sn_asm.S
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:4k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

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