qemu/tests/tcg/lm32/test_addi.S
<<
>>
Prefs
   1.include "macros.inc"
   2
   3start
   4
   5test_name ADDI_1
   6mvi r1, 0
   7addi r3, r1, 0
   8check_r3 0
   9
  10test_name ADDI_2
  11mvi r1, 0
  12addi r3, r1, 1
  13check_r3 1
  14
  15test_name ADDI_3
  16mvi r1, 1
  17addi r3, r1, 0
  18check_r3 1
  19
  20test_name ADDI_4
  21mvi r1, 1
  22addi r3, r1, -1
  23check_r3 0
  24
  25test_name ADDI_5
  26mvi r1, -1
  27addi r3, r1, 1
  28check_r3 0
  29
  30test_name ADDI_6
  31mvi r1, -1
  32addi r3, r1, 0
  33check_r3 -1
  34
  35test_name ADDI_7
  36mvi r1, 0
  37addi r3, r1, -1
  38check_r3 -1
  39
  40test_name ADDI_8
  41mvi r3, 4
  42addi r3, r3, 4
  43check_r3 8
  44
  45test_name ADDI_9
  46mvi r3, 4
  47addi r3, r3, -4
  48check_r3 0
  49
  50test_name ADDI_10
  51mvi r3, 4
  52addi r3, r3, -5
  53check_r3 -1
  54
  55end
  56
  57