← Back to team overview

openjdk team mailing list archive

Bug#864464: openjdk-9: Please drop armel from hotspot_archs

 

On 06/10/2017 10:24 AM, peter green wrote:
> From some googling it seems that PLD is just a cache hint instruction, so afaict it
> should be ok just to ifdef it out when building for CPUs that don't support it.

I gave it a short (patches for disabling "bkpt" and "pld" attached), but ran into
yet another problem with an unresolvable linker symbol:

/usr/bin/printf "* For target hotspot_variant-server_libjvm_gtest_objs_BUILD_GTEST_LIBJVM_link:\n"
* For target hotspot_variant-server_libjvm_gtest_objs_BUILD_GTEST_LIBJVM_link:
(/bin/grep -v -e "^Note: including file:" <
/home/glaubitz/openjdk-9/openjdk-9-9~b170/build/make-support/failure-logs/hotspot_variant-server_libjvm_gtest_objs_BUILD_GTEST_LIBJVM_link.log || true) |
/usr/bin/head -n 12
/home/glaubitz/openjdk-9/openjdk-9-9~b170/build/hotspot/variant-server/libjvm/objs/c1_LIRGenerator_arm.o: In function
`LIRGenerator::do_ArithmeticOp_FPU(ArithmeticOp*)':
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp:745: undefined reference to `__aeabi_fadd_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp:745: undefined reference to `__aeabi_fsub_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp:745: undefined reference to `__aeabi_dadd_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp:745: undefined reference to `__aeabi_dsub_glibc'
/home/glaubitz/openjdk-9/openjdk-9-9~b170/build/hotspot/variant-server/libjvm/objs/c1_Runtime1_arm.o: In function `Runtime1::pd_name_for_address(unsigned char*)':
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp:1228: undefined reference to `__aeabi_fadd_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp:1228: undefined reference to `__aeabi_fsub_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp:1228: undefined reference to `__aeabi_dadd_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp:1228: undefined reference to `__aeabi_dsub_glibc'
/home/glaubitz/openjdk-9/openjdk-9-9~b170/build/hotspot/variant-server/libjvm/objs/templateTable_arm.o: In function `TemplateTable::fop2(TemplateTable::Operation)':
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/templateTable_arm.cpp:1747: undefined reference to `__aeabi_fadd_glibc'
if test `/usr/bin/wc -l <
/home/glaubitz/openjdk-9/openjdk-9-9~b170/build/make-support/failure-logs/hotspot_variant-server_libjvm_gtest_objs_BUILD_GTEST_LIBJVM_link.log` -gt 12; then
/bin/echo "   ... (rest of output omitted)" ; fi
   ... (rest of output omitted)
/usr/bin/printf "* For target hotspot_variant-server_libjvm_objs_BUILD_LIBJVM_link:\n"
* For target hotspot_variant-server_libjvm_objs_BUILD_LIBJVM_link:
(/bin/grep -v -e "^Note: including file:" <
/home/glaubitz/openjdk-9/openjdk-9-9~b170/build/make-support/failure-logs/hotspot_variant-server_libjvm_objs_BUILD_LIBJVM_link.log || true) | /usr/bin/head -n 12
/home/glaubitz/openjdk-9/openjdk-9-9~b170/build/hotspot/variant-server/libjvm/objs/c1_LIRGenerator_arm.o: In function
`LIRGenerator::do_ArithmeticOp_FPU(ArithmeticOp*)':
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp:745: undefined reference to `__aeabi_fadd_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp:745: undefined reference to `__aeabi_fsub_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp:745: undefined reference to `__aeabi_dadd_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp:745: undefined reference to `__aeabi_dsub_glibc'
/home/glaubitz/openjdk-9/openjdk-9-9~b170/build/hotspot/variant-server/libjvm/objs/c1_Runtime1_arm.o: In function `Runtime1::pd_name_for_address(unsigned char*)':
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp:1228: undefined reference to `__aeabi_fadd_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp:1228: undefined reference to `__aeabi_fsub_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp:1228: undefined reference to `__aeabi_dadd_glibc'
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp:1228: undefined reference to `__aeabi_dsub_glibc'
/home/glaubitz/openjdk-9/openjdk-9-9~b170/build/hotspot/variant-server/libjvm/objs/templateTable_arm.o: In function `TemplateTable::fop2(TemplateTable::Operation)':
./src/hotspot/make/./src/hotspot/src/cpu/arm/vm/templateTable_arm.cpp:1747: undefined reference to `__aeabi_fadd_glibc'
if test `/usr/bin/wc -l < /home/glaubitz/openjdk-9/openjdk-9-9~b170/build/make-support/failure-logs/hotspot_variant-server_libjvm_objs_BUILD_LIBJVM_link.log`
-gt 12; then /bin/echo "   ... (rest of output omitted)" ; fi
   ... (rest of output omitted)
