Re: [Qemu-devel] [PATCH 14/17] s390x: Implement opcode helpers

2011-03-29 Thread Alexander Graf
On 28.03.2011, at 19:55, Peter Maydell wrote: > On 28 March 2011 18:23, Alexander Graf wrote: >> On 03/24/2011 06:29 PM, Peter Maydell wrote: +/* condition codes for binary FP ops */ +static uint32_t set_cc_f32(float32 v1, float32 v2) +{ +if (float32_is_any_nan(v1) || flo

Re: [Qemu-devel] [PATCH 14/17] s390x: Implement opcode helpers

2011-03-28 Thread Peter Maydell
On 28 March 2011 18:23, Alexander Graf wrote: > On 03/24/2011 06:29 PM, Peter Maydell wrote: >>> +/* condition codes for binary FP ops */ >>> +static uint32_t set_cc_f32(float32 v1, float32 v2) >>> +{ >>> +    if (float32_is_any_nan(v1) || float32_is_any_nan(v2)) { >>> +        return 3; >>> +    

Re: [Qemu-devel] [PATCH 14/17] s390x: Implement opcode helpers

2011-03-28 Thread Richard Henderson
On 03/28/2011 10:23 AM, Alexander Graf wrote: > I just checked the macros there and it looks like > float32_compare_quiet returns eq when both numbers are NaN. No it doesn't -- a == b will never be true for either operand as NaN. Have a look at the "real" softfloat version anyway, not the softflo

Re: [Qemu-devel] [PATCH 14/17] s390x: Implement opcode helpers

2011-03-28 Thread Alexander Graf
On 03/24/2011 06:29 PM, Peter Maydell wrote: On 24 March 2011 15:58, Alexander Graf wrote: This is more random comments in passing than a thorough review; sorry. +#if HOST_LONG_BITS == 64&& defined(__GNUC__) +/* assuming 64-bit hosts have __uint128_t */ +__uint128_t dividend

Re: [Qemu-devel] [PATCH 14/17] s390x: Implement opcode helpers

2011-03-24 Thread Alexander Graf
Am 24.03.2011 um 18:29 schrieb Peter Maydell : > On 24 March 2011 15:58, Alexander Graf wrote: > > This is more random comments in passing than a thorough review; sorry. > >> +#if HOST_LONG_BITS == 64 && defined(__GNUC__) >> +/* assuming 64-bit hosts have __uint128_t */ >> +__u

Re: [Qemu-devel] [PATCH 14/17] s390x: Implement opcode helpers

2011-03-24 Thread Alexander Graf
Am 24.03.2011 um 18:41 schrieb Richard Henderson : > On 03/24/2011 10:29 AM, Peter Maydell wrote: >> On 24 March 2011 15:58, Alexander Graf wrote: >> >> This is more random comments in passing than a thorough review; sorry. >> >>> +#if HOST_LONG_BITS == 64 && defined(__GNUC__) >>> +/*

Re: [Qemu-devel] [PATCH 14/17] s390x: Implement opcode helpers

2011-03-24 Thread Peter Maydell
On 24 March 2011 15:58, Alexander Graf wrote: This is more random comments in passing than a thorough review; sorry. > +#if HOST_LONG_BITS == 64 && defined(__GNUC__) > +        /* assuming 64-bit hosts have __uint128_t */ > +        __uint128_t dividend = (((__uint128_t)env->regs[r1]) << 64) | >

Re: [Qemu-devel] [PATCH 14/17] s390x: Implement opcode helpers

2011-03-24 Thread Richard Henderson
On 03/24/2011 10:29 AM, Peter Maydell wrote: > On 24 March 2011 15:58, Alexander Graf wrote: > > This is more random comments in passing than a thorough review; sorry. > >> +#if HOST_LONG_BITS == 64 && defined(__GNUC__) >> +/* assuming 64-bit hosts have __uint128_t */ >> +__uint1