Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005200OCaml~DO NOT USE (was: OCaml general)public2010-12-20 12:172015-12-11 19:04
Assigned Tomeurer 
StatusclosedResolutionno 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?
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
is (reporter)
2010-12-21 08:57

Should this be category "ocaml general"? Can I change this?
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?
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
2015-12-11 19:04 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker