mm/tools/asm-processor/tests/o2.c
Anghelo Carvajal 58022571ba
subrepo asm-processor (#1212)
* 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"
2023-03-17 15:16:30 +11:00

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; }