changeset 13444:862767b4c105

8185567: fix hsdis cpu to architecture mapping on various Linux platforms Summary: Add "arm" target to hsdis.c and fix several cpu to architecture mappings in Makefile Reviewed-by: dholmes, vlivanov, tbell
author dbuck
date Thu, 03 Aug 2017 17:13:57 -0400
parents 9b011e7527d6
children 70ae4e940b3b
files src/share/tools/hsdis/Makefile src/share/tools/hsdis/hsdis.c
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/tools/hsdis/Makefile	Thu Aug 03 08:16:00 2017 -0400
+++ b/src/share/tools/hsdis/Makefile	Thu Aug 03 17:13:57 2017 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -70,14 +70,18 @@
 else   #linux
 CPU             = $(shell uname -m)
 ARCH1=$(CPU:x86_64=amd64)
-ARCH=$(ARCH1:i686=i386)
+ARCH2=$(ARCH1:i686=i386)
+ARCH=$(ARCH2:sparc64=sparcv9)
 ifdef LP64
 CFLAGS/sparcv9	+= -m64
 CFLAGS/amd64	+= -m64
 CFLAGS/ppc64	+= -m64
 CFLAGS/ppc64le  += -m64 -DABI_ELFv2
 else
-ARCH=$(ARCH1:amd64=i386)
+ARCH=$(ARCH2:amd64=i386)
+ifneq ($(findstring arm,$(ARCH)),)
+ARCH=arm
+endif
 CFLAGS/i386	+= -m32
 CFLAGS/sparc	+= -m32
 endif
--- a/src/share/tools/hsdis/hsdis.c	Thu Aug 03 08:16:00 2017 -0400
+++ b/src/share/tools/hsdis/hsdis.c	Thu Aug 03 17:13:57 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -465,6 +465,9 @@
 #if  defined(LIBARCH_ppc64) || defined(LIBARCH_ppc64le)
   res = "powerpc:common64";
 #endif
+#ifdef LIBARCH_arm
+  res = "arm";
+#endif
 #ifdef LIBARCH_aarch64
   res = "aarch64";
 #endif