[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
GitOrigin-RevId: f28523bb3fd67ab80a60d989bbfa7ca7763596ab
1 file changed