This is the mail archive of the gcc@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]

Re: X86-64 setup/configure support patch


On Thu, Sep 20, 2001 at 12:20:57PM +0100, Bo Thorsen wrote:
> +#undef QUAD_ASM_OP
> +#define QUAD_ASM_OP                     "\t.quad\t"
[...]
> +/* The svr4 ABI for the i386 says that records and unions are returned
> +   in memory.  */
> +#undef DEFAULT_PCC_STRUCT_RETURN
> +#define DEFAULT_PCC_STRUCT_RETURN 1
> +
> +#undef ASM_COMMENT_START
> +#define ASM_COMMENT_START "#"
> +
> +/* This is how to output an element of a case-vector that is relative.
> +   This is only used for PIC code.  See comments by the `casesi' insn in
> +   i386.md for an explanation of the expression this outputs. */
> +#undef ASM_OUTPUT_ADDR_DIFF_ELT
> +#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
> +  if (TARGET_64BIT) \
> +    fprintf (FILE, "\t.long %s%d-.+4+(.-%s%d)\n", LPREFIX, VALUE, LPREFIX, 
> REL); \
> +  else	\
> +    fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, 
> VALUE)
> +
> +/* Indicate that jump tables go in the text section.  This is
> +   necessary when compiling PIC code.  */
> +#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic && !TARGET_64BIT)
> +
> +#undef DBX_REGISTER_NUMBER
> +#define DBX_REGISTER_NUMBER(n) \
> +  (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
> +
> +/* Output assembler code to FILE to call the profiler.
> +   To the best of my knowledge, no Linux libc has required the label
> +   argument to mcount.  */
> +
> +#define NO_PROFILE_COUNTERS
> +
> +#undef FUNCTION_PROFILER
> +#define FUNCTION_PROFILER(FILE, LABELNO)  \
> +{									\
> +  if (flag_pic)								\
> +    fprintf (FILE, "\tcall\t*mcount@GOT(%%ebx)\n");			\
> +  else									\
> +    fprintf (FILE, "\tcall\tmcount\n");					\
> +}
> +
> +#undef SIZE_TYPE
> +#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
> + 
> +#undef PTRDIFF_TYPE
> +#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
> +  
> +#undef WCHAR_TYPE
> +#define WCHAR_TYPE "int"
> +   
> +#undef WCHAR_TYPE_SIZE
> +#define WCHAR_TYPE_SIZE 32
> +    
> +#undef CPP_PREDEFINES
> +#define CPP_PREDEFINES "-D__ELF__ -Dunix -Dlinux -Asystem(posix)"
> +
> +#undef CPP_SPEC
> +#ifdef USE_GNULIBC_1
> +#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ 
> -D__pic__} %{posix:-D_POSIX_SOURCE}"
> +#else
> +#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ 
> -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT} 
> %{!m32:-D__LONG_MAX__=9223372036854775807L}"
> +#endif
> +
> +#undef CC1_SPEC
> +#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"

> +/* A C statement (sans semicolon) to output to the stdio stream
> +   FILE the assembler definition of uninitialized global DECL named
> +   NAME whose size is SIZE bytes and alignment is ALIGN bytes.
> +   Try to use asm_output_aligned_bss to implement this macro.  */
> +
> +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
> +  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
> +
> +/* A C statement to output to the stdio stream FILE an assembler
> +   command to advance the location counter to a multiple of 1<<LOG
> +   bytes if it is within MAX_SKIP bytes.
> +
> +   This is used to align code labels according to Intel recommendations.  */
> +
> +#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
> +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP)			\
> +  do {									\
> +    if ((LOG) != 0) {							\
> +      if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG));	\
> +      else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP));	\
> +    }									\
> +  } while (0)
> +#endif
> +
> +/* System V Release 4 uses DWARF debugging info.  Buf DWARF1 doesn't do
> +   64-bit anything, so we use DWARF2.  */
> +
> +#undef DWARF2_DEBUGGING_INFO
> +#undef DWARF_DEBUGGING_INFO
> +#undef DBX_DEBUGGING_INFO
> +#define DWARF2_DEBUGGING_INFO
> +#define DBX_DEBUGGING_INFO
> +#define DWARF2_FRAME_INFO (TARGET_64BIT && TARGET_UNWIND_INFO)
> +#define DWARF2_UNWIND_INFO 1
> +#define ASYNCHRONOUS_DWARF2_UNWIND_INFO (TARGET_64BIT && TARGET_UNWIND_INFO)
> +/* Incorrectly autodetected in cross compilation.  */
> +#undef HAVE_AS_DWARF2_DEBUG_LINE
> +#define HAVE_AS_DWARF2_DEBUG_LINE
> +
> +#undef PREFERRED_DEBUGGING_TYPE
> +#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG

Why is all this stuff in linux64.h instead of x86_64.h?
There's absolutely nothing linux specific about it.

> +#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)
> +#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)

These have been replaced.  You don't need them.


> Index: config/i386/att.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/i386/att.h,v
> retrieving revision 1.7
> diff -u -r1.7 att.h
> --- att.h	2001/05/20 19:54:04	1.7
> +++ att.h	2001/09/20 11:19:07
> @@ -32,6 +32,8 @@
>  
>  #define ASM_SHORT "\t.value\t"
>  #define ASM_LONG "\t.long\t"
> +#define ASM_QUAD "\t.quad\t"
> +#define ASM_DOUBLE "\t.double\t"

Why?


r~


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