diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-13 15:19:56 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-13 15:19:56 +0000 |
commit | 73306ce39f2fe827894c140bcfce5f4b2fd3b0ec (patch) | |
tree | be4e3729fa03983d6df820afdb2c59e201737c01 /lib/Target/ARM | |
parent | b37b01d95c9d3358bbae9ee69c6ab0053c989135 (diff) | |
download | llvm-73306ce39f2fe827894c140bcfce5f4b2fd3b0ec.tar.gz llvm-73306ce39f2fe827894c140bcfce5f4b2fd3b0ec.tar.bz2 llvm-73306ce39f2fe827894c140bcfce5f4b2fd3b0ec.tar.xz |
Revert "ARMEB: Fix byte order of EH frame unwinding instructions"
This reverts commit r208689.
The test was crashing on OS X and windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208704 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r-- | lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp b/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp index 7c178650a5..657190d086 100644 --- a/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp +++ b/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp @@ -1137,11 +1137,8 @@ void ARMELFStreamer::emitFnEnd() { "Compact model must use __aeabi_cpp_unwind_pr0 as personality"); assert(Opcodes.size() == 4u && "Unwind opcode size for __aeabi_cpp_unwind_pr0 must be equal to 4"); - uint64_t Intval = Opcodes[0] | - Opcodes[1] << 8 | - Opcodes[2] << 16 | - Opcodes[3] << 24; - EmitIntValue(Intval, Opcodes.size()); + EmitBytes(StringRef(reinterpret_cast<const char*>(Opcodes.data()), + Opcodes.size())); } // Switch to the section containing FnStart @@ -1213,15 +1210,8 @@ void ARMELFStreamer::FlushUnwindOpcodes(bool NoHandlerData) { } // Emit unwind opcodes - assert((Opcodes.size() % 4) == 0 && - "Unwind opcode size for __aeabi_cpp_unwind_pr0 must be multiple of 4"); - for (unsigned I = 0; I != Opcodes.size(); I += 4) { - uint64_t Intval = Opcodes[I] | - Opcodes[I + 1] << 8 | - Opcodes[I + 2] << 16 | - Opcodes[I + 3] << 24; - EmitIntValue(Intval, 4); - } + EmitBytes(StringRef(reinterpret_cast<const char *>(Opcodes.data()), + Opcodes.size())); // According to ARM EHABI section 9.2, if the __aeabi_unwind_cpp_pr1() or // __aeabi_unwind_cpp_pr2() is used, then the handler data must be emitted |