asm.h 711 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* Miscellaneous macros for LoongArch64.
  2. Copyright (C) 2024 uClibc-ng contributors.
  3. Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  4. */
  5. #ifndef _SYS_ASM_H
  6. #define _SYS_ASM_H
  7. #define SZREG 8
  8. #define SZFREG 8
  9. #define REG_S st.d
  10. #define REG_L ld.d
  11. #define FREG_S fst.d
  12. #define FREG_L fld.d
  13. #define PTRLOG 3
  14. /* Declare leaf routine. */
  15. #define LEAF(symbol) \
  16. .globl symbol; \
  17. .align 2; \
  18. .type symbol,@function; \
  19. symbol: \
  20. cfi_startproc;
  21. /* Mark end of function. */
  22. #undef END
  23. #define END(function) \
  24. cfi_endproc; \
  25. .size function,.-function
  26. /* Stack alignment -- LoongArch requires 16-byte alignment. */
  27. #define ALMASK ~15
  28. #endif /* sys/asm.h */