This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: insv vs one-bit fields


Revisiting an old thread...

> On Fri, Sep 02, 2005 at 09:40:20PM -0400, DJ Delorie wrote:
> > So... why is it illegal to put a constant into a single bit field?
> 
> Probably because it was more efficient to use some other pattern
> for some other target.

That's a bad reason to put it in the MI code, since the target could
simply reject those requests itself.  Does anyone remember which
target needed this?  If not, can we remove that test?

> But there's absolutely zero chance you can reliably use a volatile
> bit field to emit a given insn sequence necessary for accessing a
> hardware register.

I don't need reliable, I'm working on optimal.  If/when the compiler
can detect that a single "bit insert" opcode can be used instead of a
read/change/write opcode sequence, it's a big win.  The fact that the
bitfield is volatile means that a lot of other optimizations get
bypassed, the only way to get it in there is to use insv.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]