se_regmv_usp_sysreg.S 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. //Original:/proj/frio/dv/testcases/seq/se_regmv_usp_sysreg/se_regmv_usp_sysreg.dsp
  2. // Description: RegMV USP to SYSREG
  3. # mach: bfin
  4. # sim: --environment operating
  5. #include "test.h"
  6. .include "testutils.inc"
  7. start
  8. //
  9. // Constants and Defines
  10. //
  11. include(selfcheck.inc)
  12. include(std.inc)
  13. include(symtable.inc)
  14. //*********************************************************************
  15. BEGIN:
  16. // KLUDGE: from perl script must place cycles 2 write before cycles
  17. // write, and cycles 2 read AFTER cycles read
  18. // PUT YOUR TEST HERE!
  19. R0 = 0;
  20. SP = R0;
  21. SYSCFG = R0;
  22. CHECK_INIT_DEF(p0); //CHECK_INIT(p0, 0xFF7FFFFC);
  23. R0 = 0x59c4 (Z);
  24. R0.H = 0x95a6;
  25. USP = R0;
  26. ASTAT = USP;
  27. R1 = ASTAT;
  28. R0 = 0xd4a4 (Z);
  29. R0.H = 0xd16c;
  30. USP = R0;
  31. RETS = USP;
  32. R1 = RETS;
  33. CHECKREG(r1, 3513570468);
  34. R0 = 0x2bca (Z);
  35. R0.H = 0x6ad8;
  36. USP = R0;
  37. LC0 = USP;
  38. R1 = LC0;
  39. CHECKREG(r1, 1792551882);
  40. R0 = 0x6d4a (Z);
  41. R0.H = 0xada2;
  42. USP = R0;
  43. LT0 = USP;
  44. R1 = LT0;
  45. CHECKREG(r1, 2913103178);
  46. R0 = 0x6b18 (Z);
  47. R0.H = 0x931c;
  48. USP = R0;
  49. LB0 = USP;
  50. R1 = LB0;
  51. CHECKREG(r1, 2468113176);
  52. R0 = 0x62da (Z);
  53. R0.H = 0x16ee;
  54. USP = R0;
  55. LC1 = USP;
  56. R1 = LC1;
  57. CHECKREG(r1, 384721626);
  58. R0 = 0x7c60 (Z);
  59. R0.H = 0xf7c8;
  60. USP = R0;
  61. LT1 = USP;
  62. R1 = LT1;
  63. CHECKREG(r1, 4157111392);
  64. R0 = 0x182 (Z);
  65. R0.H = 0x942;
  66. USP = R0;
  67. LB1 = USP;
  68. R1 = LB1;
  69. CHECKREG(r1, 155320706);
  70. R0 = 0xd5a2 (Z);
  71. R0.H = 0x8782;
  72. USP = R0;
  73. CYCLES2 = USP;
  74. // KLUDGE - moved read after that for cycles
  75. R0 = 0x297c (Z);
  76. R0.H = 0x9d06;
  77. USP = R0;
  78. CYCLES = USP;
  79. R1 = CYCLES;
  80. CHECKREG(r1, 2634426748);
  81. R1 = CYCLES2; // KLUDGE moved read after that for cycles
  82. CHECKREG(r1, 2273498530);
  83. R0 = 0x8c66 (Z);
  84. R0.H = 0x3d64;
  85. USP = R0;
  86. SEQSTAT = USP;
  87. R1 = SEQSTAT;
  88. R0 = 0x3b8c (Z);
  89. R0.H = 0xdcd4;
  90. USP = R0;
  91. SYSCFG = USP;
  92. R1 = SYSCFG;
  93. R0 = 0xb1ae (Z);
  94. R0.H = 0x6f6;
  95. USP = R0;
  96. RETI = USP;
  97. R1 = RETI;
  98. CHECKREG(r1, 116830638);
  99. R0 = 0x32b0 (Z);
  100. R0.H = 0x9b7e;
  101. USP = R0;
  102. RETX = USP;
  103. R1 = RETX;
  104. CHECKREG(r1, 2608738992);
  105. R0 = 0xea72 (Z);
  106. R0.H = 0x11ea;
  107. USP = R0;
  108. RETN = USP;
  109. R1 = RETN;
  110. CHECKREG(r1, 300608114);
  111. R0 = 0x2c58 (Z);
  112. R0.H = 0xb13a;
  113. USP = R0;
  114. RETE = USP;
  115. R1 = RETE;
  116. CHECKREG(r1, 2973379672);
  117. // Sanity check
  118. USP = R0;
  119. USP = R1;
  120. USP = R2;
  121. USP = R3;
  122. USP = R4;
  123. USP = R5;
  124. USP = R6;
  125. USP = R7;
  126. USP = P0;
  127. USP = P1;
  128. USP = P2;
  129. USP = P3;
  130. USP = P4;
  131. USP = P5;
  132. USP = SP;
  133. USP = FP;
  134. USP = A0.X;
  135. USP = A0.W;
  136. USP = A1.X;
  137. USP = A1.W;
  138. A0.X = USP;
  139. A0.W = USP;
  140. A1.X = USP;
  141. A1.W = USP;
  142. END:
  143. dbg_pass; // End the test
  144. //*********************************************************************