Changeset 94
- Timestamp:
- May 5, 2003, 8:48:59 PM (22 years ago)
- Location:
- trunk/src/emx
- Files:
-
- 40 added
- 58 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/a_out.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 132 132 /* Copied from aout64.h of BFD */ 133 133 #define N_WEAKU 0x0d /* Weak undefined symbol. */ 134 #define N_WEAKA 0x0e /* Weak absolute symbol. */ 135 #define N_WEAKT 0x0f /* Weak text symbol. */ 136 #define N_WEAKD 0x10 /* Weak data symbol. */ 137 #define N_WEAKB 0x11 /* Weak bss symbol. */ 134 138 /* emx */ 135 139 #define N_IMP1 0x68 /* Import definition symbol */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/asm386.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 3 3 #include <sys/errno.h> 4 4 5 #define _xam fxam; fstsw w%ax; andb $0x45, %ah5 #define _xam fxam; fstsw %ax; andb $0x45, %ah 6 6 7 7 #define j_nan cmpb $0x01, %ah; je -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/getopt.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 1 /* getopt (emx+gcc) */ 1 /* Declarations for getopt. 2 Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc. 3 4 NOTE: The canonical source of this file is maintained with the GNU C Library. 5 Bugs can be reported to bug-glibc@gnu.org. 6 7 This program is free software; you can redistribute it and/or modify it 8 under the terms of the GNU General Public License as published by the 9 Free Software Foundation; either version 2, or (at your option) any 10 later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 20 USA. */ 2 21 3 22 #ifndef _GETOPT_H 4 #define _GETOPT_H 23 #define _GETOPT_H 1 5 24 6 #if defined (__cplusplus)25 #ifdef __cplusplus 7 26 extern "C" { 8 27 #endif 9 28 10 extern char *optarg; /* argument of current option */ 11 extern int optind; /* index of next argument; default=0: initialize */ 12 extern int opterr; /* 0=disable error messages; default=1: enable */ 13 extern int optopt; /* option character which caused the error */ 14 extern char *optswchar; /* characters introducing options; default="-"*/29 /* For communication from `getopt' to the caller. 30 When `getopt' finds an option that takes an argument, 31 the argument value is returned here. 32 Also, when `ordering' is RETURN_IN_ORDER, 33 each non-option ARGV-element is returned here. */ 15 34 16 extern enum _optmode 35 extern char *optarg; 36 37 /* Index in ARGV of the next element to be scanned. 38 This is used for communication to and from the caller 39 and for communication between successive calls to `getopt'. 40 41 On entry to `getopt', zero means this is the first call; initialize. 42 43 When `getopt' returns -1, this is the index of the first of the 44 non-option elements that the caller should itself scan. 45 46 Otherwise, `optind' communicates from one call to the next 47 how much of ARGV has been scanned so far. */ 48 49 extern int optind; 50 51 /* Callers store zero here to inhibit the error message `getopt' prints 52 for unrecognized options. */ 53 54 extern int opterr; 55 56 /* Set to an option character which was unrecognized. */ 57 58 extern int optopt; 59 60 /* Describe the long-named options requested by the application. 61 The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector 62 of `struct option' terminated by an element containing a name which is 63 zero. 64 65 The field `has_arg' is: 66 no_argument (or 0) if the option does not take an argument, 67 required_argument (or 1) if the option requires an argument, 68 optional_argument (or 2) if the option takes an optional argument. 69 70 If the field `flag' is not NULL, it points to a variable that is set 71 to the value given in the field `val' when the option is found, but 72 left unchanged if the option is not found. 73 74 To have a long-named option do something other than set an `int' to 75 a compiled-in constant, such as set a value from `optarg', set the 76 option's `flag' field to zero and its `val' field to a nonzero 77 value (the equivalent single-letter option character, if there is 78 one). For long options that have a zero `flag' field, `getopt' 79 returns the contents of the `val' field. */ 80 81 struct option 17 82 { 18 GETOPT_UNIX, /* options at start of argument list (default) */ 19 GETOPT_ANY, /* move non-options to the end */ 20 GETOPT_KEEP /* return options in order */ 21 } optmode; 83 #if defined (__STDC__) && __STDC__ 84 const char *name; 85 #else 86 char *name; 87 #endif 88 /* has_arg can't be an enum because some compilers complain about 89 type mismatches in all the code that assumes it is an int. */ 90 int has_arg; 91 int *flag; 92 int val; 93 }; 22 94 95 /* Names for the values of the `has_arg' field of `struct option'. */ 23 96 24 /* Note: The 2nd argument is not const as GETOPT_ANY reorders the 25 array pointed to. */ 97 #define no_argument 0 98 #define required_argument 1 99 #define optional_argument 2 26 100 27 int getopt (int, char **, __const__ char *); 101 #if defined (__STDC__) && __STDC__ 102 #ifdef __GNU_LIBRARY__ 103 /* Many other libraries have conflicting prototypes for getopt, with 104 differences in the consts, in stdlib.h. To avoid compilation 105 errors, only prototype getopt for the GNU C library. */ 106 extern int getopt (int argc, char *const *argv, const char *shortopts); 107 #else /* not __GNU_LIBRARY__ */ 108 extern int getopt (); 109 #endif /* __GNU_LIBRARY__ */ 110 extern int getopt_long (int argc, char *const *argv, const char *shortopts, 111 const struct option *longopts, int *longind); 112 extern int getopt_long_only (int argc, char *const *argv, 113 const char *shortopts, 114 const struct option *longopts, int *longind); 28 115 29 #if defined (__cplusplus) 116 /* Internal only. Users should not call this directly. */ 117 extern int _getopt_internal (int argc, char *const *argv, 118 const char *shortopts, 119 const struct option *longopts, int *longind, 120 int long_only); 121 #else /* not __STDC__ */ 122 extern int getopt (); 123 extern int getopt_long (); 124 extern int getopt_long_only (); 125 126 extern int _getopt_internal (); 127 #endif /* __STDC__ */ 128 129 #ifdef __cplusplus 30 130 } 31 131 #endif 32 132 33 #endif /* not _GETOPT_H*/133 #endif /* getopt.h */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/os2.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 8 8 #endif 9 9 10 #ifndef _Cdecl 10 11 #define _Cdecl 12 #endif 13 #ifndef _Far16 11 14 #define _Far16 15 #endif 16 #ifndef _Optlink 12 17 #define _Optlink 18 #endif 19 #ifndef _Pascal 13 20 #define _Pascal 21 #endif 22 #ifndef _Seg16 14 23 #define _Seg16 24 #endif 25 #ifndef _System 15 26 #define _System 27 #endif 16 28 17 29 #if defined (USE_OS2_TOOLKIT_HEADERS) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxbind/emxbind.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r93 r94 25 25 #include <stdlib.h> 26 26 #include <string.h> 27 #include < getopt.h>27 #include <emx/getopt.h> 28 28 #include <sys/moddef.h> 29 29 #include "defs.h" -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxexp/emxexp.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r93 r94 24 24 #include <stdarg.h> 25 25 #include <string.h> 26 #include < getopt.h>26 #include <emx/getopt.h> 27 27 #include <errno.h> 28 28 #include <ar.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emximp/emximp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 25 25 #include <string.h> 26 26 #include <ctype.h> 27 #include < getopt.h>27 #include <emx/getopt.h> 28 28 #include <process.h> 29 29 #include <ar.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxload/emxload.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 26 26 #include <limits.h> 27 27 #include <time.h> 28 #include <alloca.h> 28 29 #include <sys/emxload.h> 29 30 #include <emx/emxload.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxomf/emxomf.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r93 r94 28 28 #include <ctype.h> 29 29 #include <getopt.h> 30 #include <alloca.h> 30 31 #include <sys/param.h> 31 32 #include <sys/emxload.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxomf/emxomfld.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r93 r94 22 22 #include <stdio.h> 23 23 #include <stdlib.h> 24 #include <alloca.h> 25 #include <errno.h> 24 26 #include <string.h> 25 27 #include <process.h> … … 28 30 #include <sys/types.h> 29 31 #include <sys/stat.h> 30 #include <emx/getopt.h>31 #include <errno.h>32 32 #include <sys/utime.h> 33 33 #include <sys/moddef.h> 34 #include <emx/getopt.h> 34 35 #include <alloca.h> 35 36 #include "defs.h" -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxstack/emxstack.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 24 24 #include <stdarg.h> 25 25 #include <string.h> 26 #include < getopt.h>26 #include <emx/getopt.h> 27 27 #include <sys/dirtree.h> 28 28 #include "defs.h" -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxtsf/emxtsf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 23 23 #include <stdlib.h> 24 24 #include <string.h> 25 #include < getopt.h>25 #include <emx/getopt.h> 26 26 #include <sys/moddef.h> 27 27 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/ld/ld.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 28 28 #include <io.h> 29 29 #include <process.h> /* for running emxbind */ 30 #include <errno.h> 30 31 #endif /* __EMX__ */ 31 32 #include <sys/types.h> … … 81 82 82 83 #endif /* EMX */ 84 85 /* We need .data of every module aligned to at least 16 bound 86 in order to support the alignments required by SSE */ 87 #define SECTION_ALIGN 16 88 #define SECTION_ALIGN_MASK (SECTION_ALIGN-1) 83 89 84 90 #ifndef N_SET_MAGIC … … 521 527 #endif /* This is output from LD. */ 522 528 529 /* Check if a symbol is weak */ 530 #define WEAK_SYMBOL(t) (((t) >= N_WEAKU) && ((t) <= N_WEAKB)) 531 523 532 /* If a this type of symbol is encountered, its name is a warning 524 533 message to print each time the symbol referenced by the next symbol … … 612 621 char trace; 613 622 #ifdef EMX /* WEAKU */ 614 /* Nonzero if undefined weak*/623 /* One of N_WEAKX values */ 615 624 char weak; 616 625 #endif /* EMX */ … … 1100 1109 1101 1110 int parse (); 1111 void do_warnings (); 1102 1112 void initialize_text_start (); 1103 1113 void initialize_data_start (); … … 1700 1710 register struct file_entry *subentry = entry->subfiles; 1701 1711 for (; subentry; subentry = subentry->chain) 1702 if ( return_val = (*function) (subentry, arg))1712 if ((return_val = (*function) (subentry, arg))) 1703 1713 return return_val; 1704 1714 } 1705 1715 else 1706 if ( return_val = (*function) (entry, arg))1716 if ((return_val = (*function) (entry, arg))) 1707 1717 return return_val; 1708 1718 } … … 1753 1763 register struct file_entry *entry; 1754 1764 { 1755 register int desc ;1765 register int desc = -1; 1756 1766 1757 1767 if (entry->superfile) … … 1771 1781 register char *string 1772 1782 = concat (search_dirs[i], "/", entry->filename); 1773 #ifdef __EMX__1783 #ifdef EMX /* host */ 1774 1784 desc = open (string, O_RDONLY|O_BINARY, 0); 1775 #else /* !__EMX__ */ 1785 1786 if (desc < 0) 1787 { 1788 char *tmp = _getext (entry->filename); 1789 if (tmp && (tolower(tmp[1]) == 'a') && (tmp[2] == 0)) 1790 { 1791 /* Try libxxx */ 1792 free (string); 1793 string = concat (search_dirs[i], "/lib", entry->filename); 1794 desc = open (string, O_RDONLY|O_BINARY, 0); 1795 } 1796 } 1797 #else /* !EMX */ 1776 1798 desc = open (string, O_RDONLY, 0); 1777 #endif /* ! __EMX__*/1799 #endif /* !EMX */ 1778 1800 if (desc > 0) 1779 1801 { … … 1800 1822 1801 1823 perror_file (entry); 1802 /* NOTREACHED */1824 return -1; 1803 1825 } 1804 1826 … … 1925 1947 struct file_entry *entry; 1926 1948 { 1927 register int len;1928 1949 struct exec hdr; 1929 1950 struct stat st; … … 1992 2013 entry->strs_offset = N_STROFF(hdr); 1993 2014 lseek(desc, entry->starting_offset + entry->strs_offset, 0); 1994 if (read(desc, (char *) &entry->strs_size, sizeof (unsigned long int)) 2015 if (entry->syms_size && 2016 read(desc, (char *) &entry->strs_size, sizeof (unsigned long int)) 1995 2017 != sizeof (unsigned long int)) 1996 2018 fatal_with_file ("failure reading string table size of ", entry); … … 2030 2052 #ifdef LC_SYMSEG 2031 2053 struct symseg_command *symseg_command; 2032 #endif ;2054 #endif 2033 2055 int ordinal; 2034 2056 int symtab_seen, symseg_seen; … … 2186 2208 int desc; 2187 2209 { 2188 int str_size;2189 2190 2210 if (!entry->header_read_flag) 2191 2211 read_header (desc, entry); … … 2211 2231 int desc; 2212 2232 { 2213 int buffer;2214 2215 2233 if (!entry->header_read_flag) 2216 2234 read_header (desc, entry); … … 2330 2348 } 2331 2349 } 2350 #ifdef __EMX__ 2351 else if (WEAK_SYMBOL (p->n_type)) 2352 { 2353 /* Enter the symbol into the symbol hash table only if it 2354 has not already been defined */ 2355 symbol *s = getsym_soft (p->n_un.n_strx + entry->strings); 2356 if (!s || !s->defined) 2357 enter_global_ref (p, p->n_un.n_strx + entry->strings, entry); 2358 } 2359 #endif 2332 2360 else if (p->n_type & N_EXT) 2333 2361 enter_global_ref (p, p->n_un.n_strx + entry->strings, entry); … … 2367 2395 register symbol *sp = getsym (name); 2368 2396 register int type = nlist_p->n_type; 2397 const int realtype = type; 2369 2398 int oldref = sp->referenced; 2370 2399 int olddef = sp->defined; … … 2374 2403 2375 2404 sp->referenced = 1; 2376 #ifdef EMX /* WEAKU */ 2377 if (type == N_WEAKU) 2378 { 2379 /* Note: This doesn't work with DOLLAR_KLUDGE */ 2380 /* Don't increment undefined_global_sym_count */ 2381 sp->weak = 1; 2382 } 2383 else 2405 2406 #ifdef EMX /* WEAK symbol support */ 2407 if (WEAK_SYMBOL (type)) 2408 { 2409 sp->weak = type; 2410 /* Switch symbol type so that it can be processed like regular symbols */ 2411 type = nlist_p->n_type = 2412 (type == N_WEAKU) ? N_UNDF | N_EXT : 2413 (type == N_WEAKA) ? N_ABS | N_EXT : 2414 (type == N_WEAKT) ? N_TEXT | N_EXT : 2415 (type == N_WEAKD) ? N_DATA | N_EXT : 2416 /*(type == N_WEAKB)*/ N_BSS | N_EXT; 2417 } 2384 2418 #endif /* EMX */ 2419 2385 2420 if (type != (N_UNDF | N_EXT) || nlist_p->n_value) 2386 2421 { … … 2388 2423 sp->defined = type; 2389 2424 2390 #ifdef EMX /* WEAKU */2391 if (oldref && !olddef && sp->weak)2392 sp->weak = 0; /* Keep undefined_global_sym_count */2393 else2394 #endif /* EMX */2395 2425 if (oldref && !olddef) 2396 2426 /* It used to be undefined and we're defining it. */ … … 2409 2439 common_defined_global_count--; 2410 2440 sp->max_common_size = 0; 2441 2442 fprintf (stderr, "%s: symbol `%s' defined more than once in ", 2443 progname, name); 2444 print_file_name (entry, stderr); 2445 fprintf (stderr, "\n"); 2446 exit (1); 2411 2447 } 2412 2448 else if (olddef && sp->max_common_size && type == (N_UNDF | N_EXT) … … 2478 2514 { 2479 2515 register char *reftype; 2480 switch ( type & ~N_EXT)2516 switch (realtype & ~N_EXT) 2481 2517 { 2482 2518 case N_UNDF: … … 2544 2580 #endif 2545 2581 2546 #ifdef EMX /* import */2582 #ifdef EMX /* import & WEAK */ 2547 2583 case N_IMP1: 2548 2584 reftype = "imported"; 2549 2585 break; 2550 #endif /* EMX */2551 #ifdef EMX /* WEAKU */2552 2586 case N_WEAKU & ~N_EXT: 2553 2587 reftype = "weak"; 2588 break; 2589 case N_WEAKT & ~N_EXT: 2590 reftype = "weak text"; 2591 break; 2592 case N_WEAKD & ~N_EXT: 2593 reftype = "weak data"; 2554 2594 break; 2555 2595 #endif /* EMX */ … … 2764 2804 if (sp && ((sp->referenced && !sp->defined) 2765 2805 || (sp->defined && sp->max_common_size)) 2766 #ifdef EMX /* WEAKU */2767 && !sp->weak2768 #endif /* EMX */2769 2806 ) 2770 2807 { … … 2840 2877 /* Handle a subentry for a file with no __.SYMDEF. */ 2841 2878 2842 process_subentry (desc, subentry, entry, prev_addr)2879 void process_subentry (desc, subentry, entry, prev_addr) 2843 2880 int desc; 2844 2881 register struct file_entry *subentry; … … 2917 2954 /* If the symbol has an interesting definition, we could 2918 2955 potentially want it. */ 2919 if (type & N_EXT 2956 if (((type & N_EXT) 2957 #ifdef __EMX__ 2958 || WEAK_SYMBOL (type) 2959 #endif 2960 ) 2920 2961 && (type != (N_UNDF | N_EXT) || p->n_value 2921 2922 2962 #ifdef DOLLAR_KLUDGE 2923 2963 || name[1] == '$' 2924 2964 #endif 2925 2965 ) 2926 #ifdef EMX /* WEAKU */2927 && type != N_WEAKU2928 #endif /* EMX */2929 2966 && !SET_ELEMENT_P (type) 2930 2967 && !set_element_prefixed_p (name)) … … 2959 2996 pipe() from the library. But the bug fix kingdon made was wrong. */ 2960 2997 || (sp->defined && sp->max_common_size 2961 #ifdef EMX /* fix bugs, WEAKU */2962 && type != (N_INDR | N_EXT) && type != N_WEAKU2998 #ifdef EMX 2999 && type != (N_INDR | N_EXT) 2963 3000 #endif /* EMX */ 2964 3001 )) … … 3014 3051 { 3015 3052 register int i; 3016 int setv_fill_count ;3053 int setv_fill_count = 0; 3017 3054 3018 3055 if (trace_files) … … 3055 3092 /* Make sure bss starts out aligned as much as anyone can want. */ 3056 3093 { 3057 int new_data_size = (data_size + sizeof(double) - 1) & ~(sizeof(double)-1);3094 int new_data_size = (data_size + SECTION_ALIGN_MASK) & ~SECTION_ALIGN_MASK; 3058 3095 3059 3096 data_pad += new_data_size - data_size; … … 3090 3127 /* Make sure bss starts out aligned as much as anyone can want. */ 3091 3128 { 3092 int new_data_size = (data_size + sizeof(double) - 1) & ~(sizeof(double)-1);3129 int new_data_size = (data_size + SECTION_ALIGN_MASK) & ~SECTION_ALIGN_MASK; 3093 3130 3094 3131 data_pad += new_data_size - data_size; … … 3121 3158 int defs = 0, com = sp->max_common_size; 3122 3159 struct nlist *first_definition; 3123 #ifdef EMX /* WEAKU */3124 if (sp->weak && !sp->defined && output_style != OUTPUT_RELOCATABLE)3125 {3126 sp->defined = N_ABS;3127 sp->weak = 0;3128 sp->value = 0;3129 }3130 #endif /* EMX */3131 3160 for (p = sp->refs; p; p = next) 3132 3161 { … … 3156 3185 set_vectors[setv_fill_count++] = p->n_value; 3157 3186 } 3158 #ifdef EMX /* import , WEAKU*/3187 #ifdef EMX /* import */ 3159 3188 else if ((type & N_EXT) && type != (N_UNDF | N_EXT) 3160 && type != (N_IMP1 | N_EXT) && type != N_WEAKU)3189 && type != (N_IMP1 | N_EXT)) 3161 3190 #else /* !EMX */ 3162 3191 else if ((type & N_EXT) && type != (N_UNDF | N_EXT)) … … 3206 3235 bss_size += com; 3207 3236 if (write_map) 3208 printf ("Allocating common %s: %x at % x\n",3237 printf ("Allocating common %s: %x at %lx\n", 3209 3238 sp->name, com, sp->value); 3210 3239 } … … 3251 3280 set_vectors[setv_fill_count++] = 0; 3252 3281 } 3282 #ifdef EMX /* Unresolved weak symbols should be zero */ 3283 if (!sp->defined && WEAK_SYMBOL (sp->weak)) 3284 { 3285 sp->defined = N_ABS; 3286 sp->value = 0; 3287 undefined_global_sym_count--; 3288 } 3289 #endif /* EMX */ 3253 3290 if (sp->defined) 3254 3291 defined_global_sym_count++; 3255 #ifdef EMX /* WEAKU */3256 else if (sp->weak)3257 undefined_global_sym_count++;3258 #endif /* EMX */3259 3292 } 3260 3293 } … … 3262 3295 /* Make sure end of bss is aligned as much as anyone can want. */ 3263 3296 3264 bss_size = (bss_size + sizeof(double) - 1) & ~(sizeof(double)-1);3297 bss_size = (bss_size + SECTION_ALIGN_MASK) & ~SECTION_ALIGN_MASK; 3265 3298 3266 3299 /* Give values to _end and friends. */ … … 3328 3361 text_size += entry->text_size; 3329 3362 entry->data_start_address = data_size; 3330 data_size += entry->data_size;3363 data_size += (entry->data_size + SECTION_ALIGN_MASK) & ~SECTION_ALIGN_MASK; 3331 3364 entry->bss_start_address = bss_size; 3332 bss_size += entry->bss_size;3365 bss_size += (entry->bss_size + SECTION_ALIGN_MASK) & ~SECTION_ALIGN_MASK; 3333 3366 3334 3367 text_reloc_size += entry->text_reloc_size; … … 3400 3433 fprintf (outfile, "\nFiles:\n\n"); 3401 3434 3402 each_file (describe_file_sections, outfile);3435 each_file (describe_file_sections, (int)outfile); 3403 3436 3404 3437 fprintf (outfile, "\nGlobal symbols:\n\n"); … … 3412 3445 fprintf (outfile, " %s: common, length 0x%x\n", sp->name, sp->max_common_size); 3413 3446 if (sp->defined) 3414 fprintf (outfile, " %s: 0x% x\n", sp->name, sp->value);3447 fprintf (outfile, " %s: 0x%lx\n", sp->name, sp->value); 3415 3448 else if (sp->referenced) 3416 3449 fprintf (outfile, " %s: undefined\n", sp->name); … … 3418 3451 } 3419 3452 3420 each_file (list_file_locals, outfile);3453 each_file (list_file_locals, (int)outfile); 3421 3454 } 3422 3455 … … 3429 3462 print_file_name (entry, outfile); 3430 3463 if (entry->just_syms_flag) 3431 fprintf (outfile, " symbols only\n" , 0);3464 fprintf (outfile, " symbols only\n"); 3432 3465 else 3433 fprintf (outfile, " text %x(% x), data %x(%x), bss %x(%x) hex\n",3466 fprintf (outfile, " text %x(%lx), data %x(%lx), bss %x(%lx) hex\n", 3434 3467 entry->text_start_address, entry->text_size, 3435 3468 entry->data_start_address, entry->data_size, … … 3456 3489 /* If this is a definition, 3457 3490 update it if necessary by this file's start address. */ 3458 if (!(p->n_type & (N_STAB | N_EXT))) 3459 fprintf (outfile, " %s: 0x%x\n", 3491 if (!(p->n_type & (N_STAB | N_EXT)) && 3492 !SET_ELEMENT_P (p->n_type)) 3493 fprintf (outfile, " %s: 0x%lx\n", 3460 3494 entry->strings + p->n_un.n_strx, p->n_value); 3495 else if (SET_ELEMENT_P (p->n_type)) 3496 fprintf (outfile, " [set element] %s: 0x%lx\n", 3497 ((symbol *)p->n_un.n_name)->name, p->n_value); 3461 3498 3462 3499 entry->strings = 0; /* All done with them. */ … … 3688 3725 we scan the nlists themselves. */ 3689 3726 3727 void 3690 3728 do_relocation_warnings (entry, data_segment, outfile, nlist_bitvector) 3691 3729 struct file_entry *entry; … … 3830 3868 struct line_debug_entry *text_scan, *data_scan; 3831 3869 int i; 3832 char *errfmt, *file_name ;3833 int line_number ;3870 char *errfmt, *file_name = NULL; 3871 int line_number = -1; 3834 3872 int dont_allow_symbol_name; 3835 3873 … … 3867 3905 s = entry->symbols + i; 3868 3906 3869 if ( !(s->n_type & N_EXT))3907 if (WEAK_SYMBOL (s->n_type) || !(s->n_type & N_EXT)) 3870 3908 continue; 3871 3909 … … 3964 4002 3965 4003 4004 void 3966 4005 do_warnings (outfile) 3967 4006 FILE *outfile; … … 3977 4016 return; 3978 4017 3979 each_file (do_file_warnings, outfile);4018 each_file (do_file_warnings, (int)outfile); 3980 4019 3981 4020 if (list_unresolved_refs || list_multiple_defs) … … 4002 4041 initialize_a_out_text_start () 4003 4042 { 4004 int magic ;4043 int magic = 0; 4005 4044 4006 4045 switch (output_style) … … 4811 4850 { 4812 4851 ext = _getext (output_filename); 4813 if (ext != NULL) 4814 fatal ("The output file name must not have a suffix if -Zexe is used", 4815 NULL); 4816 touch_filename = output_filename; 4817 exe_filename = concat (output_filename, ".exe", ""); 4852 if ((ext != NULL) && (stricmp (ext, ".exe") == 0)) 4853 { 4854 exe_filename = output_filename; 4855 exe_flag = 0; 4856 } else 4857 { 4858 touch_filename = output_filename; 4859 exe_filename = concat (output_filename, ".exe", ""); 4860 } 4818 4861 } 4819 4862 else … … 4999 5042 if (touch_filename != NULL) 5000 5043 { 5001 i = open (touch_filename, 5002 O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666); 5003 if (i < 0) 5044 char execname[512]; 5045 _execname((char *)&execname, sizeof(execname)); 5046 strcpy(_getname((char *)&execname), "ldstub.bin"); 5047 /* Copy stub into file */ 5048 if (DosCopy((char *)&execname, touch_filename, 4)) 5049 { 5050 errno = EACCES; 5051 perror_name (execname); 5052 } 5053 /* Now touch it */ 5054 if (utime(touch_filename, NULL)) 5004 5055 perror_name (touch_filename); 5005 close (i);5006 5056 } 5007 5057 } … … 5280 5330 5281 5331 mywrite (bytes, 1, entry->data_size, outdesc); 5332 padfile ((SECTION_ALIGN - entry->data_size) & SECTION_ALIGN_MASK, outdesc); 5282 5333 } 5283 5334 … … 5400 5451 5401 5452 /* Unshifted mask for relocation */ 5402 mask = 1 << RELOC_TARGET_BITSIZE(p) - 1;5453 mask = (1 << RELOC_TARGET_BITSIZE(p)) - 1; 5403 5454 mask |= mask - 1; 5404 5455 relocation &= mask; … … 5667 5718 #endif 5668 5719 5669 symtype = symptr->defined & ~N_EXT; 5670 5720 #ifdef EMX 5721 if (symtype = symptr->defined != (N_IMP1 | N_EXT)) 5722 #endif 5723 symtype = symptr->defined & ~N_EXT; 5724 5725 #ifdef EMX /* relocatable */ 5726 if ((force_common_definition || reloc_flag) 5727 && (symtype != (N_IMP1 | N_EXT))) 5728 #endif /* EMX */ 5671 5729 if (force_common_definition 5672 #ifdef EMX /* relocatable */5673 || (reloc_flag && symtype != N_IMP1)5674 #endif /* EMX */5675 5730 || symtype == N_DATA || symtype == N_TEXT || symtype == N_ABS) 5676 5731 { … … 5828 5883 /* Write the local symbols defined by the various files. */ 5829 5884 5830 each_file (write_file_syms, &syms_written);5885 each_file (write_file_syms, (int)&syms_written); 5831 5886 file_close (); 5832 5887 … … 5893 5948 nl.n_value = sp->max_common_size; 5894 5949 } 5895 #ifdef EMX /* WEAK U*/5950 #ifdef EMX /* WEAK */ 5896 5951 else if (!sp->defined && sp->weak) 5897 5952 { 5898 nl.n_type = N_WEAKU;5953 nl.n_type = sp->weak; 5899 5954 nl.n_value = 0; 5900 5955 } … … 5920 5975 { 5921 5976 struct nlist xtra_ref; 5922 xtra_ref.n_type = =N_EXT | N_UNDF;5977 xtra_ref.n_type = N_EXT | N_UNDF; 5923 5978 xtra_ref.n_un.n_strx 5924 5979 = assign_string_table_index (((symbol *) sp->value)->name); … … 6047 6102 /* globally. */ 6048 6103 write = output_style == OUTPUT_RELOCATABLE; 6104 else if (WEAK_SYMBOL (type)) 6105 ; 6049 6106 else if (!(type & (N_STAB | N_EXT))) 6050 6107 /* ordinary local symbol */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/ld/stab.def
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
-
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/ld/stab.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
-
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/ld/symseg.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
-
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/app/stdio.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 2 2 3 3 #include <stdio.h> 4 #include <stdlib.h> 4 5 #include <sys/builtin.h> /* For <sys/fmutex.h> */ 5 6 #include <sys/fmutex.h> /* For <sys/rmutex.h> */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/conv/bidivbb.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 1 1 /* bidivbb.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */ 2 2 3 #include <alloca.h> 3 4 #include <assert.h> 4 5 #include <sys/builtin.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/conv/bipow5.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 2 2 3 3 #include <stdlib.h> 4 #include <alloca.h> 4 5 #include <emx/bigint.h> 5 6 #include "bipow5.tab" -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/conv/dtoa.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 1 1 /* dtoa.c (emx+gcc) -- Copyright (c) 1996-1999 by Eberhard Mattes */ 2 2 3 #include <stdlib.h> 3 4 #include <math.h> 4 5 #include <float.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/access.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 3 3 #include <string.h> 4 4 #include <io.h> 5 #include <alloca.h> 5 6 #include <errno.h> 6 7 #include <emx/io.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/eaget.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 7 7 #include <io.h> 8 8 #include <errno.h> 9 #include <alloca.h> 9 10 #include <sys/ea.h> 10 11 #include "ea.h" -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/eaput.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 6 6 #include <string.h> 7 7 #include <io.h> 8 #include <alloca.h> 8 9 #include <errno.h> 9 10 #include <sys/ea.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/fcntl.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 5 5 #include <io.h> 6 6 #include <fcntl.h> 7 #include <alloca.h> 7 8 #include <errno.h> 8 9 #include <limits.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/readv.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 5 5 #include <unistd.h> 6 6 #include <io.h> 7 #include <alloca.h> 7 8 #include <errno.h> 8 9 #include <sys/types.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/select.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 4 4 #include <memory.h> 5 5 #include <io.h> 6 #include <alloca.h> 6 7 #include <sys/types.h> 7 8 #include <sys/time.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/sscanf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 4 4 #include <stdarg.h> 5 5 #include <limits.h> 6 #include <string.h> 6 7 #include <emx/io.h> 7 8 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/stat.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 5 5 #include <time.h> 6 6 #include <io.h> 7 #include <alloca.h> 7 8 #include <errno.h> 8 9 #include <sys/types.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/vscanf.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 7 7 #include <stdlib.h> 8 8 #include <stdarg.h> 9 #include <string.h> 9 10 #include <emx/io.h> 10 11 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/io/writev.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 5 5 #include <unistd.h> 6 6 #include <io.h> 7 #include <alloca.h> 7 8 #include <errno.h> 8 9 #include <sys/types.h> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/ceil.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 21 21 PROFILE_NOFRAME 22 22 subl $4, %esp 23 fstcw wcw123 fstcw cw1 24 24 movw cw1, %ax 25 25 andw $0xf3ff, %ax 26 26 orw $0x0800, %ax /* round up towards +inf */ 27 27 movw %ax, cw2 28 fldcw wcw228 fldcw cw2 29 29 FLD x /* x */ 30 30 frndint 31 fldcw wcw131 fldcw cw1 32 32 addl $4, %esp 33 33 EPILOGUE(FUNC) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/clear.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 14 14 PROFILE_NOFRAME 15 15 xor %eax, %eax /* Clear upper 16 bits */ 16 fstsw w%ax16 fstsw %ax 17 17 fclex 18 18 EPILOGUE(_clear87) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/control.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 20 20 PROFILE_NOFRAME 21 21 pushl %ecx /* Dummy (for control word) */ 22 fstcw wcw_old /* Store control word into memory */22 fstcw cw_old /* Store control word into memory */ 23 23 movl mask, %ecx /* Get mask */ 24 24 jecxz 1f /* Do not set cw => done */ … … 30 30 orl %edx, %eax /* Insert new bits */ 31 31 movw %ax, cw_new /* Put new cw into memory */ 32 fldcw wcw_new /* Load control word */32 fldcw cw_new /* Load control word */ 33 33 1: popl %eax /* Return old cw in lower 16 bits */ 34 34 movzwl %ax, %eax /* Clear upper 16 bits */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/cos.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 20 20 FLD x /* x */ 21 21 fcos /* cos(x) */ 22 fstsw w%ax22 fstsw %ax 23 23 testb $0x04, %ah 24 24 jnz Llarge /* C2 != 0 ? */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/cosh.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 26 26 fldl2e /* log2 (e) */ 27 27 fmulp /* y := x * log2 (e) */ 28 fstcw wcw128 fstcw cw1 29 29 movw cw1, %ax 30 30 andw $0xf3ff, %ax 31 31 orw $0x0400, %ax /* round down towards -inf */ 32 32 movw %ax, cw2 33 fldcw wcw233 fldcw cw2 34 34 fld %st /* y, y */ 35 35 frndint /* int (y), y */ 36 fldcw wcw136 fldcw cw1 37 37 fxch %st(1) /* y, int (y) */ 38 38 fsub %st(1), %st /* frac (y), int (y) */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/exp.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 23 23 FLD x /* x */ 24 24 fxam 25 fstsw w%ax25 fstsw %ax 26 26 andb $0x47, %ah 27 27 cmpb $5, %ah … … 31 31 fldl2e /* log2 (e) */ 32 32 fmulp /* y := x * log2 (e) */ 33 fstcw wcw133 fstcw cw1 34 34 movw cw1, %ax 35 35 andw $0xf3ff, %ax 36 36 orw $0x0400, %ax /* round down towards -inf */ 37 37 movw %ax, cw2 38 fldcw wcw238 fldcw cw2 39 39 fld %st /* y, y */ 40 40 frndint /* int (y), y */ 41 fldcw wcw141 fldcw cw1 42 42 fxch %st(1) /* y, int (y) */ 43 43 fsub %st(1), %st /* frac (y), int (y) */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/floor.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 21 21 PROFILE_NOFRAME 22 22 subl $4, %esp 23 fstcw wcw123 fstcw cw1 24 24 movw cw1, %ax 25 25 andw $0xf3ff, %ax 26 26 orw $0x0400, %ax /* round down towards -inf */ 27 27 movw %ax, cw2 28 fldcw wcw228 fldcw cw2 29 29 FLD x /* x */ 30 30 frndint 31 fldcw wcw131 fldcw cw1 32 32 addl $4, %esp 33 33 EPILOGUE(FUNC) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/fmod.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 26 26 FLD y /* y */ 27 27 ftst 28 fstsw w%ax28 fstsw %ax 29 29 andw $0x4100, %ax 30 30 xorb $0x40, %ah … … 32 32 FLD x /* x */ 33 33 1: fprem 34 fstsw w%ax34 fstsw %ax 35 35 andb $0x04, %ah 36 36 jnz 1b /* C2 != 0 ? */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/fpclass.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 21 21 fldt x 22 22 fxam 23 fstsw w%ax23 fstsw %ax 24 24 fstp %st(0) 25 25 movb %ah, %al -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/frexp.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 28 28 FLD x /* x */ 29 29 ftst 30 fstsw w%ax30 fstsw %ax 31 31 andw $0x4100, %ax 32 32 xorb $0x40, %ah -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/fxam.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 20 20 FLD x /* x */ 21 21 fxam 22 fstsw w%ax22 fstsw %ax 23 23 fstp %st(0) 24 24 movl %eax, %edx -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/isfin.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 21 21 fldt x 22 22 fxam 23 fstsw w%ax23 fstsw %ax 24 24 fstp %st(0) 25 25 movb %ah, %al -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/isnan.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 21 21 fldt x 22 22 fxam 23 fstsw w%ax23 fstsw %ax 24 24 fstp %st(0) 25 25 movb %ah, %al -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/isnorm.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 21 21 fldt x 22 22 fxam 23 fstsw w%ax23 fstsw %ax 24 24 fstp %st(0) 25 25 movb %ah, %al -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/log.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 19 19 FLD x /* x */ 20 20 fxam 21 fstsw w%ax21 fstsw %ax 22 22 andb $0x47, %ah 23 23 cmpb $5, %ah -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/log10.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 19 19 FLD x /* x */ 20 20 fxam 21 fstsw w%ax21 fstsw %ax 22 22 andb $0x47, %ah 23 23 cmpb $5, %ah -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/modf.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 26 26 PROFILE_NOFRAME 27 27 subl $4, %esp 28 fstcw wcw128 fstcw cw1 29 29 movw cw1, %ax 30 30 orw $0x0c00, %ax /* chop mode */ 31 31 movw %ax, cw2 32 32 movl intptr, %eax 33 fldcw wcw233 fldcw cw2 34 34 FLD x /* x */ 35 35 fld %st … … 41 41 fstl (%eax) 42 42 #endif 43 fldcw wcw143 fldcw cw1 44 44 fsubrp 45 45 addl $4, %esp -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/nextaft.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 23 23 fldt y(0) 24 24 fucompp 25 fstsw w%ax25 fstsw %ax 26 26 testb $0x04, %ah 27 27 jnz Lunordered /* Unordered (at least one NaN) */ … … 166 166 flds y 167 167 fucompp 168 fstsw w%ax168 fstsw %ax 169 169 testb $0x04, %ah 170 170 jnz Lunordered /* Unordered (at least one NaN) */ … … 243 243 fldl y(0) 244 244 fucompp 245 fstsw w%ax245 fstsw %ax 246 246 testb $0x04, %ah 247 247 jnz Lunordered /* Unordered (at least one NaN) */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/pow.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 31 31 subl $4, %esp 32 32 pushf /* Save flags */ 33 fstcw wcw_user33 fstcw cw_user 34 34 movw cw_user, %ax 35 35 orw $0x0c00, %ax /* Chop by truncating toward 0 */ … … 37 37 FLD y 38 38 fxam 39 fstsw w%ax39 fstsw %ax 40 40 movb %ah, %al 41 41 andb $0x47, %al … … 55 55 FLD x 56 56 fxam 57 fstsw w%ax57 fstsw %ax 58 58 movb %ah, %al 59 59 andb $0x47, %al … … 80 80 FLD x 81 81 fcomps Lone 82 fnstsw w%ax82 fnstsw %ax 83 83 sahf 84 84 ja Ldone … … 210 210 fabs 211 211 fcoms Lone 212 fnstsw w%ax212 fnstsw %ax 213 213 fstp %st(0) 214 214 sahf … … 227 227 fabs 228 228 fcoms Lone 229 fnstsw w%ax229 fnstsw %ax 230 230 fstp %st(0) /* Pop x */ 231 231 sahf … … 252 252 Lis_odd_int: 253 253 fld %st /* st(0)=x, st(1)=x */ 254 fldcw wcw_chop254 fldcw cw_chop 255 255 frndint /* st(0)=int(x), st(1)=x */ 256 fldcw wcw_user256 fldcw cw_user 257 257 fcom %st(1) 258 fnstsw w%ax258 fnstsw %ax 259 259 sahf 260 260 jnz Lnot_int /* x not an integer */ 261 261 fmuls Lhalf /* st(0)=x/2, st(1)=x */ 262 fldcw wcw_chop262 fldcw cw_chop 263 263 frndint 264 fldcw wcw_user264 fldcw cw_user 265 265 fmuls Ltwo /* st(0)=2*(x/2), st(1)=x */ 266 266 fcomp %st(1) 267 fnstsw w%ax267 fnstsw %ax 268 268 sahf 269 269 jnz Lodd … … 290 290 j_inf Lpower_overflow 291 291 fld %st 292 fldcw wcw_chop292 fldcw cw_chop 293 293 frndint 294 fldcw wcw_user294 fldcw cw_user 295 295 fsubr %st, %st(1) 296 296 fxch %st(1) … … 307 307 fabs 308 308 fcomps Lone 309 fnstsw w%ax309 fnstsw %ax 310 310 sahf 311 311 ja Lpower_ret -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/rint.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 21 21 PROFILE_NOFRAME 22 22 subl $4, %esp 23 fstcw wcw123 fstcw cw1 24 24 movw cw1, %ax 25 25 andw $0xf3ff, %ax /* round to nearest or even */ 26 26 movw %ax, cw2 27 fldcw wcw227 fldcw cw2 28 28 FLD x /* x */ 29 29 frndint 30 fldcw wcw130 fldcw cw1 31 31 addl $4, %esp 32 32 EPILOGUE(FUNC) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/sin.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 20 20 FLD x /* x */ 21 21 fsin /* sin(x) */ 22 fstsw w%ax22 fstsw %ax 23 23 testb $0x04, %ah 24 24 jnz Llarge /* C2 != 0 ? */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/sinh.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 26 26 fldl2e /* log2 (e) */ 27 27 fmulp /* y := x * log2 (e) */ 28 fstcw wcw128 fstcw cw1 29 29 movw cw1, %ax 30 30 andw $0xf3ff, %ax 31 31 orw $0x0400, %ax /* round down towards -inf */ 32 32 movw %ax, cw2 33 fldcw wcw233 fldcw cw2 34 34 fld %st /* y, y */ 35 35 frndint /* int (y), y */ 36 fldcw wcw136 fldcw cw1 37 37 fxch %st(1) /* y, int (y) */ 38 38 fsub %st(1), %st /* frac (y), int (y) */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/status.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 14 14 PROFILE_NOFRAME 15 15 xor %eax, %eax /* Clear upper 16 bits */ 16 fstsw w%ax16 fstsw %ax 17 17 EPILOGUE(_status87) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/tan.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 21 21 fptan 22 22 23 /* Note: fptan is followed by fstsw w, avoiding a bug in the 486. */23 /* Note: fptan is followed by fstsw , avoiding a bug in the 486. */ 24 24 25 fstsw w%ax25 fstsw %ax 26 26 testb $0x04, %ah 27 27 jnz Llarge /* C2 != 0 ? */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/tanh.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 27 27 fldl2e /* log2 (e) */ 28 28 fmulp /* y := 2x * log2 (e) */ 29 fstcw wcw129 fstcw cw1 30 30 movw cw1, %ax 31 31 andw $0xf3ff, %ax 32 32 orw $0x0400, %ax /* round down towards -inf */ 33 33 movw %ax, cw2 34 fldcw wcw234 fldcw cw2 35 35 fld %st /* y, y */ 36 36 frndint /* int (y), y */ 37 fldcw wcw137 fldcw cw1 38 38 fxch %st(1) /* y, int (y) */ 39 39 fsub %st(1), %st /* frac (y), int (y) */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/math/386/trunc.s
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 21 21 PROFILE_NOFRAME 22 22 subl $4, %esp 23 fstcw wcw123 fstcw cw1 24 24 movw cw1, %ax 25 25 andw $0xf3ff, %ax 26 26 orw $0x0c00, %ax /* chop by truncating toward 0 */ 27 27 movw %ax, cw2 28 fldcw wcw228 fldcw cw2 29 29 FLD x /* x */ 30 30 frndint 31 fldcw wcw131 fldcw cw1 32 32 addl $4, %esp 33 33 EPILOGUE(FUNC) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/misc/getopt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 4 4 #include <stdlib.h> 5 5 #include <string.h> 6 #include < getopt.h>6 #include <emx/getopt.h> 7 7 8 8 char *_optarg = NULL; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/regexp/regexp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r93 r94 298 298 register char *br; 299 299 register char *ender; 300 register int parno ;300 register int parno = 0; 301 301 int flags; 302 302 … … 914 914 case WORDA: 915 915 /* Must be looking at a letter, digit, or _ */ 916 if ((!isalnum(* reginput)) && *reginput != '_')916 if ((!isalnum(*(unsigned char *)reginput)) && *reginput != '_') 917 917 return(0); 918 918 /* Prev must be BOL or nonword */ 919 919 if (reginput > regbol && 920 (isalnum( reginput[-1]) || reginput[-1] == '_'))920 (isalnum(((unsigned char *)reginput)[-1]) || reginput[-1] == '_')) 921 921 return(0); 922 922 break; 923 923 case WORDZ: 924 924 /* Must be looking at non letter, digit, or _ */ 925 if (isalnum(* reginput) || *reginput == '_')925 if (isalnum(*(unsigned char *)reginput) || *reginput == '_') 926 926 return(0); 927 927 /* We don't care what the previous char was */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.