diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-03-16 16:11:02 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-03-16 16:11:02 -0500 |
commit | b310a51d35b01c9ce4e617e357ade93d87cd1c90 (patch) | |
tree | 13e5d1ec505ca76fd30db1565f071f02eead01e1 /gcc | |
parent | 8af24e2633f70c6e4b4d5a201fe61b7b305d62f1 (diff) | |
download | gcc-b310a51d35b01c9ce4e617e357ade93d87cd1c90.zip gcc-b310a51d35b01c9ce4e617e357ade93d87cd1c90.tar.gz gcc-b310a51d35b01c9ce4e617e357ade93d87cd1c90.tar.bz2 |
(FUNCTION_PROLOGUE, HAVE_probe, gen_probe): Deleted.
(ENCODE_SECTION_INFO, VALID_MACHINE_DECL_ATTRIBUTE): New macro.
From-SVN: r9190
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/i386/win-nt.h | 50 |
1 files changed, 43 insertions, 7 deletions
diff --git a/gcc/config/i386/win-nt.h b/gcc/config/i386/win-nt.h index d551e91..636ccb99 100644 --- a/gcc/config/i386/win-nt.h +++ b/gcc/config/i386/win-nt.h @@ -65,11 +65,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ 0 \ ) -#undef FUNCTION_PROLOGUE -#define FUNCTION_PROLOGUE(FILE,SIZE) \ - winnt_function_prologue (FILE, SIZE) - - #ifdef CPP_PREDEFINES #undef CPP_PREDEFINES #endif @@ -132,8 +127,49 @@ dtor_section () \ fprintf (FILE, "\n"); \ } while (0) -#define HAVE_probe 1 -#define gen_probe() gen_rtx(ASM_INPUT, VOIDmode, "call __stkchk\n") +/* Define this macro if references to a symbol must be treated + differently depending on something about the variable or + function named by the symbol (such as what section it is in). + + On i386, if using PIC, mark a SYMBOL_REF for a non-global symbol + so that we may access it directly in the GOT. */ + + On i386 running Windows NT, modify the assembler name with a suffix + consisting of an atsign (@) followed by string of digits that represents + the number of bytes of arguments passed to the function, if it has the + attribute STDCALL. */ + +#ifdef ENCODE_SECTION_INFO +#undef ENCODE_SECTION_INFO +#define ENCODE_SECTION_INFO(DECL) \ +do \ + { \ + if (flag_pic) \ + { \ + rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ + ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ + SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ + = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ + || ! TREE_PUBLIC (DECL)); \ + } \ + if (TREE_CODE (DECL) == FUNCTION_DECL) \ + if (chain_member_value (get_identifier ("stdcall"), \ + DECL_MACHINE_ATTRIBUTES (DECL))) \ + XEXP (DECL_RTL (DECL), 0) = \ + gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (DECL)); \ + } \ +while (0) +#endif + +/* Value is 1 if the declaration has either of the attributes: CDECL or + STDCALL and 0 otherwise */ + +#define VALID_MACHINE_DECL_ATTRIBUTE(decl,attr,name) \ + ((TREE_CODE(decl) == FUNCTION_DECL) \ + || (TREE_CODE(decl) == FIELD_DECL) \ + || (TREE_CODE(decl) == TYPE_DECL)) \ + && ((get_identifier("stdcall") == name) \ + || (get_identifier("cdecl") == name)) #include "winnt/winnt.h" |