|Anonymous | Login | Signup for a new account||2015-03-29 00:57 CET|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000328||OCaml||OCaml general||public||2001-03-30 02:23||2001-04-06 15:27|
|Target Version||Fixed in Version|
|Summary||0000328: Bug in ARM ocaml 3.01|
|Description||While attempting to `make opt' on an ARM-based NetWinder running Linux|
with GNU binutils I discovered an ARM-specific bug in the code
The code generator created an invalid constant while running
../../../boot/ocamlrun ../../../ocamlopt -I ../../../stdlib -labels -c
-I ../support tk.ml
The constant is 0001180, or 010010110010 in binary. The instructions are
add sp, sp, 0001180
sub sp, sp, 0001180
If you take a look at the ARM instruction format (tricky, only Mitel
supplies useful ARM documents these days), you will see that the constant
number is formed by right shifting an 8-bit value an even number of
positions. (The shift is encoded in a 4-bit value.) Unfortunately,
1180 contains 1s that are too far apart to be encoded. To use constants
that do not fit into the given format you will need to store the
constant in a register or use several ADD/SUB operations.
I can send you the .s file if you like.
The bug-reporting web site mentioned in the ocaml 3.01 README doesn't
seem to exist.
# -- Michael Van Biesbrouck, email@example.com
|Tags||No tags attached.|
> While attempting to `make opt' on an ARM-based NetWinder running Linux
> with GNU binutils I discovered an ARM-specific bug in the code
Correct. Thanks for the detailed analysis. I'll try to fix this.
Since I no longer have access to a Netwinder, would you be willing to
beta-test the fix?
> The bug-reporting web site mentioned in the ocaml 3.01 README doesn't
> seem to exist.
Oups, the URL was wrong. Thanks for mentioning it.
- Xavier Leroy
|Same bug as PR#327. Fixed 2001-04-03 by XL.|
|2005-11-18 10:13||administrator||New Issue|
|Copyright © 2000 - 2011 MantisBT Group|