Commit 0d14656b authored by Simon Atanasyan's avatar Simon Atanasyan
Browse files

[mips] Set __OCTEON__ macros

parent e578d0fd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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");
+1 −0
Original line number Diff line number Diff line
@@ -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