This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: dangerous cleverness? ppc int<->float conversions, subreg
- To: dalej at apple dot com (Dale Johannesen)
- Subject: Re: dangerous cleverness? ppc int<->float conversions, subreg
- From: Joern Rennecke <amylaar at onetel dot net dot uk>
- Date: Sat, 27 Oct 2001 02:29:26 +0100 (BST)
- Cc: dalej at apple dot com (Dale Johannesen), zack at codesourcery dot com (Zack Weinberg), gcc at gcc dot gnu dot org, dje at watson dot ibm dot com (David Edelsohn)
> 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
amylaar@onetel.net.uk | send enquiries to: jwr_jobs@onetel.net.uk