diff options
author | Tim Shen <timshen91@gmail.com> | 2017-02-10 21:03:24 +0000 |
---|---|---|
committer | Tim Shen <timshen91@gmail.com> | 2017-02-10 21:03:24 +0000 |
commit | 918ed871df7398c1c4a384787df8728532ece1db (patch) | |
tree | 1cfe7c2a2e372c04729d2ed31f13ef69ed06710f /llvm/lib/XRay/InstrumentationMap.cpp | |
parent | 58fc1b50d8b0719460e1bf08734c0e7632fb03c4 (diff) | |
download | bcm5719-llvm-918ed871df7398c1c4a384787df8728532ece1db.tar.gz bcm5719-llvm-918ed871df7398c1c4a384787df8728532ece1db.zip |
[XRay] Implement powerpc64le xray.
Summary:
powerpc64 big-endian is not supported, but I believe that most logic can
be shared, except for xray_powerpc64.cc.
Also add a function InvalidateInstructionCache to xray_util.h, which is
copied from llvm/Support/Memory.cpp. I'm not sure if I need to add a unittest,
and I don't know how.
Reviewers: dberris, echristo, iteratee, kbarton, hfinkel
Subscribers: mehdi_amini, nemanjai, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D29742
llvm-svn: 294781
Diffstat (limited to 'llvm/lib/XRay/InstrumentationMap.cpp')
-rw-r--r-- | llvm/lib/XRay/InstrumentationMap.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/XRay/InstrumentationMap.cpp b/llvm/lib/XRay/InstrumentationMap.cpp index b3b482f0286..431c251feb6 100644 --- a/llvm/lib/XRay/InstrumentationMap.cpp +++ b/llvm/lib/XRay/InstrumentationMap.cpp @@ -55,7 +55,8 @@ loadELF64(StringRef Filename, object::OwningBinary<object::ObjectFile> &ObjFile, // Find the section named "xray_instr_map". if (!ObjFile.getBinary()->isELF() || - ObjFile.getBinary()->getArch() != Triple::x86_64) + !(ObjFile.getBinary()->getArch() == Triple::x86_64 || + ObjFile.getBinary()->getArch() == Triple::ppc64le)) return make_error<StringError>( "File format not supported (only does ELF little endian 64-bit).", std::make_error_code(std::errc::not_supported)); |