From ff1e9747e6db80db30c9f7f102eac29ce648e1ba Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 4 Feb 2018 16:29:17 +0300 Subject: [PATCH] Save/restore ebx for PIE code, just as well as for PIC. --- include/boost/atomic/detail/config.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/atomic/detail/config.hpp b/include/boost/atomic/detail/config.hpp index cd87435..cd2832f 100644 --- a/include/boost/atomic/detail/config.hpp +++ b/include/boost/atomic/detail/config.hpp @@ -65,7 +65,7 @@ #define BOOST_ATOMIC_DETAIL_X86_NO_ASM_AX_DX_PAIRS #endif -#if defined(__i386__) && defined(__PIC__) && !(defined(__clang__) || (defined(BOOST_GCC) && (BOOST_GCC+0) >= 50100)) +#if defined(__i386__) && (defined(__PIC__) || defined(__PIE__)) && !(defined(__clang__) || (defined(BOOST_GCC) && (BOOST_GCC+0) >= 50100)) // This macro indicates that asm blocks should preserve ebx value unchanged. Some compilers are able to maintain ebx themselves // around the asm blocks. For those compilers we don't need to save/restore ebx in asm blocks. #define BOOST_ATOMIC_DETAIL_X86_ASM_PRESERVE_EBX