Guest User

Untitled

a guest
Jul 31st, 2011
140
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define LOAD_ARGS_0() do { } while(0)
  2. #define ASM_ARGS_0
  3. #define LOAD_ARGS_1(a1) \
  4. int _a1 = (int)(a1); \
  5. LOAD_ARGS_0(); \
  6. register int __a1 __asm__("r1") = _a1
  7. #define ASM_ARGS_1 ASM_ARGS_0, "r1"(__a1)
  8. #define LOAD_ARGS_2(a1, a2) \
  9. int _a2 = (int)(a2); \
  10. LOAD_ARGS_1(a1); \
  11. register int __a2 __asm__("r2") = _a2
  12. #define ASM_ARGS_2 ASM_ARGS_1, "r"(__a2)
  13. #define LOAD_ARGS_3(a1, a2, a3) \
  14. int _a3 = (int)(a3); \
  15. LOAD_ARGS_2(a1, a2); \
  16. register int __a3 __asm__("r3") = _a3
  17. #define ASM_ARGS_3 ASM_ARGS_2, "r"(__a3)
  18. #define LOAD_ARGS_4(a1, a2, a3, a4) \
  19. int _a4 = (int)(a4); \
  20. LOAD_ARGS_3(a1, a2, a3); \
  21. register int __a4 __asm__("r4") = _a4
  22. #define ASM_ARGS_4 ASM_ARGS_3, "r"(__a4)
  23. #define LOAD_ARGS_5(a1, a2, a3, a4, a5) \
  24. int _a5 = (int)(a5); \
  25. LOAD_ARGS_4(a1, a2, a3, a4); \
  26. register int __a5 __asm__("r5") = _a5
  27. #define ASM_ARGS_5 ASM_ARGS_4, "r"(__a5)
  28. #define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \
  29. int _a6 = (int)(a6); \
  30. LOAD_ARGS_5(a1, a2, a3, a4, a5); \
  31. register int __a6 __asm__("r6") = _a6
  32. #define ASM_ARGS_6 ASM_ARGS_5, "r"(__a6)
RAW Paste Data