fix(asm): encode the arm64 bitfield aliases with their own opc
Assisted-by: GLM 5.3 Flash
This commit is contained in:
1 parent
8ab99c9b0c
commit
2b2a72d54e
2 files changed
+40
-1
No files matched your search
@@ -3636,7 +3636,10 @@ func encodeARM64BitfieldAlias(mnem string, baseOp uint32, ops []*ast.Operand) ([
|
||||
case "BFXIL", "BFXILW":
|
||||
immr, imms = lsb, lsb+width-1
|
||||
default: // BFI, SBFIZ, UBFIZ
|
||||
immr, imms = (-lsb)%bits, width-1
|
||||
// immr = (bits - lsb) mod bits, the toolchain's 64-r form with the
|
||||
// zero lsb folding to zero (Go's % keeps the sign, so the operand
|
||||
// order matters here).
|
||||
immr, imms = (bits-lsb)%bits, width-1
|
||||
}
|
||||
return a64wordLE(baseOp | uint32(immr)<<16 | uint32(imms)<<10 | uint32(rn)<<5 | uint32(rd)), nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user