public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Bo Thorsen <bo@sonofthor.dk>
Cc: patches@x86-64.org, gcc@gcc.gnu.org
Subject: Re: X86-64 setup/configure support patch
Date: Thu, 20 Sep 2001 16:25:00 -0000	[thread overview]
Message-ID: <20010920162517.A1034@redhat.com> (raw)
In-Reply-To: <20010920112057.E4D136B1E9@idefix.sonofthor.dk>

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~

      parent reply	other threads:[~2001-09-20 16:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-20  4:21 Bo Thorsen
2001-09-20  8:43 ` Bo Thorsen
2001-09-20 16:25 ` Richard Henderson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010920162517.A1034@redhat.com \
    --to=rth@redhat.com \
    --cc=bo@sonofthor.dk \
    --cc=gcc@gcc.gnu.org \
    --cc=patches@x86-64.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).