diff options
| author | Renato Golin <renato.golin@linaro.org> | 2016-12-22 19:38:04 +0000 |
|---|---|---|
| committer | Renato Golin <renato.golin@linaro.org> | 2016-12-22 19:38:04 +0000 |
| commit | fe8bbb2333108c3a7a922dbb44d23fc66c3f76ab (patch) | |
| tree | bbcfb63a28142ef274eadfbfd9ca7b1700c58b08 | |
| parent | 8a4e63994e32e2cf3d7f0ba6fd99fca4e9268183 (diff) | |
| download | bcm5719-llvm-fe8bbb2333108c3a7a922dbb44d23fc66c3f76ab.tar.gz bcm5719-llvm-fe8bbb2333108c3a7a922dbb44d23fc66c3f76ab.zip | |
Revert "[XRay][AArch64] An attempt to fix test patching-unpatching.cc by flushing the instruction cache after code modification"
This reverts commit r290354, as it broke the build. We need to make sure
this builds on AArch64 before committing again.
llvm-svn: 290362
| -rw-r--r-- | compiler-rt/lib/xray/xray_AArch64.cc | 5 | ||||
| -rw-r--r-- | compiler-rt/test/xray/TestCases/Linux/patching-unpatching.cc | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/compiler-rt/lib/xray/xray_AArch64.cc b/compiler-rt/lib/xray/xray_AArch64.cc index 12b4a6fade9..8f24610dab2 100644 --- a/compiler-rt/lib/xray/xray_AArch64.cc +++ b/compiler-rt/lib/xray/xray_AArch64.cc @@ -75,8 +75,8 @@ inline static bool patchSled(const bool Enable, const uint32_t FuncId, // B #32 uint32_t *FirstAddress = reinterpret_cast<uint32_t *>(Sled.Address); - uint32_t *CurAddress = FirstAddress + 1; if (Enable) { + uint32_t *CurAddress = FirstAddress + 1; *CurAddress = uint32_t(PatchOpcodes::PO_LdrW0_12); CurAddress++; *CurAddress = uint32_t(PatchOpcodes::PO_LdrX16_12); @@ -88,7 +88,6 @@ inline static bool patchSled(const bool Enable, const uint32_t FuncId, *reinterpret_cast<void (**)()>(CurAddress) = TracingHook; CurAddress += 2; *CurAddress = uint32_t(PatchOpcodes::PO_LdpX0X30SP_16); - CurAddress++; std::atomic_store_explicit( reinterpret_cast<std::atomic<uint32_t> *>(FirstAddress), uint32_t(PatchOpcodes::PO_StpX0X30SP_m16e), std::memory_order_release); @@ -97,8 +96,6 @@ inline static bool patchSled(const bool Enable, const uint32_t FuncId, reinterpret_cast<std::atomic<uint32_t> *>(FirstAddress), uint32_t(PatchOpcodes::PO_B32), std::memory_order_release); } - __clear_cache(reinterpret_cast<char*>(FirstAddress), - reinterpret_cast<char*>(CurAddress)); return true; } diff --git a/compiler-rt/test/xray/TestCases/Linux/patching-unpatching.cc b/compiler-rt/test/xray/TestCases/Linux/patching-unpatching.cc index 05478a48805..e684e427f06 100644 --- a/compiler-rt/test/xray/TestCases/Linux/patching-unpatching.cc +++ b/compiler-rt/test/xray/TestCases/Linux/patching-unpatching.cc @@ -3,6 +3,7 @@ // // RUN: %clangxx_xray -fxray-instrument -std=c++11 %s -o %t // RUN: XRAY_OPTIONS="patch_premain=false" %run %t 2>&1 | FileCheck %s +// REQUIRES: stable-runtime #include "xray/xray_interface.h" |

