Skip to content

Commit 1906ab1

Browse files
committed
docs:fix deprecated AsmFull comment
1 parent deb48dd commit 1906ab1

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

compiler/inlineasm.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ func (b *builder) createInlineAsm(args []ssa.Value) (llvm.Value, error) {
3838
// provided immediately. For example:
3939
//
4040
// arm.AsmFull(
41-
// "str {value}, {result}",
41+
// "str {value}, [{result}]",
4242
// map[string]interface{}{
43-
// "value": 1
44-
// "result": &dest,
43+
// "value": 1,
44+
// "result": uintptr(unsafe.Pointer(&dest)),
4545
// })
4646
func (b *builder) createInlineAsmFull(instr *ssa.CallCommon) (llvm.Value, error) {
4747
asmString := constant.StringVal(instr.Args[0].(*ssa.Const).Value)

src/device/arm/arm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ func Asm(asm string)
4848
// recognizes template values in the form {name}, like so:
4949
//
5050
// arm.AsmFull(
51-
// "str {value}, {result}",
51+
// "str {value}, [{result}]",
5252
// map[string]interface{}{
5353
// "value": 1
54-
// "result": &dest,
54+
// "result": uintptr(unsafe.Pointer(&dest)),
5555
// })
5656
//
5757
// You can use {} in the asm string (which expands to a register) to set the

src/device/arm64/arm64.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ func Asm(asm string)
1010
// recognizes template values in the form {name}, like so:
1111
//
1212
// arm.AsmFull(
13-
// "str {value}, {result}",
13+
// "str {value}, [{result}]",
1414
// map[string]interface{}{
1515
// "value": 1
16-
// "result": &dest,
16+
// "result": uintptr(unsafe.Pointer(&dest)),
1717
// })
1818
//
1919
// You can use {} in the asm string (which expands to a register) to set the

src/device/asm.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ func Asm(asm string)
1010
// recognizes template values in the form {name}, like so:
1111
//
1212
// arm.AsmFull(
13-
// "str {value}, {result}",
13+
// "str {value}, [{result}]",
1414
// map[string]interface{}{
15-
// "value": 1
16-
// "result": &dest,
15+
// "value": 1,
16+
// "result": uintptr(unsafe.Pointer(&dest)),
1717
// })
1818
//
1919
// You can use {} in the asm string (which expands to a register) to set the

src/device/riscv/riscv.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ func Asm(asm string)
1010
// recognizes template values in the form {name}, like so:
1111
//
1212
// arm.AsmFull(
13-
// "st {value}, {result}",
13+
// "str {value}, [{result}]",
1414
// map[string]interface{}{
1515
// "value": 1
16-
// "result": &dest,
16+
// "result": uintptr(unsafe.Pointer(&dest)),
1717
// })
1818
//
1919
// You can use {} in the asm string (which expands to a register) to set the

0 commit comments

Comments
 (0)