@@ -635,17 +635,17 @@ class StubGenerator: public StubCodeGenerator {
635
635
Register result_hi = R1;
636
636
Register src = R0;
637
637
638
- if (!os::is_MP ()) {
639
- __ ldmia (src, RegisterSet (result_lo, result_hi));
640
- __ bx (LR);
641
- } else if (VM_Version::supports_ldrexd ()) {
638
+ if (VM_Version::supports_ldrexd ()) {
642
639
__ ldrexd (result_lo, Address (src));
643
640
__ clrex (); // FIXME: safe to remove?
644
- __ bx (LR);
641
+ } else if (!os::is_MP ()) {
642
+ // Last-ditch attempt: we are allegedly running on uni-processor.
643
+ // Load the thing non-atomically and hope for the best.
644
+ __ ldmia (src, RegisterSet (result_lo, result_hi));
645
645
} else {
646
646
__ stop (" Atomic load(jlong) unsupported on this platform" );
647
- __ bx (LR);
648
647
}
648
+ __ bx (LR);
649
649
650
650
return start;
651
651
}
@@ -662,22 +662,22 @@ class StubGenerator: public StubCodeGenerator {
662
662
Register scratch_hi = R3; /* After load from stack */
663
663
Register result = R3;
664
664
665
- if (!os::is_MP ()) {
666
- __ stmia (dest, RegisterSet (newval_lo, newval_hi));
667
- __ bx (LR);
668
- } else if (VM_Version::supports_ldrexd ()) {
665
+ if (VM_Version::supports_ldrexd ()) {
669
666
__ mov (Rtemp, dest); // get dest to Rtemp
670
667
Label retry;
671
668
__ bind (retry);
672
669
__ ldrexd (scratch_lo, Address (Rtemp));
673
670
__ strexd (result, R0, Address (Rtemp));
674
671
__ rsbs (result, result, 1 );
675
672
__ b (retry, eq);
676
- __ bx (LR);
673
+ } else if (!os::is_MP ()) {
674
+ // Last-ditch attempt: we are allegedly running on uni-processor.
675
+ // Store the thing non-atomically and hope for the best.
676
+ __ stmia (dest, RegisterSet (newval_lo, newval_hi));
677
677
} else {
678
678
__ stop (" Atomic store(jlong) unsupported on this platform" );
679
- __ bx (LR);
680
679
}
680
+ __ bx (LR);
681
681
682
682
return start;
683
683
}
0 commit comments