aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1995-04-28 01:12:58 +0000
committerDoug Evans <dje@gnu.org>1995-04-28 01:12:58 +0000
commit19a0120cb029b036665ebde73bcda0245fa33c52 (patch)
tree0d295fc4df01460d0d629bf1ea95f93d9b1ea944
parent88a781e84cdb96003e34195199488855af79c278 (diff)
downloadgcc-19a0120cb029b036665ebde73bcda0245fa33c52.zip
gcc-19a0120cb029b036665ebde73bcda0245fa33c52.tar.gz
gcc-19a0120cb029b036665ebde73bcda0245fa33c52.tar.bz2
(RETURN_POPS_ARGS): Call lookup_attribute.
(ENCODE_SECTION_INFO): Likewise. (CPP_PREDEFINES): Use __stdcall__, __cdecl__. (VALID_MACHINE_DECL_ATTRIBUTE): Call is_attribute_p. `args' must be NULL. From-SVN: r9525
-rw-r--r--gcc/config/i386/win-nt.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/gcc/config/i386/win-nt.h b/gcc/config/i386/win-nt.h
index 3b2d8c3..256a6f5 100644
--- a/gcc/config/i386/win-nt.h
+++ b/gcc/config/i386/win-nt.h
@@ -41,10 +41,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
0 \
: \
( \
- ((FUNDECL && (TREE_CODE_CLASS (TREE_CODE (FUNDECL)) == 'd') ? \
- chain_member_purpose (get_identifier ("stdcall"), \
- DECL_MACHINE_ATTRIBUTES (FUNDECL) \
- ) : 0 \
+ ((FUNDECL && (TREE_CODE_CLASS (TREE_CODE (FUNDECL)) == 'd') \
+ ? \
+ lookup_attribute ("stdcall", \
+ DECL_MACHINE_ATTRIBUTES (FUNDECL)) != NULL_TREE \
+ : 0 \
) \
) \
&& \
@@ -70,7 +71,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#endif
#define CPP_PREDEFINES "-Dunix -Di386 -DWIN32 -D_WIN32 \
-DWINNT -D_M_IX86=300 -D_X86_=1 -D__STDC__=0 -DALMOST_STDC -D_MSC_VER=800 \
- -D__stdcall=__attribute__((stdcall)) -D__cdecl=__attribute__((cdecl)) \
+ -D__stdcall=__attribute__((__stdcall__)) \
+ -D__cdecl=__attribute__((__cdecl__)) \
-Asystem(unix) -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
#define SIZE_TYPE "unsigned int"
@@ -154,8 +156,8 @@ do \
|| ! TREE_PUBLIC (DECL)); \
} \
if (TREE_CODE (DECL) == FUNCTION_DECL) \
- if (chain_member_purpose (get_identifier ("stdcall"), \
- DECL_MACHINE_ATTRIBUTES (DECL))) \
+ if (lookup_attribute ("stdcall", \
+ DECL_MACHINE_ATTRIBUTES (DECL))) \
XEXP (DECL_RTL (DECL), 0) = \
gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (DECL)); \
} \
@@ -165,12 +167,13 @@ while (0)
/* 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))
+#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTR, NAME, ARGS) \
+ (((TREE_CODE(DECL) == FUNCTION_DECL) \
+ || (TREE_CODE(DECL) == FIELD_DECL) \
+ || (TREE_CODE(DECL) == TYPE_DECL)) \
+ && (is_attribute_p ("stdcall", (NAME)) \
+ || is_attribute_p ("cdecl", (NAME))) \
+ && (ARGS) == NULL)
/* The global __fltused is necessary to cause the printf/scanf routines
for outputting/inputting floating point numbers to be loaded. Since this