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]
Other format: [Raw text]

Re: PATCH: Explicitly pass --64 to assembler on AMD64 targets


> Richard Henderson <rth@redhat.com> writes:
> 
> > On Mon, Jun 13, 2005 at 07:17:24PM -0700, Zack Weinberg wrote:
> >> Or, if GAS can be told which mode it should be in via directives in
> >> its input (.code32/.code64?), then we could add something like
> >> 
> >>  fputs (TARGET_64BIT ? "\t.code64\n" : "\t.code32", 
> >>         asm_out_file);
> >> 
> >> to x86_file_start, and kill the spec hackery altogether.
> >
> > I'm a fan of such directives.  I suspect that we'll have to keep
> > the spec hackery for a while yet.  We don't usually force binutils
> > upgrades with compiler upgrades...
> 
> So I take it that such directives do not already exist?  Darn.

They exist:
  {"code16gcc", set_16bit_gcc_code_flag, CODE_16BIT},
  {"code16", set_code_flag, CODE_16BIT},
  {"code32", set_code_flag, CODE_32BIT},
  {"code64", set_code_flag, CODE_64BIT},

but they only switch ASM encoding, not the output ELF file format as
they are intended for stuff where you really mix 32bit and 64bit code,
such as in the boot loader.

Honza
> 
> zw


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