< prev index next >

src/hotspot/cpu/arm/macroAssembler_arm.cpp

Print this page
rev 54026 : 8213845: ARM32: Interpreter doesn't call result handler after native calls
Summary: Fix mapping of native jboolean result to 0..1 on ARM32
Reviewed-by: aph
Contributed-by: christoph.goettschkes@microdoc.com


1212   }
1213 
1214   ldr(R2, addr);                                 // oop to verify
1215   mov(R1, SP);                                   // register save area
1216 
1217   Label done;
1218   InlinedString Lmsg(msg_buffer);
1219   ldr_literal(R0, Lmsg);                         // message
1220 
1221   // call indirectly to solve generation ordering problem
1222   ldr_global_ptr(Rtemp, StubRoutines::verify_oop_subroutine_entry_address());
1223   call(Rtemp);
1224 
1225   restore_all_registers();
1226 
1227   b(done);
1228   bind_literal(Lmsg);
1229   bind(done);
1230 }
1231 









1232 void MacroAssembler::null_check(Register reg, Register tmp, int offset) {
1233   if (needs_explicit_null_check(offset)) {
1234 #ifdef AARCH64
1235     ldr(ZR, Address(reg));
1236 #else
1237     assert_different_registers(reg, tmp);
1238     if (tmp == noreg) {
1239       tmp = Rtemp;
1240       assert((! Thread::current()->is_Compiler_thread()) ||
1241              (! (ciEnv::current()->task() == NULL)) ||
1242              (! (ciEnv::current()->comp_level() == CompLevel_full_optimization)),
1243              "Rtemp not available in C2"); // explicit tmp register required
1244       // XXX: could we mark the code buffer as not compatible with C2 ?
1245     }
1246     ldr(tmp, Address(reg));
1247 #endif
1248   }
1249 }
1250 
1251 // Puts address of allocated object into register `obj` and end of allocated object into register `obj_end`.




1212   }
1213 
1214   ldr(R2, addr);                                 // oop to verify
1215   mov(R1, SP);                                   // register save area
1216 
1217   Label done;
1218   InlinedString Lmsg(msg_buffer);
1219   ldr_literal(R0, Lmsg);                         // message
1220 
1221   // call indirectly to solve generation ordering problem
1222   ldr_global_ptr(Rtemp, StubRoutines::verify_oop_subroutine_entry_address());
1223   call(Rtemp);
1224 
1225   restore_all_registers();
1226 
1227   b(done);
1228   bind_literal(Lmsg);
1229   bind(done);
1230 }
1231 
1232 void MacroAssembler::c2bool(Register x) {
1233   tst(x, 0xff);   // Only look at the lowest byte
1234 #ifdef AARCH64
1235   cset(x, ne);
1236 #else
1237   mov(x, 1, ne);
1238 #endif 
1239 }
1240 
1241 void MacroAssembler::null_check(Register reg, Register tmp, int offset) {
1242   if (needs_explicit_null_check(offset)) {
1243 #ifdef AARCH64
1244     ldr(ZR, Address(reg));
1245 #else
1246     assert_different_registers(reg, tmp);
1247     if (tmp == noreg) {
1248       tmp = Rtemp;
1249       assert((! Thread::current()->is_Compiler_thread()) ||
1250              (! (ciEnv::current()->task() == NULL)) ||
1251              (! (ciEnv::current()->comp_level() == CompLevel_full_optimization)),
1252              "Rtemp not available in C2"); // explicit tmp register required
1253       // XXX: could we mark the code buffer as not compatible with C2 ?
1254     }
1255     ldr(tmp, Address(reg));
1256 #endif
1257   }
1258 }
1259 
1260 // Puts address of allocated object into register `obj` and end of allocated object into register `obj_end`.


< prev index next >