This is the mail archive of the
gcc@gcc.gnu.org
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: <c568a2600908311220m60550051ne55455ea03888cc0@mail.gmail.com> <m3zl9frdbo.fsf@google.com> <c568a2600908311307m3410d5d0va3571e9bbc90ca@mail.gmail.com> <4A9C345E.2030600@redhat.com> <c568a2600908311407i154c858eq9c5b085cafdc4d3b@mail.gmail.com> <4A9C4029.2070205@redhat.com>
On Mon, Aug 31, 2009 at 5:27 PM, Richard Henderson<rth@redhat.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 ...))
>
> No.
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,
Jc