mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
c7a23183e8
Go 1.19 started reformatting code in a way that makes it more obvious how it will be rendered on pkg.go.dev. It gets it almost right, but not entirely. Therefore, I had to modify some of the comments so that they are formatted correctly.
22 lines
723 B
Go
22 lines
723 B
Go
package device
|
|
|
|
// Run the given assembly code. The code will be marked as having side effects,
|
|
// as it doesn't produce output and thus would normally be eliminated by the
|
|
// optimizer.
|
|
func Asm(asm string)
|
|
|
|
// Run the given inline assembly. The code will be marked as having side
|
|
// effects, as it would otherwise be optimized away. The inline assembly string
|
|
// recognizes template values in the form {name}, like so:
|
|
//
|
|
// arm.AsmFull(
|
|
// "str {value}, {result}",
|
|
// map[string]interface{}{
|
|
// "value": 1
|
|
// "result": &dest,
|
|
// })
|
|
//
|
|
// 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
|