asm.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef _SPARC_ASM_H
  2. #define _SPARC_ASM_H
  3. /* Macros to assist the sharing of assembler code between 32-bit and
  4. * 64-bit sparc.
  5. */
  6. #ifdef CONFIG_SPARC64
  7. #define BRANCH32(TYPE, PREDICT, DEST) \
  8. TYPE,PREDICT %icc, DEST
  9. #define BRANCH32_ANNUL(TYPE, PREDICT, DEST) \
  10. TYPE,a,PREDICT %icc, DEST
  11. #define BRANCH_REG_ZERO(PREDICT, REG, DEST) \
  12. brz,PREDICT REG, DEST
  13. #define BRANCH_REG_ZERO_ANNUL(PREDICT, REG, DEST) \
  14. brz,a,PREDICT REG, DEST
  15. #define BRANCH_REG_NOT_ZERO(PREDICT, REG, DEST) \
  16. brnz,PREDICT REG, DEST
  17. #define BRANCH_REG_NOT_ZERO_ANNUL(PREDICT, REG, DEST) \
  18. brnz,a,PREDICT REG, DEST
  19. #else
  20. #define BRANCH32(TYPE, PREDICT, DEST) \
  21. TYPE DEST
  22. #define BRANCH32_ANNUL(TYPE, PREDICT, DEST) \
  23. TYPE,a DEST
  24. #define BRANCH_REG_ZERO(PREDICT, REG, DEST) \
  25. cmp REG, 0; \
  26. be DEST
  27. #define BRANCH_REG_ZERO_ANNUL(PREDICT, REG, DEST) \
  28. cmp REG, 0; \
  29. be,a DEST
  30. #define BRANCH_REG_NOT_ZERO(PREDICT, REG, DEST) \
  31. cmp REG, 0; \
  32. bne DEST
  33. #define BRANCH_REG_NOT_ZERO_ANNUL(PREDICT, REG, DEST) \
  34. cmp REG, 0; \
  35. bne,a DEST
  36. #endif
  37. #endif /* _SPARC_ASM_H */