This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC PATCH] Typed DWARF stack
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Jason Merrill <jason at redhat dot com>, Cary Coutant <ccoutant at google dot com>, gcc-patches at gcc dot gnu dot org, Roland McGrath <roland at hack dot frob dot com>, Jan Kratochvil <jkratoch at redhat dot com>, Mark Wielaard <mjw at redhat dot com>
- Date: Wed, 4 May 2011 20:33:53 +0200
- Subject: Re: [RFC PATCH] Typed DWARF stack
- References: <20110325113237.GY18914@tyan-ft48-01.lab.bos.redhat.com> <m38vum1gw7.fsf@fleche.redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, May 04, 2011 at 12:04:40PM -0600, Tom Tromey wrote:
> Should DW_OP_bra be restricted to integral types? Several other opcodes
Yes. If you want to test other types, just compare them against 0
using DW_OP_ne etc.
> Currently, the comparison operators are all defined as performing signed
> operations. So, what should happen in this case:
>
> DW_OP_lit0
> DW_OP_GNU_convert <unsigned int>
> DW_OP_GNU_const_type <unsigned int> -1
> DW_OP_gt
>
> That is, should this ignore the type (perhaps just using the type
> width), or is this a bug in the spec?
Whenever you have explicit type, use that type for comparisons, including
its signedness.
Jakub