mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 11:37:46 +00:00
all: improve compiler-rt compilation
A few changes to make sure compiler-rt is correctly compiled (and doesn't include host headers, for example). This improves support for AVR, but it still doesn't work. Compiler-rt itself doesn't really work for AVR either.
This commit is contained in:
@@ -53,3 +53,11 @@ func abort() {
|
||||
func align(ptr uintptr) uintptr {
|
||||
return (ptr + 3) &^ 3
|
||||
}
|
||||
|
||||
// Implement memset for compiler-rt.
|
||||
//go:export memset
|
||||
func memset(ptr unsafe.Pointer, c byte, size uintptr) {
|
||||
for i := uintptr(0); i < size; i++ {
|
||||
*(*byte)(unsafe.Pointer(uintptr(ptr) + i)) = c
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user