github.com/Rookout/GoSDK@v0.1.48/pkg/services/assembler/regs_amd64.go (about) 1 package assembler 2 3 import ( 4 "github.com/Rookout/GoSDK/pkg/services/assembler/internal/obj/x86" 5 "golang.org/x/arch/x86/x86asm" 6 ) 7 8 var sysRegToDwarfReg = x86.AMD64DWARFRegisters 9 10 var asmRegToSysReg = map[Reg]int16{ 11 x86asm.RAX: x86.REG_AX, 12 x86asm.RCX: x86.REG_CX, 13 x86asm.RDX: x86.REG_DX, 14 x86asm.RBX: x86.REG_BX, 15 x86asm.RSP: x86.REG_SP, 16 x86asm.RBP: x86.REG_BP, 17 x86asm.RSI: x86.REG_SI, 18 x86asm.RDI: x86.REG_DI, 19 x86asm.R8: x86.REG_R8, 20 x86asm.R9: x86.REG_R9, 21 x86asm.R10: x86.REG_R10, 22 x86asm.R11: x86.REG_R11, 23 x86asm.R12: x86.REG_R12, 24 x86asm.R13: x86.REG_R13, 25 x86asm.R14: x86.REG_R14, 26 x86asm.R15: x86.REG_R15, 27 x86asm.X0: x86.REG_X0, 28 x86asm.X1: x86.REG_X1, 29 x86asm.X2: x86.REG_X2, 30 x86asm.X3: x86.REG_X3, 31 x86asm.X4: x86.REG_X4, 32 x86asm.X5: x86.REG_X5, 33 x86asm.X6: x86.REG_X6, 34 x86asm.X7: x86.REG_X7, 35 x86asm.X8: x86.REG_X8, 36 x86asm.X9: x86.REG_X9, 37 x86asm.X10: x86.REG_X10, 38 x86asm.X11: x86.REG_X11, 39 x86asm.X12: x86.REG_X12, 40 x86asm.X13: x86.REG_X13, 41 x86asm.X14: x86.REG_X14, 42 x86asm.X15: x86.REG_X15, 43 x86asm.FS: x86.REG_FS, 44 }