mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
22 lines
751 B
Go
22 lines
751 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": uintptr(unsafe.Pointer(&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
|