Skip to content

Commit a34ab39

Browse files
author
duke
committedSep 24, 2021
Automatic merge of jdk:master into master
2 parents 82535b5 + 718eff2 commit a34ab39

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed
 

‎src/hotspot/cpu/arm/stubGenerator_arm.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -635,17 +635,17 @@ class StubGenerator: public StubCodeGenerator {
635635
Register result_hi = R1;
636636
Register src = R0;
637637

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()) {
642639
__ ldrexd(result_lo, Address(src));
643640
__ 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));
645645
} else {
646646
__ stop("Atomic load(jlong) unsupported on this platform");
647-
__ bx(LR);
648647
}
648+
__ bx(LR);
649649

650650
return start;
651651
}
@@ -662,22 +662,22 @@ class StubGenerator: public StubCodeGenerator {
662662
Register scratch_hi = R3; /* After load from stack */
663663
Register result = R3;
664664

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()) {
669666
__ mov(Rtemp, dest); // get dest to Rtemp
670667
Label retry;
671668
__ bind(retry);
672669
__ ldrexd(scratch_lo, Address(Rtemp));
673670
__ strexd(result, R0, Address(Rtemp));
674671
__ rsbs(result, result, 1);
675672
__ 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));
677677
} else {
678678
__ stop("Atomic store(jlong) unsupported on this platform");
679-
__ bx(LR);
680679
}
680+
__ bx(LR);
681681

682682
return start;
683683
}

0 commit comments

Comments
 (0)
Please sign in to comment.