reg: support for register casting
Adds methods for referencing sub- or super-registers. For example, for general purpose registers you can now reference As8(), As16(), ... and for vector AsX(), AsY(), AsZ(). Closes #1
This commit is contained in:
12
tests/cast/cast.s
Normal file
12
tests/cast/cast.s
Normal file
@@ -0,0 +1,12 @@
|
||||
// Code generated by command: go run asm.go -out cast.s -stubs stub.go. DO NOT EDIT.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// func Split(x uint64) (q uint64, l uint32, w uint16, b uint8)
|
||||
TEXT ·Split(SB), 0, $0-23
|
||||
MOVQ x(FP), AX
|
||||
MOVQ AX, q+8(FP)
|
||||
MOVL AX, l+16(FP)
|
||||
MOVW AX, w+20(FP)
|
||||
MOVB AL, b+22(FP)
|
||||
RET
|
||||
Reference in New Issue
Block a user