22 lines
526 B
ArmAsm
22 lines
526 B
ArmAsm
#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
|