Re: [Qemu-devel] [PATCH v3 08/10] target-xtensa: implement FP0 conversions

2012-09-19 Thread Max Filippov
On Thu, Sep 20, 2012 at 1:59 AM, Richard Henderson wrote: > On 09/18/2012 05:23 PM, Max Filippov wrote: >> +uint32_t HELPER(ftoi)(float32 v, uint32_t rounding_mode, uint32_t scale) >> +{ >> +float_status fp_status = {0}; >> + >> +set_float_rounding_mode(rounding_mode, &fp_status); >> +

Re: [Qemu-devel] [PATCH v3 08/10] target-xtensa: implement FP0 conversions

2012-09-19 Thread Richard Henderson
On 09/18/2012 05:23 PM, Max Filippov wrote: > +uint32_t HELPER(ftoi)(float32 v, uint32_t rounding_mode, uint32_t scale) > +{ > +float_status fp_status = {0}; > + > +set_float_rounding_mode(rounding_mode, &fp_status); > +return float32_to_int32( > +float32_scalbn(v, scale, &f

[Qemu-devel] [PATCH v3 08/10] target-xtensa: implement FP0 conversions

2012-09-18 Thread Max Filippov
These are FP to integer and integer to FP conversion opcodes. See ISA, 4.3.10 for more details. Note that ISA description for utrunc.s is currently incorrect and will be fixed in future revisions. Signed-off-by: Max Filippov --- target-xtensa/helper.h|4 +++ target-xtensa/op_helper.c |