/usr/bin/printf "\n* All command lines available in /home/glaubitz/openjdk-9/openjdk-9-9~b170/build/make-support/failure-logs.\n"

* All command lines available in /home/glaubitz/openjdk-9/openjdk-9-9~b170/build/make-support/failure-logs.
/usr/bin/printf "=== End of repeated output ===\n"
=== End of repeated output ===
if /bin/grep -q "recipe for target .* failed" /home/glaubitz/openjdk-9/openjdk-9-9~b170/build/build.log 2> /dev/null; then /usr/bin/printf "\n=== Make failed
targets repeated here ===\n" ; /bin/grep "recipe for target .* failed" /home/glaubitz/openjdk-9/openjdk-9-9~b170/build/build.log ; /usr/bin/printf "=== End of
repeated output ===\n" ; /usr/bin/printf "\nHint: Try searching the build log for the name of the first failed target.\n" ; else /usr/bin/printf "\nNo
indication of failed target found.\n" ; /usr/bin/printf "Hint: Try searching the build log for '] Error'.\n" ; fi

=== Make failed targets repeated here ===
lib/CompileJvm.gmk:212: recipe for target '/home/glaubitz/openjdk-9/openjdk-9-9~b170/build/support/modules_libs/java.base/server/libjvm.so' failed
lib/CompileGtest.gmk:64: recipe for target '/home/glaubitz/openjdk-9/openjdk-9-9~b170/build/hotspot/variant-server/libjvm/gtest/libjvm.so' failed
make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed

So, disabling "bkpt" and "pld" is still not enough.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@xxxxxxxxxx
`. `'   Freie Universitaet Berlin - glaubitz@xxxxxxxxxxxxxxxxxxx
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
--- a/hotspot/src/os_cpu/linux_arm/vm/linux_arm_32.s~	2017-05-11 12:11:42.000000000 +0000
+++ b/hotspot/src/os_cpu/linux_arm/vm/linux_arm_32.s	2017-06-11 08:56:19.476635740 +0000
@@ -77,7 +77,6 @@
         cmp     r2, #0
         beq     disjoint_words_finish
 
