revised**2 x86_64-pc-mingw32 patch

Kai Tietz Kai.Tietz@onevision.com
Thu Mar 29 13:01:00 GMT 2007


Richard Henderson <rth@redhat.com> wrote on 28.03.2007 18:42:26:

> Add 
> 
> #undef TARGET_STRICT_ARGUMENT_NAMING
> #define TARGET_STRICT_ARGUMENT_NAMING hook_bool_CUMULATIVE_ARGS_true
> 
> near the end of i386.c.  The other i386 abis ignore the value
> of "named", so it won't affect them in any way, so we don't
> need to make this hook depend on TARGET_64BIT_MS_ABI.

Great, it works AFAICS fine ;)

I changed the c-pragma.c part to be more GNAT style compliant and add a 
test-case for "#pragma pop_macro" and "#pragma push_macro".
Also I added a patch to libiberty/strerror.c to be compilable with w64 
include headers.

New ChangeLog entries are:

2007-03-29  Richard Henderson  <rth@redhat.com>
            Kai Tietz  <kai.tietz@onevision.com>

        * gcc/config.host: Add x86_64-*-mingw32* target.
        * gcc/config.build: Ditto.
        * gcc/config.gcc: Ditto.
        * libgcc/config.host: Add support for an x86_64-mingw* target.
        * gcc/doc/tm.texi: (HANDLE_PRAGMA_PUSH_POP_MACRO): Add new.
        * gcc/gthr-win32.h: (__gthread_key_create): Mark arg dtor as 
unused.
        * gcc/gthr-win32.c: (__gthread_key_create): Mark arg dtor as 
unused.
        * gcc/testsuite/gcc.dg/pragma-push_pop_macro.c: New test-case.
        * gcc/c-pragma.c (HANDLE_PRAGMA_PUSH_POP_MACRO): New.
          (handle_pragma_push_macro): New.
          (handle_pragma_pop_macro): New.
          (init_pragma): Add new pragma command.
          (def_pragma_macro): New type for macro pile.
          (macro_list): New static var for chain macro pile.
        * gcc/emutls.c: (__emutls_array): Change size to type pointer.
          (emutls_destroy): Changed to avoid "unsigned long int" cast.
          (__emutls_get_address): Ditto.
        * gcc/unwind-generic.h (_uleb128_t): Handle case 
__SIZEOF_LONG_LONG__
          >= __SIZEOF_POINTER__.
          (_sleb128_t): Ditto.
        * gcc/config/i386/i386.h: Move and adjust comments.
          (TARGET_SUBTARGET64_DEFAULT): New macro default to zero.
          (TARGET_64BIT_MS_ABI): New macro default to zero.
          (call_used_regs): Adjustments for target.
        * gcc/config/i386/cygming.h: (DWARF2_DEBUGGING_INFO) for 
x86_64-mingw needs to be
            set to valued 1.
          (DWARF2_UNWIND_INFO): Likewise
          (PREFERRED_DEBUGGING_TYPE): for x86_64-mingw it needs to be set 
to DWARF2_DEBUG
            as default.
          (DBX_REGISTER_NUMBER): Have to use dbx64_register_map for 
x86_64-mingw.
          (SIZE_TYPE): Needs to be "long long unsigned int" for 
x86_64-mingw.
          (PTRDIFF_TYPE): Needs to be "long long int" for x86_64-mingw.
          (POINTER_SIZE: Needs to be 64 for x86_64 mingw.
          (LONG_TYPE_SIZE): Force 32-bit for a long.
          (OUTGOING_REG_PARM_STACK_SPACE): Added.
          (TARGET_SUBTARGET_DEFAULT): Defined proper for x86_64-mingw.
          (REGPARM_MAX): Likewise.
          (SSE_REGPARM_MAX): Likewise.
          (LONG_TYPE_SIZE): Likewise.
          (REG_PARM_STACK_SPACE): Likewise.
          (STACK_BOUNDARY): Likewise.
          (SUBTARGET_ATTRIBUTE_TABLE): Move comment outside of macro 
definition.
          (HANDLE_PRAGMA_PUSH_POP_MACRO): New macro
        * gcc/config/i386/i386.md (allocate_stack): Merge 32-bit and 
64-bit support.
        * gcc/config/i386/predicates.md: (x86_64_movabs_operand): Adjust 
for new target.
        * gcc/config/i386/cygwin.asm: Adjustments for target build of 
x86_64-mingw (and cygwin).
        * gcc/config/i386/i386elf.h: (TARGET_SUBTARGET_DEFAULT): Removed.
        * gcc/config/i386/unix.h: (TARGET_SUBTARGET_DEFAULT): Added.
          (TARGET_SUBTARGET64_DEFAULT): New.
        * gcc/config/i386/winnt.c: (i386_pe_mark_dllimport): 64-bit mode 
support.
        * gcc/config/i386/i386.c: New calling convention and target 
support.
          (ix86_GOT_alias_set): Make from gobal scope available.
        * gcc/config/i386/mingw32.h: Adjustments for target x86_64-mingw.
          (EXTRA_OS_CPP_BUILTINS): Added predefined macro 
_INTEGRAL_MAX_BITS with the value of
            bitsize of a pointer.
          (WIN64,_WIN64,__MINGW64__): New predefined macros for 
x86_64-mingw target
          (STANDARD_INCLUDE_DIR,STANDARD_STARTFILE_PREFIX_1,): Include for 
x86_64-mingw from
            different place.
        * gcc/config/i386/i386-protos.h: Proto for ix86_GOT_alias_set 
added.
        * fixincludes/mkfixinc.sh: Add x86_64-mingw target.
        * libstdc++-v3/include/bits/locale_facets.tcc: Fixed integer 
pointer mismatch.
        * libiberty/strerror.c: Ensure sys_nerr and sys_errlist is not 
used as macro version.

Regards,
 i.A. Kai Tietz



------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: a.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070329/2a2db5c6/attachment.txt>


More information about the Gcc-patches mailing list