This is the mail archive of the 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]

Re: dangerous cleverness? ppc int<->float conversions, subreg

> Yes, I've seen this.  It doesn't work perfectly, although as you say that
> may have something to do with the alignment (Apple's alignment rules are
> arcane).  More to the point, a boolean is not enough to do the right
> thing.  PPC misalignment penalties come in 3 flavors, not 2 ("optimal",
> "fast", "poor" in the 750 book), they're dependent on the register type,
> and I think they're also dependent on the target cpu.  Thus, moving
> a "struct {short x; short y;};" with int load and store is a good idea
> even if it is not 4-byte aligned, but moving it with float load and
> store may get a slow alignment exception.

It's boolean for gcc's purposes: do we want to coalesce the access or not?
You have a point that it might be a good idea to consider the register
class.  Before reload, we could use ALL_REGS or NO_REGS, depending on
if we want SLOW_UNALIGNED_ACCESS to mean that it's slow for all of the
registers in the class, or any registers in the class.

Joern Rennecke                  |            gcc expert for hire           |  send enquiries to:

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