This is the mail archive of the
mailing list for the GCC project.
Re: Bit fields
- From: Jean Christophe Beyler <jean dot christophe dot beyler at gmail dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 31 Aug 2009 22:20:23 -0400
- Subject: Re: Bit fields
- References: <email@example.com> <firstname.lastname@example.org> <email@example.com> <4A9C345E.firstname.lastname@example.org> <email@example.com> <4A9C4029.firstname.lastname@example.org>
On Mon, Aug 31, 2009 at 5:27 PM, Richard Henderson<email@example.com> wrote:
> On 08/31/2009 02:07 PM, Jean Christophe Beyler wrote:
>> I am going to try this but shouldn't it be :
>> (set (reg:QI new-scratch))
>> ? ? ? (zero_extract:DI ...))
Ok, I think I understand why not:
>> (insn 9 8 10 3 struct4.c:24 (set (subreg:DI (reg:QI 76) 0)
>> (zero_extract:DI (reg:DI 75)
>> (const_int 1 [0x1])
>> (const_int 0 [0x0]))) -1 (nil))
Is basically saying :
(set (reg:DI new-scratch)
(zero_extract:DI (reg:DI 75)
(const_int 1 [0x1])
(const_int 0 [0x0]))) -1 (nil))
and then apply the subreg:
(set (reg:QI 76) (subreg:QI (reg:DI new-scratch)))
which is what you were saying. I was reading the subreg the other way around.
>> Any ideas?
> Nope. ?You'll have to debug it.
Ok, is it normal to see a ashift with a negative value though or is
this already sign of a (potentially) different problem?
Thanks again and sorry about the random questions,