[aarch64-port-dev ] A bug in increment_mdp_data_at() ?

Andrew Haley aph at redhat.com
Sat Dec 27 22:58:32 UTC 2014


I think the negative case of
InterpreterMacroAssembler::increment_mdp_data_at() is wrong, and this
is a fix.  Do you agree?

Ta,
Andrew.


diff -r 7896b5938a5e src/cpu/aarch64/vm/interp_masm_aarch64.cpp
--- a/src/cpu/aarch64/vm/interp_masm_aarch64.cpp        Mon Dec 22 11:24:39 2014 -0500
+++ b/src/cpu/aarch64/vm/interp_masm_aarch64.cpp        Sat Dec 27 17:49:15 2014 -0500
@@ -852,9 +852,10 @@
     // jcc(Assembler::negative, L);
     // addptr(data, (int32_t) DataLayout::counter_increment);
     // so we do this
+    ldr(rscratch1, addr);
     subs(rscratch1, rscratch1, (unsigned)DataLayout::counter_increment);
     Label L;
-    br(Assembler::CS, L);       // skip store if counter overflow
+    br(Assembler::LO, L);       // skip store if counter underflow
     str(rscratch1, addr);
     bind(L);
   } else {



More information about the aarch64-port-dev mailing list