i386.c (ix86_handle_cdecl_attribute): Check for attributes incompatible with fastcall...
authorCasper S. Hornstrup <chorns@users.sourceforge.net>
Thu, 19 Dec 2002 22:00:33 +0000 (22:00 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 19 Dec 2002 22:00:33 +0000 (14:00 -0800)
commite91f04de4bb14746e48091a26234c87287e73163
tree21891e9229467b063b2f39b501b4c0fe4d386c1e
parent61138bb628f5774e6877f2a336db898c28677a14
i386.c (ix86_handle_cdecl_attribute): Check for attributes incompatible with fastcall attribute.

        * config/i386/i386.c (ix86_handle_cdecl_attribute): Check for
        attributes incompatible with fastcall attribute.
        (ix86_handle_regparm_attribute): Likewise.

        * config/i386/i386.c (ix86_comp_type_attributes): Check for mismatched
        fastcall types.

        * config/i386/cygwin.h (TARGET_OS_CPP_BUILTINS): Add fastcall
        attributes.
        (ASM_OUTPUT_LABELREF): Define as i386_pe_output_labelref.
        * config/i386/i386-protos.h (i386_pe_output_labelref): Declare.
        * config/i386/winnt.c (i386_pe_mark_dllimport). Add __imp_ prefix in
        i386_pe_output_labelref rather than here.
        (gen_fastcall_suffix): New function. Decorates a label name with the
        fastcall prefix (@) and the stdcall suffix.
        (i386_pe_encode_section_info): Call gen_fastcall_suffix() if a symbol
        has a fastcall attribute.
        (i386_pe_output_labelref): New function. Outputs a label reference.
        * config/i386/i386.c (ix86_attribute_table): Accept 'fastcall' as a
        valid attribute.
        (ix86_return_pops_args): Fastcall functions pop the stack.
        (init_cumulative_args): Reserve registers ECX and EDX if function has
        fastcall attribute.
        (function_arg): Use registers ECX and EDX if function has fastcall
        attribute.
        * config/i386/i386.h (CUMULATIVE_ARGS): Add fastcall attribute flag.
        (DLL_IMPORT_EXPORT_PREFIX): Redefine as '#'.
        (FASTCALL_PREFIX): Define as '@'.
        * config/i386/mingw32.h (TARGET_OS_CPP_BUILTINS): Add fastcall
        attributes.
        * doc/extend.texi: Add documentation of fastcall attribute.

        * testsuite/gcc.dg/i386-fastcall-1.c: New.

Co-Authored-By: Danny Smith <dannysmith@users.sourceforge.net>
Co-Authored-By: Eric Kohl <ekohl@rz-online.de>
From-SVN: r60337
gcc/ChangeLog
gcc/config/i386/cygwin.h
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/mingw32.h
gcc/config/i386/winnt.c
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/i386-fastcall-1.c [new file with mode: 0644]