mirror of
https://github.com/zeldaret/mm.git
synced 2024-11-30 08:10:26 +00:00
58022571ba
* yeet * git subrepo clone git@github.com:simonlindholm/asm-processor.git tools/asm-processor subrepo: subdir: "tools/asm-processor" merged: "bbd86ea1f" upstream: origin: "git@github.com:simonlindholm/asm-processor.git" branch: "main" commit: "bbd86ea1f" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
27 lines
387 B
C
27 lines
387 B
C
// COMPILE-FLAGS: -O2
|
|
|
|
int a(void) { return 1; }
|
|
GLOBAL_ASM(
|
|
glabel foo
|
|
addiu $a0, $a0, 1
|
|
addiu $a0, $a0, 2
|
|
addiu $a0, $a0, 3
|
|
jr $ra
|
|
addiu $a0, $a0, 4
|
|
)
|
|
float b(void) { return 1.2f; }
|
|
GLOBAL_ASM(
|
|
.late_rodata
|
|
glabel float1
|
|
.float 12.34
|
|
|
|
.text
|
|
glabel bar
|
|
addiu $a0, $a0, 5
|
|
addiu $a0, $a0, 6
|
|
lui $v0, %hi(float1 + 1)
|
|
jr $ra
|
|
addiu $v0, $v0, %lo(float1 + 1)
|
|
)
|
|
float c(void) { return 1.3f; }
|