Files
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

33 lines
503 B
C

// COMPILE-FLAGS: -O2
static int xtext(int a, int b, int c);
const int rodata1[] = {1};
static const int rodata2[] = {2};
int data1[] = {3};
static int data2[] = {4};
int bss1;
static int bss2;
GLOBAL_ASM(
glabel bar
lui $a0, %hi(rodata2)
lw $a0, %lo(rodata2)($a0)
lui $a1, %hi(data2)
lw $a1, %lo(data2)($a0)
lui $a2, %hi(bss2)
lw $a2, %lo(bss2)($a0)
jal xtext
nop
jr $ra
nop
nop
nop
)
static int xtext(int a, int b, int c) {
return 1;
}
void baz(void) {
xtext(bss2, rodata2[0], data2[0]);
}