From: Daniel Jacobowitz <drow@false.org>
To: Thiago Jung Bauermann <bauerman@br.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch 2/4] decimal floating point types
Date: Thu, 11 Oct 2007 16:00:00 -0000 [thread overview]
Message-ID: <20071011155721.GB22982@caradoc.them.org> (raw)
In-Reply-To: <20070920215539.651720008@br.ibm.com>
On Thu, Sep 20, 2007 at 06:54:12PM -0300, Thiago Jung Bauermann wrote:
> + case DW_ATE_decimal_float:
> + if (size == 16)
> + {
> + type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_DECFLOAT, cu);
> + }
> + else if (size == 8)
> + {
> + type = dwarf2_fundamental_type (objfile, FT_EXT_PREC_DECFLOAT, cu);
> + }
> + else
> + type = dwarf2_fundamental_type (objfile, FT_DECFLOAT, cu);
> + return type;
You don't need a bunch of those extra braces.
> + /* The following three are about decimal floating point types, which
> + are 32-bits, 64-bits and 128-bits respectively. */
> + builtin_type->builtin_decfloat =
> + init_type (TYPE_CODE_DECFLOAT, 32 / 8,
> + 0,
> + "decimal float", (struct objfile *) NULL);
I think our convention is to put the equals sign after the line break.
> void
> +print_decimal_floating (const gdb_byte *valaddr, struct type *type,
> + struct ui_file *stream)
> +{
> + char decstr[128];
> + unsigned len = TYPE_LENGTH (type);
> +
> + decimal_to_string (valaddr, len, decstr);
> + fputs_filtered (decstr, stream);
> + return;
> +}
Does the libdecnumber API specify that 128 bytes is enough? If so
this should be a constant in dfp.h.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-10-11 15:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-20 21:57 [patch 0/4] decimal floating point support Thiago Jung Bauermann
2007-09-20 21:57 ` [patch 2/4] decimal floating point types Thiago Jung Bauermann
2007-10-11 16:00 ` Daniel Jacobowitz [this message]
2007-10-15 18:12 ` Thiago Jung Bauermann
2007-10-24 20:11 ` Daniel Jacobowitz
2007-10-25 18:24 ` Thiago Jung Bauermann
2007-09-20 21:57 ` [patch 4/4] decimal floating point testcases Thiago Jung Bauermann
2007-10-11 16:19 ` Daniel Jacobowitz
2007-10-15 18:12 ` Thiago Jung Bauermann
2007-10-25 18:22 ` Thiago Jung Bauermann
2007-09-20 21:57 ` [patch 3/4] decimal floating point support for expressions Thiago Jung Bauermann
2007-10-11 16:18 ` Daniel Jacobowitz
2007-10-15 18:12 ` Thiago Jung Bauermann
2007-10-24 20:12 ` Daniel Jacobowitz
2007-10-25 18:40 ` Thiago Jung Bauermann
2007-09-20 21:57 ` [patch 1/4] libdecnumber support Thiago Jung Bauermann
2007-10-11 15:57 ` Daniel Jacobowitz
2007-10-11 16:07 ` Daniel Jacobowitz
2007-10-15 18:32 ` Thiago Jung Bauermann
2007-10-15 18:11 ` Thiago Jung Bauermann
2007-10-15 18:38 ` Daniel Jacobowitz
2007-10-25 18:23 ` Thiago Jung Bauermann
[not found] <20070323030737.475073862@br.ibm.com>
2007-03-27 16:30 ` [patch 2/4] decimal floating point types Thiago Jung Bauermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071011155721.GB22982@caradoc.them.org \
--to=drow@false.org \
--cc=bauerman@br.ibm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox