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
-2
View File
@@ -1364,8 +1364,6 @@ func (b *builder) createFunctionCall(instr *ssa.CallCommon) (llvm.Value, error)
return b.createMemoryCopyCall(fn, instr.Args)
case name == "runtime.memzero":
return b.createMemoryZeroCall(instr.Args)
case name == "device/arm.ReadRegister" || name == "device/riscv.ReadRegister":
return b.createReadRegister(name, instr.Args)
case name == "device/arm.Asm" || name == "device/avr.Asm" || name == "device/riscv.Asm":
return b.createInlineAsm(instr.Args)
case name == "device/arm.AsmFull" || name == "device/avr.AsmFull" || name == "device/riscv.AsmFull":