ARM: Replace a bunch of numeric constants

Andrew Haley aph at redhat.com
Wed Mar 14 02:47:48 PDT 2012


Replace some obscure constants with symbols.  Committed to trunk
thusly.

Andrew.


2012-03-14  Andrew Haley  <aph at redhat.com>

	* arm_port/hotspot/src/cpu/zero/vm/bytecodes_arm.def (ldc, ldc_w):
	Replace numeric constants for constant pool with symbols.
	* arm_port/hotspot/src/cpu/zero/vm/cppInterpreter_arm.S (build_frame):
	Likewise.
	(fast_native_entry): Likewise.

diff -r fd60dc8238c7 arm_port/hotspot/src/cpu/zero/vm/bytecodes_arm.def
--- a/arm_port/hotspot/src/cpu/zero/vm/bytecodes_arm.def	Tue Mar 13 16:56:04
2012 +0000
+++ b/arm_port/hotspot/src/cpu/zero/vm/bytecodes_arm.def	Wed Mar 14 09:29:13
2012 +0000
@@ -2091,7 +2091,7 @@
 	bne	2f
 	add	r0, tmp1, #CONSTANTPOOL_BASE
 	ldr	r0, [r0, lr, lsl #2]
-	ldr	r1, [r0, #60]
+	ldr	r1, [r0, #KLASS_PART + KLASS_JAVA_MIRROR]
 	PUSH	r1
 	DISPATCH	0
 2:
@@ -2147,7 +2147,7 @@
 	bne	2f
 	add	r0, r2, #CONSTANTPOOL_BASE
 	ldr	r0, [r0, lr, lsl #2]
-	ldr	r1, [r0, #60]
+	ldr	r1, [r0, #KLASS_PART + KLASS_JAVA_MIRROR]
 	PUSH	r1
 	DISPATCH	0
 2:
diff -r fd60dc8238c7 arm_port/hotspot/src/cpu/zero/vm/cppInterpreter_arm.S
--- a/arm_port/hotspot/src/cpu/zero/vm/cppInterpreter_arm.S	Tue Mar 13
16:56:04 2012 +0000
+++ b/arm_port/hotspot/src/cpu/zero/vm/cppInterpreter_arm.S	Wed Mar 14
09:29:13 2012 +0000
@@ -737,8 +737,8 @@
 	tst	r2, #JVM_ACC_STATIC
 	ldrne	r2, [r1, #METHOD_CONSTANTS]
 	ldreq	r2, [r6, #0]
-	ldrne	r2, [r2, #16]
-	ldrne	r2, [r2, #60]
+	ldrne	r2, [r2, #CONSTANTPOOL_POOL_HOLDER]
+	ldrne	r2, [r2, #KLASS_PART + KLASS_JAVA_MIRROR]
 	str	r2, [r7, #4]
 .L10:
 	ldr	r2, [r3, #8]
@@ -1125,9 +1125,9 @@
 	beq	.do_fast_copy_args

 	ldr	r2, [r11, #METHOD_CONSTANTS]
-	ldr	r2, [r2, #16]
+	ldr	r2, [r2, #CONSTANTPOOL_POOL_HOLDER]
 	str	r3, [lr], #4
-	ldr	r2, [r2, #60]
+	ldr	r2, [r2, #KLASS_PART + KLASS_JAVA_MIRROR]
 	add	r1, r1, #4
 	str	r2, [r3]

@@ -2861,9 +2861,9 @@
 	tst	r3, #JVM_ACC_STATIC
 	ldrne	r3, [r0, #METHOD_CONSTANTS]
 	ldreq	sl, [locals, #0]
-	ldrne	r2, [r3, #16]
+	ldrne	r2, [r3, #CONSTANTPOOL_POOL_HOLDER]
 	ldr	tmp1, [istate, #ISTATE_MONITOR_BASE]
-	ldrne	sl, [r2, #60]
+	ldrne	sl, [r2, #KLASS_PART + KLASS_JAVA_MIRROR]
 	ldr	r3, [sl, #0]
 	orr	tmp_xxx, r3, #1
 	str	tmp_xxx, [tmp1, #-8]!



More information about the distro-pkg-dev mailing list