feat(asm): add VEX shuffle, extract, permute, move and FP forms
Assisted-by: Qwen 3.8 Max Preview
This commit is contained in:
@@ -136,6 +136,17 @@ func (e *enc) encodeALU(op struct {
|
||||
return e.encodeALUImm(op.digit, dst, int64(imm), size)
|
||||
}
|
||||
|
||||
// CMP accepts the immediate in the second position too — CMPL CX, $31 is
|
||||
// the form the Go assembler itself accepts — and encodes it identically
|
||||
// (CMP r/m, imm sets the flags as first − second). No other ALU op takes
|
||||
// an immediate destination.
|
||||
if imm, ok := dst.(Imm); ok {
|
||||
if op.digit != 7 {
|
||||
return fmt.Errorf("immediate must be the source operand")
|
||||
}
|
||||
return e.encodeALUImm(op.digit, src, int64(imm), size)
|
||||
}
|
||||
|
||||
dstReg, dstIsReg := dst.(Reg)
|
||||
srcReg, srcIsReg := src.(Reg)
|
||||
switch {
|
||||
|
||||
Reference in New Issue
Block a user