mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 13:03:39 +00:00
Add support for inline assembly
This depends on support in LLVM, which hasn't been merged yet. See: https://reviews.llvm.org/D46437
This commit is contained in:
@@ -32,6 +32,9 @@ package arm
|
||||
type __reg uint32
|
||||
type RegValue = __reg
|
||||
|
||||
type __asm string
|
||||
func Asm(s __asm)
|
||||
|
||||
const (
|
||||
SCS_BASE = 0xE000E000
|
||||
NVIC_BASE = SCS_BASE + 0x0100
|
||||
|
||||
@@ -74,8 +74,8 @@ func monotime() uint64 {
|
||||
}
|
||||
|
||||
func abort() {
|
||||
// TODO: wfi
|
||||
for {
|
||||
arm.Asm("wfi")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user