[compiler-rt] r203658 - Add FreeBSD 9.2 support to asan_linux.cc
Viktor Kutuzov
vkutuzov at accesssoftek.com
Wed Mar 12 05:44:36 PDT 2014
Author: vkutuzov
Date: Wed Mar 12 07:44:36 2014
New Revision: 203658
URL: http://llvm.org/viewvc/llvm-project?rev=203658&view=rev
Log:
Add FreeBSD 9.2 support to asan_linux.cc
Modified:
compiler-rt/trunk/lib/asan/asan_linux.cc
Modified: compiler-rt/trunk/lib/asan/asan_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_linux.cc?rev=203658&r1=203657&r2=203658&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_linux.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_linux.cc Wed Mar 12 07:44:36 2014
@@ -39,6 +39,17 @@
#include <sys/ucontext.h>
#endif
+// x86_64 FreeBSD 9.2 and older define 64-bit register names in both 64-bit
+// and 32-bit modes.
+#if SANITIZER_FREEBSD
+#include <sys/param.h>
+# if __FreeBSD_version <= 902001 // v9.2
+# define mc_eip mc_rip
+# define mc_ebp mc_rbp
+# define mc_esp mc_rsp
+# endif
+#endif
+
extern "C" void* _DYNAMIC;
namespace __asan {
More information about the llvm-commits
mailing list