diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2017-02-27 10:27:54 +0530 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-03-01 11:23:39 +1100 |
commit | dd09c36159858c66ab6e47c688e4177dd3912bf0 (patch) | |
tree | 1f48513b6d6035239103c89b4d5d22a13b5335e1 /target/s390x | |
parent | e78308fd3959c2694c8c366efdccacdd11997ac8 (diff) | |
download | qemu-dd09c36159858c66ab6e47c688e4177dd3912bf0.zip qemu-dd09c36159858c66ab6e47c688e4177dd3912bf0.tar.gz qemu-dd09c36159858c66ab6e47c688e4177dd3912bf0.tar.bz2 |
target/ppc: support for 32-bit carry and overflow
POWER ISA 3.0 adds CA32 and OV32 status in 64-bit mode. Add the flags
and corresponding defines.
Moreover, CA32 is updated when CA is updated and OV32 is updated when OV
is updated.
Arithmetic instructions:
* Addition and Substractions:
addic, addic., subfic, addc, subfc, adde, subfe, addme, subfme,
addze, and subfze always updates CA and CA32.
=> CA reflects the carry out of bit 0 in 64-bit mode and out of
bit 32 in 32-bit mode.
=> CA32 reflects the carry out of bit 32 independent of the
mode.
=> SO and OV reflects overflow of the 64-bit result in 64-bit
mode and overflow of the low-order 32-bit result in 32-bit
mode
=> OV32 reflects overflow of the low-order 32-bit independent of
the mode
* Multiply Low and Divide:
For mulld, divd, divde, divdu and divdeu: SO, OV, and OV32 bits
reflects overflow of the 64-bit result
For mullw, divw, divwe, divwu and divweu: SO, OV, and OV32 bits
reflects overflow of the 32-bit result
* Negate with OE=1 (nego)
For 64-bit mode if the register RA contains
0x8000_0000_0000_0000, OV and OV32 are set to 1.
For 32-bit mode if the register RA contains 0x8000_0000, OV and
OV32 are set to 1.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/s390x')
0 files changed, 0 insertions, 0 deletions