MLton codegen combines divison on arm

"Wesley W. Terpstra" <[email protected]>
Newsgroups gmane.comp.lang.ml.mlton.devel
Message-ID <[email protected]>
I've been trying to get arm to pass the regression suite cleanly. It
currently fails whenever the rounding mode should be set via
fe(get/set)round. I've found the right flags to get these working for
an example C program, but I can't get regression/ieee-real.sml to
work. I've confirmed that it indeed calls and correctly sets the
rounding mode. The problem seems to be in the MLton C codegen itself.

Normally when I build ieee-real.sml using the C codegen, there is in
ieee-real.0.c these lines:
static void real_Init() {
        globalReal64[0] = 0.1E1;
        globalReal64[1] = 0.1E2;
}
But on the arm it reads:
static void real_Init() {
}

I can only conclude that MLton has optimized the 1.0/10.0 away! Indeed
there are no calls to Real64_div in ieee-real.1.c on arm, while there
are 4 such calls on other architectures. There must be a toggle
somewhere in MLton that is letting it think that it is safe to
optimize away the division, but I can't for the life of me find it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.