Subject: Gcc improvements (testers wanted)
To: Netbsd pc532 list <port-pc532@NetBSD.ORG>
From: Ian Dall <Ian.Dall@dsto.defence.gov.au>
List: port-pc532
Date: 08/18/1997 14:39:49
I have pretty much finished the compiler work I was doing. I am quite
pleased now with the block move code it generates. For small blocks of
known size it uses move instructions, for larger blocks it uses movmd
and for even larger blocks, or if the size is not known at compile
time it uses movsd.

Where the alignment is not known and if the size is large or unknown,
it copies bytes until the source address is aligned, then uses movsd
for the bulk of the copying.

When the -funroll-loops option is given, it never uses movmd, instead
using up to 4 movd instructions. If more than that is needed, it still
goes to the movsd method.

The 32281 support is in and it effectively uses the extra registers
and the multiply-add instructions dotf and polyf.

I did some work combining udivsi and umodsi into udivmodsi. It now
recognizes that q = n/d; r = n%d can be combined in one deid
instruction.

The only other thing I am thinking of doing is adding cache flushing
for the trampoline code. The trampoline code is only generated for
nested functions I think. We have cache flushing code in ld.so. The
version there needs to be loaded at a known place in memory. I wonder
if we could put a copy of that in crt0?

I have done the changes against gcc-2.7.2.2 rather than the netbsd
distribution with the idea of forwarding the patches to the FSF.  So,
I still need to fold them back into the netbsd distribution.

So far, it has passed the stage 3 validation, and I have built, (but
not yet tested) a netbsd kernel. Would someone like to do a complete
build soon?

Ian