ARM GCC compiler issue
Ohshima, Yoshiki
Yoshiki.Ohshima at disney.com
Mon Feb 25 21:03:52 UTC 2002
Hello,
Thank you for everyone for the suggestions.
I've created a separate .c file, which I call interp-f.c,
for the following functions
double loadFloatOrIntFrom(int floatOrInt);
int primitiveFloatAddtoArg(int rcvrOop, int argOop);
int primitiveFloatDividebyArg(int rcvrOop, int argOop);
int primitiveFloatEqualtoArg(int rcvrOop, int argOop);
int primitiveFloatGreaterthanArg(int rcvrOop, int argOop);
int primitiveFloatLessthanArg(int rcvrOop, int argOop);
int primitiveFloatMultiplybyArg(int rcvrOop, int argOop);
int primitiveFloatSubtractfromArg(int rcvrOop, int argOop);
and compile the file without optimization. (and optimize
the rest of source files.) Actually, this trick seems
working, at least for my majorshrink image! The
tinyBenchmarks result is something like 10m bytecodes/sec,
400k sends/sec, which is in the range I expect.
Then, I tried to replace "mvfd f4, f0" lines in assembly
with "mov r0, r0" (the mnemonic in gcc generated asm is
"mvfd"). The executable doesn't crash with "illegal
instruction" but doesn't run correctly either.
# Those instructions doesn't apprear in "preambles" of
# functions, but it seems to me that those are the part of
# the calling sequence in the caller. I guess it isn't
# a nop.
My guesswork says that replacing
mvfd f4, f0
with
mvfd f4, #0
adfd f4, f4, f0
or
sufd f4, f4, f4
adfd f4, f4, f0
would work, but it turned out that both cases raise the
illegal instruction exception, too. The compiler emits
"mvfd f4, #0" for stackFloatValue, but I guess the
executable crash once the function gets called.
I couldn't find the manual on the instcution set of
SA-1110 on the web. Do I have to buy a book?
Since many plugins including B3D, B2D, and even BitBlt use
C double, I will have to change the tactics, but for now
I'll try to go a bit further with the first tactics.
-- Yoshiki
More information about the Squeak-dev
mailing list
|