diff --git a/compiler/inlineasm.go b/compiler/inlineasm.go index 237c430abe..9f62ec4efc 100644 --- a/compiler/inlineasm.go +++ b/compiler/inlineasm.go @@ -38,10 +38,10 @@ func (b *builder) createInlineAsm(args []ssa.Value) (llvm.Value, error) { // provided immediately. For example: // // arm.AsmFull( -// "str {value}, {result}", +// "str {value}, [{result}]", // map[string]interface{}{ -// "value": 1 -// "result": &dest, +// "value": 1, +// "result": uintptr(unsafe.Pointer(&dest)), // }) func (b *builder) createInlineAsmFull(instr *ssa.CallCommon) (llvm.Value, error) { asmString := constant.StringVal(instr.Args[0].(*ssa.Const).Value) diff --git a/src/device/arm/arm.go b/src/device/arm/arm.go index 1f26b7fe95..fdd14ab7b6 100644 --- a/src/device/arm/arm.go +++ b/src/device/arm/arm.go @@ -48,10 +48,10 @@ func Asm(asm string) // recognizes template values in the form {name}, like so: // // arm.AsmFull( -// "str {value}, {result}", +// "str {value}, [{result}]", // map[string]interface{}{ -// "value": 1 -// "result": &dest, +// "value": 1, +// "result": uintptr(unsafe.Pointer(&dest)), // }) // // You can use {} in the asm string (which expands to a register) to set the diff --git a/src/device/arm64/arm64.go b/src/device/arm64/arm64.go index 7e8cea6c7d..59e371ff54 100644 --- a/src/device/arm64/arm64.go +++ b/src/device/arm64/arm64.go @@ -10,10 +10,10 @@ func Asm(asm string) // recognizes template values in the form {name}, like so: // // arm.AsmFull( -// "str {value}, {result}", +// "str {value}, [{result}]", // map[string]interface{}{ -// "value": 1 -// "result": &dest, +// "value": 1, +// "result": uintptr(unsafe.Pointer(&dest)), // }) // // You can use {} in the asm string (which expands to a register) to set the diff --git a/src/device/asm.go b/src/device/asm.go index 49ddbc3ef2..87ae5e6fab 100644 --- a/src/device/asm.go +++ b/src/device/asm.go @@ -10,10 +10,10 @@ func Asm(asm string) // recognizes template values in the form {name}, like so: // // arm.AsmFull( -// "str {value}, {result}", +// "str {value}, [{result}]", // map[string]interface{}{ -// "value": 1 -// "result": &dest, +// "value": 1, +// "result": uintptr(unsafe.Pointer(&dest)), // }) // // You can use {} in the asm string (which expands to a register) to set the diff --git a/src/device/riscv/riscv.go b/src/device/riscv/riscv.go index 1c3c3e63a3..2097f7326d 100644 --- a/src/device/riscv/riscv.go +++ b/src/device/riscv/riscv.go @@ -10,10 +10,10 @@ func Asm(asm string) // recognizes template values in the form {name}, like so: // // arm.AsmFull( -// "st {value}, {result}", +// "str {value}, [{result}]", // map[string]interface{}{ -// "value": 1 -// "result": &dest, +// "value": 1, +// "result": uintptr(unsafe.Pointer(&dest)), // }) // // You can use {} in the asm string (which expands to a register) to set the