mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 08:23:41 +00:00
all: rename assembly files to .S extension
The Go tools only consider lowercase .s files to be assembly files. By renaming these to uppercase .S files they won't be discovered by the Go toolchain and listed as the SFiles to be assembled. There is a difference between .s and .S: only uppercase .S will be passed through the preprocessor. Doing that is normally safe, and definitely safe in the case of these files.
This commit is contained in:
committed by
Ron Evans
parent
b6d6efde07
commit
c4392d9472
@@ -0,0 +1,40 @@
|
||||
// Macro for writing less code
|
||||
.macro FUNC name
|
||||
.section .text.\name, "ax", %progbits
|
||||
.global \name
|
||||
.type \name, %function
|
||||
.align 2
|
||||
\name:
|
||||
.endm
|
||||
|
||||
FUNC armGetSystemTick
|
||||
mrs x0, cntpct_el0
|
||||
ret
|
||||
|
||||
// Horizon System Calls
|
||||
// https://switchbrew.org/wiki/SVC
|
||||
FUNC svcSetHeapSize
|
||||
str x0, [sp, #-16]!
|
||||
svc 0x1
|
||||
ldr x2, [sp], #16
|
||||
str x1, [x2]
|
||||
ret
|
||||
|
||||
FUNC svcExitProcess
|
||||
svc 0x7
|
||||
ret
|
||||
|
||||
FUNC svcSleepThread
|
||||
svc 0xB
|
||||
ret
|
||||
|
||||
FUNC svcOutputDebugString
|
||||
svc 0x27
|
||||
ret
|
||||
|
||||
FUNC svcGetInfo
|
||||
str x0, [sp, #-16]!
|
||||
svc 0x29
|
||||
ldr x2, [sp], #16
|
||||
str x1, [x2]
|
||||
ret
|
||||
Reference in New Issue
Block a user