Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000328OCamlOCaml generalpublic2001-03-30 02:232001-04-06 15:27
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000328: Bug in ARM ocaml 3.01
DescriptionWhile 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 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, 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

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000557)
administrator (administrator)
2001-03-30 10:14

> 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.

Regards,

- Xavier Leroy

(0000558)
administrator (administrator)
2001-04-06 15:27

Same bug as PR#327. Fixed 2001-04-03 by XL.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker