feat(asm): symbol-valued DATA, division slash in symbols and plain semicolons
Assisted-by: GLM 5.3 Flash
This commit is contained in:
Vendored
+21
@@ -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
|
||||
Reference in New Issue
Block a user