entry.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:3k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. #include <linux/config.h>
  2. /*
  3.  * Preserved registers that are shared between code in ivt.S and entry.S.  Be
  4.  * careful not to step on these!
  5.  */
  6. #define pKern p2 /* will leave_kernel return to kernel-mode? */
  7. #define pUser p3 /* will leave_kernel return to user-mode? */
  8. #define pSys p4 /* are we processing a (synchronous) system call? */
  9. #define pNonSys p5 /* complement of pSys */
  10. #define PT(f) (IA64_PT_REGS_##f##_OFFSET)
  11. #define SW(f) (IA64_SWITCH_STACK_##f##_OFFSET)
  12. #define PT_REGS_SAVES(off)
  13. .unwabi @svr4, 'i';
  14. .fframe IA64_PT_REGS_SIZE+16+(off);
  15. .spillsp rp, PT(CR_IIP)+16+(off);
  16. .spillsp ar.pfs, PT(CR_IFS)+16+(off);
  17. .spillsp ar.unat, PT(AR_UNAT)+16+(off);
  18. .spillsp ar.fpsr, PT(AR_FPSR)+16+(off);
  19. .spillsp pr, PT(PR)+16+(off);
  20. #define PT_REGS_UNWIND_INFO(off)
  21. .prologue;
  22. PT_REGS_SAVES(off);
  23. .body
  24. #define SWITCH_STACK_SAVES(off)
  25. .savesp ar.unat,SW(CALLER_UNAT)+16+(off);
  26. .savesp ar.fpsr,SW(AR_FPSR)+16+(off);
  27. .spillsp f2,SW(F2)+16+(off); .spillsp f3,SW(F3)+16+(off);
  28. .spillsp f4,SW(F4)+16+(off); .spillsp f5,SW(F5)+16+(off);
  29. .spillsp f16,SW(F16)+16+(off); .spillsp f17,SW(F17)+16+(off);
  30. .spillsp f18,SW(F18)+16+(off); .spillsp f19,SW(F19)+16+(off);
  31. .spillsp f20,SW(F20)+16+(off); .spillsp f21,SW(F21)+16+(off);
  32. .spillsp f22,SW(F22)+16+(off); .spillsp f23,SW(F23)+16+(off);
  33. .spillsp f24,SW(F24)+16+(off); .spillsp f25,SW(F25)+16+(off);
  34. .spillsp f26,SW(F26)+16+(off); .spillsp f27,SW(F27)+16+(off);
  35. .spillsp f28,SW(F28)+16+(off); .spillsp f29,SW(F29)+16+(off);
  36. .spillsp f30,SW(F30)+16+(off); .spillsp f31,SW(F31)+16+(off);
  37. .spillsp r4,SW(R4)+16+(off); .spillsp r5,SW(R5)+16+(off);
  38. .spillsp r6,SW(R6)+16+(off); .spillsp r7,SW(R7)+16+(off);
  39. .spillsp b0,SW(B0)+16+(off); .spillsp b1,SW(B1)+16+(off);
  40. .spillsp b2,SW(B2)+16+(off); .spillsp b3,SW(B3)+16+(off);
  41. .spillsp b4,SW(B4)+16+(off); .spillsp b5,SW(B5)+16+(off);
  42. .spillsp ar.pfs,SW(AR_PFS)+16+(off); .spillsp ar.lc,SW(AR_LC)+16+(off);
  43. .spillsp @priunat,SW(AR_UNAT)+16+(off);
  44. .spillsp ar.rnat,SW(AR_RNAT)+16+(off);
  45. .spillsp ar.bspstore,SW(AR_BSPSTORE)+16+(off);
  46. .spillsp pr,SW(PR)+16+(off))
  47. #define DO_SAVE_SWITCH_STACK
  48. movl r28=1f;
  49. ;;
  50. .fframe IA64_SWITCH_STACK_SIZE;
  51. adds sp=-IA64_SWITCH_STACK_SIZE,sp;
  52. mov.ret.sptk b7=r28,1f;
  53. SWITCH_STACK_SAVES(0);
  54. br.cond.sptk.many save_switch_stack;
  55. 1:
  56. #define DO_LOAD_SWITCH_STACK
  57. movl r28=1f;
  58. ;;
  59. invala;
  60. mov.ret.sptk b7=r28,1f;
  61. br.cond.sptk.many load_switch_stack;
  62. 1: .restore sp;
  63. adds sp=IA64_SWITCH_STACK_SIZE,sp