mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
20 lines
388 B
C
20 lines
388 B
C
// #target: elf-riscv32
|
|
module test;
|
|
|
|
fn void main(String[] args)
|
|
{
|
|
int x = 2;
|
|
asm
|
|
{
|
|
li $s1, -65536;
|
|
lui $t0, 123456u;
|
|
auipc $x15, -123456;
|
|
mv $a0, $a1;
|
|
lw $a4, [&x];
|
|
lb $a5, [$a7 - 4];
|
|
}
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
"li s1, -65536\0Alui t0, 123456\0Aauipc x15, -123456\0Amv a0, a1\0Alw a4, $0\0Alb a5, -4(a7)\0A", "*m,~{x5},~{x9},~{x10},~{x14},~{x15}"(ptr elementtype(i32) %x)
|