This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] x86 Darwin support
- From: Richard Henderson <rth at redhat dot com>
- To: Stan Shebs <shebs at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Jul 2002 15:49:15 -0700
- Subject: Re: [PATCH] x86 Darwin support
- References: <3D447DBC.5070604@apple.com>
On Sun, Jul 28, 2002 at 04:26:52PM -0700, Stan Shebs wrote:
> + #define TARGET_VERSION fprintf (stderr, " (x86, BSD syntax)");
x86/DARWIN?
> + /* Darwin 'as' recognises filds/fists/fistps. */
> + #undef HAVE_GAS_FILDS_FISTS
> + #define HAVE_GAS_FILDS_FISTS 1
Why not detected by autoconf?
> + /* Floating-point return values come in the FP register. */
> +
> + #define VALUE_REGNO(MODE) \
> + (GET_MODE_CLASS (MODE) == MODE_FLOAT \
> + && TARGET_FLOAT_RETURNS_IN_80387 ? FIRST_FLOAT_REG \
> + : (MODE) == TImode || VECTOR_MODE_P (MODE) ? FIRST_SSE_REG \
> + : 0)
I can't figure out why the (only!) existing version of this macro is
in unix.h. This is really generic. Please move this to a function
in i386.c.
> + /* Get HOST_WIDE_INT and CONST_INT to be 32 bits, for compile time
> + space/speed. */
> + #undef MAX_LONG_TYPE_SIZE
> + #define MAX_LONG_TYPE_SIZE 32
Should be controled by
#if defined (TARGET_BI_ARCH) || TARGET_64BIT_DEFAULT
already.
> + /* Make sure local alignments come from the type node, not the mode;
> + mode-based alignments are wrong for vectors. */
> + #undef LOCAL_ALIGNMENT
> + #define LOCAL_ALIGNMENT(TYPE, ALIGN) (MAX (ALIGN, TYPE_ALIGN (TYPE)))
Huh?
> + #define USER_LABEL_PREFIX ""
User-label prefix of "" but LPREFIX of "L"? Badness. Surely
you want ".L" or something.
> else
> + #if !TARGET_MACHO
> output_asm_insn ("add{l}\t{%1+[.-%a2], %0|%0, %a1+(.-%a2)}", xops);
> + #endif
As much as possible, please use C if rather than preprocessor if.
r~