Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005200OCamlOCaml generalpublic2010-12-20 12:172012-04-08 19:37
Reporteris 
Assigned Tomeurer 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionno change required 
PlatformOSOS Version
Product Version3.12.0 
Target VersionFixed in Version 
Summary0005200: arm native code is thumb-aware, thus does crash (SIGILL) on thumbless ARM CPUs
DescriptionThe ARM code uses "bx Rn" / "bx LR" to return to callers or call external functions. This is nice on Thumb-aware CPUs, because it allows to return to/call thumb code in these situations. However, bx is not available on thumbless CPUs like SA-110 (or any without the suffix "T").

For NetBSD/arm I've patched by replacing "bx Rn" with "mov PC,Rn". Patch files are appended. However, I think that you'll want some option to build either the one or the other version, else mixed thumb/arm code wouldn't interwork with OCaml... maybe introduce "armt" for the Thumb-aware variant?
Tagsarm
Attached Files? file icon patch-bx [^] (1,210 bytes) 2010-12-20 12:17 [Show Content]
? file icon patch-bw [^] (1,600 bytes) 2010-12-20 12:18 [Show Content]

- Relationships

-  Notes
(0005746)
is (reporter)
2010-12-21 08:57

Should this be category "ocaml general"? Can I change this?
(0006956)
meurer (developer)
2012-02-22 11:55

For ARM code to be EABI compliant we have to use BX (EABI requires interworking). It is the job of the linker to replace BX Rn with MOV PC, Rn when running on a pre-ARMv5T CPU.

Is this issue still relevant? Which NetBSD ARM port are you talking about exactly?
(0007296)
xleroy (administrator)
2012-04-08 19:37

In the absence of new information, I'm resolving this PR as "no change required" in OCaml.

- Issue History
Date Modified Username Field Change
2010-12-20 12:17 is New Issue
2010-12-20 12:17 is File Added: patch-bx
2010-12-20 12:18 is File Added: patch-bw
2010-12-20 12:23 is Tag Attached: arm
2010-12-21 08:57 is Note Added: 0005746
2010-12-21 16:21 doligez Status new => acknowledged
2010-12-21 16:21 doligez Category OCamlbuild => OCaml general
2012-02-21 18:57 xleroy Assigned To => meurer
2012-02-21 18:57 xleroy Status acknowledged => assigned
2012-02-22 11:55 meurer Note Added: 0006956
2012-02-22 11:56 meurer Status assigned => feedback
2012-04-08 19:37 xleroy Note Added: 0007296
2012-04-08 19:37 xleroy Status feedback => resolved
2012-04-08 19:37 xleroy Resolution open => no change required


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker