qemu/tests/tcg/lm32/test_sru.S
<<
>>
Prefs
   1.include "macros.inc"
   2
   3start
   4
   5test_name SRU_1
   6mvi r1, 1
   7mvi r2, 0
   8sru r3, r1, r2
   9check_r3 1
  10
  11test_name SRU_2
  12mvi r1, 0
  13mvi r2, 1
  14sru r3, r1, r2
  15check_r3 0
  16
  17test_name SRU_3
  18load r1 0x40000000
  19mvi r2, 30
  20sru r3, r1, r2
  21check_r3 1
  22
  23test_name SRU_4
  24load r1 0x40000000
  25mvi r2, 31
  26sru r3, r1, r2
  27check_r3 0
  28
  29test_name SRU_5
  30mvi r1, 16
  31mvi r2, 34
  32sru r3, r1, r2
  33check_r3 4
  34
  35test_name SRU_6
  36mvi r1, 2
  37sru r3, r1, r1
  38check_r3 0
  39
  40test_name SRU_7
  41mvi r3, 2
  42sru r3, r3, r3
  43check_r3 0
  44
  45test_name SRU_8
  46mvi r1, 0xfffffff0
  47mvi r2, 2
  48sru r3, r1, r2
  49check_r3 0x3ffffffc
  50
  51test_name SRU_9
  52mvi r1, 0xfffffff0
  53mvi r2, 4
  54sru r3, r1, r2
  55check_r3 0x0fffffff
  56
  57end
  58