fix(asm): set the CASALH opcode bit fifteen

The CASALH entry carried the CASB/CASH opcode pattern where the acquire
forms take the full fixed field, so the word differed from the
toolchain's in one opcode bit.  Pinned against the oracle word.

Assisted-by: GLM 5.3 Flash
This commit is contained in:
petrbalvin committed 2026-10-07 02:36:24 +02:00
1 parent a0fa7e802c
commit a344399b81
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -661,7 +661,8 @@ func TestArm64PairLoadStore(t *testing.T) {
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"+
"\tLDEORALD R5, (R6), R7\n\tLDEORALW R5, (RSP), R7\n")
"\tLDEORALD R5, (R6), R7\n\tLDEORALW R5, (RSP), R7\n"+
"\tCASALH ZR, (R5), R8\n")
want := []uint32{
0xc8dfff76, // LDAR R22, (R27)
0x08dfff22, // LDARB R2, (R25)
@@ -675,6 +676,7 @@ func TestArm64AcquireRelease(t *testing.T) {
0xb8e580c7, // SWPALW R7, (R6), R5
0xf8e520c7, // LDEORALD R7, (R6), R5
0xb8e523e7, // LDEORALW R7, (RSP), R5
0x48fffca8, // CASALH R8, (R5), ZR
0xd65f03c0,
}
if len(got) != len(want) {