Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: src/arm64/assembler-arm64.cc

Issue 1990073002: Add {lda,stl}x?r{,b,h} instructions to ARM64 assembler/disassembler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: typo Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/assembler-arm64.h ('k') | src/arm64/constants-arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/arm64/assembler-arm64.h ('k') | src/arm64/constants-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698