You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 328 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug 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
generator.
The code generator created an invalid constant while running
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.
While attempting to `make opt' on an ARM-based NetWinder running Linux
with GNU binutils I discovered an ARM-specific bug in the code
generator.
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.
Original bug ID: 328
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug 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
generator.
The code generator created an invalid constant while running
../../../boot/ocamlrun ../../../ocamlopt -I ../../../stdlib -labels -c
-I ../support tk.ml
The constant is #1180, or 010010110010 in binary. The instructions are
add sp, sp, #1180
sub sp, sp, #1180
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, mlvanbie@thinkage.ca
:b^Js/(.)(,.):\1(.)([a-z])(.)r(:.)>\3/\4\2:\1\3\4\5r\6\5>/
s/(.)(,.):\1(.)([a-z])(.)l(:.)(.)>\3/\4\2:\1\3\4\5l\6>\7\5/
s/>$/>0/^J/^halt/!bb
The text was updated successfully, but these errors were encountered: