[PATCH] D45830: Fix trap instruction on pp64

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 19 16:00:34 PDT 2018


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: ELF/Arch/PPC64.cpp:97-98
 
-  TrapInstr = 0x7fe00008;
+  bool IsBE = Config->EKind != ELF64LEKind;
+  TrapInstr = IsBE == sys::IsBigEndianHost ? 0x7fe00008 : 0x0800e07f;
 }
----------------
Something like this would be a bit simpler:

  TrapInstr = (Config->IsLE == sys::IsLittleEndianHost) ? ...;


https://reviews.llvm.org/D45830





More information about the llvm-commits mailing list