[mips] Set __OCTEON__ macros

This commit is contained in:
Simon Atanasyan 2019-11-05 11:01:15 +03:00
parent e578d0fd29
commit 0d14656b9d
2 changed files with 4 additions and 0 deletions

View File

@ -189,6 +189,9 @@ void MipsTargetInfo::getTargetDefines(const LangOptions &Opts,
Builder.defineMacro("_MIPS_ARCH", "\"" + CPU + "\"");
Builder.defineMacro("_MIPS_ARCH_" + StringRef(CPU).upper());
if (StringRef(CPU).startswith("octeon"))
Builder.defineMacro("__OCTEON__");
// These shouldn't be defined for MIPS-I but there's no need to check
// for that since MIPS-I isn't supported.
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");

View File

@ -4839,6 +4839,7 @@
// MIPS-ARCH-OCTEON:#define _MIPS_ARCH "octeon"
// MIPS-ARCH-OCTEON:#define _MIPS_ARCH_OCTEON 1
// MIPS-ARCH-OCTEON:#define _MIPS_ISA _MIPS_ISA_MIPS64
// MIPS-ARCH-OCTEON:#define __OCTEON__ 1
// MIPS-ARCH-OCTEON:#define __mips_isa_rev 2
//
// Check MIPS float ABI macros