iwmmxt.h 970 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __IWMMXT_H__
  3. #define __IWMMXT_H__
  4. .irp b, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
  5. .set .LwR\b, \b
  6. .set .Lr\b, \b
  7. .endr
  8. .set .LwCSSF, 0x2
  9. .set .LwCASF, 0x3
  10. .set .LwCGR0, 0x8
  11. .set .LwCGR1, 0x9
  12. .set .LwCGR2, 0xa
  13. .set .LwCGR3, 0xb
  14. .macro wldrd, reg:req, base:req, offset:req
  15. .inst 0xedd00100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
  16. .endm
  17. .macro wldrw, reg:req, base:req, offset:req
  18. .inst 0xfd900100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
  19. .endm
  20. .macro wstrd, reg:req, base:req, offset:req
  21. .inst 0xedc00100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
  22. .endm
  23. .macro wstrw, reg:req, base:req, offset:req
  24. .inst 0xfd800100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
  25. .endm
  26. #ifdef __clang__
  27. #define wCon c1
  28. .macro tmrc, dest:req, control:req
  29. mrc p1, 0, \dest, \control, c0, 0
  30. .endm
  31. .macro tmcr, control:req, src:req
  32. mcr p1, 0, \src, \control, c0, 0
  33. .endm
  34. #endif
  35. #endif