fix(test): add arm64 encoding tests for Go 1.26 coverage compatibility
Assisted-by: MiMo V2.5 Pro
This commit is contained in:
@@ -214,7 +214,13 @@ func encodeARM64Instr(instr *ast.Instr, pc int, offsets map[string]int, fi arm64
|
||||
}
|
||||
|
||||
// Register-register data processing.
|
||||
// ASR/LSL/LSR/ROR with immediate operands use bitfield encoding (SBFM/UBFM).
|
||||
if enc, ok := a64InstrTable[mnem]; ok && enc.format == a64FDPSR {
|
||||
isShift := mnem == "ASR" || mnem == "ASRW" || mnem == "LSL" || mnem == "LSLW" ||
|
||||
mnem == "LSR" || mnem == "LSRW" || mnem == "ROR" || mnem == "RORW"
|
||||
if isShift && len(ops) >= 2 && isImmOperand(ops[0]) {
|
||||
return encodeARM64Bitfield(mnem, enc.op, ops)
|
||||
}
|
||||
return encodeARM64DPSR(mnem, enc.op, ops)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user