mirror of
https://github.com/plctlab/riscv-operating-system-mooc.git
synced 2025-12-05 15:15:49 +00:00
9 lines
219 B
C
9 lines
219 B
C
// for signed int, shift right is assembled to srai
|
|
|
|
// riscv64-unknown-elf-gcc -march=rv32ima -mabi=ilp32 -c -g test.c -o test.o
|
|
// riscv64-unknown-elf-objdump -S test.o
|
|
void foo()
|
|
{
|
|
int i = 0x80000000;
|
|
i = i >> 4;
|
|
} |