mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-softfloat-20160122' into staging
softfloat: * drop confusing softfloat-only types * fix return type of roundAndPackFloat16 # gpg: Signature made Fri 22 Jan 2016 15:15:17 GMT using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" # gpg: aka "Peter Maydell <pmaydell@gmail.com>" # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" * remotes/pmaydell/tags/pull-softfloat-20160122: softfloat: fix return type of roundAndPackFloat16 fpu: Replace uint8 typedef with uint8_t fpu: Replace int8 typedef with int8_t fpu: Replace uint32 typedef with uint32_t fpu: Replace int32 typedef with int32_t fpu: Replace uint64 typedef with uint64_t fpu: Replace int64 typedef with int64_t Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
+1
-1
@@ -434,7 +434,7 @@ int qcrypto_secret_lookup(const char *secretid,
|
||||
return -1;
|
||||
}
|
||||
|
||||
*data = g_new0(uint8, secret->rawlen + 1);
|
||||
*data = g_new0(uint8_t, secret->rawlen + 1);
|
||||
memcpy(*data, secret->rawdata, secret->rawlen);
|
||||
(*data)[secret->rawlen] = '\0';
|
||||
*datalen = secret->rawlen;
|
||||
|
||||
+13
-13
@@ -164,7 +164,7 @@ static inline void
|
||||
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
|
||||
{
|
||||
uint64_t z0, z1;
|
||||
int8 negCount = ( - count ) & 63;
|
||||
int8_t negCount = ( - count ) & 63;
|
||||
|
||||
if ( count == 0 ) {
|
||||
z1 = a1;
|
||||
@@ -201,7 +201,7 @@ static inline void
|
||||
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
|
||||
{
|
||||
uint64_t z0, z1;
|
||||
int8 negCount = ( - count ) & 63;
|
||||
int8_t negCount = ( - count ) & 63;
|
||||
|
||||
if ( count == 0 ) {
|
||||
z1 = a1;
|
||||
@@ -236,7 +236,7 @@ static inline void
|
||||
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
|
||||
{
|
||||
uint64_t z0, z1;
|
||||
int8 negCount = ( - count ) & 63;
|
||||
int8_t negCount = ( - count ) & 63;
|
||||
|
||||
if ( count == 0 ) {
|
||||
z1 = a1;
|
||||
@@ -294,7 +294,7 @@ static inline void
|
||||
)
|
||||
{
|
||||
uint64_t z0, z1, z2;
|
||||
int8 negCount = ( - count ) & 63;
|
||||
int8_t negCount = ( - count ) & 63;
|
||||
|
||||
if ( count == 0 ) {
|
||||
z2 = a2;
|
||||
@@ -371,7 +371,7 @@ static inline void
|
||||
)
|
||||
{
|
||||
uint64_t z0, z1, z2;
|
||||
int8 negCount;
|
||||
int8_t negCount;
|
||||
|
||||
z2 = a2<<count;
|
||||
z1 = a1<<count;
|
||||
@@ -428,7 +428,7 @@ static inline void
|
||||
)
|
||||
{
|
||||
uint64_t z0, z1, z2;
|
||||
int8 carry0, carry1;
|
||||
int8_t carry0, carry1;
|
||||
|
||||
z2 = a2 + b2;
|
||||
carry1 = ( z2 < a2 );
|
||||
@@ -484,7 +484,7 @@ static inline void
|
||||
)
|
||||
{
|
||||
uint64_t z0, z1, z2;
|
||||
int8 borrow0, borrow1;
|
||||
int8_t borrow0, borrow1;
|
||||
|
||||
z2 = a2 - b2;
|
||||
borrow1 = ( a2 < b2 );
|
||||
@@ -645,7 +645,7 @@ static uint32_t estimateSqrt32(int_fast16_t aExp, uint32_t a)
|
||||
0x0A2D, 0x08AF, 0x075A, 0x0629, 0x051A, 0x0429, 0x0356, 0x029E,
|
||||
0x0200, 0x0179, 0x0109, 0x00AF, 0x0068, 0x0034, 0x0012, 0x0002
|
||||
};
|
||||
int8 index;
|
||||
int8_t index;
|
||||
uint32_t z;
|
||||
|
||||
index = ( a>>27 ) & 15;
|
||||
@@ -669,7 +669,7 @@ static uint32_t estimateSqrt32(int_fast16_t aExp, uint32_t a)
|
||||
| `a'. If `a' is zero, 32 is returned.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static int8 countLeadingZeros32( uint32_t a )
|
||||
static int8_t countLeadingZeros32( uint32_t a )
|
||||
{
|
||||
#if SOFTFLOAT_GNUC_PREREQ(3, 4)
|
||||
if (a) {
|
||||
@@ -678,7 +678,7 @@ static int8 countLeadingZeros32( uint32_t a )
|
||||
return 32;
|
||||
}
|
||||
#else
|
||||
static const int8 countLeadingZerosHigh[] = {
|
||||
static const int8_t countLeadingZerosHigh[] = {
|
||||
8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
@@ -696,7 +696,7 @@ static int8 countLeadingZeros32( uint32_t a )
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
int8 shiftCount;
|
||||
int8_t shiftCount;
|
||||
|
||||
shiftCount = 0;
|
||||
if ( a < 0x10000 ) {
|
||||
@@ -717,7 +717,7 @@ static int8 countLeadingZeros32( uint32_t a )
|
||||
| `a'. If `a' is zero, 64 is returned.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static int8 countLeadingZeros64( uint64_t a )
|
||||
static int8_t countLeadingZeros64( uint64_t a )
|
||||
{
|
||||
#if SOFTFLOAT_GNUC_PREREQ(3, 4)
|
||||
if (a) {
|
||||
@@ -726,7 +726,7 @@ static int8 countLeadingZeros64( uint64_t a )
|
||||
return 64;
|
||||
}
|
||||
#else
|
||||
int8 shiftCount;
|
||||
int8_t shiftCount;
|
||||
|
||||
shiftCount = 0;
|
||||
if ( a < ( (uint64_t) 1 )<<32 ) {
|
||||
|
||||
@@ -174,7 +174,7 @@ const float128 float128_default_nan
|
||||
| should be simply `float_exception_flags |= flags;'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
void float_raise(int8 flags, float_status *status)
|
||||
void float_raise(int8_t flags, float_status *status)
|
||||
{
|
||||
status->float_exception_flags |= flags;
|
||||
}
|
||||
|
||||
+110
-110
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1454,7 +1454,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
|
||||
ISADevice **rtc_state,
|
||||
bool create_fdctrl,
|
||||
bool no_vmport,
|
||||
uint32 hpet_irqs)
|
||||
uint32_t hpet_irqs)
|
||||
{
|
||||
int i;
|
||||
DriveInfo *fd[MAX_FD];
|
||||
|
||||
@@ -405,7 +405,7 @@ static void ipmi_bt_class_init(IPMIInterfaceClass *iic)
|
||||
|
||||
typedef struct ISAIPMIBTDevice {
|
||||
ISADevice dev;
|
||||
int32 isairq;
|
||||
int32_t isairq;
|
||||
IPMIBT bt;
|
||||
IPMIFwInfo fwinfo;
|
||||
} ISAIPMIBTDevice;
|
||||
|
||||
@@ -368,7 +368,7 @@ static void ipmi_kcs_class_init(IPMIInterfaceClass *iic)
|
||||
|
||||
typedef struct ISAIPMIKCSDevice {
|
||||
ISADevice dev;
|
||||
int32 isairq;
|
||||
int32_t isairq;
|
||||
IPMIKCS kcs;
|
||||
IPMIFwInfo fwinfo;
|
||||
} ISAIPMIKCSDevice;
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@ static void imx25_ccm_reset(DeviceState *dev)
|
||||
|
||||
static uint64_t imx25_ccm_read(void *opaque, hwaddr offset, unsigned size)
|
||||
{
|
||||
uint32 value = 0;
|
||||
uint32_t value = 0;
|
||||
IMX25CCMState *s = (IMX25CCMState *)opaque;
|
||||
|
||||
if (offset < 0x70) {
|
||||
|
||||
+1
-1
@@ -261,7 +261,7 @@ static void imx31_ccm_reset(DeviceState *dev)
|
||||
|
||||
static uint64_t imx31_ccm_read(void *opaque, hwaddr offset, unsigned size)
|
||||
{
|
||||
uint32 value = 0;
|
||||
uint32_t value = 0;
|
||||
IMX31CCMState *s = (IMX31CCMState *)opaque;
|
||||
|
||||
if ((offset >> 2) < IMX31_CCM_MAX_REG) {
|
||||
|
||||
@@ -49,7 +49,7 @@ vmw_shmem_rw(hwaddr addr, void *buf, int len, int is_write)
|
||||
}
|
||||
|
||||
static inline void
|
||||
vmw_shmem_set(hwaddr addr, uint8 val, int len)
|
||||
vmw_shmem_set(hwaddr addr, uint8_t val, int len)
|
||||
{
|
||||
int i;
|
||||
VMW_SHPRN("SHMEM set: %" PRIx64 ", len: %d (value 0x%X)", addr, len, val);
|
||||
|
||||
+1
-1
@@ -522,7 +522,7 @@ vmxnet3_dec_rx_completion_counter(VMXNET3State *s, int qidx)
|
||||
vmxnet3_ring_dec(&s->rxq_descr[qidx].comp_ring);
|
||||
}
|
||||
|
||||
static void vmxnet3_complete_packet(VMXNET3State *s, int qidx, uint32 tx_ridx)
|
||||
static void vmxnet3_complete_packet(VMXNET3State *s, int qidx, uint32_t tx_ridx)
|
||||
{
|
||||
struct Vmxnet3_TxCompDesc txcq_descr;
|
||||
|
||||
|
||||
@@ -459,7 +459,7 @@ void spapr_hotplug_req_add_by_index(sPAPRDRConnector *drc)
|
||||
{
|
||||
sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
|
||||
sPAPRDRConnectorType drc_type = drck->get_type(drc);
|
||||
uint32 index = drck->get_index(drc);
|
||||
uint32_t index = drck->get_index(drc);
|
||||
|
||||
spapr_hotplug_req_event(RTAS_LOG_V6_HP_ID_DRC_INDEX,
|
||||
RTAS_LOG_V6_HP_ACTION_ADD, drc_type, index);
|
||||
@@ -469,7 +469,7 @@ void spapr_hotplug_req_remove_by_index(sPAPRDRConnector *drc)
|
||||
{
|
||||
sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
|
||||
sPAPRDRConnectorType drc_type = drck->get_type(drc);
|
||||
uint32 index = drck->get_index(drc);
|
||||
uint32_t index = drck->get_index(drc);
|
||||
|
||||
spapr_hotplug_req_event(RTAS_LOG_V6_HP_ID_DRC_INDEX,
|
||||
RTAS_LOG_V6_HP_ACTION_REMOVE, drc_type, index);
|
||||
|
||||
+29
-39
@@ -90,21 +90,11 @@ this code that are retained.
|
||||
#include "config-host.h"
|
||||
#include "qemu/osdep.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Each of the following `typedef's defines the most convenient type that holds
|
||||
| integers of at least as many bits as specified. For example, `uint8' should
|
||||
| be the most convenient type that can hold unsigned integers of as many as
|
||||
| 8 bits. The `flag' type must be able to hold either a 0 or 1. For most
|
||||
| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
|
||||
| to the same as `int'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
/* This 'flag' type must be able to hold at least 0 and 1. It should
|
||||
* probably be replaced with 'bool' but the uses would need to be audited
|
||||
* to check that they weren't accidentally relying on it being a larger type.
|
||||
*/
|
||||
typedef uint8_t flag;
|
||||
typedef uint8_t uint8;
|
||||
typedef int8_t int8;
|
||||
typedef unsigned int uint32;
|
||||
typedef signed int int32;
|
||||
typedef uint64_t uint64;
|
||||
typedef int64_t int64;
|
||||
|
||||
#define LIT64( a ) a##LL
|
||||
|
||||
@@ -282,7 +272,7 @@ static inline flag get_default_nan_mode(float_status *status)
|
||||
| Routine to raise any or all of the software IEC/IEEE floating-point
|
||||
| exception flags.
|
||||
*----------------------------------------------------------------------------*/
|
||||
void float_raise(int8 flags, float_status *status);
|
||||
void float_raise(int8_t flags, float_status *status);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| If `a' is denormal and we are in flush-to-zero mode then set the
|
||||
@@ -376,14 +366,14 @@ int_fast16_t float32_to_int16(float32, float_status *status);
|
||||
uint_fast16_t float32_to_uint16(float32, float_status *status);
|
||||
int_fast16_t float32_to_int16_round_to_zero(float32, float_status *status);
|
||||
uint_fast16_t float32_to_uint16_round_to_zero(float32, float_status *status);
|
||||
int32 float32_to_int32(float32, float_status *status);
|
||||
int32 float32_to_int32_round_to_zero(float32, float_status *status);
|
||||
uint32 float32_to_uint32(float32, float_status *status);
|
||||
uint32 float32_to_uint32_round_to_zero(float32, float_status *status);
|
||||
int64 float32_to_int64(float32, float_status *status);
|
||||
uint64 float32_to_uint64(float32, float_status *status);
|
||||
uint64 float32_to_uint64_round_to_zero(float32, float_status *status);
|
||||
int64 float32_to_int64_round_to_zero(float32, float_status *status);
|
||||
int32_t float32_to_int32(float32, float_status *status);
|
||||
int32_t float32_to_int32_round_to_zero(float32, float_status *status);
|
||||
uint32_t float32_to_uint32(float32, float_status *status);
|
||||
uint32_t float32_to_uint32_round_to_zero(float32, float_status *status);
|
||||
int64_t float32_to_int64(float32, float_status *status);
|
||||
uint64_t float32_to_uint64(float32, float_status *status);
|
||||
uint64_t float32_to_uint64_round_to_zero(float32, float_status *status);
|
||||
int64_t float32_to_int64_round_to_zero(float32, float_status *status);
|
||||
float64 float32_to_float64(float32, float_status *status);
|
||||
floatx80 float32_to_floatx80(float32, float_status *status);
|
||||
float128 float32_to_float128(float32, float_status *status);
|
||||
@@ -488,14 +478,14 @@ int_fast16_t float64_to_int16(float64, float_status *status);
|
||||
uint_fast16_t float64_to_uint16(float64, float_status *status);
|
||||
int_fast16_t float64_to_int16_round_to_zero(float64, float_status *status);
|
||||
uint_fast16_t float64_to_uint16_round_to_zero(float64, float_status *status);
|
||||
int32 float64_to_int32(float64, float_status *status);
|
||||
int32 float64_to_int32_round_to_zero(float64, float_status *status);
|
||||
uint32 float64_to_uint32(float64, float_status *status);
|
||||
uint32 float64_to_uint32_round_to_zero(float64, float_status *status);
|
||||
int64 float64_to_int64(float64, float_status *status);
|
||||
int64 float64_to_int64_round_to_zero(float64, float_status *status);
|
||||
uint64 float64_to_uint64(float64 a, float_status *status);
|
||||
uint64 float64_to_uint64_round_to_zero(float64 a, float_status *status);
|
||||
int32_t float64_to_int32(float64, float_status *status);
|
||||
int32_t float64_to_int32_round_to_zero(float64, float_status *status);
|
||||
uint32_t float64_to_uint32(float64, float_status *status);
|
||||
uint32_t float64_to_uint32_round_to_zero(float64, float_status *status);
|
||||
int64_t float64_to_int64(float64, float_status *status);
|
||||
int64_t float64_to_int64_round_to_zero(float64, float_status *status);
|
||||
uint64_t float64_to_uint64(float64 a, float_status *status);
|
||||
uint64_t float64_to_uint64_round_to_zero(float64 a, float_status *status);
|
||||
float32 float64_to_float32(float64, float_status *status);
|
||||
floatx80 float64_to_floatx80(float64, float_status *status);
|
||||
float128 float64_to_float128(float64, float_status *status);
|
||||
@@ -596,10 +586,10 @@ extern const float64 float64_default_nan;
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE extended double-precision conversion routines.
|
||||
*----------------------------------------------------------------------------*/
|
||||
int32 floatx80_to_int32(floatx80, float_status *status);
|
||||
int32 floatx80_to_int32_round_to_zero(floatx80, float_status *status);
|
||||
int64 floatx80_to_int64(floatx80, float_status *status);
|
||||
int64 floatx80_to_int64_round_to_zero(floatx80, float_status *status);
|
||||
int32_t floatx80_to_int32(floatx80, float_status *status);
|
||||
int32_t floatx80_to_int32_round_to_zero(floatx80, float_status *status);
|
||||
int64_t floatx80_to_int64(floatx80, float_status *status);
|
||||
int64_t floatx80_to_int64_round_to_zero(floatx80, float_status *status);
|
||||
float32 floatx80_to_float32(floatx80, float_status *status);
|
||||
float64 floatx80_to_float64(floatx80, float_status *status);
|
||||
float128 floatx80_to_float128(floatx80, float_status *status);
|
||||
@@ -681,10 +671,10 @@ extern const floatx80 floatx80_default_nan;
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE quadruple-precision conversion routines.
|
||||
*----------------------------------------------------------------------------*/
|
||||
int32 float128_to_int32(float128, float_status *status);
|
||||
int32 float128_to_int32_round_to_zero(float128, float_status *status);
|
||||
int64 float128_to_int64(float128, float_status *status);
|
||||
int64 float128_to_int64_round_to_zero(float128, float_status *status);
|
||||
int32_t float128_to_int32(float128, float_status *status);
|
||||
int32_t float128_to_int32_round_to_zero(float128, float_status *status);
|
||||
int64_t float128_to_int64(float128, float_status *status);
|
||||
int64_t float128_to_int64_round_to_zero(float128, float_status *status);
|
||||
float32 float128_to_float32(float128, float_status *status);
|
||||
float64 float128_to_float64(float128, float_status *status);
|
||||
floatx80 float128_to_floatx80(float128, float_status *status);
|
||||
|
||||
@@ -258,7 +258,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
|
||||
ISADevice **rtc_state,
|
||||
bool create_fdctrl,
|
||||
bool no_vmport,
|
||||
uint32 hpet_irqs);
|
||||
uint32_t hpet_irqs);
|
||||
void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd);
|
||||
void pc_cmos_init(PCMachineState *pcms,
|
||||
BusState *ide0, BusState *ide1,
|
||||
|
||||
+1
-1
@@ -265,7 +265,7 @@ struct DecompressParam {
|
||||
QemuMutex mutex;
|
||||
QemuCond cond;
|
||||
void *des;
|
||||
uint8 *compbuf;
|
||||
uint8_t *compbuf;
|
||||
int len;
|
||||
};
|
||||
typedef struct DecompressParam DecompressParam;
|
||||
|
||||
@@ -437,7 +437,7 @@ uint64_t helper_cvtqs(CPUAlphaState *env, uint64_t a)
|
||||
return float32_to_s(fr);
|
||||
}
|
||||
|
||||
/* Implement float64 to uint64 conversion without saturation -- we must
|
||||
/* Implement float64 to uint64_t conversion without saturation -- we must
|
||||
supply the truncated result. This behaviour is used by the compiler
|
||||
to get unsigned conversion for free with the same instruction. */
|
||||
|
||||
|
||||
+2
-2
@@ -277,7 +277,7 @@ static inline int kvm_mips_get_one_reg(CPUState *cs, uint64_t reg_id,
|
||||
return kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, &cp0reg);
|
||||
}
|
||||
|
||||
static inline int kvm_mips_get_one_ulreg(CPUState *cs, uint64 reg_id,
|
||||
static inline int kvm_mips_get_one_ulreg(CPUState *cs, uint64_t reg_id,
|
||||
target_ulong *addr)
|
||||
{
|
||||
int ret;
|
||||
@@ -294,7 +294,7 @@ static inline int kvm_mips_get_one_ulreg(CPUState *cs, uint64 reg_id,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int kvm_mips_get_one_reg64(CPUState *cs, uint64 reg_id,
|
||||
static inline int kvm_mips_get_one_reg64(CPUState *cs, uint64_t reg_id,
|
||||
uint64_t *addr)
|
||||
{
|
||||
struct kvm_one_reg cp0reg = {
|
||||
|
||||
+18
-18
@@ -1604,7 +1604,7 @@ static inline int get_enabled_exceptions(const CPUMIPSState *env, int c)
|
||||
return c & enable;
|
||||
}
|
||||
|
||||
static inline float16 float16_from_float32(int32 a, flag ieee,
|
||||
static inline float16 float16_from_float32(int32_t a, flag ieee,
|
||||
float_status *status)
|
||||
{
|
||||
float16 f_val;
|
||||
@@ -1615,7 +1615,7 @@ static inline float16 float16_from_float32(int32 a, flag ieee,
|
||||
return a < 0 ? (f_val | (1 << 15)) : f_val;
|
||||
}
|
||||
|
||||
static inline float32 float32_from_float64(int64 a, float_status *status)
|
||||
static inline float32 float32_from_float64(int64_t a, float_status *status)
|
||||
{
|
||||
float32 f_val;
|
||||
|
||||
@@ -1636,7 +1636,7 @@ static inline float32 float32_from_float16(int16_t a, flag ieee,
|
||||
return a < 0 ? (f_val | (1 << 31)) : f_val;
|
||||
}
|
||||
|
||||
static inline float64 float64_from_float32(int32 a, float_status *status)
|
||||
static inline float64 float64_from_float32(int32_t a, float_status *status)
|
||||
{
|
||||
float64 f_val;
|
||||
|
||||
@@ -1657,7 +1657,7 @@ static inline float32 float32_from_q16(int16_t a, float_status *status)
|
||||
return f_val;
|
||||
}
|
||||
|
||||
static inline float64 float64_from_q32(int32 a, float_status *status)
|
||||
static inline float64 float64_from_q32(int32_t a, float_status *status)
|
||||
{
|
||||
float64 f_val;
|
||||
|
||||
@@ -1670,9 +1670,9 @@ static inline float64 float64_from_q32(int32 a, float_status *status)
|
||||
|
||||
static inline int16_t float32_to_q16(float32 a, float_status *status)
|
||||
{
|
||||
int32 q_val;
|
||||
int32 q_min = 0xffff8000;
|
||||
int32 q_max = 0x00007fff;
|
||||
int32_t q_val;
|
||||
int32_t q_min = 0xffff8000;
|
||||
int32_t q_max = 0x00007fff;
|
||||
|
||||
int ieee_ex;
|
||||
|
||||
@@ -1690,7 +1690,7 @@ static inline int16_t float32_to_q16(float32 a, float_status *status)
|
||||
|
||||
if (ieee_ex & float_flag_overflow) {
|
||||
float_raise(float_flag_inexact, status);
|
||||
return (int32)a < 0 ? q_min : q_max;
|
||||
return (int32_t)a < 0 ? q_min : q_max;
|
||||
}
|
||||
|
||||
/* conversion to int */
|
||||
@@ -1704,7 +1704,7 @@ static inline int16_t float32_to_q16(float32 a, float_status *status)
|
||||
set_float_exception_flags(ieee_ex & (~float_flag_invalid)
|
||||
, status);
|
||||
float_raise(float_flag_overflow | float_flag_inexact, status);
|
||||
return (int32)a < 0 ? q_min : q_max;
|
||||
return (int32_t)a < 0 ? q_min : q_max;
|
||||
}
|
||||
|
||||
if (q_val < q_min) {
|
||||
@@ -1720,11 +1720,11 @@ static inline int16_t float32_to_q16(float32 a, float_status *status)
|
||||
return (int16_t)q_val;
|
||||
}
|
||||
|
||||
static inline int32 float64_to_q32(float64 a, float_status *status)
|
||||
static inline int32_t float64_to_q32(float64 a, float_status *status)
|
||||
{
|
||||
int64 q_val;
|
||||
int64 q_min = 0xffffffff80000000LL;
|
||||
int64 q_max = 0x000000007fffffffLL;
|
||||
int64_t q_val;
|
||||
int64_t q_min = 0xffffffff80000000LL;
|
||||
int64_t q_max = 0x000000007fffffffLL;
|
||||
|
||||
int ieee_ex;
|
||||
|
||||
@@ -1742,7 +1742,7 @@ static inline int32 float64_to_q32(float64 a, float_status *status)
|
||||
|
||||
if (ieee_ex & float_flag_overflow) {
|
||||
float_raise(float_flag_inexact, status);
|
||||
return (int64)a < 0 ? q_min : q_max;
|
||||
return (int64_t)a < 0 ? q_min : q_max;
|
||||
}
|
||||
|
||||
/* conversion to integer */
|
||||
@@ -1756,20 +1756,20 @@ static inline int32 float64_to_q32(float64 a, float_status *status)
|
||||
set_float_exception_flags(ieee_ex & (~float_flag_invalid)
|
||||
, status);
|
||||
float_raise(float_flag_overflow | float_flag_inexact, status);
|
||||
return (int64)a < 0 ? q_min : q_max;
|
||||
return (int64_t)a < 0 ? q_min : q_max;
|
||||
}
|
||||
|
||||
if (q_val < q_min) {
|
||||
float_raise(float_flag_overflow | float_flag_inexact, status);
|
||||
return (int32)q_min;
|
||||
return (int32_t)q_min;
|
||||
}
|
||||
|
||||
if (q_max < q_val) {
|
||||
float_raise(float_flag_overflow | float_flag_inexact, status);
|
||||
return (int32)q_max;
|
||||
return (int32_t)q_max;
|
||||
}
|
||||
|
||||
return (int32)q_val;
|
||||
return (int32_t)q_val;
|
||||
}
|
||||
|
||||
#define MSA_FLOAT_COND(DEST, OP, ARG1, ARG2, BITS, QUIET) \
|
||||
|
||||
+1
-1
@@ -1433,7 +1433,7 @@ static int kvm_s390_store_status(S390CPU *cpu, hwaddr addr, bool store_arch)
|
||||
cpu_physical_memory_write(offsetof(LowCore, ar_access_id), &ar_id, 1);
|
||||
}
|
||||
for (i = 0; i < 16; ++i) {
|
||||
*((uint64 *)mem + i) = get_freg(&cpu->env, i)->ll;
|
||||
*((uint64_t *)mem + i) = get_freg(&cpu->env, i)->ll;
|
||||
}
|
||||
memcpy(mem + 128, &cpu->env.regs, 128);
|
||||
memcpy(mem + 256, &cpu->env.psw, 16);
|
||||
|
||||
@@ -439,7 +439,7 @@ static void wait_for_log_fd(TestServer *s)
|
||||
g_mutex_unlock(&s->data_mutex);
|
||||
}
|
||||
|
||||
static void write_guest_mem(TestServer *s, uint32 seed)
|
||||
static void write_guest_mem(TestServer *s, uint32_t seed)
|
||||
{
|
||||
uint32_t *guest_mem;
|
||||
int i, j;
|
||||
|
||||
Reference in New Issue
Block a user