github.com/tencent/goom@v1.0.1/internal/iface/jmp_amd64.go (about) 1 package iface 2 3 // jmpWithRdx Assembles a jump to a clourse function value 4 // dx DX 寄存器 5 func jmpWithRdx(dx uintptr) (value []byte) { 6 return []byte{ 7 0x48, 0xBA, 8 byte(dx), 9 byte(dx >> 8), 10 byte(dx >> 16), 11 byte(dx >> 24), 12 byte(dx >> 32), 13 byte(dx >> 40), 14 byte(dx >> 48), 15 byte(dx >> 56), // movabs rdx,dx 16 0xFF, 0x22, // jmp QWORD PTR [rdx] 17 } 18 }