aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/runtime/print.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/runtime/print.go b/src/runtime/print.go
index e4d715176..706904fbd 100644
--- a/src/runtime/print.go
+++ b/src/runtime/print.go
@@ -48,6 +48,16 @@ func printint16(n int16) {
}
func printuint32(n uint32) {
+ if TargetBits == 8 {
+ // AVR-specific workaround on LLVM 10. Should be removed when we switch
+ // to LLVM 11.
+ prevdigits := n / 10
+ if prevdigits != 0 {
+ printuint32(prevdigits)
+ }
+ putchar(byte((n % 10) + '0'))
+ return
+ }
printuint64(uint64(n))
}