1 /* Configuration for an i386 running MS-DOS with djgpp/go32. */
3 /* Don't assume anything about the header files. */
4 #define NO_IMPLICIT_EXTERN_C
6 #define HANDLE_SYSV_PRAGMA
8 #define YES_UNDERSCORES
12 /* Value is the number of bytes of arguments automatically
13 popped when returning from a subroutine call.
14 FUNDECL is the declaration node of the function (as a tree),
15 FUNTYPE is the data type of the function (as a tree),
16 or for a library call it is an identifier node for the subroutine name.
17 SIZE is the number of bytes of arguments passed on the stack.
19 This only happens if the function declaration has the STDCALL attribute and
20 the number of arguments is not variable */
22 #undef RETURN_POPS_ARGS
23 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
25 TREE_CODE (FUNTYPE) == IDENTIFIER_NODE \
30 ((FUNDECL && (TREE_CODE_CLASS (TREE_CODE (FUNDECL)) == 'd') \
32 lookup_attribute ("stdcall", \
33 DECL_MACHINE_ATTRIBUTES (FUNDECL)) != NULL_TREE \
39 TYPE_ARG_TYPES (FUNTYPE) == 0 \
41 TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \
48 (aggregate_value_p (TREE_TYPE (FUNTYPE))) \
50 GET_MODE_SIZE (Pmode) \
55 /* Value is 1 if the declaration has either of the attributes: CDECL or
56 STDCALL and 0 otherwise */
58 #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTR, NAME, ARGS) \
59 (((TREE_CODE(DECL) == FUNCTION_DECL) \
60 || (TREE_CODE(DECL) == FIELD_DECL) \
61 || (TREE_CODE(DECL) == TYPE_DECL)) \
62 && (is_attribute_p ("stdcall", (NAME)) \
63 || is_attribute_p ("cdecl", (NAME))) \
69 #define CPP_PREDEFINES "-Dunix -Di386 -DGO32 -DMSDOS \
70 -Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386)"
73 #define EXTRA_SECTIONS in_ctor, in_dtor
75 #undef EXTRA_SECTION_FUNCTIONS
76 #define EXTRA_SECTION_FUNCTIONS \
77 CTOR_SECTION_FUNCTION \
80 #define CTOR_SECTION_FUNCTION \
84 if (in_section != in_ctor) \
86 fprintf (asm_out_file, "\t.section .ctor\n"); \
87 in_section = in_ctor; \
91 #define DTOR_SECTION_FUNCTION \
95 if (in_section != in_dtor) \
97 fprintf (asm_out_file, "\t.section .dtor\n"); \
98 in_section = in_dtor; \
102 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
105 fprintf (FILE, "%s\t", ASM_LONG); \
106 assemble_name (FILE, NAME); \
107 fprintf (FILE, "\n"); \
110 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
113 fprintf (FILE, "%s\t", ASM_LONG); \
114 assemble_name (FILE, NAME); \
115 fprintf (FILE, "\n"); \