This is an archive of the discontinued LLVM Phabricator instance.

compiler-rt: prefer thumb over ARM
ClosedPublic

Authored by abdulras on May 31 2014, 3:23 PM.

Details

Reviewers
t.p.northover
abdulras
joerg
Group Reviewers
deleted
Summary

When possible, use Thumb or Thumb-2 over ARM instructions. This is particularly
important for pure-Thumb environments (e.g. Windows on ARM). Although, it is
possible to conditionalise this for that target specifically, this is available
on most newer ARM CPUs, and the code remains compatible with older CPUs with no
adverse effects. It therefore feels better to always prefer Thumb when
possible.

Diff Detail

Event Timeline

abdulras updated this revision to Diff 9991.May 31 2014, 3:23 PM
abdulras retitled this revision from to compiler-rt: prefer thumb over ARM.
abdulras updated this object.
abdulras edited the test plan for this revision. (Show Details)
abdulras added reviewers: joerg, t.p.northover.
abdulras set the repository for this revision to rL LLVM.
abdulras added a subscriber: compnerd.
t.p.northover edited edge metadata.Jun 9 2014, 11:04 AM

Hi Saleem,

Couple of things here.

I'm worried about using .thumb on CPUs that only support Thumb1. The chances of all the (written for ARM) instructions assembling are fairly small.

I also think we should probably use the ACLE predefines if possible (__ARM_ARCH_ISA_THUMB == 2 in this case). That may need a Clang patch though...

Cheers.

Tim.

abdulras updated this revision to Diff 10426.Jun 15 2014, 12:07 PM
abdulras edited edge metadata.

Use __ARM_ARCH_ISA_THUMB introduced in SVN r210991.

Hi Saleem,

I think this looks reasonable now.

Cheers.

Tim.

abdulras accepted this revision.Jun 16 2014, 10:46 AM
abdulras added a reviewer: abdulras.
This revision is now accepted and ready to land.Jun 16 2014, 10:46 AM
abdulras closed this revision.Jun 16 2014, 10:46 AM

SVN r211032 with a small fixup at SVN r211035.