fix(amd64): correct guard displacements, frameless FP offsets and immediate ranges
Assisted-by: GLM 5.3
This commit is contained in:
+8
-3
@@ -36,10 +36,15 @@ func Encodable(mnemonic string) bool {
|
||||
}
|
||||
|
||||
// CMOV carries size then condition (CMOVLGT); SET carries the condition
|
||||
// alone (SETNE).
|
||||
// alone (SETNE). The size letter is checked exactly as encodeCmov does,
|
||||
// so a spelling like CMOVBGT is not reported encodable when Encode
|
||||
// would reject it.
|
||||
if rest, ok := strings.CutPrefix(upper, "CMOV"); ok && len(rest) >= 2 {
|
||||
if _, ok := jccMap[rest[1:]]; ok {
|
||||
return true
|
||||
switch rest[0] {
|
||||
case 'W', 'L', 'Q':
|
||||
if _, ok := jccMap[rest[1:]]; ok {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
if rest, ok := strings.CutPrefix(upper, "SET"); ok {
|
||||
|
||||
Reference in New Issue
Block a user