public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Richard Henderson <rth@redhat.com>,
	Jason Merrill <jason@redhat.com>,
	       Cary Coutant <ccoutant@google.com>,
	gcc-patches@gcc.gnu.org,
	       Roland McGrath <roland@hack.frob.com>,
	       Jan Kratochvil <jkratoch@redhat.com>,
	Mark Wielaard <mjw@redhat.com>
Subject: Re: [RFC PATCH] Typed DWARF stack
Date: Wed, 04 May 2011 20:27:00 -0000	[thread overview]
Message-ID: <m339ku1buu.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20110504183353.GI17079@tyan-ft48-01.lab.bos.redhat.com> (Jakub	Jelinek's message of "Wed, 4 May 2011 20:33:53 +0200")

>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:

Tom> Should DW_OP_bra be restricted to integral types?  Several other opcodes

Jakub> Yes.  If you want to test other types, just compare them against 0
Jakub> using DW_OP_ne etc.

Great, thanks.

Tom> Currently, the comparison operators are all defined as performing signed
Tom> operations.  So, what should happen in this case:
Tom> 
Tom> DW_OP_lit0
Tom> DW_OP_GNU_convert <unsigned int>
Tom> DW_OP_GNU_const_type <unsigned int> -1
Tom> DW_OP_gt
Tom> 
Tom> That is, should this ignore the type (perhaps just using the type
Tom> width), or is this a bug in the spec?

Jakub> Whenever you have explicit type, use that type for comparisons,
Jakub> including its signedness.

DW_OP_mod also need special treatment.

What my patch does now is that it generally uses a signed integer type
of the appropriate width for "legacy" DWARF values.  Then, for mod, if
the value's type is this special type, it converts it to an
identically-sized unsigned type, and converts back after the operation.

For DW_OP_shr, I always convert the LHS to an appropriately-sized
unsigned type first.

Tom

  reply	other threads:[~2011-05-04 19:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 11:33 Jakub Jelinek
2011-03-25 16:48 ` Roland McGrath
2011-03-28  9:25   ` Jakub Jelinek
2011-03-25 17:51 ` Cary Coutant
2011-04-16  9:28 ` [PATCH] " Jakub Jelinek
2011-04-29 21:01   ` Jason Merrill
2011-05-03 13:34   ` H.J. Lu
2011-05-08 18:57     ` H.J. Lu
2011-05-04 18:22 ` [RFC PATCH] " Tom Tromey
2011-05-04 18:30   ` Cary Coutant
2011-05-04 18:37   ` Jakub Jelinek
2011-05-04 20:27     ` Tom Tromey [this message]
2011-05-12 21:16       ` Tom Tromey
2011-05-12 21:37         ` Tom Tromey
2011-06-09 15:47 ` Typed DWARF stack and convert to untyped Jakub Jelinek
2011-06-09 18:34   ` Jakub Jelinek
2011-06-13 15:34   ` Tom Tromey

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=m339ku1buu.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=ccoutant@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    --cc=jkratoch@redhat.com \
    --cc=mjw@redhat.com \
    --cc=roland@hack.frob.com \
    --cc=rth@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).