This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] x86 Darwin support


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]