feat(asm): add vpcmp compare, full opmask set, legacy sse integers and bswap
Test / vet (push) Successful in 47s
Test / test (push) Successful in 2m35s
Test / build (push) Successful in 41s

Assisted-by: GLM 5.3
This commit is contained in:
2026-08-27 22:41:03 +02:00
parent 163480e283
commit 19a26e049b
5 changed files with 170 additions and 32 deletions
+8 -2
View File
@@ -82,8 +82,12 @@ func (e *enc) encode(mnem string, ops []Operand) error {
if m, ok := sseShufTable[upper]; ok {
return e.encodeSSEShuf(m, ops)
}
// Legacy SSE packed binary ops and imm8 shuffles (ADDPS/MULPS/
// SHUFPS/PSHUFD/...): no size suffix, dispatch on the full name.
// Legacy SSE packed binaries dispatch on the full name: the packed
// integer mnemonics carry real width suffixes (PADDB/PCMPGTW/...),
// which the size split must not eat.
if m, ok := sseBinTable[upper]; ok {
return e.encodeSSEBin(m, ops)
}
if m, ok := sseBinTable[base]; ok {
return e.encodeSSEBin(m, ops)
}
@@ -108,6 +112,8 @@ func (e *enc) encode(mnem string, ops []Operand) error {
return e.encodePushPop(ops, false)
case "BSF", "BSR", "LZCNT", "TZCNT", "POPCNT":
return e.encodeCount(base, ops, size)
case "BSWAP":
return e.encodeBswap(ops, size)
case "MOVBLZX", "MOVBQZX", "MOVWLZX", "MOVWQZX", "MOVWLSX", "MOVLQSX":
return e.encodeMovExtend(base, ops)
case "CVTSL2SD", "CVTSQ2SD":