arm7tdmi: clean up architecture definition
Этот коммит содержится в:
родитель
e356bad4d1
коммит
9b1dd8e03d
2 изменённых файлов: 7 добавлений и 10 удалений
|
@ -1,7 +1,9 @@
|
||||||
// +build arm,!baremetal
|
// +build arm,!baremetal arm,arm7tdmi
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
|
import "device/arm"
|
||||||
|
|
||||||
const GOARCH = "arm"
|
const GOARCH = "arm"
|
||||||
|
|
||||||
// The bitness of the CPU (e.g. 8, 32, 64).
|
// The bitness of the CPU (e.g. 8, 32, 64).
|
||||||
|
@ -11,3 +13,7 @@ const TargetBits = 32
|
||||||
func align(ptr uintptr) uintptr {
|
func align(ptr uintptr) uintptr {
|
||||||
return (ptr + 3) &^ 3
|
return (ptr + 3) &^ 3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getCurrentStackPointer() uintptr {
|
||||||
|
return arm.ReadRegister("sp")
|
||||||
|
}
|
||||||
|
|
|
@ -3,14 +3,9 @@
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"device/arm"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
const TargetBits = 32
|
|
||||||
|
|
||||||
const GOARCH = "arm"
|
|
||||||
|
|
||||||
type timeUnit int64
|
type timeUnit int64
|
||||||
|
|
||||||
const tickMicros = 1
|
const tickMicros = 1
|
||||||
|
@ -82,10 +77,6 @@ func abort() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func getCurrentStackPointer() uintptr {
|
|
||||||
return arm.ReadRegister("sp")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Implement memset for LLVM and compiler-rt.
|
// Implement memset for LLVM and compiler-rt.
|
||||||
//go:export memset
|
//go:export memset
|
||||||
func libc_memset(ptr unsafe.Pointer, c byte, size uintptr) {
|
func libc_memset(ptr unsafe.Pointer, c byte, size uintptr) {
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче