feat(asm): symbol-valued DATA, division slash in symbols and plain semicolons

Assisted-by: GLM 5.3 Flash
This commit is contained in:
2026-09-20 19:15:05 +02:00
parent 289cabe993
commit 6556b85abf
14 changed files with 1027 additions and 18 deletions
+21
View File
@@ -0,0 +1,21 @@
#include "textflag.h"
// The kernel exercises the ';' statement separator in a plain file, the way
// the runtime writes it ("ROLQ $3, DI; ROLQ $13, DI", "REP; MOVSQ"). Each
// statement assembles exactly as it would on a line of its own.
// func rol(x int64) int64
TEXT ·rol(SB), NOSPLIT, $0-16
ROLQ $3, DI; ROLQ $13, DI
MOVQ DI, ret+0(FP)
RET
// func move(dst, src unsafe.Pointer)
TEXT ·move(SB), NOSPLIT, $0-16
REP ; MOVSQ
RET
TEXT ·paired(SB), NOSPLIT, $0-8
XORQ AX, AX; XORQ CX, CX
MOVQ AX, ret+0(FP)
RET