qemu/tests/tcg/lm32/test_lhu.S
<<
>>
Prefs
   1.include "macros.inc"
   2
   3start
   4
   5test_name LHU_1
   6load r1 data
   7lhu r3, (r1+0)
   8check_r3 0x7e7f
   9
  10test_name LHU_2
  11load r1 data
  12lhu r3, (r1+2)
  13check_r3 0x7071
  14
  15test_name LHU_3
  16load r1 data
  17lhu r3, (r1+-2)
  18check_r3 0x7c7d
  19
  20test_name LHU_4
  21load r1 data_msb
  22lhu r3, (r1+0)
  23check_r3 0xfeff
  24
  25test_name LHU_5
  26load r1 data_msb
  27lhu r3, (r1+2)
  28check_r3 0xf0f1
  29
  30test_name LHU_6
  31load r1 data_msb
  32lhu r3, (r1+-2)
  33check_r3 0xfcfd
  34
  35test_name LHU_7
  36load r3 data
  37lhu r3, (r3+0)
  38check_r3 0x7e7f
  39
  40end
  41
  42.data
  43        .align 4
  44        .byte 0x7a, 0x7b, 0x7c, 0x7d
  45data:
  46        .byte 0x7e, 0x7f, 0x70, 0x71
  47        .byte 0xfa, 0xfb, 0xfc, 0xfd
  48data_msb:
  49        .byte 0xfe, 0xff, 0xf0, 0xf1
  50