gcc_ppc_asm_common.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Distributed under the Boost Software License, Version 1.0.
  3. * (See accompanying file LICENSE_1_0.txt or copy at
  4. * http://www.boost.org/LICENSE_1_0.txt)
  5. *
  6. * Copyright (c) 2021 Andrey Semashev
  7. */
  8. /*!
  9. * \file atomic/detail/gcc_ppc_asm_common.hpp
  10. *
  11. * This header contains basic utilities for gcc asm-based PowerPC backend.
  12. */
  13. #ifndef BOOST_ATOMIC_DETAIL_GCC_PPC_ASM_COMMON_HPP_INCLUDED_
  14. #define BOOST_ATOMIC_DETAIL_GCC_PPC_ASM_COMMON_HPP_INCLUDED_
  15. #include <boost/atomic/detail/config.hpp>
  16. #ifdef BOOST_HAS_PRAGMA_ONCE
  17. #pragma once
  18. #endif
  19. #if !defined(_AIX)
  20. #define BOOST_ATOMIC_DETAIL_PPC_ASM_LABEL(label) label ":\n\t"
  21. #define BOOST_ATOMIC_DETAIL_PPC_ASM_JUMP(insn, label, offset) insn " " label "\n\t"
  22. #else
  23. // Standard assembler tool (as) on AIX does not support numeric jump labels, so we have to use offsets instead.
  24. // https://github.com/boostorg/atomic/pull/50
  25. #define BOOST_ATOMIC_DETAIL_PPC_ASM_LABEL(label)
  26. #define BOOST_ATOMIC_DETAIL_PPC_ASM_JUMP(insn, label, offset) insn " $" offset "\n\t"
  27. #endif
  28. #endif // BOOST_ATOMIC_DETAIL_GCC_PPC_ASM_COMMON_HPP_INCLUDED_