assembler.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * arch/arm/include/asm/assembler.h
  3. *
  4. * Copyright (C) 1996-2000 Russell King
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * This file contains arm architecture specific defines
  11. * for the different processors.
  12. *
  13. * Do not include any C declarations in this file - it is included by
  14. * assembler source.
  15. */
  16. /*
  17. * Endian independent macros for shifting bytes within registers.
  18. */
  19. #ifndef __ARMEB__
  20. #define pull lsr
  21. #define push lsl
  22. #define get_byte_0 lsl #0
  23. #define get_byte_1 lsr #8
  24. #define get_byte_2 lsr #16
  25. #define get_byte_3 lsr #24
  26. #define put_byte_0 lsl #0
  27. #define put_byte_1 lsl #8
  28. #define put_byte_2 lsl #16
  29. #define put_byte_3 lsl #24
  30. #else
  31. #define pull lsl
  32. #define push lsr
  33. #define get_byte_0 lsr #24
  34. #define get_byte_1 lsr #16
  35. #define get_byte_2 lsr #8
  36. #define get_byte_3 lsl #0
  37. #define put_byte_0 lsl #24
  38. #define put_byte_1 lsl #16
  39. #define put_byte_2 lsl #8
  40. #define put_byte_3 lsl #0
  41. #endif
  42. /*
  43. * Data preload for architectures that support it
  44. */
  45. #if defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) || \
  46. defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \
  47. defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || \
  48. defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_7A__) || \
  49. defined(__ARM_ARCH_7R__)
  50. #define PLD(code...) code
  51. #else
  52. #define PLD(code...)
  53. #endif
  54. /*
  55. * Cache alligned
  56. */
  57. #define CALGN(code...) code