Subject: Strange C compiler code generation
To: None <port-arm32@netbsd.org>
From: Peter Teichmann <teich-p@rcs.urz.tu-dresden.de>
List: port-arm32
Date: 02/24/2001 23:06:05
Hi there,

I am not regularly using NetBSD, but as I am now responsible for the ARM =
port
of the distributed.net client and as the current NetBSD client is quite o=
ld I
thought a newer client for NetBSD that also supports the OGR project coul=
d be
nice.

Compiling was no big problem, but the strange result was that the OGR cor=
e
reached only about 1/4 of the speed on Linux and RiscOS. When I looked at=
 the
produced code I found the reason was this:

Many 32-Bit-Loads were not done using a LDR instruction, but using 4 sing=
le
LDRB instructions and 3 ORR instructions. Is that intended and if yes, wh=
y?
Probably many NetBSD applications will be quite slow because of this!

I could imagine one reason: 32 bit quantities are not necessarily 32 bit =
aligned
in structures, but if that is really true, well, I better do not continue=
 this
thought!

Peter Teichmann
--=20
Email: teich-p@rcs.urz.tu-dresden.de   WWW: rcswww.urz.tu-dresden.de/~tei=
ch-p