This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] decimal float point patch based on libdecnumber: gdb patch
- From: Daniel Jacobowitz <drow at false dot org>
- To: Wu Zhou <woodzltc at cn dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 21 Aug 2006 08:50:31 -0400
- Subject: Re: [RFC] decimal float point patch based on libdecnumber: gdb patch
- References: <20060821070736.tr378yu70gk8s8cc@imap.linux.ibm.com>
On Mon, Aug 21, 2006 at 07:07:36AM -0400, Wu Zhou wrote:
> decimal128 is defined like this in libdecnumber:
>
> typedef struct
> {
> uint8_t bytes[DECIMAL128_Bytes]; /* decimal128: 1, 5, 12, 110 bits */
> } decimal128;
>
> It is always big-endian.
>
> When parsing dfp constant in our patch, we are also using a byte array
> to store its value. It is big-endian too:
>
> struct {
> gdb_byte val[16];
> struct type *type;
> } typed_val_decfloat;
>
> But when transfering them into gdb's value system
> (value_from_decfloat), we need to do endianess transfer in little
> endian machine. This is why exchange_dfp is needed.
Why? Why can't that use exactly the same big endian representation?
It's big endian on the target, it's big endian in the library, so what
are you doing that needs it to be little endian?
Sorry to keep asking this; I really want to understand this one issue
before I review the code.
--
Daniel Jacobowitz
CodeSourcery