8185567: fix hsdis cpu to architecture mapping on various Linux platforms
authordbuck
Thu, 03 Aug 2017 17:13:57 -0400
changeset 46748 4aeae5b90e60
parent 46747 7b6570052b58
child 46749 9db1408787eb
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
hotspot/src/share/tools/hsdis/Makefile
hotspot/src/share/tools/hsdis/hsdis.c
--- a/hotspot/src/share/tools/hsdis/Makefile	Thu Aug 03 08:16:00 2017 -0400
+++ b/hotspot/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/hotspot/src/share/tools/hsdis/hsdis.c	Thu Aug 03 08:16:00 2017 -0400
+++ b/hotspot/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