home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / emulate / sparc / logical.s < prev    next >
Text File  |  1992-01-29  |  2KB  |  148 lines

  1. !
  2. ! test logical instructions
  3. !
  4.     set    0x1324579f,%o1
  5.     set    0x735cda0e,%o2
  6.     set    0x1304520e,%l0
  7.     set    0x00200591,%l1
  8.     set    0x737cdf9f,%l2
  9.     set    0x9fa777ff,%l3
  10.     set    0x60788d91,%l4
  11.     set    0x9f87726e,%l5
  12. ! and
  13.     and    %o1,%o2,%o3
  14.     cmp    %o3,%l0
  15.     bne,a    .+0x8
  16.     unimp    0
  17. ! andn
  18.     andn    %o1,%o2,%o3
  19.     cmp    %o3,%l1
  20.     bne,a    .+0x8
  21.     unimp    0
  22. ! or
  23.     or    %o1,%o2,%o3
  24.     cmp    %o3,%l2
  25.     bne,a    .+0x8
  26.     unimp    0
  27. ! orn
  28.     orn    %o1,%o2,%o3
  29.     cmp    %o3,%l3
  30.     bne,a    .+0x8
  31.     unimp    0
  32. ! xor
  33.     xor    %o1,%o2,%o3
  34.     cmp    %o3,%l4
  35.     bne,a    .+0x8
  36.     unimp    0
  37. ! xnor
  38.     xnor    %o1,%o2,%o3
  39.     cmp    %o3,%l5
  40.     bne,a    .+0x8
  41.     unimp    0
  42. ! andcc
  43.     andcc    %o1,%o2,%o3
  44.     bneg    .+0x18
  45.     bvs    .+0x14
  46.     bcs    .+0x10
  47.     be    .+0xc
  48.     cmp    %o3,%l0
  49.     bne,a    .+0x8
  50.     unimp    0
  51. ! andncc
  52.     andncc    %o1,%o2,%o3
  53.     bneg    .+0x18
  54.     bvs    .+0x14
  55.     bcs    .+0x10
  56.     be    .+0xc
  57.     cmp    %o3,%l1
  58.     bne,a    .+0x8
  59.     unimp    0
  60. ! orcc
  61.     orcc    %o1,%o2,%o3
  62.     bneg    .+0x18
  63.     bvs    .+0x14
  64.     bcs    .+0x10
  65.     be    .+0xc
  66.     cmp    %o3,%l2
  67.     bne,a    .+0x8
  68.     unimp    0
  69. ! orncc
  70.     orncc    %o1,%o2,%o3
  71.     bpos    .+0x18
  72.     bvs    .+0x14
  73.     bcs    .+0x10
  74.     be    .+0xc
  75.     cmp    %o3,%l3
  76.     bne,a    .+0x8
  77.     unimp    0
  78. ! xorcc
  79.     xorcc    %o1,%o2,%o3
  80.     bneg    .+0x18
  81.     bvs    .+0x14
  82.     bcs    .+0x10
  83.     be    .+0xc
  84.     cmp    %o3,%l4
  85.     bne,a    .+0x8
  86.     unimp    0
  87. ! xnorcc
  88.     xnorcc    %o1,%o2,%o3
  89.     bpos    .+0x18
  90.     bvs    .+0x14
  91.     bcs    .+0x10
  92.     be    .+0xc
  93.     cmp    %o3,%l5
  94.     bne,a    .+0x8
  95.     unimp    0
  96. ! sll
  97.     andn    %o1,0xf,%o1
  98.     set    0x01324579,%i0
  99.     mov    4,%i1
  100.     sll    %i0,%i1,%i2
  101.     cmp    %i2,%o1
  102.     bne,a    .+0x8
  103.     unimp    0
  104.     sll    %i0,4,%i2
  105.     cmp    %i2,%o1
  106.     bne,a    .+0x8
  107.     unimp    0
  108. ! srl
  109.     srl    %i2,4,%i3
  110.     cmp    %i3,%i0
  111.     bne,a    .+0x8
  112.     unimp    0
  113.     srl    %i2,%i1,%i3
  114.     cmp    %i3,%i0
  115.     bne,a    .+0x8
  116.     unimp    0
  117. ! sra
  118.     sra    %i2,4,%i3
  119.     cmp    %i3,%i0
  120.     bne,a    .+0x8
  121.     unimp    0
  122.     sra    %i2,%i1,%i3
  123.     cmp    %i3,%i0
  124.     bne,a    .+0x8
  125.     unimp    0
  126.     set    0xf8765432,%i0
  127.     set    0xff876543,%i4
  128.     sra    %i0,4,%i2
  129.     cmp    %i2,%i4
  130.     bne,a    .+0x8
  131.     unimp    0
  132.     sra    %i0,%i1,%i2
  133.     cmp    %i2,%i4
  134.     bne,a    .+0x8
  135.     unimp    0
  136. ! sethi
  137.     sethi    0x3e73a2,%o1
  138.     set    0xf9ce8800,%o2
  139.     cmp    %o1,%o2
  140.     bne,a    .+0x8
  141.     unimp    0
  142.  
  143. exit:
  144.     mov    1,%g1
  145.     clr    %o0
  146.     ta    0
  147.     nop
  148.