Changeset 543
- Timestamp:
- Aug 7, 2003, 8:39:55 PM (22 years ago)
- Location:
- trunk/src
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/Makefile
-
Property cvs2svn:cvs-rev
changed from
1.30
to1.31
r542 r543 34 34 ifndef GENRULES 35 35 GENRULES = $.genrules.smak 36 endif 37 38 # Check if MODE has a valid value 39 ifneq ($(filter-out /opt/ /dbg/ /prf/,/$(MODE)/),) 40 $(error MODE should have one of the following values: opt, dbg, prf) 36 41 endif 37 42 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/libc.def
-
Property cvs2svn:cvs-rev
changed from
1.9
to1.10
r542 r543 538 538 "__getcwd2" @562 539 539 "__getdrive" @563 540 "__getegid" @564541 "__geteuid" @565542 540 "__getext" @566 543 541 "__getext2" @567 544 "__getgrgid" @568545 542 "__getname" @569 546 543 "__getpass1" @570 … … 804 801 "__ea_set_errno" @828 805 802 "__ea_write" @829 806 803 "__std_getegid" @830 804 "__std_geteuid" @831 805 "__std_getgrgid" @832 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/misc/getegid.c
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r542 r543 5 5 #include <sys/types.h> 6 6 7 gid_t _ getegid(void)7 gid_t _STD(getegid) (void) 8 8 { 9 9 return 0; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/misc/geteuid.c
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r542 r543 5 5 #include <sys/types.h> 6 6 7 uid_t _ geteuid(void)7 uid_t _STD(geteuid) (void) 8 8 { 9 9 return 0; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/misc/getgrgid.c
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r542 r543 8 8 /* Dummy function */ 9 9 10 struct group *_ getgrgid(gid_t gid)10 struct group *_STD(getgrgid) (gid_t gid) 11 11 { 12 12 static struct group tmp_grp; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/Makefile.in
-
Property cvs2svn:cvs-rev
changed from
1.7
to1.8
r542 r543 1062 1062 CONFIG_H="$(TCONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \ 1063 1063 LIB1ASMSRC='$(LIB1ASMSRC)' \ 1064 MAKEOVERRIDES= \1064 MAKEOVERRIDES= SHELL=$(SHELL) \ 1065 1065 -f libgcc.mk all 1066 1066 … … 1104 1104 CONFIG_H="$(CONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \ 1105 1105 LIB1ASMSRC='$(LIB1ASMSRC)' \ 1106 MAKEOVERRIDES= \1106 MAKEOVERRIDES= SHELL=$(SHELL) \ 1107 1107 -f libgcc.mk all 1108 1108 $(STAMP) stmp-multilib … … 2779 2779 DESTDIR="$(DESTDIR)" \ 2780 2780 libsubdir="$(libsubdir)" \ 2781 slibdir="$(slibdir)" \2781 slibdir="$(slibdir)" SHELL=$(SHELL) \ 2782 2782 -f libgcc.mk install 2783 2783 … … 2806 2806 DESTDIR="$(DESTDIR)" \ 2807 2807 libsubdir="$(libsubdir)" \ 2808 slibdir="$(slibdir)" \2808 slibdir="$(slibdir)" SHELL=$(SHELL) \ 2809 2809 -f libgcc.mk install 2810 2810 … … 3189 3189 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ 3190 3190 done 3191 endif 3191 3192 case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ 3192 3193 for dir in tmp-foo intl $(SUBDIRS); do \ … … 3200 3201 done 3201 3202 -rm -f tmp-foo* 3202 endif3203 3203 case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ 3204 3204 if [ -f .bad_compare ]; then \ … … 3245 3245 stage1-start: 3246 3246 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi 3247 $(MAKE) -f libgcc.mk libgcc-stage-start stage=stage13247 $(MAKE) SHELL=$(SHELL) -f libgcc.mk libgcc-stage-start stage=stage1 3248 3248 -for dir in intl $(SUBDIRS) ; \ 3249 3249 do \ … … 3274 3274 stage2-start: 3275 3275 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi 3276 $(MAKE) -f libgcc.mk libgcc-stage-start stage=stage23276 $(MAKE) SHELL=$(SHELL) -f libgcc.mk libgcc-stage-start stage=stage2 3277 3277 -for dir in intl $(SUBDIRS) ; \ 3278 3278 do \ … … 3303 3303 stage3-start: 3304 3304 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi 3305 $(MAKE) -f libgcc.mk libgcc-stage-start stage=stage33305 $(MAKE) SHELL=$(SHELL) -f libgcc.mk libgcc-stage-start stage=stage3 3306 3306 -for dir in intl $(SUBDIRS) ; \ 3307 3307 do \ … … 3332 3332 stage4-start: 3333 3333 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi 3334 $(MAKE) -f libgcc.mk libgcc-stage-start stage=stage43334 $(MAKE) SHELL=$(SHELL) -f libgcc.mk libgcc-stage-start stage=stage4 3335 3335 -for dir in intl $(SUBDIRS) ; \ 3336 3336 do \ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/cfg.sh
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r542 r543 20 20 export LDFLAGS="-s -Zexe -Zcrtdll" 21 21 22 # Many tests will fail if we'll include toolkit's types.h instead of emx's 23 unset C_INCLUDE_PATH 24 export C_INCLUDE_PATH 25 22 26 export TOPLEVEL_CONFIGURE_ARGUMENTS="--enable-clh --enable-threads --enable-shared --enable-nls --without-included-gettext --prefix=/gcc --srcdir=`pwd`" 23 27 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/config/i386/emx-dllinit.c
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r542 r543 6 6 extern void __ctordtorInit (void); 7 7 extern void __ctordtorTerm (void); 8 extern void __ehInitDLL (void);9 extern void __ehTermDLL (void);10 8 11 9 unsigned long _System _DLL_InitTerm (unsigned long mod_handle, unsigned long flag) … … 16 14 if (_CRT_init () != 0) 17 15 break; 18 __ehInitDLL ();19 16 __ctordtorInit (); 20 17 return 1; 21 18 case 1: 22 19 __ctordtorTerm (); 23 __ehTermDLL ();24 20 return 1; 25 21 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/config/i386/emx-eh.c
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r542 r543 1 /* Called at startup to register frame unwind info tables and at shutdown 2 to deregister FUI tables. Used when frame unwinding info is enabled 3 (C++ without --fno-exceptions and without -fsjlj-exceptions). */ 1 /* This piece of code is linked into the program from gcc.a if any of the 2 object files that are linked together use exception (e.g. have exception 3 frame tables inside). The code automatically registers all exception 4 tables into a central list (meant to be placed inside gcc*.dll), 5 upon program exit these lists are deregistered. */ 4 6 5 7 extern int __eh_frame__; 6 8 extern void __register_frame_table (void *begin); 7 9 extern void __deregister_frame (void *begin); 8 extern int atexit(void (*f)());9 10 10 11 /** Exception handler stuff init indicator. 0 means not inited, 1 means inited. */ … … 15 16 * Intended external caller is _DLL_InitTerm. 16 17 */ 17 void __ ehInitDLL(void)18 void __attribute__((constructor)) __ehInit (void) 18 19 { 19 20 if (!inited) … … 29 30 * Intended external caller is _DLL_InitTerm. 30 31 */ 31 void __ ehTermDLL(void)32 void __attribute__((destructor)) __ehTerm (void) 32 33 { 33 34 if (inited) … … 38 39 } 39 40 } 40 41 /**42 * atexit() procedure used to terminate exception stuff in programs.43 * Registered by __ehInit.44 */45 static void __ehTerm (void)46 {47 __ehTermDLL ();48 }49 50 /**51 * Init exception handler stuff for a program.52 * Intended external caller is GCC generated main() code.53 */54 void __ehInit (void)55 {56 if (!inited)57 {58 atexit (__ehTerm);59 __ehInitDLL ();60 }61 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/config/i386/emx.c
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r542 r543 1 1 /* emx.c: Functions for emx as target system. 2 2 3 Written by Eberhard Mattes, based on i386.c.4 r=bird: Shouldn't Andy be in here too? 3 Original version by Eberhard Mattes, based on i386.c. 4 Heavily modified by Andrew Zabolotny and Knut St. Osmundsen. 5 5 6 6 This file is part of GNU CC. … … 36 36 #endif 37 37 38 extern int ix86_return_pops_args (tree fundecl, tree funtype, int size); 39 40 tree ix86_handle_optlink_attribute (tree *node, tree name, tree args, 38 static void (*old_lang_set_decl_assembler_name) (tree decl); 39 40 static void emx_lang_set_decl_assembler_name (tree decl) 41 { 42 tree id; 43 44 if (lookup_attribute ("optlink", TYPE_ATTRIBUTES (TREE_TYPE (decl)))) 45 { 46 size_t sl; 47 const char *oldsym; 48 char *newsym; 49 50 old_lang_set_decl_assembler_name (decl); 51 id = DECL_ASSEMBLER_NAME (decl); 52 /* Remove the leading underscore */ 53 remove_underscore: 54 oldsym = IDENTIFIER_POINTER (id); 55 sl = strlen (oldsym) + 2; 56 newsym = xmalloc (sl); 57 /* Specifying '*' as first symbol character tells gcc (see varasm.c, 58 function assemble_name()) to output the label as-is rather than 59 invoking the ASM_OUTPUT_LABELREF macro (which prepends a underscore) */ 60 newsym [0] = '*'; 61 memcpy (newsym + 1, oldsym, sl + 1); 62 XEXP (DECL_RTL (decl), 0) = gen_rtx (SYMBOL_REF, Pmode, 63 IDENTIFIER_POINTER (get_identifier (newsym))); 64 } 65 else if (lookup_attribute ("system", TYPE_ATTRIBUTES (TREE_TYPE (decl)))) 66 { 67 id = get_identifier (IDENTIFIER_POINTER (DECL_NAME (decl))); 68 SET_DECL_ASSEMBLER_NAME (decl, id); 69 goto remove_underscore; 70 } 71 else 72 old_lang_set_decl_assembler_name (decl); 73 } 74 75 /* The first time we encounter a _Optlink or _System function we hook the 76 * lang_set_decl_assembler_name function so that instead of calling the 77 * original mangler function our function gets called. Then, if the function 78 * attribute is _System or _Optlink we mangle it according to respective 79 * rules (_System functions always get the name as-is (e.g. no underscore, 80 * no C++ mangling) and _Optlink don't get the leading underscore. 81 */ 82 static void hook_mangler (void) 83 { 84 if (lang_set_decl_assembler_name != emx_lang_set_decl_assembler_name) 85 { 86 old_lang_set_decl_assembler_name = lang_set_decl_assembler_name; 87 lang_set_decl_assembler_name = emx_lang_set_decl_assembler_name; 88 } 89 } 90 91 tree ix86_handle_system_attribute (tree *node, tree name, tree args, 41 92 int flags, bool *no_add_attrs) 42 93 { … … 52 103 } 53 104 105 hook_mangler (); 106 54 107 return NULL_TREE; 55 108 } 56 109 57 /* Value is the number of bytes of arguments automatically 58 popped when returning from a subroutine call. 59 FUNDECL is the declaration node of the function (as a tree), 60 FUNTYPE is the data type of the function (as a tree), 61 or for a library call it is an identifier node for the subroutine name. 62 SIZE is the number of bytes of arguments passed on the stack. 63 64 On the 80386, the RTD insn may be used to pop them if the number 65 of args is fixed, but if the number is variable then the caller 66 must pop them all. RTD can't be used for library calls now 67 because the library is compiled with the Unix compiler. 68 Use of RTD is a selectable option, since it is incompatible with 69 standard Unix calling sequences. If the option is not selected, 70 the caller must always pop the args. 71 72 The attribute stdcall is equivalent to RTD on a per module basis. */ 73 74 int 75 emx_return_pops_args (fundecl, funtype, size) 76 tree fundecl; 77 tree funtype; 78 int size; 79 { 80 return ix86_return_pops_args (fundecl, funtype, size); 81 #if 0 82 int rtd = TARGET_RTD && (!fundecl || TREE_CODE (fundecl) != IDENTIFIER_NODE); 83 84 /* Cdecl functions override -mrtd, and never pop the stack */ 85 if (!lookup_attribute ("cdecl", TYPE_ATTRIBUTES (funtype)) 86 && !lookup_attribute ("system", TYPE_ATTRIBUTES (funtype))) 87 { 88 /* Stdcall functions will pop the stack if not variable args */ 89 if (lookup_attribute ("stdcall", TYPE_ATTRIBUTES (funtype))) 90 rtd = 1; 91 92 /* `optlink' functions taking a variable number of arguments 93 should also pop the stack, but that's not implemented. 94 We treat `optlink' functions taking a variable number of 95 arguments like `system' functions. */ 96 if (lookup_attribute ("regparm", TYPE_ATTRIBUTES (funtype))) 97 rtd = 1; 98 99 if (rtd 100 && (TYPE_ARG_TYPES (funtype) == NULL_TREE 101 || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (funtype))) == void_type_node))) 102 return size; 103 } 104 105 /* Lose any fake structure return argument */ 106 /* @@@ This makes the generated code incompatible with that generated 107 * by 2.7.2. I think this belongs in the if (rtd) ... case. Any ideas? */ 108 if (aggregate_value_p (TREE_TYPE (funtype))) 109 return GET_MODE_SIZE (Pmode); 110 111 return 0; 112 #endif 110 tree ix86_handle_optlink_attribute (tree *node, tree name, tree args, 111 int flags, bool *no_add_attrs) 112 { 113 (void)args; (void)flags; 114 if (TREE_CODE (*node) != FUNCTION_TYPE 115 && TREE_CODE (*node) != METHOD_TYPE 116 && TREE_CODE (*node) != FIELD_DECL 117 && TREE_CODE (*node) != TYPE_DECL) 118 { 119 warning ("`%s' attribute only applies to functions", 120 IDENTIFIER_POINTER (name)); 121 *no_add_attrs = true; 122 } 123 124 hook_mangler (); 125 126 return NULL_TREE; 113 127 } 114 128 … … 178 192 } 179 193 180 const char * 181 emx_remove_underscore (tree decl) 182 { 183 /* ??? This probably should use XSTR (XEXP (DECL_RTL (decl), 0), 0) instead 184 of DECL_ASSEMBLER_NAME. */ 185 const char *asmname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); 186 char *newsym = xmalloc (strlen (asmname) + 2); 187 sprintf (newsym, "\b%s", asmname); 188 return IDENTIFIER_POINTER (get_identifier (newsym)); 189 } 190 191 /* Cover function to implement ENCODE_SECTION_INFO. */ 194 /* Cover function to implement ENCODE_SECTION_INFO. 195 Note that this could be implemented much better by doing the 196 stdcall mangling like optlink and system, but unfortunately */ 192 197 193 198 void 194 199 emx_encode_section_info (tree decl) 195 200 { 196 /* This bit is copied from i386.h. */ 197 if (optimize > 0 && TREE_CONSTANT (decl) 198 && (!flag_writable_strings || TREE_CODE (decl) != STRING_CST)) 201 /* The default ENCODE_SECTION_INFO from i386.h */ 202 if (flag_pic) 199 203 { 200 204 rtx rtl = (TREE_CODE_CLASS (TREE_CODE (decl)) != 'd' 201 205 ? TREE_CST_RTL (decl) : DECL_RTL (decl)); 202 SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1; 203 } 204 206 207 if (GET_CODE (rtl) == MEM) 208 { 209 if (TARGET_DEBUG_ADDR 210 && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd') 211 { 212 fprintf (stderr, "Encode %s, public = %d\n", 213 IDENTIFIER_POINTER (DECL_NAME (decl)), 214 TREE_PUBLIC (decl)); 215 } 216 217 SYMBOL_REF_FLAG (XEXP (rtl, 0)) 218 = (TREE_CODE_CLASS (TREE_CODE (decl)) != 'd' 219 || ! TREE_PUBLIC (decl)); 220 } 221 } 222 223 /* If declaring a function, mangle it if it's stdcall */ 205 224 if (TREE_CODE (decl) == FUNCTION_DECL) 206 225 { 207 if (lookup_attribute ("stdcall", 208 TYPE_ATTRIBUTES (TREE_TYPE (decl)))) 226 if (lookup_attribute ("stdcall", TYPE_ATTRIBUTES (TREE_TYPE (decl)))) 209 227 XEXP (DECL_RTL (decl), 0) = 210 228 gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (decl)); 211 else if (lookup_attribute ("optlink", 212 TYPE_ATTRIBUTES (TREE_TYPE (decl))) 213 || lookup_attribute ("system", 214 TYPE_ATTRIBUTES (TREE_TYPE (decl)))) 215 XEXP (DECL_RTL (decl), 0) = 216 gen_rtx (SYMBOL_REF, Pmode, emx_remove_underscore (decl)); 217 } 218 } 229 } 230 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/config/i386/emx.h
-
Property cvs2svn:cvs-rev
changed from
1.13
to1.14
r542 r543 91 91 #define DWARF2_UNWIND_INFO 1 92 92 93 /* The function to call after __main in the case program uses exceptions */ 94 #define NAME__EH_INIT "__ehInit" 93 /* We want the _System attribute */ 94 #define TARGET_SYSTEM_DECL_ATTRIBUTES 95 /* Handle _System attribute */ 96 extern tree ix86_handle_system_attribute PARAMS ((tree *, tree, tree, int, _Bool *)); 97 98 /* We want the _Optlink attribute */ 99 #define TARGET_OPTLINK_DECL_ATTRIBUTES 100 /* Handle _Optlink attribute */ 101 extern tree ix86_handle_optlink_attribute PARAMS ((tree *, tree, tree, int, _Bool *)); 95 102 96 103 /* This macros will stick a label to exception table for current file, … … 171 178 172 179 /******************************************************************* 173 The following encodings are used for label names174 depending on their attributes:175 176 180 stdcall labels get a suffix consisting of an at-sign '@' and 177 181 the size of parameters in bytes rounded to next multiple of 4. 178 179 optlink labels get a prefix of '\b' (e.g. backspace). This kind of180 means that the symbol name should not be prefixed by an underscore.181 182 *******************************************************************/ 182 183 … … 196 197 const char *_p; \ 197 198 const char *_name = SYMBOL_NAME; \ 198 if (*_name == '\b') _name++; \199 199 for (_p = _name; *_p && *_p != '@'; ++_p) \ 200 200 ; \ … … 214 214 #undef ASM_OUTPUT_LABELREF 215 215 #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ 216 fprintf (STREAM, "%s%s", *NAME == '\b' ? "" : USER_LABEL_PREFIX, \ 217 *NAME == '\b' ? NAME + 1 : NAME) 218 219 /* Handle _optlink attributes */ 220 extern tree ix86_handle_optlink_attribute PARAMS ((tree *, tree, tree, int, _Bool *)); 216 fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, NAME) 221 217 222 218 /****************************************************************************** … … 241 237 fprintf (FILE, "\tcall __mcount\n"); \ 242 238 } 243 244 /* Calling conventions */245 246 extern int emx_return_pops_args PARAMS ((tree, tree, int));247 #undef RETURN_POPS_ARGS248 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \249 (emx_return_pops_args (FUNDECL, FUNTYPE, SIZE))250 239 251 240 /****************************************************************************** -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/config/i386/i386.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r542 r543 1285 1285 { "shared", 0, 0, true, false, false, ix86_handle_shared_attribute }, 1286 1286 #endif 1287 #ifdef EMX 1288 { "system", 0, 0, false, true, true, ix86_handle_cdecl_attribute }, 1287 #ifdef TARGET_SYSTEM_DECL_ATTRIBUTES 1288 /* System says the function is extern "C" and is not underscored. */ 1289 { "system", 0, 0, false, true, true, ix86_handle_system_attribute }, 1290 #endif 1291 #ifdef TARGET_OPTLINK_DECL_ATTRIBUTES 1292 /* Optlink is like regparm with a few differences */ 1289 1293 { "optlink", 0, 0, false, true, true, ix86_handle_optlink_attribute }, 1290 1294 #endif … … 1509 1513 int rtd = TARGET_RTD && (!fundecl || TREE_CODE (fundecl) != IDENTIFIER_NODE); 1510 1514 1511 /* Cdecl functions override -mrtd, and never pop the stack. */ 1512 if (! lookup_attribute ("cdecl", TYPE_ATTRIBUTES (funtype))) { 1515 /* Cdecl functions override -mrtd, and never pop the stack. */ 1516 if (! lookup_attribute ("cdecl", TYPE_ATTRIBUTES (funtype)) 1517 #ifdef TARGET_SYSTEM_DECL_ATTRIBUTES 1518 && ! lookup_attribute ("system", TYPE_ATTRIBUTES (funtype)) 1519 #endif 1520 ) { 1513 1521 1514 1522 /* Stdcall functions will pop the stack if not variable args. */ … … 1605 1613 if (attr) 1606 1614 cum->nregs = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attr))); 1607 #ifdef EMX1615 #ifdef TARGET_OPTLINK_DECL_ATTRIBUTES 1608 1616 if (lookup_attribute ("optlink", TYPE_ATTRIBUTES (fntype))) 1609 1617 { 1610 1618 cum->nregs = 3; cum->optlink = 1; 1611 1619 } 1612 #endif /* EMX */1620 #endif 1613 1621 } 1614 1622 cum->maybe_vaarg = false; … … 1621 1629 if (cum->nregs) 1622 1630 { 1631 #ifdef TARGET_OPTLINK_DECL_ATTRIBUTES 1632 /* Count conforming arguments for optlink */ 1633 int cfarg_count = 0; 1634 #endif 1635 1623 1636 for (param = (fntype) ? TYPE_ARG_TYPES (fntype) : 0; 1624 1637 param != 0; param = next_param) 1625 1638 { 1639 #ifdef TARGET_OPTLINK_DECL_ATTRIBUTES 1640 if (INTEGRAL_TYPE_P (TREE_VALUE (param)) 1641 || POINTER_TYPE_P (TREE_VALUE (param))) 1642 cfarg_count++; 1643 #endif 1626 1644 next_param = TREE_CHAIN (param); 1627 1645 if (next_param == 0 && TREE_VALUE (param) != void_type_node) 1628 1646 { 1647 #ifdef TARGET_OPTLINK_DECL_ATTRIBUTES 1648 /* Visual Age docs says that the params preceeding the 1649 ellipsis still are passed in registers. */ 1650 if (cum->optlink) 1651 cum->nregs = cfarg_count > 3 ? 3 : cfarg_count; 1652 else 1653 #endif 1629 1654 if (!TARGET_64BIT) 1630 1655 cum->nregs = 0; … … 2204 2229 { 2205 2230 cum->words += words; 2206 #ifdef EMX 2231 #ifdef TARGET_OPTLINK_DECL_ATTRIBUTES 2232 /* Optlink functions never pass aggregates in registers 2233 (they are pushed on the stack, and the registers are 2234 preserved for following parameters). Unfortunately GCC 2235 optimizes short structures to SImode or DImode, thus 2236 this detection works only for large structs. */ 2207 2237 if (cum->optlink && mode == BLKmode) 2208 return; /* Skip aggregates */2209 #endif /* EMX */2238 return; 2239 #endif 2210 2240 cum->nregs -= words; 2211 2241 cum->regno += words; … … 2272 2302 2273 2303 case BLKmode: 2274 #ifdef EMX2304 #ifdef TARGET_OPTLINK_DECL_ATTRIBUTES 2275 2305 if (cum->optlink) 2276 2306 break; 2277 2307 /* fall through */ 2278 #endif /* EMX */2308 #endif 2279 2309 case DImode: 2280 2310 case SImode: … … 2282 2312 case QImode: 2283 2313 if (words <= cum->nregs) 2284 #ifdef EMX 2314 #ifdef TARGET_OPTLINK_DECL_ATTRIBUTES 2315 /* Optlink specs says that the parameter is passed in a register 2316 and space on the stack is reserved for it as well (which is not 2317 filled). Currently GCC will pass the parameter *both* in register 2318 and stack; this is suboptimal but is compatible. */ 2285 2319 if (cum->optlink) 2286 2320 { … … 2293 2327 } 2294 2328 else 2295 #endif /* EMX */2329 #endif 2296 2330 ret = gen_rtx_REG (mode, cum->regno); 2297 2331 break; … … 2308 2342 words, cum->words, cum->nregs, GET_MODE_NAME (mode), named); 2309 2343 2310 #ifdef EMX2344 #ifdef TARGET_OPTLINK_DECL_ATTRIBUTES 2311 2345 if (ret && GET_CODE (ret) == PARALLEL) 2312 2346 fprintf (stderr, ", stack/reg=%%e%s", 2313 2347 reg_names[ REGNO(XEXP (XVECEXP (ret, 0, 1), 0))]); 2314 2348 else 2315 #endif /* EMX */2349 #endif 2316 2350 if (ret) 2317 2351 fprintf (stderr, ", reg=%%e%s", reg_names[ REGNO (ret) ]); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/config/i386/t-emx
-
Property cvs2svn:cvs-rev
changed from
1.20
to1.21
r542 r543 1 # bird (#424): dropping multilibs. Old hacks - START 2 ## EMX target have share libgcc, but the names are release specific and constrained by 8.3 limits. 3 ## The link command depends heavily on the directory structure. 4 #SHLIB_EXT = 5 #SHLIB_BASENAME = gcc$(gccdll_version) 6 #SHLIB_MULTINAME= $(SHLIB_BASENAME)`echo @shlib_so_name@ | cut -b10` 7 #SHLIB_DLLNAME = $(SHLIB_MULTINAME).dll 8 #SHLIB_LINK = export DLLAR_CMDLINE="@shlib_objs@" && \ 9 # kRx.exe dllar.cmd -o $$(@D)/$(SHLIB_DLLNAME) \ 10 # -ordinal @multilib_flags@ -nocrtdll \ 11 # -ex "__main __do_global_* _GLOBAL* _exit_dummy_ref __ctordtor* __eh* _DLL_InitTerm" \ 12 # -d "GNU C runtime shared library version $(gcc_version)" \ 13 # -libf "INITINSTANCE TERMGLOBAL" -lc_static -lc_import \ 14 # && mv -f $$(@D)/$(SHLIB_MULTINAME).a $$(@D)/$(SHLIB_BASENAME).a \ 15 # && ar rs $$(@D)/$(SHLIB_BASENAME).a libgcc/$$(@D)/__main.o libgcc/$$(@D)/emx-ctordtor.o libgcc/$$(@D)/emx-eh.o libgcc/$$(@D)/emx-dllinit.o \ 16 # && touch $$@ 17 #SHLIB_SUBDIR = `echo @shlib_base_name@ | sed -e "s/^libgcc_s_//" -e "s,_,/,g"` 18 #SHLIB_INSTALL = $$(INSTALL_DATA) $(SHLIB_SUBDIR)/$(SHLIB_DLLNAME) $$(DESTDIR)$$(slibdir)/ \ 19 # && $$(INSTALL_DATA) $(SHLIB_SUBDIR)/$(SHLIB_BASENAME).a $$(DESTDIR)$$(libsubdir)/$(SHLIB_SUBDIR)/ 20 # 21 ## EMX Multi-threaded/Single-threaded libraries. 22 #MULTILIB_OPTIONS = Zmt 23 #MULTILIB_DIRNAMES = mt st 24 #MULTILIB_MATCHES = Zmt=Zmts Zmt=Zmtd 25 #MULTILIB_EXCEPTIONS = 26 #MULTILIB_EXTRA_OPTS = 27 # bird (#424): dropping multilibs. Old hacks - END 1 # The command to run REXX scripts 2 # (that can invoke CMD.EXE commands! Never user kRx.exe here!) 3 REXX = $(subst \,/,$(OS2_SHELL)) /c 28 4 29 5 # EMX target have share libgcc, but the names are release specific and constrained by 8.3 limits. … … 35 11 SHLIB_LINK = export DLLAR_CMDLINE="$$(patsubst %.o,%.obj,@shlib_objs@)" \ 36 12 && emxomf @shlib_objs@ \ 37 && kRx.exedllar.cmd -o $$(@D)/$(SHLIB_DLLNAME) \13 && $(REXX) dllar.cmd -o $$(@D)/$(SHLIB_DLLNAME) \ 38 14 -ordinal @multilib_flags@ -nocrtdll \ 39 15 -flags "-g -Zomf -v" \ … … 46 22 else 47 23 SHLIB_LINK = export DLLAR_CMDLINE="@shlib_objs@" && \ 48 kRx.exedllar.cmd -o $$(@D)/$(SHLIB_DLLNAME) \24 $(REXX) dllar.cmd -o $$(@D)/$(SHLIB_DLLNAME) \ 49 25 -ordinal @multilib_flags@ -nocrtdll \ 50 26 -ex "___main ___do_global_* __GLOBAL* __exit_dummy_ref ___ctordtor* ___eh* _DLL_InitTerm" \ … … 66 42 67 43 # Override linker flags 68 # bird: The -B specification doesn't work too well here...69 # bird: This better be removed....70 #LDFLAGS = -Zexe -Zcrtdll -B/emx/lib71 #LDFLAGS = -Zexe -Zcrtdll -B$(PATH_EMXPGCC)/lib72 44 LDFLAGS = -Zexe -Zcrtdll -Zstack 1024 73 45 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/configure
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r542 r543 3087 3087 s/ \\[^ ]/./g' | 3088 3088 tr -d ' 3089 ' | tr -s '*' '3089 \r' | tr -s '\\*' ' 3090 3090 ' | fold | sed '$a\ 3091 3091 ' > conftest.dmp … … 3161 3161 s/ \\[^ ]/./g' | 3162 3162 tr -d ' 3163 ' | tr -s '*' '3163 \r' | tr -s '\\*' ' 3164 3164 ' | fold | sed '$a\ 3165 3165 ' > conftest.dmp … … 7992 7992 fi 7993 7993 elif test x$gcc_cv_ld != x; then 7994 for gcc_WS in 4 8; do7995 cat > conftest.s <<EOF7996 .text7997 .LFB1: .skip 647998 .LFE1:7999 .LFB2: .skip 648000 .LFE2:8001 .LFB3: .skip 648002 .LFE3:8003 .section .eh_frame,"aw",@progbits8004 .Lframe1:8005 .4byte .LECIE1-.LSCIE18006 .LSCIE1:8007 .4byte 0x08008 .byte 0x18009 .ascii "zR\0"8010 .uleb128 0x18011 .sleb128 -48012 .byte 0x88013 .uleb128 0x18014 .byte 0x508015 .byte 0xc8016 .uleb128 0x48017 .uleb128 0x48018 .byte 0x888019 .uleb128 0x18020 .balign ${gcc_WS}8021 .LECIE1:8022 .LSFDE1:8023 .4byte .LEFDE1-.LASFDE18024 .LASFDE1:8025 .4byte .LASFDE1-.Lframe18026 .${gcc_WS}byte .LFB18027 .${gcc_WS}byte .LFE1-.LFB18028 .uleb128 0x08029 .balign ${gcc_WS}8030 .LEFDE1:8031 .LSFDE2:8032 .4byte .LEFDE2-.LASFDE28033 .LASFDE2:8034 .4byte .LASFDE2-.Lframe18035 .${gcc_WS}byte .LFB28036 .${gcc_WS}byte .LFE2-.LFB28037 .uleb128 0x08038 .balign ${gcc_WS}8039 .LEFDE2:8040 .LSFDE3:8041 .4byte .LEFDE3-.LASFDE38042 .LASFDE3:8043 .4byte .LASFDE3-.Lframe18044 .${gcc_WS}byte .LFB38045 .${gcc_WS}byte .LFE3-.LFB38046 .uleb128 0x08047 .balign ${gcc_WS}8048 .LEFDE3:8049 .4byte 08050 EOF8051 # r=bird: Make this omission OS/2 target specific.8052 rm -f conftest.*8053 done8054 7994 fi 8055 7995 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr_works" 1>&6 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/emx-nextstage
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r542 r543 20 20 [ -z "$SHELL" ] && SHELL=sh 21 21 22 # Find emx directory 23 emxdir=`echo "$PATH" | sed -e "s/.*;\([#-:<-~]*emx[#-:<-~]*\);.*/\1/" -e 'y,\\\\,//,'` 24 [ -z "$emxdir" ] && emxdir=/emx 22 # Find gcc directory 23 gccdir=`which gcc` 24 gccdir=`dirname $gccdir` 25 gccdir=`dirname $gccdir` 26 [ -z "$gccdir" ] && gccdir=/emx 27 28 # The compilation will fail if we have toolkit in C_INCLUDE_PATH 29 unset C_INCLUDE_PATH 30 export C_INCLUDE_PATH=$gccdir/include 25 31 26 32 for stage in 4 3 2 1 0; do … … 39 45 LDFLAGS="-Zexe" 40 46 else 41 LDFLAGS="-Zexe -B /emx/lib"47 LDFLAGS="-Zexe -B$gccdir/lib" 42 48 fi 43 49 else 44 50 ### gcc 3.0 cannot complete stage 2 with -fomit-frame-pointer! :-( ### 45 51 CFLAGS="-s -O2 -mcpu=pentium -mpreferred-stack-boundary=2 -falign-loops=2 -falign-jumps=2 -falign-functions=2 -malign-strings=0" 46 LDFLAGS="-Zexe -Zcrtdll -B /emx/lib"52 LDFLAGS="-Zexe -Zcrtdll -B$gccdir/lib" 47 53 fi 48 54 if [ ${stage} -eq 0 ]; then … … 64 70 OLDCC="gcc -O6 -mno-stack-align-double -s" OLDCFLAGS= \ 65 71 LOOSE_WARN="-W -Wall -Wwrite-strings -Wstrict-prototypes" \ 66 exec_prefix=$emxdirLANGUAGES="${LANGUAGES}" $* 2>&1 | tee $log72 LANGUAGES="${LANGUAGES}" $* 2>&1 | tee $log 67 73 68 if [ $? = 0 ] && [ -f mt/gcc*.dll ]; then74 if ! tail -1 $log | grep -q "Error"; then 69 75 echo -n "Compilation finished succesfully. Finish this stage? [Y/N] " 70 76 read answer … … 73 79 emxload -q 74 80 stage=`expr ${stage} + 1` 75 make stage${stage}81 make SHELL=$SHELL stage${stage} 76 82 ;; 77 83 esac -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/function.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r542 r543 6497 6497 emit_library_call (gen_rtx_SYMBOL_REF (Pmode, NAME__MAIN), LCT_NORMAL, 6498 6498 VOIDmode, 0); 6499 #ifdef NAME__EH_INIT6500 if (flag_exceptions)6501 emit_library_call (gen_rtx_SYMBOL_REF (Pmode, NAME__EH_INIT), LCT_NORMAL,6502 VOIDmode, 0);6503 #endif6504 6499 #endif 6505 6500 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.