Re: Issue with subregs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

On Thu, Jan 30, 2020 at 11:19:18AM +0100, Henri Cloetens wrote:
> - It is indeed true subreg only works on bytes.
> - So, I changed the declaration:
>   a. I declared all 12 condition code bits as BYTES (QI)

That's not going to work.  The separate 3-bit fields are still at offsets
0, 3, 6, 9 bit.  You cannot use subregs to access them.

>   b. I split it in 4 CC fields (cfr below), and declared each of these 
> as SI.

Why not as CCmode?  That's what they are, after all.

> - Then, the compare addresses the CC field in SI mode, the branch in QI
>   mode, and all goes well. I mean, it does not matter if I declare SI 
> or BI, because
>   the compare instruction only writes 0 or 1, and the branch 
> instruction tests only
>   for 0 or 1.

Or do the compare insns only set single bits?  Not (e.g.) all of "less
than", "equal to", "greater than" at once?


Segher



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux