feat(parser): bracket register ranges, index-only VSIB and bare trailing immediates

Assisted-by: GLM 5.3 Flash
This commit is contained in:
2026-09-20 22:02:19 +02:00
parent 81d4bd81e4
commit 522e6f2ae8
6 changed files with 255 additions and 13 deletions
+21
View File
@@ -0,0 +1,21 @@
#include "textflag.h"
// The index-only VSIB shapes from amd64enc_extra.s: a scaled vector index
// addresses memory with no base register. The comments record the bytes the
// Go assembler emits.
TEXT asmtest(SB), DUPOK|NOSPLIT, $0
VPGATHERDQ Y0, 8(X4*1), Y6 // c4e2fd90342508000000
VPGATHERDQ Y0,-8(X4*1), Y6 // c4e2fd903425f8ffffff
VPGATHERDQ Y0, 0(X4*1), Y6 // c4e2fd90342500000000
VPGATHERDQ Y0, 664(X4*1), Y6 // c4e2fd90342598020000
VPGATHERDQ Y0, 8(X14*1), Y6 // c4a2fd90343508000000
VPGATHERDQ Y0, 8(X4*8), Y6 // c4e2fd9034e508000000
VGATHERDPD Y0, 8(X4*1), Y6 // c4e2fd92342508000000
VPGATHERDD X0, 8(X4*1), X6 // c4e27d90342508000000
VPGATHERDD Y0, 8(Y4*1), Y6 // c4e2fd90342508000000
// The bare trailing immediate of math/floor_amd64.s: the toolchain
// reads the final 1 as $1.
CMPSD X1, X0, 1 // f20fc2c101
CMPSD X1, X0, 2 // f20fc2c102
RET