12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- #ifndef _SYS_ASM_H
- #define _SYS_ASM_H
- #if __riscv_xlen == 64
- # define PTRLOG 3
- # define SZREG 8
- # define REG_S sd
- # define REG_L ld
- #elif __riscv_xlen == 32
- # define PTRLOG 2
- # define SZREG 4
- # define REG_S sw
- # define REG_L lw
- #else
- # error __riscv_xlen must equal 32 or 64
- #endif
- #if !defined __riscv_float_abi_soft
- # if defined __riscv_float_abi_double
- # define FREG_L fld
- # define FREG_S fsd
- # define SZFREG 8
- # else
- # error unsupported FLEN
- # endif
- #endif
- #define LEAF(symbol) \
- .globl symbol; \
- .align 2; \
- .type symbol,@function; \
- symbol: \
- cfi_startproc;
- #undef END
- #define END(function) \
- cfi_endproc; \
- .size function,.-function
- #define ALMASK ~15
- #endif /* sys/asm.h */
|