Re: [Qemu-devel] [PATCH 09/37] libdecnumber: Introduce decNumberFrom[U]Int64

2014-04-18 Thread Richard Henderson
On 04/18/2014 07:50 AM, Tom Musta wrote: > +uint64_t unsig; > +if (in >= 0) { > +unsig = in; > +} else { /* negative (possibly BADINT) */ > +if (in == INT64_MIN) { > +unsig = 1ull << 63; /* special case */ > +} else { > +

[Qemu-devel] [PATCH 09/37] libdecnumber: Introduce decNumberFrom[U]Int64

2014-04-18 Thread Tom Musta
Introduce two conversion functions to the libdecnumber library. These conversions transform 64 bit integers to the internal decNumber representation. Both a signed and unsigned version is added. Signed-off-by: Tom Musta --- include/libdecnumber/decNumber.h |2 ++ libdecnumber/decNumber.c