On Wed, 22 Aug 2007, Paolo Bonzini wrote:
> > With the modifications I made, GCC still compiled fine. However,
> > libgcc and libstdc++ DO still get build with the missing instructions
> > (according to objdump -D). Why is that? Is that a consequence of the
> > ADA files? Or something else? Where should I look? Is the it ada files
> > that are the cause of the problem I'm seeing?
>
> It must be something else. I'm not sure what, though. It might be
> something as simple as an instruction built from substrings. For
> example, search for altivec_vmsumu<VI_char>m in altivec.md.
I just re-checked for that and I can't find any. I have attached a diff
for my modified altivec.h, altivec.md and rs6000.c files. Patch in
gcc/config/rs6000 subtree with -p1.
Can anyone think of anywhere else I should be looking? Where else could
these instructions be coming from?
This is really not relevant to the posted patch; however, I'll still post it
here.
The proper way to disable Altivec instructions is to leave altivec.h and
rs6000.c aside, and just change the "TARGET_ALTIVEC" to something like
"(TARGET_ALTIVEC && 0)". The remaining code will automagically be disabled.
Later, you can add your option and the corresponding TARGET_VMX128 mask, and
go back replacing the "TARGET_ALTIVEC && 0" with "TARGET_ALTIVEC &&
!TARGET_VMX128".
Thanks for that. This is the sort of thing I was hoping to eventually
implement (rather than re-implementing vmx128.h and vmx128.md from scratch
with 90% overlap with altivec.h and altivec.md). But I'd really like to go
with a quick and dirty proof of concept first, which is to just cut out
the offending instructions from altivec support, just to make sure that it
would work.
Gordan