-        pld     [r1, #0]
         cmp     r2, #12
         ble disjoint_words_small
 
@@ -87,7 +86,6 @@
 	blt	dw_f2b_loop_32_finish
         ldmia r1!, {r3 - r9, ip}
         nop
-	pld     [r1]
         stmia r0!, {r3 - r9, ip}
         bgt     dw_f2b_loop_32
 dw_f2b_loop_32_finish:
@@ -122,7 +120,6 @@
 	cmp	r2, #0
 	beq	conjoint_words_finish
 
-        pld     [r1, #0]
         cmp     r2, #12
         ble conjoint_words_small
 
@@ -135,7 +132,6 @@
 	blt	cw_f2b_loop_32_finish
         ldmia r1!, {r3 - r9, ip}
         nop
-	pld     [r1]
         stmia r0!, {r3 - r9, ip}
         bgt     cw_f2b_loop_32
 cw_f2b_loop_32_finish:
@@ -160,7 +156,6 @@
 	# Src and dest overlap, copy in a descending order
 cw_b2f_copy:
         add     r1, r2
-        pld     [r1, #-32]
         add     r0, r2
         .align 3
 cw_b2f_loop_32:
@@ -168,7 +163,6 @@
 	blt	cw_b2f_loop_32_finish
         ldmdb r1!, {r3-r9,ip}
         nop
-	pld     [r1, #-32]
         stmdb r0!, {r3-r9,ip}
         bgt     cw_b2f_loop_32
 cw_b2f_loop_32_finish:
@@ -206,8 +200,6 @@
         cmphi   r2, r3
         bhi     cs_b2f_copy
 
-        pld     [r1]
-
         ands    r3, r0, #3
         bne     cs_f2b_dest_u
         ands    r3, r1, #3
@@ -220,7 +212,6 @@
 	blt	cs_f2b_loop_32_finish
         ldmia r1!, {r3 - r9, ip}
         nop
-        pld     [r1]
         stmia r0!, {r3 - r9, ip}
         bgt     cs_f2b_loop_32
 cs_f2b_loop_32_finish:
@@ -274,7 +265,6 @@
         ldmia   r1!, {r4 - r7}
         orr     r3, r3, r4, lsl #16
         mov     r4, r4, lsr #16
-        pld     [r1]
         orr     r4, r4, r5, lsl #16
         mov     r5, r5, lsr #16
         orr     r5, r5, r6, lsl #16
@@ -312,7 +302,6 @@
 	# Src and dest overlap, copy in a descending order
 cs_b2f_copy:
         add     r1, r2
-        pld     [r1, #-32]
         add     r0, r2
 
         ands    r3, r0, #3
@@ -325,7 +314,6 @@
 	blt	cs_b2f_loop_32_finish
         ldmdb r1!, {r3-r9,ip}
         nop
-        pld     [r1, #-32]
         stmdb r0!, {r3-r9,ip}
         bgt     cs_b2f_loop_32
 cs_b2f_loop_32_finish:
@@ -383,7 +371,6 @@
         ldmdb   r1!, {r4 - r7}
         mov     r4, r4, lsr #16
         orr     r4, r4, r5, lsl #16
-        pld     [r1, #-32]
         mov     r5, r5, lsr #16
         orr     r5, r5, r6, lsl #16
         mov     r6, r6, lsr #16
@@ -440,7 +427,6 @@
 	cmp	r2, #0
 	beq	conjoint_longs_finish
 
-        pld     [r1, #0]
         cmp     r2, #24
         ble conjoint_longs_small
 
@@ -453,7 +439,6 @@
 	blt	cl_f2b_loop_32_finish
         ldmia r1!, {r3 - r9, ip}
         nop
-	pld     [r1]
         stmia r0!, {r3 - r9, ip}
         bgt     cl_f2b_loop_32
 cl_f2b_loop_32_finish:
@@ -478,7 +463,6 @@
 	# Src and dest overlap, copy in a descending order
 cl_b2f_copy:
         add     r1, r2
-        pld     [r1, #-32]
         add     r0, r2
         .align 3
 cl_b2f_loop_32:
@@ -486,7 +470,6 @@
 	blt	cl_b2f_loop_32_finish
         ldmdb 	r1!, {r3 - r9, ip}
         nop
-	pld     [r1]
         stmdb 	r0!, {r3 - r9, ip}
         bgt     cl_b2f_loop_32
 cl_b2f_loop_32_finish:
--- a/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp~	2017-05-11 12:11:42.000000000 +0000
+++ b/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp	2017-06-11 08:59:09.206726330 +0000
@@ -935,7 +935,7 @@
   void prefetch_read(Address addr) {
 #ifdef AARCH64
     prfm(pldl1keep, addr);
-#else
+#elif defined(__ARM_FP)
     pld(addr);
 #endif
   }
--- a/hotspot/src/cpu/arm/vm/assembler_arm_32.hpp~	2017-05-11 12:11:42.000000000 +0000
+++ b/hotspot/src/cpu/arm/vm/assembler_arm_32.hpp	2017-06-11 09:01:25.345195346 +0000
@@ -430,12 +430,16 @@
   }
 
   void pld(Address addr) {
+#if defined(__ARM_FP)
     emit_int32(0xf550f000 | addr.encoding2());
+#endif
   }
 
   void pldw(Address addr) {
+#if defined(__ARM_FP)
     assert(VM_Version::arm_arch() >= 7 && os::is_MP(), "no pldw on this processor");
     emit_int32(0xf510f000 | addr.encoding2());
+#endif
   }
 
   void svc(int imm_24, AsmCondition cond = al) {
--- a/hotspot/src/cpu/arm/vm/globalDefinitions_arm.hpp	2017-05-11 12:11:42.000000000 +0000
+++ b/hotspot/src/cpu/arm/vm/globalDefinitions_arm.hpp	2017-06-08 21:48:36.527377766 +0000
@@ -70,7 +70,7 @@
 #define C1_LIRGENERATOR_MD_HPP "c1_LIRGenerator_arm.hpp"
 
 #ifdef TARGET_COMPILER_gcc
-#ifdef ARM32
+#if defined(ARM32) && defined(__ARM_FP)
 #undef BREAKPOINT
 #define BREAKPOINT __asm__ volatile ("bkpt")
 #endif

Follow ups

References