all: replace ReadRegister with AsmFull inline assembly

This makes AsmFull more powerful (by supporting return values) and
avoids a compiler builtin.
This commit is contained in:
Ayke van Laethem
2020-04-06 17:06:34 +02:00
committed by Ron Evans
parent 9342e73ae1
commit 6389e45d99
8 changed files with 66 additions and 55 deletions
+4 -1
View File
@@ -15,4 +15,7 @@ func Asm(asm string)
// "value": 1
// "result": &dest,
// })
func AsmFull(asm string, regs map[string]interface{})
//
// You can use {} in the asm string (which expands to a register) to set the
// return value.
func AsmFull(asm string, regs map[string]interface{}) uintptr