qemu/tests/tcg/lm32/test_sri.S
<<
>>
Prefs
   1.include "macros.inc"
   2
   3start
   4
   5test_name SRI_1
   6mvi r1, 1
   7sri r3, r1, 0
   8check_r3 1
   9
  10test_name SRI_2
  11mvi r1, 0
  12sri r3, r1, 1
  13check_r3 0
  14
  15test_name SRI_3
  16load r1 0x40000000
  17sri r3, r1, 30
  18check_r3 1
  19
  20test_name SRI_4
  21load r1 0x40000000
  22sri r3, r1, 31
  23check_r3 0
  24
  25test_name SRI_5
  26mvi r3, 2
  27sri r3, r3, 2
  28check_r3 0
  29
  30test_name SRI_6
  31mvi r1, 0xfffffff0
  32sri r3, r1, 2
  33check_r3 0xfffffffc
  34
  35test_name SRI_7
  36mvi r1, 0xfffffff0
  37sri r3, r1, 4
  38check_r3 0xffffffff
  39
  40end
  41