This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] SPARC: add mcpu=leon3v7 target
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Daniel Hellstrom <daniel at gaisler dot com>
- Cc: Sebastian dot Huber at embedded-brains dot de, gcc-patches at gcc dot gnu dot org, joel dot sherrill at oarcorp dot com, software at gaisler dot com
- Date: Mon, 06 Oct 2014 18:57:28 +0200
- Subject: Re: [PATCH] SPARC: add mcpu=leon3v7 target
- Authentication-results: sourceware.org; auth=none
- References: <1408546862-8236-1-git-send-email-daniel at gaisler dot com> <8412816 dot ffHavn9dfq at polaris> <54326440 dot 4040607 at gaisler dot com>
> I posted it with v2 in the subject. I have now attached it.
There is a pasto in the v2:
@@ -1764,6 +1772,12 @@ extern int sparc_indent_opcode;
#define AS_LEON_FLAG "-Av8"
#endif
+#ifdef HAVE_AS_LEONV7
+#define AS_LEONV7_FLAG "-Aleon"
+#else
+#define AS_LEONV7_FLAG "-Av7"
+#endif
+
/* We use gcc _mcount for profiling. */
#define NO_PROFILE_COUNTERS 0
I think you would be better off adding a line to the arms of the existing code
#ifdef HAVE_AS_LEON
#define AS_LEON_FLAG "-Aleon"
#else
#define AS_LEON_FLAG "-Av8"
#endif
rather than duplicating it.
--
Eric Botcazou