qemu/tests/tcg/lm32/test_andi.S
<<
>>
Prefs
   1.include "macros.inc"
   2
   3start
   4
   5test_name ANDI_1
   6mvi r1, 0
   7andi r3, r1, 0
   8check_r3 0
   9
  10test_name ANDI_2
  11mvi r1, 1
  12andi r3, r1, 1
  13check_r3 1
  14
  15test_name ANDI_3
  16load r1 0x000f0000
  17andi r3, r1, 1
  18check_r3 0
  19
  20test_name ANDI_4
  21load r1 0xffffffff
  22andi r3, r1, 0xffff
  23check_r3 0xffff
  24
  25test_name ANDI_5
  26load r1 0xffffffff
  27andi r3, r1, 0
  28check_r3 0
  29
  30test_name ANDI_6
  31load r3 0xffff55aa
  32andi r3, r3, 0xaaaa
  33check_r3 0x000000aa
  34
  35end
  36