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

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  * Copyright (C) 2000 Silicon Graphics
  3.  * Copyright (C) 2000 Jack Steiner (steiner@sgi.com)
  4.  */
  5. #include <linux/config.h>
  6. #ifdef CONFIG_IA64_SGI_AUTOTEST
  7. // Testing only.
  8. // Routine will cause MCAs
  9. //   zzzmsa(n)
  10. //      n=0 MCA via duplicate TLB dropin
  11. //      n=0 MCA via read of garbage address
  12. //
  13. #define ITIR(key, ps)           ((key<<8) | (ps<<2))
  14. #define TLB_PAGESIZE            28                      // Use 256MB pages for now.
  15.                         .global zzzmca
  16.                         .proc   zzzmca
  17. zzzmca:
  18.                         alloc   loc4       = ar.pfs,2,8,1,0;;
  19.                         cmp.ne  p6,p0=r32,r0;;
  20.                         movl    r2=0x2dead
  21.                         movl    r3=0x3dead
  22.                         movl    r15=0x15dead
  23.                         movl    r16=0x16dead
  24.                         movl    r31=0x31dead
  25.                         movl    loc0=0x34beef
  26.                         movl    loc1=0x35beef
  27.                         movl    loc2=0x36beef
  28.                         movl    loc3=0x37beef
  29.                         movl    out0=0x42beef
  30.                         movl    r20=0x32feed;;
  31.                         mov     ar32=r20
  32.                         movl    r20=0x36feed;;
  33.                         mov     ar36=r20
  34.                         movl    r20=0x65feed;;
  35.                         mov     ar65=r20
  36.                         movl    r20=0x66feed;;
  37.                         mov     ar66=r20
  38. (p6)                    br.cond.sptk    1f
  39.                         rsm      0x2000;;
  40.                         srlz.d;
  41.                         mov      r11      = 1
  42.                         mov      r3       = ITIR(0,TLB_PAGESIZE);;
  43.                         mov      cr.itir  = r3
  44.                         mov      r10      = 0;;
  45.                         itr.d    dtr[r11] = r10;;
  46.                         mov      r11      = 2
  47.                         itr.d    dtr[r11] = r10;;
  48.                         br      9f
  49. 1:                      movl    r8=0xfe00000048;;
  50.                         ld8     r9=[r8];;
  51.                         mf
  52.                         mf.a
  53.                         srlz.d
  54. 9:                      mov     ar.pfs=loc4
  55.                         br.ret.sptk     rp
  56.                         .endp   zzzmca
  57.                         .global zzzspec
  58.                         .proc   zzzspec
  59. zzzspec:
  60. mov r8=r32
  61. movl r9=0xe000000000000000
  62. movl r10=0x4000;;
  63. ld8.s r16=[r8];;
  64. ld8.s r17=[r9];;
  65. add r8=r8,r10;;
  66. ld8.s r18=[r8];;
  67. add r8=r8,r10;;
  68. ld8.s r19=[r8];;
  69. add r8=r8,r10;;
  70. ld8.s r20=[r8];;
  71. mov r8=r0
  72. tnat.nz p6,p0=r16
  73. tnat.nz p7,p0=r17
  74. tnat.nz p8,p0=r18
  75. tnat.nz p9,p0=r19
  76. tnat.nz p10,p0=r20;;
  77. (p6) dep r8=-1,r8,0,1;;
  78. (p7) dep r8=-1,r8,1,1;;
  79. (p8) dep r8=-1,r8,2,1;;
  80. (p9) dep r8=-1,r8,3,1;;
  81. (p10) dep r8=-1,r8,4,1;;
  82.                         br.ret.sptk     rp
  83.                         .endp   zzzspec
  84.                         .global zzzspec2
  85.                         .proc   zzzspec2
  86. zzzspec2:
  87. cmp.eq p6,p7=r2,r2
  88. movl r16=0xc0000a0001000020
  89. ;;
  90. mf
  91. ;;
  92. ld8 r9=[r16]
  93. (p6) br.spnt 1f
  94. ld8 r10=[r32]
  95. ;;
  96. 1: mf.a
  97. mf
  98. ld8 r9=[r16];;
  99. cmp.ne p6,p7=r9,r16
  100. (p6) br.spnt 1f
  101. ld8 r10=[r32]
  102. ;;
  103. 1: mf.a
  104. mf
  105. ld8 r9=[r33];;
  106. cmp.ne p6,p7=r9,r33
  107. (p6) br.spnt 1f
  108. ld8 r10=[r32]
  109. ;;
  110. 1: mf.a
  111. mf
  112. tpa r23=r32
  113. add r20=512,r33
  114. add r21=1024,r33;;
  115. ld8 r9=[r20]
  116. ld8 r10=[r21];;
  117. nop.i 0
  118. { .mib
  119. nop.m 0
  120. cmp.ne p6,p7=r10,r33
  121. (p6) br.spnt 1f
  122. }
  123. ld8 r10=[r32]
  124. ;;
  125. 1: mf.a
  126. mf
  127. br.ret.sptk     rp
  128.                         .endp   zzzspec
  129. #endif