test_xor_1:
  #_ REGISTER_IN r4 0xFFFFFFFFFFFFFFFF
  #_ REGISTER_IN r5 0xFFFFFFFF00000000
  xor r3, r4, r5
  blr
  #_ REGISTER_OUT r3 0x00000000FFFFFFFF
  #_ REGISTER_OUT r4 0xFFFFFFFFFFFFFFFF
  #_ REGISTER_OUT r5 0xFFFFFFFF00000000

test_xor_1_constant:
  li r4, -1
  li r5, -1
  clrldi r5, r5, 32
  sldi r5, r5, 32
  xor r3, r4, r5
  blr
  #_ REGISTER_OUT r3 0x00000000FFFFFFFF
  #_ REGISTER_OUT r4 0xFFFFFFFFFFFFFFFF
  #_ REGISTER_OUT r5 0xFFFFFFFF00000000

test_xor_2:
  #_ REGISTER_IN r4 0xAAAAAAAAAAAAAAAA
  #_ REGISTER_IN r5 0x5555555555555555
  xor r3, r4, r5
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFFFFF
  #_ REGISTER_OUT r4 0xAAAAAAAAAAAAAAAA
  #_ REGISTER_OUT r5 0x5555555555555555

test_xor_2_constant:
  li r4, -1
  srdi r4, r4, 1
  sldi r4, r4, 1
  li r5, -1
  srdi r5, r5, 1
  xor r3, r4, r5
  blr
  #_ REGISTER_OUT r3 0x8000000000000001
  #_ REGISTER_OUT r4 0xFFFFFFFFFFFFFFFE
  #_ REGISTER_OUT r5 0x7FFFFFFFFFFFFFFF

test_xor_3:
  #_ REGISTER_IN r4 0x0000000000000000
  #_ REGISTER_IN r5 0xFFFFFFFFFFFFFFFF
  xor r3, r4, r5
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFFFFF
  #_ REGISTER_OUT r4 0x0000000000000000
  #_ REGISTER_OUT r5 0xFFFFFFFFFFFFFFFF

test_xor_3_constant:
  li r4, 0
  li r5, -1
  xor r3, r4, r5
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFFFFF
  #_ REGISTER_OUT r4 0x0000000000000000
  #_ REGISTER_OUT r5 0xFFFFFFFFFFFFFFFF

test_xor_4:
  #_ REGISTER_IN r4 0x123456789ABCDEF0
  #_ REGISTER_IN r5 0x123456789ABCDEF0
  xor r3, r4, r5
  blr
  #_ REGISTER_OUT r3 0x0000000000000000
  #_ REGISTER_OUT r4 0x123456789ABCDEF0
  #_ REGISTER_OUT r5 0x123456789ABCDEF0

test_xor_4_constant:
  lis r4, 0x1234
  ori r4, r4, 0x5678
  sldi r4, r4, 32
  oris r4, r4, 0x9ABC
  ori r4, r4, 0xDEF0
  mr r5, r4
  xor r3, r4, r5
  blr
  #_ REGISTER_OUT r3 0x0000000000000000
  #_ REGISTER_OUT r4 0x123456789ABCDEF0
  #_ REGISTER_OUT r5 0x123456789ABCDEF0

test_xor_5:
  #_ REGISTER_IN r4 0xFF00FF00FF00FF00
  #_ REGISTER_IN r5 0x00FF00FF00FF00FF
  xor r3, r4, r5
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFFFFF
  #_ REGISTER_OUT r4 0xFF00FF00FF00FF00
  #_ REGISTER_OUT r5 0x00FF00FF00FF00FF

test_xor_5_constant:
  lis r4, 0xFF00
  ori r4, r4, 0xFF00
  sldi r4, r4, 32
  oris r4, r4, 0xFF00
  ori r4, r4, 0xFF00
  lis r5, 0x00FF
  ori r5, r5, 0x00FF
  sldi r5, r5, 32
  oris r5, r5, 0x00FF
  ori r5, r5, 0x00FF
  xor r3, r4, r5
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFFFFF
  #_ REGISTER_OUT r4 0xFF00FF00FF00FF00
  #_ REGISTER_OUT r5 0x00FF00FF00FF00FF
