qemu/tests/lm32/test_srui.S
<<
>>
Prefs
   1.include "macros.inc"
   2
   3start
   4
   5test_name SRUI_1
   6mvi r1, 1
   7srui r3, r1, 0
   8check_r3 1
   9
  10test_name SRUI_2
  11mvi r1, 0
  12srui r3, r1, 1
  13check_r3 0
  14
  15test_name SRUI_3
  16load r1 0x40000000
  17srui r3, r1, 30
  18check_r3 1
  19
  20test_name SRUI_4
  21load r1 0x40000000
  22srui r3, r1, 31
  23check_r3 0
  24
  25test_name SRUI_5
  26mvi r3, 2
  27srui r3, r3, 2
  28check_r3 0
  29
  30test_name SRUI_6
  31mvi r1, 0xfffffff0
  32srui r3, r1, 2
  33check_r3 0x3ffffffc
  34
  35test_name SRUI_7
  36mvi r1, 0xfffffff0
  37srui r3, r1, 4
  38check_r3 0x0fffffff
  39
  40end
  41