mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-26 03:50:07 +08:00
b2d351e0ec
Change type from signed char to int. Make assembly code work with tcc and gcc.
17 lines
379 B
ArmAsm
17 lines
379 B
ArmAsm
.text
|
|
.align 2
|
|
.global fetch_and_add_riscv64
|
|
.type fetch_and_add_riscv64, %function
|
|
fetch_and_add_riscv64:
|
|
#ifdef __TINYC__
|
|
.int 0x0f50000f
|
|
.int 0x004b5202f
|
|
.short 0x8082
|
|
#else
|
|
fence iorw,ow
|
|
amoadd.w.aq zero,a1,0(a0)
|
|
ret
|
|
#endif
|
|
|
|
.size fetch_and_add_riscv64, .-fetch_and_add_riscv64
|