mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
target-ppc: Add xscvdphp, xscvhpdp
xscvdphp: VSX Scalar round & Convert Double-Precision format to Half-Precision format xscvhpdp: VSX Scalar Convert Half-Precision format to Double-Precision format Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
ffc67420f9
commit
f566c0474a
6 changed files with 62 additions and 0 deletions
|
@ -356,6 +356,26 @@ static inline int float16_is_any_nan(float16 a)
|
|||
return ((float16_val(a) & ~0x8000) > 0x7c00);
|
||||
}
|
||||
|
||||
static inline int float16_is_neg(float16 a)
|
||||
{
|
||||
return float16_val(a) >> 15;
|
||||
}
|
||||
|
||||
static inline int float16_is_infinity(float16 a)
|
||||
{
|
||||
return (float16_val(a) & 0x7fff) == 0x7c00;
|
||||
}
|
||||
|
||||
static inline int float16_is_zero(float16 a)
|
||||
{
|
||||
return (float16_val(a) & 0x7fff) == 0;
|
||||
}
|
||||
|
||||
static inline int float16_is_zero_or_denormal(float16 a)
|
||||
{
|
||||
return (float16_val(a) & 0x7c00) == 0;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| The pattern for a default generated half-precision NaN.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue