feat(asm): add VEX shuffle, extract, permute, move and FP forms

Assisted-by: Qwen 3.8 Max Preview
This commit is contained in:
2026-07-07 13:57:53 +02:00
parent d5a4a6de45
commit 39870f91f6
9 changed files with 590 additions and 36 deletions
+11
View File
@@ -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 {