[libFuzzer] Generalize the code for getting the previous offset for different archite...
authorGeorge Karpenkov <ekarpenkov@apple.com>
Wed, 10 Oct 2018 00:57:44 +0000 (00:57 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Wed, 10 Oct 2018 00:57:44 +0000 (00:57 +0000)
commitf28523bb3fd67ab80a60d989bbfa7ca7763596ab
tree0d40c382b22ec10cb2ca816303d81b316fe5eeae
parentea13613572db918380b21c34a755abc3531a39a4
[libFuzzer] Generalize the code for getting the previous offset for different architectures

Without this change, tests in coverage.test and dump_coverage.test are
failing on non-x86_64 platforms.
The diff is copied from sanitizer_common library, an alternative would
be to link it together with libFuzzer.

Differential Revision: https://reviews.llvm.org/D53040

llvm-svn: 344104
compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
compiler-rt/test/fuzzer/coverage.test
compiler-rt/test/fuzzer/dump_coverage.test
compiler-rt/test/fuzzer/handle-unstable.test