Index: src/arm64/assembler-arm64.cc |
diff --git a/src/arm64/assembler-arm64.cc b/src/arm64/assembler-arm64.cc |
index 91563a4227afd0a54591a8eb4289a402acacb40c..6fddd6f29396841540e4cc17f909ae058d02671c 100644 |
--- a/src/arm64/assembler-arm64.cc |
+++ b/src/arm64/assembler-arm64.cc |
@@ -1716,6 +1716,83 @@ void Assembler::ldr(const CPURegister& rt, const Immediate& imm) { |
ldr_pcrel(rt, 0); |
} |
+void Assembler::ldar(const Register& rt, const Register& rn) { |
+ DCHECK(rn.Is64Bits()); |
+ LoadStoreAcquireReleaseOp op = rt.Is32Bits() ? LDAR_w : LDAR_x; |
+ Emit(op | Rs(x31) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
+ |
+void Assembler::ldaxr(const Register& rt, const Register& rn) { |
+ DCHECK(rn.Is64Bits()); |
+ LoadStoreAcquireReleaseOp op = rt.Is32Bits() ? LDAXR_w : LDAXR_x; |
+ Emit(op | Rs(x31) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
+ |
+void Assembler::stlr(const Register& rt, const Register& rn) { |
+ DCHECK(rn.Is64Bits()); |
+ LoadStoreAcquireReleaseOp op = rt.Is32Bits() ? STLR_w : STLR_x; |
+ Emit(op | Rs(x31) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
+ |
+void Assembler::stlxr(const Register& rs, const Register& rt, |
+ const Register& rn) { |
+ DCHECK(rs.Is32Bits()); |
+ DCHECK(rn.Is64Bits()); |
+ LoadStoreAcquireReleaseOp op = rt.Is32Bits() ? STLXR_w : STLXR_x; |
+ Emit(op | Rs(rs) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
+ |
+void Assembler::ldarb(const Register& rt, const Register& rn) { |
+ DCHECK(rt.Is32Bits()); |
+ DCHECK(rn.Is64Bits()); |
+ Emit(LDAR_b | Rs(x31) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
+ |
+void Assembler::ldaxrb(const Register& rt, const Register& rn) { |
+ DCHECK(rt.Is32Bits()); |
+ DCHECK(rn.Is64Bits()); |
+ Emit(LDAXR_b | Rs(x31) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
+ |
+void Assembler::stlrb(const Register& rt, const Register& rn) { |
+ DCHECK(rt.Is32Bits()); |
+ DCHECK(rn.Is64Bits()); |
+ Emit(STLR_b | Rs(x31) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
+ |
+void Assembler::stlxrb(const Register& rs, const Register& rt, |
+ const Register& rn) { |
+ DCHECK(rs.Is32Bits()); |
+ DCHECK(rt.Is32Bits()); |
+ DCHECK(rn.Is64Bits()); |
+ Emit(STLXR_b | Rs(rs) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
+ |
+void Assembler::ldarh(const Register& rt, const Register& rn) { |
+ DCHECK(rt.Is32Bits()); |
+ DCHECK(rn.Is64Bits()); |
+ Emit(LDAR_h | Rs(x31) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
+ |
+void Assembler::ldaxrh(const Register& rt, const Register& rn) { |
+ DCHECK(rt.Is32Bits()); |
+ DCHECK(rn.Is64Bits()); |
+ Emit(LDAXR_h | Rs(x31) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
+ |
+void Assembler::stlrh(const Register& rt, const Register& rn) { |
+ DCHECK(rt.Is32Bits()); |
+ DCHECK(rn.Is64Bits()); |
+ Emit(STLR_h | Rs(x31) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
+ |
+void Assembler::stlxrh(const Register& rs, const Register& rt, |
+ const Register& rn) { |
+ DCHECK(rs.Is32Bits()); |
+ DCHECK(rt.Is32Bits()); |
+ DCHECK(rn.Is64Bits()); |
+ Emit(STLXR_h | Rs(rs) | Rt2(x31) | Rn(rn) | Rt(rt)); |
+} |
void Assembler::mov(const Register& rd, const Register& rm) { |
// Moves involving the stack pointer are encoded as add immediate with |