]> granicus.if.org Git - llvm/commit
Recommit: ARM: sort register lists by encoding in push/pop instructions.
authorTim Northover <tnorthover@apple.com>
Mon, 14 Nov 2016 20:28:24 +0000 (20:28 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 14 Nov 2016 20:28:24 +0000 (20:28 +0000)
commitfcc03ff315b34590d26ec77144def6e7d08564ea
treea576d3323ec950260cf782f3744443096390c94b
parentbf09fb4d18c6b86cb6996bca1d1b4c4a3fd39dce
Recommit: ARM: sort register lists by encoding in push/pop instructions.

For example we were producing

    push {r8, r10, r11, r4, r5, r7, lr}

This is misleading (r4, r5 and r7 are actually pushed before the rest), and
other components (stack folding recently) often forget to deal with the extra
complexity coming from the different order, leading to miscompiles. Finally, we
warn about our own code in -no-integrated-as mode without this, which is really
not a good idea.

Fixed usage of std::sort so that we (hopefully) use instantiations that
actually exist in GCC 4.8.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286881 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMFrameLowering.cpp
lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
test/CodeGen/ARM/swifterror.ll