mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 04:23:41 +00:00
avr: convert initialization from asm to Go
This increases code size by 1 instruction (2 bytes) because LLVM isn't yet smart enough to recognize that it doesn't need to clear a register to use 0: it can just use r1 which is always 0 according to the convention. It makes initialization a lot easier to read, however.
This commit is contained in:
@@ -24,6 +24,12 @@ type timespec struct {
|
||||
|
||||
const CLOCK_MONOTONIC_RAW = 4
|
||||
|
||||
func preinit() {
|
||||
}
|
||||
|
||||
func postinit() {
|
||||
}
|
||||
|
||||
func putchar(c byte) {
|
||||
_Cfunc_putchar(int(c))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user