This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: More i386/ builtins
Richard Henderson wrote:-
> On Mon, Jun 03, 2002 at 08:18:52PM +0100, Neil Booth wrote:
> > ! size_t arch_len = strlen (ix86_arch_string); \
> > ! int last_arch_char = ix86_arch_string[arch_len - 1]; \
>
> This same scheme should be used
>
> > ! if (TARGET_MMX) \
> > ! builtin_define ("__tune_pentium_mmx__"); \
> [...]
> > ! if (ix86_cpu_string[cpu_len - 1] == '2') \
> > ! builtin_define ("__tune_k6_2__"); \
> > ! else if (ix86_cpu_string[cpu_len - 1] == '3') \
> > ! builtin_define ("__tune_k6_3__"); \
> [...]
> > ! if (TARGET_SSE) \
> > ! builtin_define ("__tune_athlon_sse__"); \
>
> here. Ok with that change.
You mean using a "last_cpu_char" and testing with that for the athlon
sse and mmx, and the k6 2/3? Why is that better than just testing the
TARGET_??? flag in the first 2 cases?
The other cases were different, since they depend on -march only, so
using TARGET_??? was wrong like you pointed out. But the ones above
depend on -march, but are overridden by -mcpu, which is captured by
the TARGET_??? macros.
Neil.