tests/alloc/gp8: allocator test using all 8-bit registers (#102)

Updates #43
This commit is contained in:
Michael McLoughlin
2019-12-20 15:31:35 -08:00
committed by GitHub
parent 15d6a9a17e
commit cfc6ecac41
5 changed files with 107 additions and 0 deletions

45
tests/alloc/gp8/gp8.s Normal file
View File

@@ -0,0 +1,45 @@
// Code generated by command: go run asm.go -out gp8.s -stubs stub.go. DO NOT EDIT.
#include "textflag.h"
// func GP8() uint8
TEXT ·GP8(SB), NOSPLIT, $0-1
MOVB $0x01, AL
MOVB $0x02, CL
MOVB $0x03, DL
MOVB $0x04, BL
MOVB $0x05, AH
MOVB $0x06, CH
MOVB $0x07, DH
MOVB $0x08, BH
MOVB $0x09, BP
MOVB $0x0a, SI
MOVB $0x0b, DI
MOVB $0x0c, R8
MOVB $0x0d, R9
MOVB $0x0e, R10
MOVB $0x0f, R11
MOVB $0x10, R12
MOVB $0x11, R13
MOVB $0x12, R14
MOVB $0x13, R15
ADDB CL, AL
ADDB DL, AL
ADDB BL, AL
ADDB AH, AL
ADDB CH, AL
ADDB DH, AL
ADDB BH, AL
ADDB BP, AL
ADDB SI, AL
ADDB DI, AL
ADDB R8, AL
ADDB R9, AL
ADDB R10, AL
ADDB R11, AL
ADDB R12, AL
ADDB R13, AL
ADDB R14, AL
ADDB R15, AL
MOVB AL, ret+0(FP)
RET