feat(asm): encode the LDEORAL acquire variants

Assisted-by: GLM 5.3 Flash
This commit is contained in:
petrbalvin committed 2026-10-07 02:36:24 +02:00
1 parent 458d981f31
commit a6bd9c1ebe
2 files changed
+6 -1

No files matched your search

+2
View File
@@ -869,7 +869,9 @@ func init() {
"LDEORAD": 0xf8a02000,
"LDEORAH": 0x78a02000,
"LDEORALB": 0x38e02000,
"LDEORALD": 0xf8e02000,
"LDEORALH": 0x78e02000,
"LDEORALW": 0xb8e02000,
"LDEORAW": 0xb8a02000,
"LDEORB": 0x38202000,
"LDEORD": 0xf8202000,
+4 -1
View File
@@ -652,7 +652,8 @@ func TestArm64PairLoadStore(t *testing.T) {
// families.
func TestArm64AcquireRelease(t *testing.T) {
got := arm64Words(t, "\tLDAR (R27), R22\n\tLDARB (R25), R2\n\tLDARW (R12), R29\n\tSTLR R3, (R24)\n\tSTLRB R11, (R22)\n"+
"\tCASALD R5, (R6), R7\n\tLDADDALD R5, (R6), R7\n\tLDCLRALB R5, (R6), R7\n\tLDORALD R5, (RSP), R7\n\tSWPALW R5, (R6), R7\n")
"\tCASALD R5, (R6), R7\n\tLDADDALD R5, (R6), R7\n\tLDCLRALB R5, (R6), R7\n\tLDORALD R5, (RSP), R7\n\tSWPALW R5, (R6), R7\n"+
"\tLDEORALD R5, (R6), R7\n\tLDEORALW R5, (RSP), R7\n")
want := []uint32{
0xc8dfff76, // LDAR R22, (R27)
0x08dfff22, // LDARB R2, (R25)
@@ -664,6 +665,8 @@ func TestArm64AcquireRelease(t *testing.T) {
0x38e510c7, // LDCLRALB R7, (R6), R5
0xf8e533e7, // LDORALD R7, (RSP), R5
0xb8e580c7, // SWPALW R7, (R6), R5
0xf8e520c7, // LDEORALD R7, (R6), R5
0xb8e523e7, // LDEORALW R7, (RSP), R5
0xd65f03c0,
}
if len(got) != len(want) {