test_subfx_1:
  #_ REGISTER_IN r4 0x0000000000003000
  #_ REGISTER_IN r5 0x0000000000001000
  subf. r3, r4, r5
  mfcr r12
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFE000
  #_ REGISTER_OUT r12 0x0000000080000000

test_subfx_1_constant:
  li r4, 0x3000
  li r5, 0x1000
  subf. r3, r4, r5
  mfcr r12
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFE000
  #_ REGISTER_OUT r12 0x0000000080000000

test_subfx_underflow:
  #_ REGISTER_IN r4 0x8000000000000000
  #_ REGISTER_IN r5 0x0000000000000001
  subf. r3, r4, r5
  mfcr r12
  blr
  #_ REGISTER_OUT r3 0x8000000000000001
  #_ REGISTER_OUT r12 0x0000000040000000

test_subfx_negative:
  #_ REGISTER_IN r4 0x0000000000000001
  #_ REGISTER_IN r5 0xFFFFFFFFFFFFFFFF
  subf. r3, r4, r5
  mfcr r12
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFFFFE
  #_ REGISTER_OUT r12 0x0000000080000000

test_subfcx_1:
  #_ REGISTER_IN r4 0x0000000000003000
  #_ REGISTER_IN r5 0x0000000000001000
  subfc. r3, r4, r5
  mfcr r12
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFE000
  #_ REGISTER_OUT r12 0x0000000080000000

test_subfcx_borrow:
  #_ REGISTER_IN r4 0x0000000000000002
  #_ REGISTER_IN r5 0x0000000000000001
  subfc. r3, r4, r5
  mfcr r12
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFFFFF
  #_ REGISTER_OUT r12 0x0000000080000000

test_subfex_1:
  #_ REGISTER_IN r4 0x0000000000003000
  #_ REGISTER_IN r5 0x0000000000001000
  #_ REGISTER_IN r0 0x0000000000000000
  mtxer r0
  subfe. r3, r4, r5
  mfcr r12
  mfxer r6
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFDFFF
  #_ REGISTER_OUT r6 0x0000000000000000
  #_ REGISTER_OUT r12 0x0000000080000000

test_subfmex_1:
  #_ REGISTER_IN r4 0x0000000000001000
  #_ REGISTER_IN r0 0x0000000000000000
  mtxer r0
  subfme. r3, r4
  mfcr r12
  mfxer r6
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFEFFE
  #_ REGISTER_OUT r6 0x0000000020000000
  #_ REGISTER_OUT r12 0x0000000080000000

test_subfzex_1:
  #_ REGISTER_IN r4 0x0000000000001000
  #_ REGISTER_IN r0 0x0000000000000000
  mtxer r0
  subfze. r3, r4
  mfcr r12
  mfxer r6
  blr
  #_ REGISTER_OUT r3 0xFFFFFFFFFFFFEFFF
  #_ REGISTER_OUT r6 0x0000000000000000
  #_ REGISTER_OUT r12 0x0000000080000000
