Compare commits

...

1471 Commits

Author SHA1 Message Date
No Author
d0ec45ebce This commit was manufactured by cvs2svn to create tag
'gcc-2_8_1-RELEASE'.

From-SVN: r18395
1998-03-04 02:31:39 +00:00
Richard Kenner
6b2496e031 *** empty log message ***
From-SVN: r18394
1998-03-03 21:31:39 -05:00
Richard Kenner
bc5817a900 Remove last (incorrect) change.
From-SVN: r18393
1998-03-03 21:30:35 -05:00
Richard Kenner
3704d4715e *** empty log message ***
From-SVN: r18389
1998-03-03 11:19:36 -05:00
Richard Kenner
a69223ed4a (expand_increment): If op0 is a MEM, enqueue insn to load it into a
REG, not just the one to store it.

From-SVN: r18388
1998-03-03 11:18:11 -05:00
Richard Kenner
2907a9e9e3 Fix typo in last change.
From-SVN: r18382
1998-03-02 20:54:12 -05:00
Richard Kenner
741e1986d8 (distdir-start): Don't copy CVS subdirectory of config.
From-SVN: r18379
1998-03-02 20:46:38 -05:00
Richard Kenner
7974870bc2 *** empty log message ***
From-SVN: r18376
1998-03-02 20:17:37 -05:00
Richard Kenner
e7c048640c (VERSION_DEP): New variable.
(distdir-finish): Pass a value of null for it.
(version.c): Use it.

From-SVN: r18375
1998-03-02 20:16:11 -05:00
Richard Kenner
7f1fe473af *** empty log message ***
From-SVN: r18373
1998-03-02 19:50:59 -05:00
Richard Kenner
8445d68ce0 (version.c): Avoid broken pipe with cvs log.
From-SVN: r18372
1998-03-02 19:49:24 -05:00
Richard Kenner
3a11f96cac *** empty log message ***
From-SVN: r18371
1998-03-02 19:28:45 -05:00
Richard Kenner
77ef1f9100 *** empty log message ***
From-SVN: r18366
1998-03-02 16:31:56 -05:00
Richard Kenner
d9d3114a26 (mostlyclean): Remove duplicate deletion of temp files.
Delete more stamp files and [df]p-bit.c
(clean): Don't delete stamp files here.

From-SVN: r18365
1998-03-02 16:30:13 -05:00
Richard Kenner
f7235cfd2b *** empty log message ***
From-SVN: r18363
1998-03-02 09:00:58 -05:00
Richard Kenner
742ad45721 (objc/runtime-info.h): Rename emptyfile to tmp-runtime and delete.
From-SVN: r18362
1998-03-02 08:59:02 -05:00
Richard Kenner
f3a0f469c3 *** empty log message ***
From-SVN: r18360
1998-03-02 08:07:34 -05:00
Richard Kenner
036e68f672 (clean): Delete stamp-* and */stamp-*.
From-SVN: r18359
1998-03-02 08:06:26 -05:00
Richard Kenner
c1261614c8 *** empty log message ***
From-SVN: r18352
1998-03-01 17:33:00 -05:00
Richard Kenner
f480144043 (build_reference_type): Handle obstacks like build_pointer_type.
From-SVN: r18351
1998-03-01 17:32:02 -05:00
Richard Kenner
d4aa2b8b2f (dist): Fix error in last change.
From-SVN: r18349
1998-03-01 13:33:16 -05:00
Richard Kenner
5d16de29f8 *** empty log message ***
From-SVN: r18340
1998-03-01 07:38:01 -05:00
Richard Kenner
e4d1941ffc (tmp-gcc.xtar): Renamed from gcc.xtar.
(gcc.xtar.gz): Deleted; merged with `dist'.
(dist): Create gcc-$(version).tar.gz.
(diff): Create gcc-$(oldversion)-$(version).diff.

From-SVN: r18339
1998-03-01 07:36:45 -05:00
Richard Kenner
841f61d2af *** empty log message ***
From-SVN: r18338
1998-03-01 06:57:59 -05:00
Richard Kenner
42f17e9ca1 (distdir): Depend on distdir-cvs.
(distdir-cvs): New rule.

From-SVN: r18337
1998-03-01 06:56:23 -05:00
Richard Kenner
c51f36e4ab *** empty log message ***
From-SVN: r18336
1998-03-01 06:49:46 -05:00
Richard Kenner
e0f2185dda (TAGS): Use tmp-tags instead of temp.
(distdir-start): Depend on TAGS.

From-SVN: r18335
1998-03-01 06:48:17 -05:00
Richard Kenner
684a375893 *** empty log message ***
From-SVN: r18334
1998-03-01 06:42:24 -05:00
Richard Kenner
9911cd74db (compare_constant_1): Fix typo in previous change.
From-SVN: r18333
1998-03-01 06:40:57 -05:00
Richard Kenner
668f99100e (objc-parse.[cy]): Remove obsolete code to check out files.
From-SVN: r18332
1998-03-01 06:28:46 -05:00
Richard Kenner
088b6df71f *** empty log message ***
From-SVN: r18331
1998-03-01 06:17:09 -05:00
Richard Kenner
014bf60dc2 *** empty log message ***
From-SVN: r18330
1998-03-01 06:15:27 -05:00
Richard Kenner
6308615a5f (distdir-start): If srcdir is CVS directory, do cvs update.
From-SVN: r18329
1998-03-01 06:13:45 -05:00
Richard Kenner
b5428a93a6 *** empty log message ***
From-SVN: r18328
1998-03-01 05:51:09 -05:00
Richard Kenner
0656e6cf44 (objc-distdir): Properly rebuild objc-parse.c.
From-SVN: r18327
1998-03-01 05:50:06 -05:00
Tristan Gingold
34253f564a *** empty log message ***
From-SVN: r18322
1998-02-28 16:49:35 -05:00
Tristan Gingold
43aadaa1fd (expand_decl): If -fcheck-memory-usage, put vars in memory.
From-SVN: r18321
1998-02-28 16:48:18 -05:00
Tristan Gingold
5848bec6e8 (get_memory_usage_from_modifier): Convert EXPAND_{CONST_ADDRESS,
INITIALIZER} to MEMORY_USE_DONT.

From-SVN: r18320
1998-02-28 16:47:39 -05:00
Richard Kenner
906efe173c Fix typo in last change.
From-SVN: r18319
1998-02-28 16:16:53 -05:00
Richard Kenner
1bcdf77d04 Fix error in last change.
From-SVN: r18318
1998-02-28 16:07:14 -05:00
Richard Kenner
9fdff081f3 *** empty log message ***
From-SVN: r18317
1998-02-28 15:55:11 -05:00
Richard Kenner
1c77a361ad (integer_pow2p, tree_log2, valid_machine_attribute): Use POINTER_TYPE_P.
From-SVN: r18316
1998-02-28 15:53:43 -05:00
Richard Kenner
65e6ef6166 (expand_decl): Use POINTER_TYPE_P.
({,bc_}expand_decl_init): Also test for REFERENCE_TYPE.

From-SVN: r18315
1998-02-28 15:50:26 -05:00
Richard Kenner
6aef789e9b (expand_inline_function): Use POINTER_TYPE_P.
From-SVN: r18314
1998-02-28 15:46:29 -05:00
Richard Kenner
f9044707ba (assign_parms): Use POINTER_TYPE_P.
From-SVN: r18313
1998-02-28 15:42:21 -05:00
Richard Kenner
dc36857a7e (force_fit_type, fold_convert, fold): Use POINTER_TYPE_P.
From-SVN: r18312
1998-02-28 15:40:54 -05:00
Richard Kenner
a5c063a766 (get_pointer_alignment, compare, do_store_flag, expand_builtin): Use
POINTER_TYPE_P.

From-SVN: r18311
1998-02-28 15:36:49 -05:00
Richard Kenner
71834e9ba2 (sdbout_field_types): Use POINTER_TYPE_P.
From-SVN: r18310
1998-02-28 15:24:10 -05:00
Richard Kenner
f8aea64e70 (FUNCTION_VALUE): Use POINTER_TYPE_P.
From-SVN: r18309
1998-02-28 15:20:40 -05:00
Richard Kenner
40a1101b2e (DATA_ALIGNMENT): Use POINTER_TYPE_P.
From-SVN: r18308
1998-02-28 15:18:27 -05:00
Richard Kenner
ca167f66a8 *** empty log message ***
From-SVN: r18307
1998-02-28 15:08:43 -05:00
Richard Kenner
907d91033a (version.c): New rule.
From-SVN: r18306
1998-02-28 15:07:52 -05:00
Richard Kenner
70f477a1b8 (version_dep): New variable; if srcdir is CVS working directory, set
to ChangeLog.

From-SVN: r18305
1998-02-28 15:07:23 -05:00
Richard Kenner
1b01efc504 *** empty log message ***
From-SVN: r18301
1998-02-28 09:16:27 -05:00
Richard Kenner
416e11eeb6 (snapshot_warning): New function.
(main): Call it for snapshots.

From-SVN: r18300
1998-02-28 09:15:22 -05:00
Richard Kenner
7e9871a958 *** empty log message ***
From-SVN: r18299
1998-02-28 08:05:03 -05:00
Richard Kenner
6706028287 (expand_builtin_dwarf_reg_size): If reg_raw_mode not valid for reg,
use last size.  Also refine range assertion.

From-SVN: r18298
1998-02-28 08:04:08 -05:00
Richard Kenner
4e0b33d9c9 Correct error in comment.
From-SVN: r18297
1998-02-28 07:50:01 -05:00
Michael P. Hayes
63e91da1e7 *** empty log message ***
From-SVN: r18295
1998-02-28 04:56:06 -05:00
Michael P. Hayes
49b76d8e60 (cprop): Don't perform exhaustive search for char_min and char_max
when bits_per_byte > 16.

From-SVN: r18294
1998-02-28 04:55:14 -05:00
Richard Kenner
635c3e3ec0 Update date.
From-SVN: r18293
1998-02-28 04:50:36 -05:00
Richard Kenner
8950a2a436 (INSN_FROM_TARGET_P): Clarify language.
From-SVN: r18292
1998-02-28 04:49:00 -05:00
Richard Kenner
a211407122 *** empty log message ***
From-SVN: r18277
1998-02-26 15:28:26 -05:00
Richard Kenner
5aef4e4fdd (distdir-start): Don't copy CVS subdirectory of config.
From-SVN: r18276
1998-02-26 15:25:39 -05:00
Christopher Taylor
dd074a03a6 *** empty log message ***
From-SVN: r18275
1998-02-26 15:04:42 -05:00
Christopher Taylor
e72b7ac54a Avoid using '0-~' in egrep.
From-SVN: r18274
1998-02-26 15:02:28 -05:00
Tristan Gingold
9a2e71ac2e *** empty log message ***
From-SVN: r18272
1998-02-26 07:55:29 -05:00
Tristan Gingold
0cb76fe8dd (assign_parms): Call 'chkr_set_right' when DECL_RTL is stack_parm.
From-SVN: r18271
1998-02-26 07:54:33 -05:00
Tristan Gingold
e5f4c8885f (get_memory_usage_from_modifier): Convert EXPAND_{SUM, CONST_ADDRESS,
INITIALIZER} to MEMORY_USE_RO.

From-SVN: r18270
1998-02-26 07:53:57 -05:00
Paul Eggert
bb4d22f5dd *** empty log message ***
From-SVN: r18269
1998-02-26 07:26:34 -05:00
Paul Eggert
3d966a6ecb (safe_write, find_file, process_aux_info_file): Don't munge errno before using it.
(safe_write, find_file, process_aux_info_file): Don't munge errno
before using it.
(rename_c_file, edit_file): Likewise.

From-SVN: r18268
1998-02-26 07:24:21 -05:00
Paul Eggert
0820bf51b2 (pfatal_pexecute): Don't munge errno before using it.
From-SVN: r18267
1998-02-26 07:23:01 -05:00
Paul Eggert
79edad6ded (cpp_error_from_errno): Don't munge errno before using it.
From-SVN: r18266
1998-02-26 07:22:12 -05:00
Paul Eggert
6acdf3cb1a (error_from_errno, perror_with_name): Don't munge errno before using it.
From-SVN: r18265
1998-02-26 07:21:25 -05:00
Paul Eggert
346af08af8 (yylex): Don't munge errno before using it.
Remove unused variable exceeds_double.

From-SVN: r18264
1998-02-26 07:17:34 -05:00
Michael P. Hayes
41026402d4 *** empty log message ***
From-SVN: r18263
1998-02-26 06:56:44 -05:00
Michael P. Hayes
714ecd4eb8 (fill_slots_from_thread): Don't steal delay list from target if
condition code of jump conflicts with opposite_needed.

From-SVN: r18262
1998-02-26 06:55:17 -05:00
Richard Kenner
1fa6a54a0b *** empty log message ***
From-SVN: r18261
1998-02-26 06:36:53 -05:00
Richard Kenner
b63b42c429 ({compare,record}_constant_1, case CONSTRUCTOR): Handle the case when
we have TREE_PURPOSE values.

From-SVN: r18260
1998-02-26 06:35:46 -05:00
Philippe De Muyter
7bd04b515a *** empty log message ***
From-SVN: r18259
1998-02-26 05:50:27 -05:00
Philippe De Muyter
14b428c030 (sys/limits.h): Fix a nested comment problem with HUGE_VAL definition
on sysV68 R3V7.1.

From-SVN: r18258
1998-02-26 05:49:26 -05:00
Philippe De Muyter
503de63c68 *** empty log message ***
From-SVN: r18257
1998-02-25 21:01:20 -05:00
Philippe De Muyter
78e5992384 (TICKS_PER_SECOND): Renamed from CLOCKS_PER_SECOND.
From-SVN: r18256
1998-02-25 21:00:04 -05:00
Richard Kenner
1ad3413d7d (PREFERRED_DEBUGGING_TYPE): Fix typo with colon.
(LINKER_DOES_NOT_WORK_WITH_DWARF2): Don't claim that GCC falls back on
PREFERRED_DEBUGGING_TYPE.

From-SVN: r18255
1998-02-25 20:44:09 -05:00
Michael P. Hayes
de58b69910 *** empty log message ***
From-SVN: r18254
1998-02-25 20:41:44 -05:00
Michael P. Hayes
9ff1e0ae11 (fill_slots_from_thread): Mark resources referenced in opposite_needed thread.
(fill_slots_from_thread): Mark resources referenced in opposite_needed
thread.  Return delay_list even when cannot get any more delay insns
from end of subroutine.

From-SVN: r18253
1998-02-25 20:40:35 -05:00
Richard Kenner
5d2717ac66 *** empty log message ***
From-SVN: r18252
1998-02-25 20:35:57 -05:00
Richard Kenner
8cd646c068 (call insns): Second operand to CALL rtl is SImode.
From-SVN: r18251
1998-02-25 20:35:01 -05:00
Richard Kenner
f580f9e9d2 *** empty log message ***
From-SVN: r18250
1998-02-25 20:07:38 -05:00
Richard Kenner
cd44399f5a Remove #include.
From-SVN: r18249
1998-02-25 20:03:55 -05:00
Richard Kenner
d7cf94e912 (i[34567]86-*-mingw32): Support msv and crt suffix.
From-SVN: r18248
1998-02-25 20:01:34 -05:00
Richard Kenner
ecc4011f24 Initial revision
From-SVN: r18247
1998-02-25 19:49:34 -05:00
No Author
733a35836b This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r18246
1998-02-26 00:49:34 +00:00
Mikael Pettersson
350953c7ca *** empty log message ***
From-SVN: r18244
1998-02-25 19:43:49 -05:00
Mikael Pettersson
2a88d552e5 (lookup_compiler): Remove redundant test.
From-SVN: r18243
1998-02-25 19:42:41 -05:00
Karl Berry
daa13a9d77 (\doprintindex): Change catcode of @ before \read, in case of \initial{@} being the line that is read.
(\doprintindex): Change catcode of @ before \read, in case of
\initial{@} being the line that is read.
Reported by: Drew Csillag <drew_csillag@geocities.com>

From-SVN: r18238
1998-02-25 22:54:34 +00:00
Karl Berry
cfdf33976f (\dotable): Don't inherit \rightskip from surrounding environment.
(\dotable): Don't inherit \rightskip from
surrounding environment.  Add \leftskip to \hsize in the first
column.  Set \item to \crcr to avoid empty first row.  Prepend
\parskip glue before table.  Set \everycr locally outside of
alignment, don't reset it explicitly in \Emultitable.
From Andreas Schwab.

Also, work on leading commentary in file a bit.

From-SVN: r18236
1998-02-25 20:48:50 +00:00
Richard Kenner
a4b8e00ea4 *** empty log message ***
From-SVN: r18235
1998-02-25 09:18:10 -05:00
Richard Kenner
b7d7f33c59 (pic_setup_code): If -O0, write USE of pic_offset_table_rtx.
From-SVN: r18234
1998-02-25 09:16:43 -05:00
Richard Kenner
78ff482afb *** empty log message ***
From-SVN: r18233
1998-02-25 07:16:30 -05:00
Richard Kenner
bc16515ecf (safe_from_p): Add new arg, TOP_P; all callers changed.
From-SVN: r18232
1998-02-25 07:14:40 -05:00
Karl Berry
d06d6f9a42 \!: Save and restore this for @tex.
\!: Save and restore this for @tex.
From: Jean-Pierre Moreau <jpmoreau@ciframedical.com>
Date: Fri, 22 Aug 1997 16:47:36 -0400

From-SVN: r18224
1998-02-24 23:05:08 +00:00
Karl Berry
5d0e2c3ac1 (\angleleft, \angleright): New macros.
(\refx, \email, \key): Use them.
From: Stephen Gildea <gildea@intouchsys.com>
Date: Fri, 26 Dec 1997 11:43:32 EST

From-SVN: r18223
1998-02-24 22:48:24 +00:00
Andreas Schwab
673a16eb2d texinfo.tex (xrdef): Read the second argument with \ as an escape character.
1997-08-28  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* doc/texinfo.tex (xrdef): Read the second argument with \ as an
	escape character.

From-SVN: r18213
1998-02-23 22:34:20 +00:00
Jim Wilson
c09b0b360f *** empty log message ***
From-SVN: r18158
1998-02-21 07:04:36 -05:00
Jim Wilson
d50a2ece2a (DWARF2_UNWIND_INFO): Define to 1.
From-SVN: r18157
1998-02-21 07:02:36 -05:00
Jim Wilson
912655a6db (DWARF2_UNWIND_INFO): Define to 0.
From-SVN: r18156
1998-02-21 07:02:22 -05:00
Richard Kenner
c0fbb7ad6d Add doc for LINKER_DOES_NOT_WORK_WITH_DWARF2
From-SVN: r18155
1998-02-21 06:55:15 -05:00
Richard Kenner
f55f2d8248 Clarify DECstation to mean only MIPS
From-SVN: r18154
1998-02-21 06:46:10 -05:00
Paul Eggert
7a56e551d6 *** empty log message ***
From-SVN: r18152
1998-02-20 08:28:29 -05:00
Paul Eggert
e8209b11d8 (main): Don't default to DWARF2_DEBUG with -ggdb if
LINKER_DOES_NOT_WORK_WITH_DWARF2 is defined.

From-SVN: r18151
1998-02-20 08:27:41 -05:00
Paul Eggert
9e17e90408 (sparc-*-solaris2*): Use sparc/sol2-sld.h when using system linker.
From-SVN: r18150
1998-02-20 08:27:25 -05:00
Paul Eggert
32d4172f86 Initial revision
From-SVN: r18149
1998-02-20 08:26:55 -05:00
Richard Kenner
0ed9b438ce *** empty log message ***
From-SVN: r18147
1998-02-20 08:23:13 -05:00
H.J. Lu
d400ea36f4 *** empty log message ***
From-SVN: r18146
1998-02-20 08:22:26 -05:00
H.J. Lu
0b95693c81 (LIB_SPEC): Likewise.
(LIBGCC_SPEC): Removed.
(CPP_SUBTARGET_SPEC): Add %{pthread:-D_REENTRANT}.
(LIB_SPEC): Updated for glibc 2.

From-SVN: r18145
1998-02-20 08:19:24 -05:00
H.J. Lu
95f83c2b72 (LIB_SPEC): Add -lc for -shared #ifndef USE_GNULIBC_1.
From-SVN: r18144
1998-02-20 08:17:15 -05:00
H.J. Lu
4251940e68 (DEFAULT_VTABLE_THUNKS): Defined #ifndef USE_GNULIBC_1.
From-SVN: r18143
1998-02-20 08:16:21 -05:00
H.J. Lu
a245fdea40 (DEFAULT_VTABLE_THUNKS): Defined #ifndef USE_GNULIBC_1
From-SVN: r18142
1998-02-20 08:14:38 -05:00
Richard Kenner
4a39d4e947 (distdir-start): Add dependence on bi-parser.[ch].
From-SVN: r18135
1998-02-20 05:19:04 -05:00
Jim Wilson
b2e6a66ac0 *** empty log message ***
From-SVN: r18132
1998-02-19 18:07:56 -05:00
Jim Wilson
ade1f7de0b (TARGET_SWITCHES): For 68000, 68302, subtract MASK_68881. For 68303,
68332, cpu32, subtract MASK_68040_ONLY.

From-SVN: r18131
1998-02-19 18:07:08 -05:00
Richard Kenner
440dea1b64 Change address for Jeff Law
From-SVN: r18130
1998-02-19 17:45:37 -05:00
Richard Kenner
bc6c504900 Fix typos
From-SVN: r18129
1998-02-19 17:39:29 -05:00
Richard Kenner
51f42dedbf Initial revision
From-SVN: r18116
1998-02-18 22:47:45 -05:00
No Author
01004f72fc This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r18115
1998-02-19 03:47:45 +00:00
Richard Kenner
1ab3219fe6 Initial revision
From-SVN: r18113
1998-02-18 22:41:23 -05:00
Richard Kenner
d1a217f9f9 Add documentation for RS/6000 AIX 4.3.0 assembler woes.
From-SVN: r18098
1998-02-18 16:30:19 -05:00
Ulrich Drepper
cd82337dc6 automatically generated from GPLed version
From-SVN: r18097
1998-02-18 20:53:57 +00:00
Paul Eggert
082434d0e7 automatically generated from GPLed version
From-SVN: r18096
1998-02-18 20:53:56 +00:00
Ulrich Drepper
0525391c05 automatically generated from GPLed version
From-SVN: r18095
1998-02-18 20:53:55 +00:00
Richard Kenner
9dbbda3f89 Update information on AIX 4.3.
From-SVN: r18093
1998-02-18 15:13:33 -05:00
Richard Kenner
7fffc08990 *** empty log message ***
From-SVN: r18092
1998-02-18 14:43:10 -05:00
Richard Kenner
9254f48867 (store_unaligned_di_reg): Handle register dest.
(store_unaligned_ti_reg): Likewise.

From-SVN: r18091
1998-02-18 14:41:35 -05:00
Richard Kenner
81f530400e (emit_move_sequence): Handle unaligned stores to pseudos.
From-SVN: r18090
1998-02-18 14:41:09 -05:00
Richard Kenner
abde6fb943 (gen_lowpart_common): Suppress last change if __complex__.
From-SVN: r18089
1998-02-18 14:12:38 -05:00
Richard Kenner
973990bc62 *** empty log message ***
From-SVN: r18088
1998-02-18 09:54:33 -05:00
Richard Kenner
907a70630f (compare_for_stack_reg): Only handle FP conditional move as next insn
specially.

From-SVN: r18087
1998-02-18 09:53:44 -05:00
Paul Eggert
0cf893f2dc *** empty log message ***
From-SVN: r18086
1998-02-18 09:38:09 -05:00
Paul Eggert
80f60a2914 (stdlib.h): Do not double-wrap the size_t typedef.
From-SVN: r18085
1998-02-18 09:37:16 -05:00
Richard Kenner
6cd90fb422 Initial revision
From-SVN: r18083
1998-02-18 09:27:58 -05:00
Richard Kenner
5383bc570f *** empty log message ***
From-SVN: r18082
1998-02-18 09:22:19 -05:00
Richard Kenner
4922f78b26 (find_reloads): Always convert address reload for non-reloaded operand
to RELOAD_FOR_OPERAND_ADDRESS.

From-SVN: r18081
1998-02-18 09:20:47 -05:00
Jim Wilson
0d6ff084f2 (MACHINE_STATE_{SAVE,RESTORE} [MOTOROLA]): Add %# and %/; add : to
make them into extended asms.

From-SVN: r18076
1998-02-18 07:32:06 -05:00
Richard Kenner
6c8fc65c0f Revise last change.
From-SVN: r18075
1998-02-18 07:14:22 -05:00
Richard Kenner
ed76e5cc12 *** empty log message ***
From-SVN: r18073
1998-02-18 07:08:41 -05:00
Richard Kenner
10bd09a65c (emit-rtl.o): Depend on hard-reg-set.h.
From-SVN: r18072
1998-02-18 07:07:55 -05:00
Richard Kenner
4a22e6e556 (hard-reg-set.h): Include.
(get_lowpart_common): Don't make new REG for hard reg in a class that cannot
change size.

From-SVN: r18071
1998-02-18 07:07:40 -05:00
Richard Kenner
5304580c53 Remove previous change.
From-SVN: r18068
1998-02-18 06:58:11 -05:00
Richard Stallman
a9e7e8d339 ($(srcdir)/objc/objc-parse.c)
($(srcdir)/objc/objc-parse.y): RCS-checkout target file.

From-SVN: r18038
1998-02-17 20:25:28 +00:00
Richard Stallman
e5f2b8a7bc ($(srcdir)/INSTALL, $(srcdir)/cexp.c) ($(srcdir)/bi-parser.c, $(srcdir)/c-gperf.h, $(srcdir)/c-parse.y)
($(srcdir)/INSTALL, $(srcdir)/cexp.c)
($(srcdir)/bi-parser.c, $(srcdir)/c-gperf.h, $(srcdir)/c-parse.y)
($(srcdir)/c-parse.c, $(srcdir)/configure): RCS-checkout target file.

From-SVN: r18037
1998-02-17 19:51:48 +00:00
Richard Stallman
5a5eb229aa Initial revision
From-SVN: r18036
1998-02-17 18:42:24 +00:00
Richard Kenner
cb0aef7022 entered into RCS
From-SVN: r18012
1998-02-15 07:39:23 -05:00
Richard Kenner
4700b0162e entered into RCS
From-SVN: r18009
1998-02-14 19:09:12 -05:00
Jason Merrill
5f58962d42 (mark_addressable): Don't assume a FUNCTION_DECL
has DECL_LANG_SPECIFIC.

From-SVN: r18008
1998-02-14 23:44:41 +00:00
Jason Merrill
5323b7d493 x
From-SVN: r18007
1998-02-14 23:43:39 +00:00
Richard Kenner
6c97baa39a Fix typo in last change.
From-SVN: r18006
1998-02-14 16:43:22 -05:00
Richard Kenner
b1efd7a5f7 (distribute_notes, case REG_DEAD): Use reg_bitfield_target_p, as in
original code.

From-SVN: r18005
1998-02-14 16:39:40 -05:00
Richard Kenner
bc2c8f2e38 (debug_reload): Properly output insn codes.
From-SVN: r18004
1998-02-14 14:25:43 -05:00
Richard Kenner
70d0f4f3f1 (emit_move_sequence): If in reload, call find_replacement.
From-SVN: r18003
1998-02-14 14:19:16 -05:00
Richard Kenner
54f0af8d4a (bcopy, bzero, {,r}index): Don't define if IN_LIBGCC2.
From-SVN: r18002
1998-02-14 11:30:43 -05:00
Richard Kenner
df409fe9e8 Update comment.
From-SVN: r18001
1998-02-14 11:22:49 -05:00
Richard Kenner
28fb3f9882 (movsfcc): Also validate operands[3] for hard float.
(movdfcc): Only accept fpu_add_operand for operands[3].

From-SVN: r17998
1998-02-14 09:58:51 -05:00
Richard Kenner
288de1f3be (distribute_notes, case REG_DEAD): When seeing if place to put new
note sets register, see if sets at all.

From-SVN: r17997
1998-02-14 09:55:54 -05:00
Richard Kenner
2f3210a21a (expand_builtin_dwarf_reg_size): New variable mode.
Convert CCmode to word_mode before calling GET_MODE_SIZE.

From-SVN: r17996
1998-02-14 09:32:22 -05:00
Richard Kenner
b228dd7abf (MY_ISCOFF): Check for U803XTOCMAGIC.
From-SVN: r17995
1998-02-14 09:27:37 -05:00
Richard Kenner
ccf5e89d8b (process_command): If file is for linker, set lang to "*".
(lookup_compiler): Return 0 for language of "*".

From-SVN: r17994
1998-02-14 09:15:18 -05:00
Richard Kenner
df52146230 (TARGET_LIBGCC_CFLAGS): New definition.
From-SVN: r17993
1998-02-14 08:29:42 -05:00
Richard Kenner
69ba5370e7 (attach_deaths, case SUBREG): Fix error in last change.
From-SVN: r17992
1998-02-14 08:25:49 -05:00
Richard Kenner
3c76e10b7f (mostlyclean): Only use s-* convention for stamp files in main dir.
From-SVN: r17991
1998-02-14 08:03:45 -05:00
Richard Kenner
c86c950996 (fill_slots_from_thread): New parameter, delay_list.
All callers changed.

From-SVN: r17990
1998-02-14 07:45:09 -05:00
Richard Kenner
eb0741e8b9 (mov[sdx]fcc): Disable for now.
(mov[sd]fcc_1): Add earlyclobber for output on last alternative.

From-SVN: r17989
1998-02-14 07:13:54 -05:00
Jason Merrill
ea740a87a7 Jason.
From-SVN: r17988
1998-02-14 06:51:06 -05:00
Jason Merrill
01ff239fb2 (make_thunk): Avoid name buffer overflow.
From-SVN: r17987
1998-02-14 06:50:22 -05:00
Jason Merrill
8c79ccaeca (do_pop_exception): Likewise.
(push_eh_cleanup): Let the cleanup mechanism supply the handler.
(expand_end_catch_block): Likewise.

From-SVN: r17986
1998-02-14 06:49:31 -05:00
Jason Merrill
37e52aea32 (__cp_pop_exception): Lose handler arg.
From-SVN: r17985
1998-02-14 06:49:09 -05:00
Jason Merrill
237af6dbec (build_over_call): Likewise.
From-SVN: r17984
1998-02-14 06:48:33 -05:00
Jason Merrill
b12ec959b1 (copy_args_p): Handle copy elision for types with virtual bases.
From-SVN: r17983
1998-02-14 06:47:43 -05:00
Richard Kenner
3d266a15b6 (get_dynamic_handler_chain_libfunc): Deleted.
From-SVN: r17982
1998-02-14 06:42:43 -05:00
Richard Kenner
151793896b (init_optabs): Don't init get_dynamic_handler_chain_libfunc.
From-SVN: r17981
1998-02-14 06:42:27 -05:00
Richard Kenner
68bf48d975 (expand_cleanups): Use new functions to protect fixups.
From-SVN: r17980
1998-02-14 06:42:04 -05:00
Richard Kenner
594869d75e (get_dynamic_handler_chain): Only make call once per func.
(expand_fixup_region_{start,end}): New functions.
(expand_eh_region_start_tree): Store cleanup into finalization here.
(get_dynamic_handler_chain): Build up a FUNCTION_DECL.

From-SVN: r17979
1998-02-14 06:41:48 -05:00
Richard Kenner
6bdaabf80e (emit_conditional_move): Don't reverse condition for FP.
From-SVN: r17978
1998-02-14 06:34:34 -05:00
Richard Kenner
6a9251c3bb Add support for i786 (Pentium II); same as i686 for now.
From-SVN: r17962
1998-02-13 07:22:00 -05:00
Richard Kenner
fff46ab813 Add PentiumII (i786). Add '7' to all i[3456] entries.
Add AMD and Cyrix names for P5 and P6.

From-SVN: r17905
1998-02-13 07:16:46 -05:00
Michael Meissner
ea585b283e replace gen_rtx(CONST_INT...) calls with GEN_INT
From-SVN: r17897
1998-02-13 01:23:07 +00:00
Richard Kenner
e720e2ecbf (i[3456]86-dg-dgux*): Don't need fixincludes.
From-SVN: r17878
1998-02-12 10:08:09 -05:00
Richard Kenner
cc91f7a1a1 (expand_assignment): Fix typo in checking OFFSET.
From-SVN: r17877
1998-02-12 10:03:39 -05:00
Richard Kenner
e681f01673 (atexit): Don't define unless needed.
From-SVN: r17873
1998-02-12 09:38:20 -05:00
Richard Kenner
987f102d14 (distribute_notes): Completely check for note operand being only partially set on potential note target...
(distribute_notes): Completely check for note operand being only
partially set on potential note target; adjust what notes we make in
that case.

From-SVN: r17872
1998-02-12 09:29:03 -05:00
Richard Kenner
44d91905e5 (NO_IMPLICIT_EXTERN_C): Don't assume anything about system headers.
(LIB_SPEC): Add -ladvapi32 -lshell32 to be consistent with mingw32
and also to resolve symbols in prefix.c.

From-SVN: r17870
1998-02-12 07:27:37 -05:00
Richard Kenner
4b0791370f (HAVE_{BCOPY,BZERO,INDEX,RINDEX}): Deleted.
From-SVN: r17869
1998-02-12 07:19:27 -05:00
Richard Kenner
f40c8950d8 (emit_call_1): Size args now HOST_WIDE_INT.
(expand_call): struct_value_size now HOST_WIDE_INT.

From-SVN: r17859
1998-02-11 08:53:22 -05:00
Richard Kenner
b3c54ee2c3 (initialize_for_inline): Ensure DECL_INCOMING_RTL is always copied.
From-SVN: r17833
1998-02-10 09:04:34 -05:00
Richard Kenner
4aa25eb23b (rescan): Fix bug with macro name appearing immediately after L'x'.
From-SVN: r17826
1998-02-10 06:10:37 -05:00
Richard Kenner
9acad9ff2c (grokdeclarator): Remove warning on inline of varargs.
From-SVN: r17824
1998-02-09 20:48:42 -05:00
Richard Kenner
bb6f303239 (format_char_info): Add new field zlen.
(print_char_table): Remove entry for 'Z' as a format character.
Initialize zlen field as appropriate.
(scan_char_table): Set zlen field to NULL in each entry.
(check_format_info): Recognize 'Z' as a length modifier, with a
warning in pedantic mode.
Avoid infinite loop when a repeated flag character is detected.

From-SVN: r17823
1998-02-09 20:44:44 -05:00
Richard Kenner
ab2d25f3e2 (find_reloads): Check for const_to_mem case before checking for invalid reload...
(find_reloads): Check for const_to_mem case before checking for
invalid reload; use force_const_mem if no_input_reloads.

From-SVN: r17822
1998-02-09 20:40:56 -05:00
Richard Kenner
2d867e2cdf (push_function_context_to): Call init_emit last.
From-SVN: r17820
1998-02-09 18:50:13 -05:00
Richard Kenner
d9d07bb377 (expand_inline_function): Fix error in last change.
From-SVN: r17807
1998-02-09 09:51:54 -05:00
Richard Kenner
ac7871fb95 entered into RCS
From-SVN: r17806
1998-02-09 09:24:38 -05:00
Richard Kenner
3a26b3a43c (primary): Minor wording fix in diagnostic.
From-SVN: r17805
1998-02-09 09:24:00 -05:00
Richard Kenner
9cfcfbdcf4 (my_link): Define as -1 in mingw32.
(link): Remove declaration.

From-SVN: r17803
1998-02-09 09:19:42 -05:00
Richard Kenner
f9f05686f3 (setup_incoming_varargs): Always set rs6000_sysv_varargs_p.
From-SVN: r17802
1998-02-09 08:58:47 -05:00
Richard Kenner
28052349b3 (expand_inline_function): Clear label_map with bzero.
From-SVN: r17801
1998-02-09 07:58:57 -05:00
Richard Kenner
40924701aa (copy_loop_body, case JUMP_INSN): Correct error in last change: call
single_set on COPY, not INSN.

From-SVN: r17800
1998-02-09 07:50:11 -05:00
Richard Kenner
90636a5c6d Change version number to 2.8.1.
From-SVN: r17780
1998-02-08 08:13:29 -05:00
Richard Kenner
1ca788173c Change version number to 2.8.0.
From-SVN: r17779
1998-02-08 08:12:19 -05:00
Richard Kenner
d23eed6ace (i[3456]86-*-sco3.2v5*): Use cpio for headers.
From-SVN: r17778
1998-02-08 08:07:33 -05:00
Richard Kenner
7bb69cf9b7 entered into RCS
From-SVN: r17776
1998-02-08 06:56:47 -05:00
Richard Kenner
72708d7119 (LIBGCC_SPEC, STARTFILE_SPEC, MATH_LIBRARY): Use msvcrt, not crtdll.
From-SVN: r17759
1998-02-07 07:32:43 -05:00
Richard Kenner
0966a86aef Fix error in last change.
From-SVN: r17758
1998-02-06 21:54:33 -05:00
Richard Kenner
27d63f017a (diff_excludes): Add objc-parse.[cy].
From-SVN: r17757
1998-02-06 21:41:44 -05:00
Richard Kenner
c421eff236 (diff): Add INSTALL, configure, and config.in; remove objc-*.
From-SVN: r17756
1998-02-06 21:33:45 -05:00
Richard Kenner
28736d51a6 *** empty log message ***
From-SVN: r17755
1998-02-06 21:32:58 -05:00
Richard Kenner
fb31ff9c1e (diff_excludes): Use basename only.
From-SVN: r17754
1998-02-06 21:31:47 -05:00
Richard Kenner
178784071b Fix typo in previous change: last_name -> last_named.
From-SVN: r17752
1998-02-06 21:01:06 -05:00
Richard Kenner
6fbd15242d Formerly NEWS.~20~
From-SVN: r17751
1998-02-06 20:57:08 -05:00
Richard Kenner
5a01019347 (EMX, USG, BSTRING, HAVE_{PUTENV,VPRINTF,STRERROR}): Define ifdef __EMX__.
(strcasecmp): Define to be stricmp if __EMX__.
(spawnv{,p}): Don't define if EMX.
(OBJECT_SUFFIX): Don't define if EMX.
(MKTEMP_EACH_FILE): Define.

From-SVN: r17750
1998-02-06 20:32:04 -05:00
Richard Kenner
9841dd6b21 (link): Delete macro.
From-SVN: r17749
1998-02-06 20:26:41 -05:00
Richard Kenner
9108437dd1 (output_prolog): Write out frame sizes as longs and print too large
sizes as zero.

From-SVN: r17748
1998-02-06 20:23:15 -05:00
Richard Kenner
eda46f10e7 (combine_temp_slots): No need to allocate and free rtx.
Don't do anything if too many slots in the list.
(put_var_into_stack): Don't use ADDRESSOF if not optimizing.

From-SVN: r17747
1998-02-06 20:19:11 -05:00
Richard Kenner
c7a9245023 (purge_addressof_1): Force into mem if VOLATILE reference.
From-SVN: r17746
1998-02-06 20:15:52 -05:00
Richard Kenner
34cd2600b4 (put_reg_into_stack): New arg USED_P; all callers changed.
From-SVN: r17745
1998-02-06 20:09:56 -05:00
Richard Kenner
90d2d015c6 (expand_expr, case SAVE_EXPR, case TARGET_EXPR): Show used.
(expand_builtin, case BUILT_IN_LONGJMP): Show __dummy used.

From-SVN: r17744
1998-02-06 20:09:24 -05:00
Richard Kenner
1a9558cb09 (expand_call): Show VAR_DECL made for structure return address is
used; remove bogus set of MEM_IN_STRUCT_P.

From-SVN: r17743
1998-02-06 20:09:05 -05:00
Richard Kenner
f57c56ca71 (struct function, fields {var,target}_temp_slot_level): New fields.
From-SVN: r17742
1998-02-06 20:03:13 -05:00
Richard Kenner
32a2715aec (struct args_size): Field CONSTANT is now HOST_WIDE_INT.
From-SVN: r17741
1998-02-06 19:56:56 -05:00
Richard Kenner
2a5bb18ee6 (expand_start_bindings): Call push_temp_slots_for_block.
From-SVN: r17740
1998-02-06 19:54:33 -05:00
Richard Kenner
45a6e8dcb7 (var_temp_slot_level): New variable.
(push_function_context_to, pop_function_context_from): Save/restore
it and target_temp_slot_level.
(assign_stack_temp): Implement KEEP of 3.
(push_temp_slots_for_block): New function.
(init_temp_slots): Initialize var_temp_slot_level.

From-SVN: r17739
1998-02-06 19:54:11 -05:00
Richard Kenner
cc0ae7f8ea (expand_expr, case SAVE_EXPR): assign_temp with KEEP of 3.
From-SVN: r17738
1998-02-06 19:53:37 -05:00
Richard Kenner
715408e164 (assign_stack_{local,temp}): Size arg is HOST_WIDE_INT.
(assign_temp): Likewise.

From-SVN: r17737
1998-02-06 19:38:20 -05:00
Richard Kenner
60d7b0c796 (struct temp_slot): SIZE, BASE_OFF_SET, and FULL_SIZE now HOST_WIDE_INT.
(assign_{,outer_}stack_local, assign_{,stack_}temp): Size arg is
now HOST_WIDE_INT.
(assign_stack_temp): Do size computations in HOST_WIDE_INT.
(fixup_var_refs_1, optimize_bit_field, instantiate_decls): Likewise.
(instantiate_virtual_regs_1, fix_lexical_address): Likewise.

From-SVN: r17736
1998-02-06 19:37:43 -05:00
Richard Kenner
2691cbc76c (attach_deaths, case REG): Don't check for REG_UNUSED.
(attach_deaths, case SUBREG, STRICT_LOW_PART, {ZERO,SIGN}_EXTRACT):
Don't pass set_p of 1 if partial assignment.

From-SVN: r17735
1998-02-06 19:26:16 -05:00
Richard Kenner
62e64203bb (size_in_bytes): Returns HOST_WIDE_INT.
From-SVN: r17734
1998-02-06 19:22:32 -05:00
Richard Kenner
0198f1323d (size_in_bytes): Returns HOST_WIDE_INT.
Tighen up logic some to avoid returning a bogus value instead of -1.

From-SVN: r17733
1998-02-06 19:22:06 -05:00
Richard Kenner
3c3d1dac7f (get_inner_reference, case ARRAY_EXPR): Make WITH_RECORD_EXPR just for index.
(expand_expr, case PLACEHOLDER_EXPR): Refine search again; look
at each expression and look for pointer to type.

From-SVN: r17732
1998-02-06 19:16:47 -05:00
Richard Kenner
19ed8f72eb (safe_from_p, case ADDR_EXPR): If TREE_STATIC, no trampoline.
(expand_expr, case ADDR_EXPR): Likewise.

From-SVN: r17731
1998-02-06 19:12:18 -05:00
Richard Kenner
a75e1e5e2e (emit_block_move): Use conservative range for movstr mode.
From-SVN: r17730
1998-02-06 19:06:37 -05:00
Richard Kenner
c8312a0ab2 See if "cp -p" works if "ln -s" doesn't; else "cp".
From-SVN: r17729
1998-02-06 19:03:06 -05:00
Richard Kenner
04eb0019bb (try_combine.c): Pass elim_i2 and elim_i1 to distribute_notes for
i3dest_killed REG_DEAD note.

From-SVN: r17728
1998-02-06 19:00:34 -05:00
Richard Kenner
dd8232daa1 Update formatting.
From-SVN: r17727
1998-02-06 18:57:43 -05:00
Richard Kenner
09f7042148 Update formatting and comments.
From-SVN: r17726
1998-02-06 18:57:31 -05:00
Richard Kenner
dcae5cd9f6 Formerly md.texi.~13~
From-SVN: r17725
1998-02-06 18:46:51 -05:00
Richard Kenner
b5a71ba25f (mips-dec-netbsd*): Remove bogus setting of prefix.
From-SVN: r17724
1998-02-06 17:29:58 -05:00
Richard Kenner
4ef58e5543 (duplicate_decls): Set DECL_IGNORED_P in newdecl if different bindings
levels.

From-SVN: r17723
1998-02-06 17:24:37 -05:00
Richard Kenner
f1654e3910 (assign_parms): New variable named_arg, with value depending on STRICT_ARGUMENT_NAMING.
(assign_parms): New variable named_arg, with value depending on
STRICT_ARGUMENT_NAMING.  Use instead of ! last_named.

From-SVN: r17722
1998-02-06 17:05:49 -05:00
Richard Kenner
2bfcfcb22e (HAVE_{BCOPY,BZERO,BCMP,RINDEX,INDEX): Define.
From-SVN: r17721
1998-02-06 16:58:21 -05:00
Richard Kenner
768e2c3bbe Test ln -s by symlinking gcc.c.
From-SVN: r17720
1998-02-06 16:49:59 -05:00
Richard Kenner
73d053ab93 (i[3456]86-dg-dgux): Add wildcard for version.
From-SVN: r17719
1998-02-06 16:45:56 -05:00
Richard Kenner
2061c3de18 (objc.stage1): Depend on stage1-start.
(objc.stage2, objc.stage3, objc.stage4): Likewise for the
respective stageN-start targets.
(objc/sendmsg.o): Depend on objc/runtime-info.h.

From-SVN: r17718
1998-02-06 16:37:27 -05:00
Richard Kenner
6ea210df39 (__do_global_ctors_aux): Switch back to text section in proper place.
From-SVN: r17717
1998-02-06 16:31:03 -05:00
Richard Kenner
3aa162e0fd (expand_asm_operands): Properly treat asm statement statements with no
operands as volatile.

From-SVN: r17716
1998-02-06 16:27:02 -05:00
Richard Kenner
9ab3576079 (pushdecl): Set DECL_ORIGINAL_TYPE once only.
From-SVN: r17715
1998-02-06 16:03:17 -05:00
Richard Kenner
efc91640e5 (STRIP_NAME_ENCODING): New macro.
From-SVN: r17714
1998-02-06 15:57:35 -05:00
Richard Kenner
17a463ff31 (__floatdi[xtds]f): Round properly even when rounding large negative
integer to plus or minus infinity.

From-SVN: r17713
1998-02-06 15:50:38 -05:00
Richard Kenner
c1c6adf4df (plain_type_1): Return T_DOUBLE, not T_VOID, for long double #ifndef
EXTENDED_SDB_BASIC_TYPES.

From-SVN: r17712
1998-02-06 15:45:13 -05:00
Richard Kenner
d5bbf93aa2 (HAVE_ATEXIT): Define.
From-SVN: r17711
1998-02-06 15:23:39 -05:00
Richard Kenner
5510f48b13 (set_nonvarying_address_components): Understand PIC refs.
From-SVN: r17710
1998-02-06 15:18:31 -05:00
Richard Kenner
5b1b7adc26 (pic_offset_table_rtx): Define (dummy).
From-SVN: r17709
1998-02-06 15:18:14 -05:00
Richard Kenner
a5ad3ca69e (rtx_varies_p, case REG): pic_offset_table_rtx is fixed.
From-SVN: r17708
1998-02-06 15:17:59 -05:00
Richard Kenner
701a1079ec (process_command, case "-dumpversion"): Print spec_version.
From-SVN: r17707
1998-02-06 14:34:12 -05:00
Richard Kenner
6aa3ee0fb7 (strength_reduce): When placing increment for auto-inc case, do
comparison in loop order.

From-SVN: r17706
1998-02-06 14:23:00 -05:00
Richard Kenner
977b5489ff Fix typo in last change.
From-SVN: r17705
1998-02-06 11:45:35 -05:00
Richard Kenner
949893d762 (output_delayed_branch): Add missing arg to recog.
(output_delay_insn): Add missing arg to constrain_operands.

From-SVN: r17704
1998-02-06 11:43:17 -05:00
Richard Kenner
27431b39c8 Truncate target after finished comparing it with host.
From-SVN: r17703
1998-02-06 11:18:41 -05:00
Richard Kenner
7a673aabcb (ASM_SPEC): Support Solaris bundled assembler's -V argument; pass -s
argument to assembler.

From-SVN: r17702
1998-02-06 11:01:11 -05:00
Richard Kenner
a0979cae06 (_mcount): Make a weak instead of global symbol.
From-SVN: r17701
1998-02-06 11:00:56 -05:00
Richard Kenner
6e53827115 (internal_mcount): Do set-up when program starts and install hook to
do clean-up when it exits.

From-SVN: r17700
1998-02-06 10:59:57 -05:00
Richard Kenner
220922556c (MAX_FIXED_MODE_SIZE): Delete.
From-SVN: r17699
1998-02-06 10:52:08 -05:00
Richard Kenner
2f365a6f69 (reload_completed): Define.
From-SVN: r17698
1998-02-06 10:48:21 -05:00
Richard Kenner
9c2c5a45d7 (dead_or_set_regno_p): Ignore REG_DEAD notes after reload.
From-SVN: r17697
1998-02-06 10:47:54 -05:00
Richard Kenner
2a1291cc8c (expr_no_comma): Clarify undefined error.
From-SVN: r17696
1998-02-06 10:41:18 -05:00
Richard Kenner
f1d013a826 (LINK_SPEC): Hide __frame_dummy too.
From-SVN: r17694
1998-02-06 09:13:18 -05:00
Richard Kenner
12199b1c78 (__frame_dummy): New function for irix6.
(__do_global_ctors): Call __frame_dummy for irix6.

From-SVN: r17692
1998-02-06 09:12:48 -05:00
Richard Kenner
568970a61f (i960-wrs-vxworks): Same as i960-wrs-vxworks5*.
From-SVN: r17691
1998-02-06 09:08:17 -05:00
Richard Kenner
bf117ca97c (get_key_value): Don't default to PREFIX here.
(translate_name): Remove bogus addition of "$" if getenv fails;
clean up application of default value of PREFIX.

From-SVN: r17690
1998-02-06 09:03:51 -05:00
Richard Kenner
9aef1760c7 (fold_convert): Call force_fit_type even if input already overflows.
From-SVN: r17689
1998-02-06 08:47:30 -05:00
Richard Kenner
7dbd28381a (main): Treat paths starting with '$' or DOS drives as absolute in
standard_startfile_prefix.

From-SVN: r17688
1998-02-06 07:44:53 -05:00
Richard Kenner
44e6c1fcbe (IS_INCLUDE_DIRECTIVE_TYPE): Add casts from enum to int.
From-SVN: r17686
1998-02-05 21:07:04 -05:00
Richard Kenner
f8df7ed730 (expand_expr, case CONSTRUCTOR): Correct shift count when making
signed bit field; use EXPAND_NORMAL, not 0.

From-SVN: r17679
1998-02-05 19:00:30 -05:00
Richard Kenner
d01271ee1a Formerly extend.texi.~121~
From-SVN: r17677
1998-02-05 17:50:58 -05:00
Richard Kenner
0a7161684d (__clear_insn_cache): On sysV68 enable the memctl stuff only if
MCT_TEXT is #define'd.

From-SVN: r17676
1998-02-05 17:42:38 -05:00
Richard Kenner
bbbac79d49 entered into RCS
From-SVN: r17675
1998-02-05 17:40:55 -05:00
Richard Kenner
54ae8812f6 Changed most stamp-* to s-*.
From-SVN: r17674
1998-02-05 17:31:54 -05:00
Richard Kenner
5871273c33 (EXECUTABLE_SUFFIX): Define.
From-SVN: r17662
1998-02-03 21:29:56 -05:00
Richard Kenner
544e0a3b41 (probe_stack_range): Properly check for small number of probes.
From-SVN: r17661
1998-02-03 21:15:39 -05:00
Richard Kenner
7b1a373574 Formerly extend.texi.~120~
From-SVN: r17660
1998-02-03 20:40:46 -05:00
Richard Kenner
3180d20ecc (i[3456]86-*-solaris2*): Add gcrt1.o and gmon.o to extra_parts.
From-SVN: r17658
1998-02-03 19:45:46 -05:00
Richard Kenner
43f39ce1f1 Upate comments.
From-SVN: r17657
1998-02-03 19:45:32 -05:00
Richard Kenner
525f86ef21 Update comments.
From-SVN: r17656
1998-02-03 19:45:16 -05:00
Richard Kenner
4c88316d4e (STARTFILE_SPEC, LIB_SPEC): Update -pg files.
From-SVN: r17655
1998-02-03 19:45:02 -05:00
Richard Kenner
902f8242a0 Formerly install.texi.~24~
From-SVN: r17652
1998-02-03 17:55:59 -05:00
Richard Kenner
f8b3aa44b7 (alpha*-*-linux-gnu*): Add extra_parts for crtstuff.
From-SVN: r17649
1998-02-03 17:28:44 -05:00
Richard Kenner
a2db46c71f (find_barrier): Fix one-too-many bug if we fail to find a barrier.
From-SVN: r17648
1998-02-03 17:20:37 -05:00
Richard Kenner
74307403ba (arm_reload_in_hi): Handle cases where the MEM is too complex for a
simple offset.

From-SVN: r17647
1998-02-03 17:18:13 -05:00
Richard Kenner
0663db5912 (process_command, case 'V'): Validate arg.
From-SVN: r17646
1998-02-03 17:10:46 -05:00
Richard Kenner
47431411c6 (i[3456]86-pc-msdosdjgpp*): New entry.
From-SVN: r17642
1998-02-03 16:14:17 -05:00
Richard Kenner
84599c3d06 Formerly install.texi.~22~
From-SVN: r17641
1998-02-03 16:04:07 -05:00
Richard Kenner
2aefe88ca9 (sbrk, free): Update declaration conditional.
From-SVN: r17640
1998-02-03 15:58:26 -05:00
Richard Kenner
80f18c5699 (sbrk): Update declaration conditional.
From-SVN: r17639
1998-02-03 15:57:18 -05:00
Richard Kenner
511a2c2aeb (NEED_DECLARATION_SBRK): New entry.
From-SVN: r17638
1998-02-03 15:57:03 -05:00
Richard Kenner
0fa8f0cf6d (sbrk): Add check for needed declaration.
From-SVN: r17637
1998-02-03 15:56:39 -05:00
Richard Kenner
ec3f06cc3a (DBX_REGISTER_NUMBER): Remove abort.
From-SVN: r17636
1998-02-03 15:24:01 -05:00
Jason Merrill
628348ccb3 merge
From-SVN: r17633
1998-02-03 19:38:07 +00:00
Richard Kenner
5b5f236cd8 Update comments.
From-SVN: r17632
1998-02-03 13:54:29 -05:00
Richard Kenner
b1348ec10f Formerly invoke.texi.~366~
From-SVN: r17631
1998-02-03 13:53:58 -05:00
Richard Kenner
47e07dba29 entered into RCS
From-SVN: r17630
1998-02-03 13:53:44 -05:00
Richard Kenner
9552530034 Formerly cpp.texi.~32~
From-SVN: r17629
1998-02-03 13:53:34 -05:00
Richard Kenner
0e8968d5e4 Add support for Linux/ARM.
From-SVN: r17626
1998-02-03 13:27:31 -05:00
Richard Kenner
2e1116ff3e Formerly md.texi.~12~
From-SVN: r17625
1998-02-03 11:50:38 -05:00
Richard Kenner
221b45806b (mips_expand_prologue): Pass reg 25 to gen_loadgp.
From-SVN: r17622
1998-02-03 08:43:54 -05:00
Richard Kenner
b670a21275 (loadgp): Add second operand for register number to add.
(builtin_setjmp_receiver): Pass new label and reg 31 to loadgp.

From-SVN: r17621
1998-02-03 08:43:26 -05:00
Richard Kenner
2af26d4882 (toplev.o): Depends on insn-{codes,config}.h, recog.h.
From-SVN: r17620
1998-02-03 07:33:51 -05:00
Richard Kenner
01b56c4ff6 Include insn-codes.h, insn-config.h, and recog.h.
(compile_file): Try to emit nop to separate gcc_compiled symbol.

From-SVN: r17619
1998-02-03 07:33:26 -05:00
Richard Kenner
c307d84881 (unroll_loop, copy_loop_body): Use {get,set}_label_from_map.
From-SVN: r17618
1998-02-03 06:58:38 -05:00
Richard Kenner
a730068727 (get_label_from_map): New function.
(set_label_from_map): New macro.

From-SVN: r17617
1998-02-03 06:58:12 -05:00
Richard Kenner
eaa26ad23f (get_label_from_map): New function.
(expand_inline_function): Use it.
Initialize label_map to NULL_RTX instead of gen_label_rtx.
(copy_rtx_and_substitute): Use get_label_from_map.

From-SVN: r17616
1998-02-03 06:57:51 -05:00
Richard Kenner
c168529b6f (mov{si,hi,sf,df,xf}cc{,_1}): Remove cases with branches.
From-SVN: r17613
1998-02-02 21:54:23 -05:00
Richard Kenner
c33e9035e5 Formerly md.texi.~11~
From-SVN: r17607
1998-02-02 17:35:58 -05:00
Richard Kenner
3e0c669b56 (INSTALL): Deleted.
From-SVN: r17606
1998-02-02 16:42:13 -05:00
Richard Kenner
28d977b20e (signed_or_unsigned_type): Properly handle pointer types.
From-SVN: r17605
1998-02-02 16:32:53 -05:00
Richard Kenner
19bcb09408 (copy_loop_body): Use single_set instead of PATTERN to detect
increment of an iv inside a PARALLEL.

From-SVN: r17603
1998-02-02 15:33:50 -05:00
Ian Lance Taylor
0a819d8149 Use ${UNAME_MACHINE} rather than i386 for cygwin32 and mingw32.
From-SVN: r17536
1998-01-28 18:01:29 +00:00
Karl Berry
74f317e110 (\tocentry): Don't \turnoffactive before typesetting the arguments...
(\tocentry): Don't \turnoffactive before
typesetting the arguments, it causes special characters to be
printed incorrectly.

From-SVN: r17492
1998-01-26 20:40:21 +00:00
Paul Eggert
13e2f11110 (sysconf): Call AC_CHECK_FUNCS.
From-SVN: r17384
1998-01-17 01:29:14 +00:00
Paul Eggert
7ea0e7244f (<unistd.h>): New include.
(get_run_time): Prefer CLK_TCK (if available) to HZ, and
prefer sysconf (_SC_CLK_TCK) (if available) to CLK_TCK.

From-SVN: r17383
1998-01-17 01:29:14 +00:00
Paul Eggert
270134d79c (rest_of_compilation): Don't fflush output if -quiet.
From-SVN: r17364
1998-01-15 01:27:11 +00:00
Paul Eggert
4268987cd0 (output_func_start_profiler): Don't fflush output if -quiet.
From-SVN: r17363
1998-01-15 01:27:11 +00:00
Paul Eggert
cfb4d56d79 Fix several bugs related to backslash processing.
(rescan): Don't report line 0 as the possible real start of an
unterminated string constant.
Don't mishandle backslash-newlines that in are the output of
a macro expansion.  Properly skip // style comments between a function
macro name and its '(', as well as backslash-newlines in comments there.
(handle_directive): Handle / \ newline * between # and directive name.
In #include directives, \ does not escape ".
(do_include): For `#include "file', do not bother expanding into temp
buffer, since that just generates more error messages.  When an error
is encountered when expanding, do not try the result of expansion.
(skip_if_group): When skipping an include directive, use include
tokenization, not normal tokenization.  Backslash-newline is still
special when skipping.  Handle * \ newline / correctly in comments
when skipping.
(skip_quoted_string): When you see a \ newline, set *backslash_newlines_p
even if count_newlines is 0.
(macroexpand): Newline space is not a special marker inside a string.
(macroexpand, macarg): Do not generate \ddd for control characters
when stringifying; the C Standard does not allow this.
(macarg1): New arg MACRO.  All callers changed.
Do not treat /*, //, or backslash-newline specially when processing
the output of a macro.
(discard_comments): Do not go past limit when looking for end of comment.
Discard backslash-newline properly when discarding comments.
(change_newlines): \" does not end a string.
(make_definition): Do not treat backslash-newline specially, as it
has already been removed before we get here.

From-SVN: r17362
1998-01-15 01:27:11 +00:00
Paul Eggert
5afe6c79ee (LIBGCC2_CFLAGS): Remove trailing white space; it's significant in `make'.
From-SVN: r17361
1998-01-15 01:09:11 +00:00
Paul Eggert
fdfe81101e (CCLIBFLAGS): Remove trailing white space; it's significant in `make'.
From-SVN: r17360
1998-01-15 01:09:11 +00:00
Paul Eggert
58751f1492 (CC): Remove trailing white space; it's significant in `make'.
From-SVN: r17359
1998-01-15 01:09:11 +00:00
Richard Kenner
7d940f1f35 Formerly NEWS.~19~
From-SVN: r17311
1998-01-08 05:55:08 -05:00
Richard Kenner
15be34345a Formerly NEWS.~18~
From-SVN: r17310
1998-01-08 05:47:53 -05:00
Richard Kenner
ecf519894c ({END,START}FILE_SPEC): Link with correct crtbegin.o and crtend.o when
using -static.

From-SVN: r17308
1998-01-07 17:54:39 -05:00
Richard Kenner
868b1581fe (INSTALL): Remove.
From-SVN: r17307
1998-01-07 17:51:27 -05:00
Richard Kenner
8c2476473d Change dates in copyright notice.
From-SVN: r17306
1998-01-07 17:49:36 -05:00
Richard Kenner
f04afbdfc7 (gansidecl.h): Include.
From-SVN: r17305
1998-01-07 17:49:06 -05:00
Richard Kenner
9cca8a4998 (assign_parms): Avoid useless call to chkr_set_right.
From-SVN: r17304
1998-01-07 17:44:59 -05:00
Richard Kenner
2cc60c4b35 (get_push_address): Use copy_to_reg instead of force_operand.
(emit_push_insn): Avoid null pointer deference if aggregate has no types.
(expand_expr): Avoid finite but useless recursion.
(expand_builtin): Fix typo in calling function.

From-SVN: r17303
1998-01-07 17:44:26 -05:00
Richard Kenner
7d0240c5af (pexecute, [_WIN32]): Yes, mask termstat for mingw32.
From-SVN: r17302
1998-01-07 17:40:28 -05:00
Richard Kenner
1c0490101c (force_to_mode): Return if operand is a CLOBBER.
From-SVN: r17301
1998-01-07 17:30:59 -05:00
Richard Kenner
239f40bd0b Fix dates in copyright notice.
From-SVN: r17300
1998-01-07 17:30:37 -05:00
Richard Kenner
91e242d7cf (jump_optimize): Don't use a hard reg as an operand of a conditional
move if small register classes.

From-SVN: r17299
1998-01-07 17:23:08 -05:00
Richard Kenner
19fe252d14 (max_insn_uid): New variable.
(cse_around_loop): Use it.
(cse_main): Set it.

From-SVN: r17298
1998-01-07 17:09:19 -05:00
Richard Kenner
7c40ee9fe0 (expand_asm_operands): Treat ASM with no outputs as volatile.
From-SVN: r17273
1997-12-31 18:40:19 -05:00
Richard Kenner
8aa622e76d Formerly extend.texi.~119~
From-SVN: r17272
1997-12-31 18:39:37 -05:00
Richard Kenner
2c5ea0eed8 (ASM_COMMENT_START): Define to " #".
From-SVN: r17271
1997-12-31 08:03:43 -05:00
Richard Kenner
45447e824c Update comments.
From-SVN: r17270
1997-12-31 08:03:24 -05:00
Richard Kenner
71193c7679 (flag_verbose_asm): Default to 0, not 1.
From-SVN: r17269
1997-12-31 08:03:13 -05:00
Richard Kenner
b97a461675 Formerly invoke.texi.~365~
From-SVN: r17268
1997-12-31 08:02:44 -05:00
Richard Kenner
1748aa962c (find_splittable_givs): Handle givs with dest_reg created by loop.
From-SVN: r17265
1997-12-30 17:38:47 -05:00
Richard Kenner
25965918fe (LINK_SPEC): Never specify -h.
From-SVN: r17264
1997-12-30 14:21:31 -05:00
Richard Kenner
f97f6abd7e (_eh_compat): Do not include stdlib.h, but provide a private extern
declaration for malloc.

From-SVN: r17263
1997-12-30 06:15:16 -05:00
Richard Kenner
4c15265e18 (stmp-int-hdrs): Add "touch".
From-SVN: r17257
1997-12-29 06:56:31 -05:00
Richard Kenner
0aa07c4867 (CACHE_FLUSH_FUNC): Define as cacheflush.
From-SVN: r17256
1997-12-28 19:36:02 -05:00
Richard Kenner
76a4dc5818 (CACHE_FLUSH_FUNC): New, defaults to _flush_cache.
(INITIALIZE_TRAMPOLINE): Use it.

From-SVN: r17255
1997-12-28 19:35:25 -05:00
Richard Kenner
7526f512fb Do not include assert.h.
(assert): New macro, since we can't use system assert.

From-SVN: r17254
1997-12-28 08:22:48 -05:00
Richard Kenner
366e32040d Don't include assert.h.
(scan_region): Rewrite to avoid assert.
(save_eh_status, restore_eh_status, scan_region): Don't bother
testing whether pointer is null.

From-SVN: r17253
1997-12-28 08:18:43 -05:00
Richard Kenner
21b5be4bde Don't include assert.h.
(expand_block_move): Rewrite to avoid assert.

From-SVN: r17252
1997-12-28 08:18:22 -05:00
Richard Kenner
508db00ae2 Don't include assert.h.
(i960_arg_size_and_align): Rewrite to avoid assert.

From-SVN: r17251
1997-12-28 08:18:03 -05:00
Richard Kenner
f218d0de65 Don't include assert.h.
From-SVN: r17250
1997-12-28 08:17:40 -05:00
Richard Kenner
353b866216 (DWARF2_UNWIND_INFO): Define as 0.
From-SVN: r17248
1997-12-27 19:08:15 -05:00
Richard Kenner
bed8f9bbd0 (__clear_insn_cache): New sysV68-specific helper function for
trampolines.

From-SVN: r17242
1997-12-26 05:56:58 -05:00
Richard Kenner
5508273dd6 (FINALIZE_TRAMPOLINE): Macro defined.
From-SVN: r17241
1997-12-26 05:55:54 -05:00
Richard Kenner
0227bd95fb Update comments.
From-SVN: r17240
1997-12-26 05:52:52 -05:00
Richard Kenner
4bbd209961 (function_arg_padding): All aggregates pad upward.
From-SVN: r17239
1997-12-25 15:22:33 -05:00
Richard Kenner
2517fee5e5 (nonlocal_goto_receiver): New pattern.
From-SVN: r17233
1997-12-24 18:05:04 -05:00
Richard Kenner
014dc6f9a4 Add prototypes for static functions.
(check_pic): Check for form of pic_pc_rtx, not it itself.
(pic_setup_code): New function, from finalize_pic.
(finalize_pic): Call pic_setup_code and insert after nonlocal_receiver.

From-SVN: r17232
1997-12-24 18:04:47 -05:00
Karl Berry
0db62a2c71 (\dots, \enddots): Use current font instead of always using math italic.
From-SVN: r17224
1997-12-24 18:59:06 +00:00
Richard Kenner
9d8d5cc002 (FORCE_INIT_SECTION_ALIGN): Remove loop.
From-SVN: r17223
1997-12-23 23:00:06 -05:00
Richard Kenner
7cddb26f93 (__do_global_ctors_aux): Go back to text section.
From-SVN: r17222
1997-12-23 22:59:54 -05:00
Richard Kenner
4fa9deff3f (builtin_setjmp_receiver): New pattern.
From-SVN: r17221
1997-12-23 21:44:13 -05:00
Richard Kenner
32665a7c4f (expand_builtin_setjmp): Call builtin_setjmp_receiver.
From-SVN: r17220
1997-12-23 21:43:45 -05:00
Karl Berry
f241e9908b Spurious xepsf.tex should be epsf.tex.
From-SVN: r17219
1997-12-23 16:33:04 +00:00
Richard Kenner
5007aa7161 (__do_global_ctors_aux): Add missing call to FORCE_INIT_SECTION_ALIGN.
From-SVN: r17216
1997-12-23 06:11:36 -05:00
Richard Kenner
c4114bf044 (do_store_flag): For shift, get bit count using tree_pow2.
From-SVN: r17215
1997-12-23 05:54:25 -05:00
Richard Kenner
2acd632c32 Update comments.
From-SVN: r17214
1997-12-23 05:21:08 -05:00
Richard Kenner
ffe073f64c (main): Check HAVE_{G,S}ETRLIMIT too.
From-SVN: r17213
1997-12-23 05:20:15 -05:00
Richard Kenner
0920f960d2 (plain_type_1): Add missing checks for named types "char" and "int"
and check for int by size first.

From-SVN: r17209
1997-12-22 19:30:56 -05:00
Richard Kenner
839155366b (ADD_MISSING_{POSIX,XOPEN}): Define.
From-SVN: r17208
1997-12-22 19:24:46 -05:00
Richard Kenner
99a9ee9d22 (main): Check HAVE_{G,S}ETRLIMIT in addition to RLIMIT_STACK.
From-SVN: r17207
1997-12-22 19:20:53 -05:00
Richard Kenner
79a267f6c2 (getrlimit, setrlimit): Call AC_CHECK_FUNCS.
From-SVN: r17206
1997-12-22 19:20:23 -05:00
Richard Kenner
f4ca58558d (target_canonical): New variable.
(size_t): Add support for Motorola's stdlib.h which fails to provide
a definition for size_t.
(str{len,spn,cspn} return value): Handle different layout on sysV88.
(fabs/hypot): Provide a fake for hypot which is broken on
m88k-motorola-sysv3; emit a prototype for fabs on m88k-motorola-sysv3.

From-SVN: r17205
1997-12-22 19:16:50 -05:00
Richard Kenner
b0b11d17b7 (ASM_BYTE_OP): Don't include '\t' in definition.
(ASM_OUTPUT_ASCII): Prefix ASM_BYTE_OP by one single '\t'.

From-SVN: r17204
1997-12-22 19:13:56 -05:00
Richard Kenner
e21c0b1bd7 (jump): Don't use the annul bit around an empty loop.
From-SVN: r17203
1997-12-22 19:05:42 -05:00
Richard Kenner
e8693665be (pexecute, [_WIN32]): For mingw32, don't mask termstat.
From-SVN: r17201
1997-12-22 18:55:55 -05:00
Richard Kenner
7db076b5bc (USE_C_ALLOCA) Added.
From-SVN: r17200
1997-12-22 18:52:54 -05:00
Richard Kenner
e8345aceb1 (CLIB) Deleted.
(ALLOCA) Added.

From-SVN: r17199
1997-12-22 18:52:40 -05:00
Richard Kenner
28c7acf938 Formerly extend.texi.~118~
From-SVN: r17198
1997-12-22 18:48:16 -05:00
Richard Kenner
7120a4704f (FUNCTION_PROFILER): USE_GAS and !USE_GAS versions of this macro fixed and merged.
(FUNCTION_PROFILER): USE_GAS and !USE_GAS versions
of this macro fixed and merged.
(EXIT_BODY): Always call __stop_monitor without tricky tests.

From-SVN: r17197
1997-12-22 18:42:13 -05:00
Richard Kenner
790efc68c3 (__stop_monitor): New (empty) function.
(mcount, mcount%, monitor): Common symbols removed.

From-SVN: r17196
1997-12-22 18:41:12 -05:00
Richard Kenner
ea0cdbf25d (mcount): Function removed.
(__stop_monitor): New function.

From-SVN: r17195
1997-12-22 18:39:48 -05:00
Richard Kenner
e404d839de (runtime-info.h, libobjc_entry.o): Create in build directory.
(libobjc.a): Update dependency list.
(libobjc.dll): Likewise.  Use libobjc_entry.o from build directory.
(objc/sendmsg.o): Add -Iobjc to find runtime-info.h.
(objc.mostlyclean): Remove runtime-info.h.

From-SVN: r17194
1997-12-22 18:35:03 -05:00
Richard Kenner
5761c8ba3d (LIB2FUNCS): Add _eh_compat.
From-SVN: r17193
1997-12-22 18:27:40 -05:00
Richard Kenner
c96682031c (_eh_compat): New section.
From-SVN: r17192
1997-12-22 18:27:17 -05:00
Richard Kenner
bcf748faf6 (_objc_load_callback): Don't initialize.
From-SVN: r17191
1997-12-22 17:52:35 -05:00
Mark Mitchell
a7eff01706 Mon Dec 22 17:46:17 1997 Mark Mitchell <mmitchell@usa.net>
From-SVN: r17190
1997-12-22 17:46:53 -05:00
Mark Mitchell
c137504119 (build_overload_name): Fix mangling for __null.
From-SVN: r17189
1997-12-22 17:45:48 -05:00
Richard Kenner
6a469e7380 (HAVE_INTTYPES_H): Force undefined.
From-SVN: r17172
1997-12-21 15:05:56 -05:00
Richard Kenner
4c75a83830 (add_bound_info, case COMPONENT_REF): New case.
From-SVN: r17171
1997-12-21 14:51:40 -05:00
Richard Kenner
2b07ead453 (expand_expr, case PLACEHOLDER_EXPR): Use placeholder_list expression
in preference to any other if correct type.

From-SVN: r17092
1997-12-14 19:44:44 -05:00
Richard Kenner
1a1cc97938 (INITIAL_ELIMINATION_OFFSET): Correctly test for PIC register used.
From-SVN: r17091
1997-12-14 06:49:01 -05:00
Richard Kenner
5e137d05a8 (fix_argv): Remove outer "const" from return type.
(pexecute): errmsg_arg is pointer to const.

From-SVN: r17089
1997-12-13 09:34:10 -05:00
Richard Kenner
a32ca6a28b Sat Dec 13 09:23:54 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
From-SVN: r17088
1997-12-13 09:24:34 -05:00
Richard Kenner
4499446c45 (g++.c, cxxmain.o): Use $(LN).
From-SVN: r17087
1997-12-13 09:22:22 -05:00
Richard Kenner
2aa5dd3d96 (__register_frame_info_table): Fix typo in declaration.
From-SVN: r17086
1997-12-13 06:11:14 -05:00
Richard Kenner
01d0edc085 (purge_addressof_1): For (mem (address (mem ...)), when collapsing,
preserve mode of outer MEM.

From-SVN: r17084
1997-12-12 19:53:41 -05:00
Richard Kenner
13ed40bb1c (__register_frame_info): Renamed from __register_frame.
(__deregister_frame_info): Similarly.
(__register_frame_info_table): New declaration.

From-SVN: r17081
1997-12-12 18:30:45 -05:00
Richard Kenner
7d1baf2546 (__register_frame_info): Renamed from __register_frame.
(__register_frame_info_table, __deregister_frame_info): Similarly.

From-SVN: r17080
1997-12-12 18:28:46 -05:00
Richard Kenner
37e915b61a Update comments.
From-SVN: r17079
1997-12-12 18:27:14 -05:00
Richard Kenner
bb120341a6 (__do_global_dtors{,_aux}): Rename __deregister_frame.
(frame_dummy, __do_global_ctors): Likewise for __register_frame.

From-SVN: r17078
1997-12-12 18:26:29 -05:00
Richard Kenner
6f967b14a7 (write_c_file_{stat,glob}): Rename __register_frame to __register_frame_info...
(write_c_file_{stat,glob}): Rename __register_frame to __register_frame_info
and similarly for __deregister_frame and __register_frame_table.

From-SVN: r17077
1997-12-12 18:23:24 -05:00
Richard Kenner
6d2e4b6952 (remove_dependencies): Set RTX_INTEGRATED_P on dependency we delete.
Properly update prev for multiple consecutive deletions.

From-SVN: r17076
1997-12-12 17:59:16 -05:00
Richard Kenner
64cc7efa92 (initialize_for_inline): In DECL_RTL of a PARM_DECL, look inside a
(mem (addressof (mem ...))).

From-SVN: r17073
1997-12-12 07:55:13 -05:00
Richard Kenner
93ecc47c0d (write_c_file_glob): Allocate initial frame object in static storage
and pass its address.

From-SVN: r17072
1997-12-12 05:49:55 -05:00
Richard Kenner
a99f59cd55 (NEED_DECLARATION_GETENV): Define slot added.
From-SVN: r17048
1997-12-11 18:01:30 -05:00
Richard Kenner
e3c6dff145 (__do_global_ctors): Fix typo in last change.
From-SVN: r17047
1997-12-11 17:54:21 -05:00
Richard Kenner
5090a25a4a (__bb_exit_func): Fix test of return value of fopen().
From-SVN: r17037
1997-12-10 18:38:23 -05:00
Richard Kenner
7398f6e75e (simplify_rtx, case ABS): Don't get confused by a VOIDmode operand.
From-SVN: r17035
1997-12-10 07:07:22 -05:00
Richard Kenner
2348e707be (function_arg_padding): New function.
From-SVN: r17034
1997-12-09 17:44:08 -05:00
Richard Kenner
078492e06e (FUNCTION_ARG_PADDING): Define.
From-SVN: r17033
1997-12-09 17:43:43 -05:00
Richard Kenner
76a4fee9d3 (save_for_inline_copying): Make a new reg_parm_stack_loc.
From-SVN: r17026
1997-12-09 08:53:52 -05:00
Richard Kenner
ee94fc66c4 [CC]: Add /Prefix=All for DEC C.
From-SVN: r17018
1997-12-08 19:23:56 -05:00
Richard Kenner
a6be5b15e7 (HAVE_UNISTD_H): Define for DEC C.
From-SVN: r17017
1997-12-08 19:23:43 -05:00
Richard Kenner
45eb067deb (get_run_time): [#if VMS] Cast arg in times call.
From-SVN: r17016
1997-12-08 19:23:24 -05:00
Richard Kenner
431fb78cb2 (expand_decl_cleanup_no_eh): Properly return a value.
From-SVN: r17014
1997-12-08 19:07:41 -05:00
Joern Rennecke
5b2ef8507f Amend Copyright notice.
From-SVN: r17009
1997-12-08 20:28:11 +00:00
Richard Kenner
026ded05c0 (fold_convert): Don't flag overflow when converting pointer to integer.
From-SVN: r17007
1997-12-08 08:09:10 -05:00
Richard Kenner
80aacca389 (__do_global_ctors): Add missing arg to __register_frame.
From-SVN: r17000
1997-12-07 18:02:58 -05:00
Richard Kenner
2578ad42a7 When building with GNU C, use -O2.
From-SVN: r16998
1997-12-07 09:42:03 -05:00
Richard Kenner
f94696e685 Add latent support to compile cp/inc/* if `cc1plus' is specified
[currently disabled].

From-SVN: r16997
1997-12-07 09:41:34 -05:00
Richard Kenner
0c1295f531 (@make-l2): Pass along any command line arguments.
From-SVN: r16996
1997-12-07 09:41:14 -05:00
Richard Kenner
716a99ad8a (write_c_file_stat): Fix error in last change; use __SIZE_TYPE__, not size_t.
From-SVN: r16995
1997-12-07 06:56:41 -05:00
Richard Kenner
acfc3378f9 (strings.h): Fix misspelling of `include' introduced in last change to
this file.

From-SVN: r16994
1997-12-07 05:50:32 -05:00
Richard Kenner
e90ad84537 (CPP_PREDEFINES): Remove redundant setting of GCC version and unneeded
setting of __VMS_VER.

From-SVN: r16986
1997-12-06 18:54:08 -05:00
Richard Kenner
04a013a22f Fix spelling errors.
From-SVN: r16976
1997-12-06 07:56:35 -05:00
Richard Kenner
c03e4e894f Update comments.
From-SVN: r16975
1997-12-06 07:56:21 -05:00
Richard Kenner
678dbd99b7 Update comments.
From-SVN: r16969
1997-12-05 07:25:31 -05:00
Richard Kenner
ce71078691 (TARGET_VERSION): Write "GNU/Linux".
From-SVN: r16968
1997-12-05 07:24:31 -05:00
Richard Kenner
df3b5e777a Upate comments.
From-SVN: r16967
1997-12-05 07:13:06 -05:00
Richard Kenner
652cbb04a7 Change linux to gnu-linux.
From-SVN: r16966
1997-12-05 07:06:39 -05:00
Richard Kenner
ef5aa39902 ($(T)crtbegin.o, $(T)crtend.o, stamp-crtS): Depend on defaults.h, frame.h.
From-SVN: r16965
1997-12-05 06:29:05 -05:00
Richard Kenner
f4e58e5e8b Allocate initial frame object in static storage and pass its address.
From-SVN: r16964
1997-12-05 06:28:43 -05:00
Richard Kenner
6a8b2ce37e Allocate initial frame object in static storage and pass its address.
(<stddef.h>, "frame.h"): Include.

From-SVN: r16963
1997-12-05 06:28:28 -05:00
Richard Kenner
69c99cf1bc (struct object): Move decl to frame.h.
("frame.h"): Include after <stddef.h>, so that size_t is defined.
(__register_frame, __register_frame_table, __deregister_frame):
It's now the caller's responsibility to allocate storage for object.

From-SVN: r16962
1997-12-05 06:28:00 -05:00
Richard Kenner
c62b8470b3 (struct object): Decl moved here from frame.c.
From-SVN: r16961
1997-12-05 06:27:45 -05:00
Richard Kenner
7576f83eac (RTL_H, TREE_H): Add gansidecl.h.
(DEMANGLE_H): New macro.  All dependencies on demangle.h changed
to $(DEMANGLE_H).
(RECOG_H): Likewise.
(libgcc2.a, stmp-multilib): Add dependencies on frame.h, gansidecl.h.
(collect.o): Add dependency on gansidecl.h.
(gcc.o, choose-temp.o, pexecute.o, prefix.o): Likewise.
(obstack.o, choose-temp.o, pexecute.o): Add dependency on $(CONFIG_H).

From-SVN: r16960
1997-12-05 06:23:15 -05:00
Richard Kenner
c5ce7d1f17 (casesi_internal): Add USE of label.
From-SVN: r16959
1997-12-05 06:19:56 -05:00
Richard Kenner
1bce022db6 Properly test for and include sys/times.h.
From-SVN: r16958
1997-12-05 05:59:39 -05:00
Richard Kenner
750fb6dbc6 (sys/times.h): Check for this instead of times.h.
From-SVN: r16957
1997-12-05 05:59:09 -05:00
Joern Rennecke
eab343f22f (final_prescan_insn): Use local label prefix when emitting .uses pseudo-ops.
From-SVN: r16948
1997-12-04 17:30:02 +00:00
Richard Kenner
9f85ab8267 Fix spelling errors.
From-SVN: r16947
1997-12-04 09:18:11 -05:00
Richard Kenner
50873afb62 Change version to 2.8.0.
From-SVN: r16946
1997-12-04 07:34:29 -05:00
Richard Kenner
b97da8ea20 Fix botch in last patch application.
From-SVN: r16945
1997-12-04 07:16:35 -05:00
Richard Kenner
17f8d923ba (arm_finalize_pic): Use an offset of 4 when adjusting the GOT address.
From-SVN: r16944
1997-12-04 07:00:41 -05:00
Richard Kenner
632a353b06 (scan_operands): Treat format of "u" like "e".
From-SVN: r16943
1997-12-04 06:58:29 -05:00
Richard Kenner
36f1f1a8bd Formerly invoke.texi.~364~
From-SVN: r16942
1997-12-04 06:52:29 -05:00
Richard Kenner
4184a8774a Formerly invoke.texi.~363~
From-SVN: r16941
1997-12-04 06:50:51 -05:00
Richard Kenner
a215e62c6a (pushcase_range): Clean up handling of "infinite" values.
From-SVN: r16940
1997-12-04 06:28:24 -05:00
Ulrich Drepper
e5c0d6c744 automatically generated from GPLed version
From-SVN: r16933
1997-12-04 01:16:52 +00:00
Richard Kenner
3e79d8cd80 (notice_update_cc): Remove bogus pentium GCC code.
From-SVN: r16924
1997-12-03 09:03:30 -05:00
Paul Eggert
bd1d343f3a Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
From-SVN: r16923
1997-12-03 08:47:56 -05:00
Richard Kenner
500d3d26a0 Fix spelling errors.
From-SVN: r16922
1997-12-03 08:46:26 -05:00
Richard Kenner
b18d6cf13c Fix header.
From-SVN: r16921
1997-12-03 08:39:01 -05:00
Richard Kenner
9040ae4afc Fix spelling errors.
From-SVN: r16920
1997-12-03 08:38:38 -05:00
Richard Kenner
b0fbb8e807 Fix header.
From-SVN: r16919
1997-12-03 08:31:52 -05:00
Richard Kenner
ace7f84884 Fix spelling errors.
From-SVN: r16918
1997-12-03 08:31:40 -05:00
Richard Kenner
a3a5a4e7eb Fix spelling errors.
From-SVN: r16917
1997-12-03 08:21:02 -05:00
Richard Kenner
307d1538eb Fix header.
From-SVN: r16916
1997-12-03 08:17:17 -05:00
Richard Kenner
25b347c405 Fix spelling errors.
From-SVN: r16915
1997-12-03 08:16:58 -05:00
Richard Kenner
a131ca8854 Formerly tm.texi.~264~
From-SVN: r16914
1997-12-03 08:11:40 -05:00
Richard Kenner
40f130748d Formerly invoke.texi.~362~
From-SVN: r16913
1997-12-03 08:11:17 -05:00
Richard Kenner
08594b0af1 entered into RCS
From-SVN: r16912
1997-12-03 08:11:08 -05:00
Bruno Haible
3a59bd23dd Sun Nov 30 08:42:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
From-SVN: r16911
1997-12-03 07:19:29 -05:00
Richard Kenner
5a6730a3a4 (expand_decl_cleanup): Update thisblock after eh_region_start.
From-SVN: r16910
1997-12-03 06:16:56 -05:00
Richard Kenner
33ec42ad8f (gen_type_die, case POINTER_TYPE): See TREE_ASM_WRITTEN before the
recursive call.

From-SVN: r16909
1997-12-03 06:06:25 -05:00
Richard Kenner
d1a1eceae5 Use autoconf symbols to select what include files are needed.
From-SVN: r16908
1997-12-03 05:57:24 -05:00
Richard Kenner
5e689a7c4d Remove obsolete ways of including headers and use autoconf symbols instead.
Include gansidecl.h; remove things defined there.
See if getenv needs to be declared.

From-SVN: r16907
1997-12-03 05:56:40 -05:00
Richard Kenner
54bbf463cc (AC_HEADER_{STDC,TIME}): Add calls.
(AC_CHECK_HEADERS): Add fcntl.h times.h, sys/times.h, sys/resource.h,
and sys/param.h.
(getenv): Check if need declaration.

From-SVN: r16906
1997-12-03 05:55:52 -05:00
Richard Kenner
a14076e1f7 (reload): Make copy of MEM before setting req_equiv_mem if the address is PLUS.
From-SVN: r16894
1997-12-02 21:44:14 -05:00
Richard Kenner
39e417f5e1 Compile libgcc2.c with `-fexceptions' specified.
From-SVN: r16881
1997-12-02 07:02:56 -05:00
Richard Kenner
3565a72757 (STDC_HEADERS, HAVE_STDLIB, HAVE_STRING): Define.
(mesg_implicit_function_declaration): New macro.

From-SVN: r16880
1997-12-02 07:01:11 -05:00
Richard Kenner
15b28285ba Add prototypes for static functions.
From-SVN: r16879
1997-12-01 18:48:21 -05:00
Richard Kenner
5ca4b8234d (output_call_frame_info): Use ASM_OUTPUT_ASCII to output ASCII by default...
(output_call_frame_info): Use ASM_OUTPUT_ASCII to output ASCII by
default; only use ASM_OUTPUT_DWARF_STRING if flag_debug_asm is on.
(output_die, output_pubnames, output_line_info): Likewise.

From-SVN: r16878
1997-12-01 17:44:47 -05:00
Richard Kenner
b81ca680b2 (SUBTARGET_CPU_DEFAULT): Define instead of TARGET_CPU_DEFAULT.
From-SVN: r16873
1997-12-01 17:15:27 -05:00
Richard Kenner
511edb7c88 (MATH_LIBRARY): Set to "-lcrtdll".
From-SVN: r16872
1997-12-01 16:51:21 -05:00
Richard Kenner
8744f50656 (TARGET_SWITCHES): Add entries for "windows" and "dll".
From-SVN: r16871
1997-12-01 16:46:53 -05:00
Richard Kenner
e64299a0d4 (fix_trunc{dfsi,sfsi,dfsi}2): Add '*' in operand 3.
From-SVN: r16869
1997-12-01 16:42:13 -05:00
Richard Kenner
aa3ce92fdc Replace all occurences of sarray_get with sarray_get_safe.
From-SVN: r16864
1997-12-01 07:31:49 -05:00
Richard Kenner
d74804ebc6 (get_inner_reference): For ARRAY_REF, if need WITH_RECORD_EXPR, make
it with the ARRAY_REF as exp.

From-SVN: r16862
1997-11-30 21:54:32 -05:00
Richard Kenner
037038383b (store_constructor): Use TARGET, not EXP, for WITH_RECORD_EXPR when
offset has a placeholder.

From-SVN: r16861
1997-11-30 20:25:46 -05:00
Richard Kenner
e6fa36043f (libobjc.dll): Rename -dll flag to -mdll.
From-SVN: r16860
1997-11-30 11:18:59 -05:00
Bruno Haible
f68cb4c999 (do_poplevel): Allow jumps into the block.
From-SVN: r16859
1997-11-30 08:43:21 -05:00
Richard Kenner
cd4fdfc609 (expand_end_bindings): Cleanups and incoming gotos are not incompatible.
From-SVN: r16858
1997-11-30 08:42:23 -05:00
Richard Kenner
e5227b94eb (jump_optimize): Use find_insert_position in two more places.
From-SVN: r16857
1997-11-30 05:44:48 -05:00
Richard Kenner
c72c7bf612 Minor reformatting.
From-SVN: r16856
1997-11-29 21:26:00 -05:00
Richard Kenner
f73b324674 (HAVE_STRERROR, HAVE_{LIMITS,STDDEF,TIME}_H): Define.
From-SVN: r16853
1997-11-29 13:47:39 -05:00
Richard Kenner
6814a6b20e (getpwd, [VMS]): Only add extra arg if VMS.
From-SVN: r16852
1997-11-29 09:21:51 -05:00
Richard Kenner
143573f26e Define kill as raise if not HAVE_KILL.
From-SVN: r16851
1997-11-29 08:29:44 -05:00
Richard Kenner
e6f9a2d645 Add check for kill.
From-SVN: r16850
1997-11-29 08:29:26 -05:00
Richard Kenner
07a8acc3b4 Include signal.h.
From-SVN: r16849
1997-11-29 08:06:33 -05:00
Richard Kenner
0df29ab184 Fix typo in last change.
From-SVN: r16848
1997-11-29 07:32:59 -05:00
Richard Kenner
a95569f282 (find_insert_position): New function.
(jump_optimize): Use it when making new copy of insn after test.

From-SVN: r16847
1997-11-29 06:18:05 -05:00
Richard Kenner
cb97dfcef1 (HAVE_PUTENV): Define.
From-SVN: r16846
1997-11-29 06:05:49 -05:00
Richard Kenner
a149bcda00 (HAVE_VPRINTF): Define.
From-SVN: r16845
1997-11-29 06:02:07 -05:00
Richard Kenner
2ad4ad8e4d (BIGGEST_ALIGNMENT, ENCODE_SECTION_INFO): No longer override.
From-SVN: r16844
1997-11-29 05:54:55 -05:00
Richard Kenner
32ea506c59 Include gansidecl.h.
From-SVN: r16843
1997-11-29 05:43:35 -05:00
Richard Kenner
b438ddd554 (index, rindex): Add conditional defs to strchr and strrchr.s
From-SVN: r16842
1997-11-29 05:43:24 -05:00
Richard Kenner
742a356ac6 (index, rindex): Add conditional defs to strchr and strrchr.
From-SVN: r16841
1997-11-29 05:43:12 -05:00
Richard Kenner
df152cb24b Finish prototyping.
From-SVN: r16840
1997-11-28 21:17:49 -05:00
Richard Kenner
c8ae39bb75 Object.m (+conformsTo:): Surround assignment with parentheses.
From-SVN: r16839
1997-11-28 21:15:54 -05:00
Richard Kenner
56435d5431 Include "output.h".
From-SVN: r16838
1997-11-28 21:15:37 -05:00
Richard Kenner
3088d00fd2 Make-lang.in (objc-parse.o, objc-act.o): Also depend on $(srcdir)/output.h.
From-SVN: r16837
1997-11-28 21:15:22 -05:00
Richard Kenner
ca068b9007 (__objc_mutex_allocate): Allocate mutex type instead of assuming it fits in a void * type.
(__objc_mutex_allocate): Allocate mutex type instead of assuming it fits in a
void * type.
(__objc_mutex_deallocate): Free mutex type.
(__objc_mutex_lock): Pass mutex type instead of pointer to it.
(__objc_mutex_{try,un}lock): Likewise.
(__objc_condition_allocate): Allocate condition type instead
of assuming it fits in a void * type.
(__objc_condition_deallocate): Free condition type.
(__objc_condition_wait): Pass condition type instead of pointer to it.
(__objc_condition_{broadcast,signal}): Likewise.

From-SVN: r16836
1997-11-28 19:15:51 -05:00
Richard Kenner
9488bc3c38 Replace all occurences of sarray_get with sarray_get_safe.
From-SVN: r16835
1997-11-28 18:26:23 -05:00
Richard Kenner
9f32af04d0 (runtime-info.h): Add comment in file.
From-SVN: r16834
1997-11-28 18:25:57 -05:00
David Edelsohn
2920a5ba29 undo FP varargs lossage from previous patch
From-SVN: r16833
1997-11-28 22:19:33 +00:00
Scott Christley
3cc78f72e9 repo.c: Prototype rindex only if needed.
Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>

	* repo.c: Prototype rindex only if needed.
	* xref.c: Likewise.

From-SVN: r16831
1997-11-28 12:36:00 -05:00
Scott Christley
4b5c809a94 Prototype rindex only if needed.
From-SVN: r16830
1997-11-28 12:35:10 -05:00
Richard Kenner
7a9d325886 (objc/{NXConstStr,Object,Protocol,linking): Compile with GNU runtime.
From-SVN: r16829
1997-11-28 12:34:00 -05:00
Richard Kenner
4c9f4e54a1 (INCLUDE_DEFAULTS): Add component element.
(ASM_COMMENT_START): Correct assembly comment string.

From-SVN: r16828
1997-11-28 12:32:02 -05:00
Richard Kenner
c2eb599518 (include_defaults): Add component element as in cccp.c.
From-SVN: r16827
1997-11-28 12:31:35 -05:00
Richard Kenner
57f2d46b14 (__objc_get_forward_imp): Check size of type for determining proper
forwarding function.

From-SVN: r16826
1997-11-28 12:27:48 -05:00
Richard Kenner
cd97534013 (print_struct_values): New variable.
(generate_struct_by_value_array): New function.
(lang_init): Call generate_struct_by_value_array if requested.
(lang_decode_option): Check for new compiler flag.

From-SVN: r16825
1997-11-28 12:27:27 -05:00
Richard Kenner
09ea9bc31b Add target to generate runtime-info.h file.
From-SVN: r16824
1997-11-28 12:27:01 -05:00
Richard Kenner
33494bf1d2 (lang_options): New ObjC specific compiler flag.
From-SVN: r16823
1997-11-28 12:26:44 -05:00
Richard Kenner
7d4d81e7c5 (record_address_regs): Use REG_OK_FOR_{INDEX,BASE}, not the REGNO versions.
From-SVN: r16819
1997-11-28 05:58:29 -05:00
Richard Kenner
a6c819d7d8 (__throw): Initialize HANDLER.
From-SVN: r16809
1997-11-27 16:28:02 -05:00
Richard Kenner
55db3d2c3f (outout_call_frame_info): Ensure info has proper alignment.
From-SVN: r16808
1997-11-27 16:27:47 -05:00
Richard Kenner
e404d808a0 Get the declaration of free from stdlib.h.
From-SVN: r16807
1997-11-27 16:23:24 -05:00
Richard Kenner
129a2eac23 See if need declarations for free.
From-SVN: r16806
1997-11-27 16:22:48 -05:00
Jason Merrill
3a3bbf9898 except.c (expand_start_catch_block): We only need the rethrow region for non-sjlj exceptions.
* except.c (expand_start_catch_block): We only need the rethrow
region for non-sjlj exceptions.
(expand_end_catch_block): Likewise.  Use outer_context_label_stack.

From-SVN: r16796
1997-11-27 08:27:45 -05:00
Jason Merrill
273a0c461f (expand_start_catch_block): We only need the rethrow region for non-sjlj exceptions.
(expand_start_catch_block): We only need the rethrow region for non-sjlj
exceptions.
(expand_end_catch_block): Likewise.  Use outer_context_label_stack.

From-SVN: r16795
1997-11-27 08:26:35 -05:00
Richard Kenner
6063ab3819 Add outer_context_label_stack.
From-SVN: r16794
1997-11-27 08:25:32 -05:00
Richard Kenner
890de5c5d5 Add outer_context_label_stack.
(expand_start_all_catch): Push the outer_context for the try block
onto outer_context_label_stack.
(expand_end_all_catch): Use it and pop it.

From-SVN: r16793
1997-11-27 08:25:18 -05:00
Richard Kenner
33bc5e9f89 (expand_start_all_catch): One more do_pending_stack_adjust.
From-SVN: r16792
1997-11-27 07:36:34 -05:00
Richard Kenner
f9031305a9 (preexpand_calls): Don't look past a TRY_CATCH_EXPR.
From-SVN: r16791
1997-11-27 07:21:42 -05:00
Richard Kenner
b630c9675c (LINK_SPEC): Pass -dynamic-linker /lib/ld.so.1 if -dynamic linker is
not used.

From-SVN: r16790
1997-11-27 07:18:56 -05:00
Richard Kenner
3376b8a2fe (SMALL_DATA_REG): Register to use for small data relocs.
(print_operand{,_address}): Use SMALL_DATA_REG for register involved in
small data relocations.

From-SVN: r16789
1997-11-27 07:18:18 -05:00
Richard Kenner
cf25b38d2b (call insns): For local calls, use @local suffix under System V.
Don't use @plt under Solaris.

From-SVN: r16788
1997-11-27 07:14:59 -05:00
Richard Kenner
581cca2f30 (pwait): For _WIN32, distinguish whether child process caught fatal
signal or reported nonzero exit code.

From-SVN: r16764
1997-11-26 17:31:42 -05:00
Richard Kenner
2ca4387215 (inhibit_libc): Define #ifdef CROSS_COMPILE.
From-SVN: r16763
1997-11-26 17:05:17 -05:00
Richard Kenner
71c968d517 (ASM_CPU_SPEC) : No whitespace allowed.
From-SVN: r16762
1997-11-26 17:01:01 -05:00
Richard Kenner
4a18442a35 (ASM_OUTPUT_REG_{PUSH,POP}): Keep stack aligned to 16 byte boundary,
and maintain stack backchain.

From-SVN: r16761
1997-11-26 16:53:47 -05:00
Richard Kenner
0198383892 (output_function_profiler): Put label address in r0, and store LR in
4(sp) for System V/eabi.

From-SVN: r16760
1997-11-26 16:53:33 -05:00
Richard Kenner
7c95961283 (SUPPORTS_ONE_ONLY) : Must be svr4.
From-SVN: r16755
1997-11-26 15:16:27 -05:00
Jeffrey A Law
bba5c4e627 lex.c (lang_init): Enable flag_exceptions by default if no command line switch was specified.
* lex.c (lang_init): Enable flag_exceptions by default if no
	command line switch was specified.

From-SVN: r16754
1997-11-26 15:14:36 -05:00
Jeffrey A Law
756e6928b4 (lang_init): Enable flag_exceptions by default if no command line
switch was specified.

From-SVN: r16753
1997-11-26 15:13:31 -05:00
Richard Kenner
bfac669d00 (flag_exceptions): Default value is 2.
(compile_file): If flag_exceptions still has the value 2, then set it to 0.

From-SVN: r16752
1997-11-26 15:12:28 -05:00
Richard Kenner
fbae33ca7c (LIBGCC2_CFLAGS): Add -fexceptions.
From-SVN: r16751
1997-11-26 15:12:08 -05:00
Richard Kenner
c82bc1f8dd (call insns): If -fPIC or -mrelocatable, add @plt suffix to calls.
From-SVN: r16749
1997-11-26 14:58:39 -05:00
Richard Kenner
50deeb2d98 (function_arg): Excess floating point arguments don't go into GPR registers...
(function_arg): Excess floating point arguments don't go into GPR
registers after exhausting FP registers under the System V.4 ABI.

From-SVN: r16748
1997-11-26 14:58:27 -05:00
Richard Kenner
abfbf72094 (malloc, realloc, calloc): No longer declare.
(USG): Define here.
(xm-iris5.h): No longer include; just include xm-mips.h.

From-SVN: r16747
1997-11-26 14:52:45 -05:00
Richard Kenner
4d12a5bde7 (parse_def): Properly recognize bitfield and count array dimensions.
From-SVN: r16745
1997-11-26 14:29:01 -05:00
Richard Kenner
b8535fb76e (output_type): If finalizing, write out nested types of types we've
already written.

From-SVN: r16744
1997-11-26 14:24:23 -05:00
Richard Kenner
434028233e Remove declarations of void, exit, and free.
From-SVN: r16743
1997-11-26 14:20:48 -05:00
Richard Kenner
a6b65455b7 (main): Complain about -gdwarfn.
From-SVN: r16741
1997-11-26 14:07:27 -05:00
Richard Kenner
96e2e33422 (LINK_SPEC, STARTFILE_SPEC): Change -dll to -mdll.
From-SVN: r16740
1997-11-26 13:37:30 -05:00
Richard Kenner
1a6efb7316 (TARGET_DEFAULT): Add ARM_FLAG_APCS_32 to defaults.
From-SVN: r16739
1997-11-26 13:32:48 -05:00
Richard Kenner
d878cdfc70 (PATH_SEPARATOR): Moved here from mingw32.h.
From-SVN: r16738
1997-11-26 13:28:51 -05:00
Richard Kenner
f6eb71a9f4 (PATH_SEPARATOR): Moved to xm-mingw32.h
From-SVN: r16737
1997-11-26 13:28:41 -05:00
Richard Kenner
53a2d99f8a (sys/file.h): Include if HAVE_SYS_FILE_H.
From-SVN: r16736
1997-11-26 13:24:29 -05:00
Richard Kenner
2cf73cf49d Check for sys/file.h.
From-SVN: r16735
1997-11-26 13:20:45 -05:00
Richard Kenner
d8f7fd1f51 (getpwd): Use VMS implementaion of _WIN32 unless cygwin32.
From-SVN: r16734
1997-11-26 12:52:00 -05:00
Richard Kenner
ee58c09850 (ASM_OUTPUT_ALIGN): Deleted.
From-SVN: r16733
1997-11-26 12:37:50 -05:00
Richard Kenner
b39ec524f5 (output_file_start) : Changed ix86_isa_string to ix86_arch_string.
From-SVN: r16732
1997-11-26 12:31:33 -05:00
Richard Kenner
5495f4fe9b (fancy_abort): Added.
From-SVN: r16731
1997-11-26 12:26:41 -05:00
Richard Kenner
81399e27a0 (arm*-*-*): Recognize --with-cpu for ARM processors.
From-SVN: r16730
1997-11-26 06:07:48 -05:00
Richard Kenner
6d77375d8e Only give error on bad --with-cpu value for target.
From-SVN: r16728
1997-11-26 05:05:31 -05:00
Jason Merrill
762565aa6f merge
From-SVN: r16701
1997-11-25 20:22:13 +00:00
Richard Kenner
9e384f34c0 (CIE_LENGTH_LABEL, FDE_LENGTH_LABEL): New macros.
(ASM_OUTPUT_DWARF_VALUE4): New macro.
(ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Define if SET_ASM_OP is defined.
(output_call_frame_info): Don't output forward label differences if
ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL is defined.  Substitute
instead simple label and define this label later to be difference of
desired labels after they have been defined.

From-SVN: r16687
1997-11-22 21:02:40 -05:00
Richard Kenner
1136f430ad (SET_ASM_OP): Define when not using gas.
From-SVN: r16686
1997-11-22 21:01:23 -05:00
Richard Kenner
53ad90ed43 Formerly tm.texi.~263~
From-SVN: r16685
1997-11-22 21:01:03 -05:00
Richard Kenner
fa104f1d67 (process_command): Don't take address of function fatal when calling
lang_specific_driver.

From-SVN: r16683
1997-11-22 19:21:52 -05:00
Richard Kenner
662c47c1e4 (SELECT_RTX_SECTION): Redefine to work with -fpic.
(LIBGCC_SPEC, LIB_SPEC): Link with correct libgcc.a.
(HAVE_ATEXIT): Define.

From-SVN: r16682
1997-11-22 17:08:02 -05:00
Richard Kenner
83589e0db0 (movsfcc{,_hard}_insn): Specify mode for all alternatives.
From-SVN: r16681
1997-11-22 12:20:20 -05:00
Richard Kenner
52537a7ce5 (instantiate_decl): Only ignore ADDRESSOF if arg is REG.
From-SVN: r16680
1997-11-22 08:54:19 -05:00
Richard Kenner
e268255785 (bcopy, bzero, bcmp, rindex, index): No longer define.
From-SVN: r16679
1997-11-22 07:21:22 -05:00
Richard Kenner
3dd9d3f661 (vax-*-sysv*): Fix typo in setting of xm_file.
From-SVN: r16678
1997-11-22 07:20:25 -05:00
Richard Kenner
37b3c1fdfa (bcopy, bzero, bcmp): No longer define.
From-SVN: r16677
1997-11-22 07:16:20 -05:00
Richard Kenner
404c8647bd (bcopy, bzero, bcmp): No longer define.
From-SVN: r16676
1997-11-22 07:11:03 -05:00
Richard Kenner
4ca5138c63 (bcopy, bzero): No longer define.
From-SVN: r16675
1997-11-22 07:03:57 -05:00
Richard Kenner
143bc841de (TARGET_MEM_FUNCTIONS): Define here.
(bcopy, bzero, bcmp, rindex, index): No longer define.

From-SVN: r16674
1997-11-22 07:03:06 -05:00
Richard Kenner
7cd6cf6963 (TARGET_MEM_FUNCTIONS): Define here.
From-SVN: r16673
1997-11-22 07:02:37 -05:00
Richard Kenner
e9d6909d8e (bcopy, bzero, bcmp, rindex, index): No longer define.
From-SVN: r16672
1997-11-22 07:00:48 -05:00
Richard Kenner
33efdf1d94 (bcopy, bzero, bcmp, index, rindex): If don't have one of these, make
macro to use ANSI form.

From-SVN: r16671
1997-11-22 06:56:10 -05:00
Richard Kenner
c732d4ef31 Add conditional definitions of index and rindex.
From-SVN: r16670
1997-11-22 06:55:51 -05:00
Richard Kenner
3deb150103 Check for functions before checking which need decls.
(bcopy, bzero, bcmp, index, rindex): Add checks.

From-SVN: r16669
1997-11-22 06:55:36 -05:00
Richard Kenner
4425cf0220 Don't include <strings.h> unless there's no <string.h>.
From-SVN: r16668
1997-11-22 06:46:22 -05:00
Jason Merrill
b15577446a revert another accidental checkin
From-SVN: r16653
1997-11-21 20:44:22 +00:00
Mike Stump
7697490bff Fix typo
From-SVN: r16644
1997-11-21 18:58:48 +00:00
No Author
b5263ec4b8 This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r16635
1997-11-21 11:46:44 +00:00
Richard Kenner
f735f4a0bd (HAVE_RUSAGE, HAVE_FILE_H): Deleted.
From-SVN: r16633
1997-11-21 06:46:35 -05:00
Richard Kenner
106449ade8 (i[3456]86-*-freebsd{,elf}*): Delete i386/xm-freebsd.h.
From-SVN: r16632
1997-11-21 06:45:10 -05:00
Richard Kenner
e6122aa906 (legitimize_pic_address): Make sure pic register marked used.
From-SVN: r16631
1997-11-21 05:53:35 -05:00
Richard Kenner
c94a0f01bd (output_call_frame_info): Call app_enable and app_disable if
flag_debug_asm, not if flag_verbose_asm.

From-SVN: r16630
1997-11-21 05:50:52 -05:00
Richard Kenner
d9fdf79989 (expand_builtin_apply): Fix typo in last change.
From-SVN: r16625
1997-11-20 18:41:25 -05:00
Richard Kenner
29747f122a (expand_assignment): If assigning to readonly field, mark rtx as unchanging.
From-SVN: r16623
1997-11-20 18:38:15 -05:00
Richard Kenner
681c45a0c5 (plus_constant_wide, case MEM): If about to call force_const_mem,
generate the rtl in a saveable obstack.

From-SVN: r16614
1997-11-20 18:03:31 -05:00
Richard Kenner
c46f7004e8 Add checks for functions putenv, popen, and vprintf.
(i[3456]86-*-netbsd*): No longer need i386/xm-netbsd.h.
(i860-alliant-*): No longer need i860/xm-fx2800.h.
(m68k-ncr-sysv*): Use xm-svr3.h instead of m68k/xm-tower.h.
(m68k-sun-sunos*): No longer need m68k/xm-sun3.h.
(m68k-*-netbsd*): No longer need m68k/xm-netbsd.h.
(mips-dec-netbsd*): No longer need mips/xm-netbsd.h.
(ns32k-pc532-netbsd*): No longer need ns32k/xm-netbsd.h.
(sparc-*-netbsd*): No longer need sparc/xm-netbsd.h.
(vax-*-netbsd*): No longer need config/xm-netbsd.h.

From-SVN: r16613
1997-11-20 18:00:20 -05:00
Richard Kenner
c3addfdeee (HAVE_POPEN): Deleted.
From-SVN: r16610
1997-11-20 16:40:04 -05:00
Richard Kenner
273eee2b70 (HAVE_VPRINTF): Deleted.
From-SVN: r16607
1997-11-20 16:37:24 -05:00
Richard Earnshaw
1c1ddbb1f5 arm.md (movhi): Pass the full MEM to storeinthi, storehi and storehi_bigend.
* arm.md (movhi): Pass the full MEM to storeinthi, storehi and
storehi_bigend.
(storeinthi, storehi, storehi_bigend): Be more conservative about
	when not to force a PLUS or MINUS into a REG.  Use change_address
to adjust the address.

From-SVN: r16606
1997-11-20 21:01:04 +00:00
Richard Kenner
db1440ee0a (HAVE_VPRINTF, HAVE_PUTENV): Deleted.
From-SVN: r16605
1997-11-20 15:45:08 -05:00
Richard Kenner
d06afa919c (HAVE_VPRINTF): Deleted.
From-SVN: r16604
1997-11-20 15:44:21 -05:00
Richard Kenner
d0389b960d (HAVE_VPRINTF): Deleted.
From-SVN: r16603
1997-11-20 15:36:49 -05:00
Richard Kenner
0cb065535b (HAVE_PUTENV, HAVE_VPRINTF): Deleted.
From-SVN: r16602
1997-11-20 15:31:56 -05:00
Richard Kenner
35a1438c64 (HAVE_PUTENV): Deleted.
From-SVN: r16601
1997-11-20 15:31:03 -05:00
Richard Kenner
fd80c29c7c (HAVE_VPRINTF): Deleted.
From-SVN: r16600
1997-11-20 15:30:08 -05:00
Richard Kenner
7470b2210f (HAVE_PUTENV, HAVE_VPRINTF): Deleted.
From-SVN: r16599
1997-11-20 15:26:07 -05:00
Richard Kenner
7673f8063f (HAVE_VPRINTF, HAVE_PUTENV): Deleted.
From-SVN: r16598
1997-11-20 15:24:28 -05:00
Michael Meissner
ee8ff07883 Formerly tm.texi.~262~
From-SVN: r16587
1997-11-19 22:24:58 +00:00
Richard Kenner
f6662dd40c (print_char_table): Add a and A to float formats.
(scan_char_table): Likewise.
(check_format_info): Recognize `a' as allocate flag only if used
in correct context.

From-SVN: r16585
1997-11-19 15:16:02 -05:00
Richard Kenner
a3f487ae32 Fix check for <inttypes.h>.
From-SVN: r16579
1997-11-19 12:56:53 -05:00
Joern Rennecke
fd825b4592 (attribute "type"): Add nil.
(movsi_ie): y/y alternative is type nil.
(movsf_ie): Replace ry/yr/X alternative by r/y/X , y/r/X and y/y/X
alternatives.
(movsf_ie+1): Delete.

From-SVN: r16574
1997-11-19 00:26:10 +00:00
Paul Eggert
de1a9fd9d6 (warn_undef): Now static.
(eval_if_expression): Do not warn about undefined preprocessor symbols
in system headers.

From-SVN: r16572
1997-11-18 23:36:29 +00:00
Paul Eggert
c2bf1c90bd Now takes new arg specifying whether to warn about undefined preprocessor symbols.
(parse_c_expression):
Now takes new arg specifying whether to warn
about undefined preprocessor symbols.
(expression_signedp): New var.
(warn_undef): Now local and static; independent of warn_undef in cccp.c
(start): Set expression_signedp to signedness of expression.
(yylex): `register' -> `register int', needed for C9X.
(print_unsigned_host_wide_int): New function.
(main): Use it to print value of expression, instead of hoping that
`long' is long enough.  Print "u" after unsigned values.

From-SVN: r16571
1997-11-18 23:36:29 +00:00
Jim Wilson
7e2bf24caf (dwarf2out_frame_debug): When set cfa_store_offset from cfa_temp_value, use cfa_offset.
(dwarf2out_frame_debug): When set cfa_store_offset
from cfa_temp_value, use cfa_offset.  Add assert checking that
cfa_reg is SP.

From-SVN: r16570
1997-11-18 15:33:08 -08:00
Jim Wilson
44bbf586bc (save_restore_insns): If gp_offset or fp_offset are
large_int, emit two insns instead of one splitable insn.

From-SVN: r16569
1997-11-18 15:31:39 -08:00
Richard Kenner
5149f038a6 (div_and_round_double): Return overflow for divide-by-zero instead of
aborting.

From-SVN: r16563
1997-11-18 09:27:42 -05:00
Richard Kenner
93cd801f5f (substitute_in_expr, case TREE_LIST): Fix two typos.
From-SVN: r16562
1997-11-18 09:11:56 -05:00
Richard Earnshaw
e49da45dbf (output_move_double): Allocate 3 entries in otherops array.
From-SVN: r16561
1997-11-18 10:02:56 +00:00
Jason Merrill
78422dc849 revert accidental checkin
From-SVN: r16560
1997-11-18 08:19:18 +00:00
Paul Eggert
7b896eadca (quote_string_for_make): New function.
(deps_output): Use it.

From-SVN: r16557
1997-11-18 07:31:59 +00:00
Richard Earnshaw
a938b28369 (arm-*-netbsd*): Doesn't need collect2.
From-SVN: r16554
1997-11-17 21:51:09 +00:00
Richard Earnshaw
dde1022097 Use Linux-specific div0 route.
From-SVN: r16550
1997-11-17 18:27:19 +00:00
Richard Earnshaw
2f3abf15c3 Provide Linux-specific div0 routine.
From-SVN: r16549
1997-11-17 18:27:19 +00:00
Richard Kenner
4ba938ea29 (purge_addressof_1): Create a copy when substituting argument ofADDRESSOF.
(fixup_var_refs_1): Likewise.

From-SVN: r16548
1997-11-17 09:18:05 -05:00
Richard Kenner
cdc2b3688f Include tree.h.
From-SVN: r16547
1997-11-17 09:13:57 -05:00
Richard Kenner
e3f3e06686 (getpwd, [VMS]): Add extra arg of 0 to getcwd call.
From-SVN: r16546
1997-11-17 09:09:18 -05:00
Richard Kenner
394b6e7204 (choose_temp_base): Remove incorrect code for VMS.
From-SVN: r16545
1997-11-17 09:07:48 -05:00
Richard Kenner
a0d3a4f427 (DIR_SEPARATOR, PATH_SEPARATOR): Delete.
From-SVN: r16544
1997-11-17 09:01:03 -05:00
Richard Kenner
f967024021 ({OPTIMIZATION,OVERRIDE}_OPTIONS): Delete, for now.
From-SVN: r16543
1997-11-17 09:00:45 -05:00
Richard Kenner
eec2da2cc6 (fixup_stack_1): Also fix-up refs via ARG_POINTER_REGNUM.
From-SVN: r16542
1997-11-17 08:52:42 -05:00
Richard Kenner
7123aed3d2 (DWARF2_UNWIND_INFO): Define as 0.
From-SVN: r16541
1997-11-17 08:49:59 -05:00
Richard Kenner
68c277b3da (propagate_block): Look for pre-inc/dec within PARALLEL.
From-SVN: r16540
1997-11-17 08:42:26 -05:00
Paul Eggert
d77f457927 (read_files):
Don't assume off_t and unsigned are the same size.

From-SVN: r16539
1997-11-17 08:13:28 +00:00
Paul Eggert
65dd3a783c (file_size_and_mode): Remove.
(finclude): Don't assume long and off_t are the same size.
Don't assume mode_t fits in int.

From-SVN: r16538
1997-11-17 08:13:28 +00:00
Paul Eggert
f1b931603f (main, finclude, check_precompiled):
Don't assume size_t and off_t are the same size.

From-SVN: r16537
1997-11-17 08:13:28 +00:00
Richard Kenner
321de2e4b7 (objc_demangle): New function.
(objc_printable_name): New function.
(init_objc): Change default function.

From-SVN: r16524
1997-11-16 18:58:41 -05:00
Richard Kenner
a0682b9980 (expand_builtin_apply): Prefer nonlocal over block.
From-SVN: r16523
1997-11-16 18:56:37 -05:00
Richard Kenner
7ce0df722b Include stdlib.h, string.h, and strings.h, if they exist.
Only declare index and rindex if needed.

From-SVN: r16522
1997-11-16 18:53:55 -05:00
Richard Kenner
b444226305 See if need declarations for index and rindex.
From-SVN: r16521
1997-11-16 18:52:41 -05:00
Richard Kenner
7ff6d25a81 (NEED_DECLARATION_{,R}INDEX): New cases.
From-SVN: r16520
1997-11-16 18:52:30 -05:00
Richard Kenner
ec51e6312a (FUNCTION_PROLOG): Make an invocation of i370_function_prolog.
From-SVN: r16519
1997-11-16 18:10:09 -05:00
Richard Kenner
dab9eb68b0 (i370_function_prolog): New function taken from i370.h.
From-SVN: r16518
1997-11-16 18:09:53 -05:00
Richard Kenner
77822b3dd0 (sparc_builtin_saveregs): Don't pass QImode arguments to emit_library_call.
From-SVN: r16517
1997-11-16 08:40:33 -05:00
Richard Kenner
05619e2a8c (hppa_builtin_saveregs): Don't pass QImode arguments to emit_library_call.
From-SVN: r16516
1997-11-16 08:40:05 -05:00
Richard Kenner
61f38b03d7 (m88k_builtin_saveregs): Don't pass QImode arguments to emit_library_call.
From-SVN: r16515
1997-11-16 08:39:43 -05:00
Richard Kenner
9e261acee7 (clipper_builtin_saveregs): Don't pass QImode arguments to emit_library_call.
From-SVN: r16514
1997-11-16 08:39:25 -05:00
Richard Kenner
b87cc55795 (alpha_builtin_saveregs): Don't pass QImode arguments to emit_library_call.
From-SVN: r16513
1997-11-16 08:38:55 -05:00
Richard Kenner
b2bafd2007 (put_var_into_stack, assign_parms): Don't pass QImode arguments to
emit_library_call.

From-SVN: r16512
1997-11-16 08:37:41 -05:00
Richard Kenner
fab170349f (emit_push_insn, expand_assignment, store_expr): Don't pass QImode arguments to emit_library_call.
(emit_push_insn, expand_assignment, store_expr): Don't pass QImode arguments
to emit_library_call.
(expand_expr, expand_builtin): Likewise.

From-SVN: r16511
1997-11-16 08:37:18 -05:00
Richard Kenner
1a9a189547 (expand_call, store_one_arg): Don't pass QImode arguments to emit_library_call.
From-SVN: r16510
1997-11-16 08:36:49 -05:00
Richard Kenner
cd8957af33 (immed_real_const_1): Use new REAL_VALUES_IDENTICAL macro instead of
doing it by hand.

From-SVN: r16509
1997-11-16 07:39:07 -05:00
Richard Kenner
6384998c17 (simple_cst_equal): Don't consider -0.0 to have the same tree structure as 0.0.
From-SVN: r16508
1997-11-16 07:38:46 -05:00
Richard Kenner
1895a00d30 (operand_equal_p): Don't consider -0.0 to be identical to 0.0.
From-SVN: r16507
1997-11-16 07:38:29 -05:00
Richard Kenner
acbcf906d1 (is_zeros_p): Don't consider -0.0 to be all zeros.
From-SVN: r16506
1997-11-16 07:38:10 -05:00
Richard Kenner
db42fc973c (REAL_VALUES_IDENTICAL): New macro.
From-SVN: r16505
1997-11-16 07:37:57 -05:00
Richard Kenner
f517b59972 (record_address_regs): Refine choice of index and base when have sum
of two regs, one of which is a hard reg.

From-SVN: r16504
1997-11-16 07:29:10 -05:00
Richard Kenner
72d91b416b (ASM_OUTPUT_ALIGNED_BSS): Define as in sysv4 and linux
(ASM_OUTPUT_ALIGNED_BSS): Define as in sysv4 and linux
(HAVE_ATEXIT): No longer define.  This confused ELF destructors.
(DBX_DEBUGGING_INFO): Define.

From-SVN: r16503
1997-11-16 07:07:43 -05:00
Richard Earnshaw
c2c1632f25 (GO_IF_LEGITIMATE_ADDRESS): Don't accept MINUS (until reload
knows what to do with it).

From-SVN: r16502
1997-11-15 14:54:31 +00:00
Michael Meissner
6eae79b9dd Fix splitting DF constants
From-SVN: r16455
1997-11-13 17:12:51 +00:00
Richard Earnshaw
18e1eca5a6 (LINK_SPEC): Redefine.
From-SVN: r16453
1997-11-13 12:41:30 +00:00
Richard Earnshaw
0a50fa9a67 (movsicc_insn): Add extra reload alternatives for better register tying.
(movsicc_insn): Add extra reload alternatives for better
register tying.
(movsfcc_hard_insn, movsfcc_soft_insn, movdfcc_insn): Likewise

From-SVN: r16452
1997-11-13 12:30:30 +00:00
Doug Evans
fb9a865038 sparc.md (mov[sdt]f_const_insn): Fix condition to match what the instruction can handle.
* sparc/sparc.md (mov[sdt]f_const_insn): Fix condition to match
	what the instruction can handle.

From-SVN: r16421
1997-11-11 00:32:05 +00:00
Jason Merrill
4032059e34 (expand_leftover_cleanups): do_pending_stack_adjust.
From-SVN: r16417
1997-11-10 11:03:00 +00:00
Jason Merrill
5148233702 (expand_decl_cleanup_no_eh): New fn.
From-SVN: r16416
1997-11-10 11:03:00 +00:00
Richard Kenner
2c4822a9e6 Yet more tries on this ...
From-SVN: r16413
1997-11-09 18:19:09 -05:00
Richard Kenner
0b33c20300 Yet another try.
From-SVN: r16412
1997-11-09 18:11:48 -05:00
Richard Kenner
cc435d30a2 Fix error in last change.
From-SVN: r16411
1997-11-09 18:06:12 -05:00
Richard Kenner
69c089a330 Make-lang.in (c++.distdir): Make inc subdirectory.
From-SVN: r16410
1997-11-09 18:00:46 -05:00
Richard Kenner
6c209a0a98 (c++.distdir): Make inc subdirectory.
From-SVN: r16409
1997-11-09 18:00:13 -05:00
David Edelsohn
9781f69bac clean up lshrdi3 first alternative
From-SVN: r16408
1997-11-09 19:32:51 +00:00
Richard Kenner
31b050b1d3 (QCmode, HCmode): New modes.
From-SVN: r16407
1997-11-09 09:51:05 -05:00
Richard Kenner
1dfc2e588a [prefix.c]: Compile additional source file.
From-SVN: r16406
1997-11-09 09:41:22 -05:00
Richard Kenner
03743c1f2a [objc-parse.{c,y}]: Now lives in the objc subdirectory.
From-SVN: r16405
1997-11-09 09:41:08 -05:00
Richard Kenner
e5e9c91f18 [version.opt]: Parse version string more robustly.
[@variable@]: Discard configure tokens when using Makefile.in.
[libgcc2-cxx.list]: Generate this new file for CXX_LIB2FUNCS.
[cp/input.c]: Suppress it as workaround to avoid linker warning.
[objc-parse.y]: Now lives in the objc subdirectory.

From-SVN: r16404
1997-11-09 09:40:50 -05:00
Richard Kenner
6b18bcb7db (sets_function_arg_p): New function.
(combinable_i3pat): Check if combining with any but the first
argument register setting insn for a function call.

From-SVN: r16403
1997-11-09 09:37:45 -05:00
Richard Kenner
615840d52b (ELIGIBLE_FOR_EPILOGUE_DELAY): Avoid sheduling load from stack slot.
From-SVN: r16402
1997-11-09 09:24:20 -05:00
Richard Kenner
722a59e60e (strength_reduce): If initial value of BIV is equivalent to a constant, record that as initial value.
(strength_reduce): If initial value of BIV is equivalent to
a constant, record that as initial value.
(check_dbra_loop): Don't reverse loop if initial value isn't CONST_INT.

From-SVN: r16401
1997-11-09 09:17:51 -05:00
Richard Kenner
c99fd3ca82 (emit_push_insn): Avoid infinite recursion when -fcheck-memory-usage.
From-SVN: r16400
1997-11-09 09:12:35 -05:00
Richard Kenner
38af6cb966 (simplify_binary_operation): Fix error in last change.
From-SVN: r16399
1997-11-09 08:03:37 -05:00
Richard Kenner
f0f33d57ec [HOST_WIDE_INT]: Manually splice long lines of avoid backslash+newline
continuation on #if directives.

From-SVN: r16398
1997-11-09 07:56:30 -05:00
Richard Kenner
299ff84186 (VMS_freopen...
(VMS_freopen, VMS_fopen, VMS_open, VMS_fstat): Call corresponding
library routine specified via its ordinary name rather than with a
decc$ prefix.  (Reverses Oct 19 change.)
[HOST_WIDE_INT]: Manually splice long lines of avoid backslash+newline
continuation on #if directives.

From-SVN: r16397
1997-11-09 07:56:14 -05:00
Jeff Law
cf2d91d4e4 local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions are shared.
* local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions
        are shared.

From-SVN: r16392
1997-11-09 01:53:08 -07:00
Richard Kenner
2c452c301c Don't simplify divide by zero for targets that don't support a
representation of INFINITY.

From-SVN: r16384
1997-11-08 23:01:35 -05:00
Richard Kenner
01e3d71a62 (cse.o): Depend on expr.h.
From-SVN: r16383
1997-11-08 22:37:20 -05:00
Richard Kenner
37a358b4fb Include expr.h.
(fold_rtx, case MEM): For ADDRESSOF, create new MEM.

From-SVN: r16382
1997-11-08 22:37:00 -05:00
Richard Kenner
983b10bb99 (expand_increment): When enqueing a postincrement for a MEM, use
copy_to_reg if address is not a general_operand.

From-SVN: r16381
1997-11-08 19:27:53 -05:00
Jason Merrill
73759f1d1c merge
From-SVN: r16380
1997-11-08 23:41:29 +00:00
Jason Merrill
534cfa8fc2 (L_eh): Define __eh_pc.
Replace __eh_type with generic pointer __eh_info.

From-SVN: r16379
1997-11-08 23:39:35 +00:00
Jason Merrill
2057b10947 merge
From-SVN: r16378
1997-11-08 23:35:40 +00:00
Richard Kenner
537b896408 (SECONDARY_OUTPUT_RELOAD_CLASS): If FLOAT_REGS, need secondary reload
for QImode and HImode even if BWX.

From-SVN: r16377
1997-11-08 18:30:24 -05:00
Jason Merrill
a730bdd659 merge
From-SVN: r16376
1997-11-08 23:30:08 +00:00
Richard Kenner
356ec76222 (store_split_bit_field): Force ADDRESSOF into register.
From-SVN: r16375
1997-11-08 17:12:37 -05:00
Richard Kenner
6681d6fa54 Remove previous change; not ready yet.
From-SVN: r16374
1997-11-08 16:35:30 -05:00
Richard Kenner
e0ceedc21b (c_decode_option): Parse -Wunknown-pragmas command line option to set
variable: warn_unknown_pragmas.

From-SVN: r16373
1997-11-08 16:32:03 -05:00
Richard Kenner
0ce7cbe599 (fold_rtx, case ADDRESSOF): New case (that does nothing).
From-SVN: r16372
1997-11-08 16:14:45 -05:00
Joern Rennecke
aead5923d3 Comment spelling fixes.
From-SVN: r16370
1997-11-08 17:54:29 +00:00
Richard Kenner
010a128b99 (fixup_var_refs_1, case ADDRESSSOF): Check that new value is valid for insn.
From-SVN: r16369
1997-11-08 11:37:36 -05:00
Richard Kenner
274f5a43f0 (get_best_mode): Refine test for field within unit to work properly
for negative positions.

From-SVN: r16368
1997-11-08 09:12:38 -05:00
Richard Kenner
1600b6a6bd (print_inline_rtx): Save and restore sawclose and indent.
From-SVN: r16367
1997-11-08 07:07:19 -05:00
Richard Kenner
755c7a7750 (find_replacement): If PLUS, MINUS, or MULT, see if either arg
contains a replacement.

From-SVN: r16366
1997-11-08 07:03:37 -05:00
Jason Merrill
6b8e7f2871 (add_fdes, count_fdes): Go back to checking pc_begin for
linked once FDEs.

From-SVN: r16363
1997-11-08 08:31:13 +00:00
Richard Kenner
61bdae66fb (FUNCTION_VALUE): Take into account promotion of pointers.
From-SVN: r16355
1997-11-07 07:01:19 -05:00
Richard Kenner
603bc2187d (back_branch_in_range_p): Refine check for INSN at loop end.
From-SVN: r16354
1997-11-07 06:50:48 -05:00
Ulrich Drepper
e2de495eb0 automatically generated from GPLed version
From-SVN: r16347
1997-11-06 00:43:09 +00:00
Paul Eggert
0535f6052e Replace __STDC__ - 0 == 1' with defined (__STRICT_ANSI__)'.
This new idiom is used in Solaris 2.6.  Solaris 2.6 no longer
uses fixinc.svr4 but other SVR4-like hosts might, and also
it might be useful to record this patch in case we put out
a new patch for GCC 2.7.

From-SVN: r16346
1997-11-05 23:16:12 +00:00
Jim Wilson
9f0e393e09 (insv, extzv, extv): Add change_address call.
(movsi_ulw, movsi_usw): Change QImode to BLKmode in pattern.

From-SVN: r16332
1997-11-04 17:54:49 -08:00
Jim Wilson
3c34848cab (mips_expand_epilogue): Emit blockage insn before call to
save_restore_insns if no FP and GP will be restored.

From-SVN: r16328
1997-11-04 17:03:02 -08:00
Paul Eggert
492c23b2ba (HAVE_INTTYPES_H): Undef.
From-SVN: r16324
1997-11-04 23:28:40 +00:00
Paul Eggert
e5fe184e78 (CC, OPT, OLDCC): Comment out.
From-SVN: r16323
1997-11-04 23:28:40 +00:00
Paul Eggert
753f017cf0 (inttypes.h): Check for conflicts between sys/types.h
and inttypes.h, and verify that intmax_t is defined.

From-SVN: r16322
1997-11-04 23:28:40 +00:00
Doug Evans
9784eb7a03 c-lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
* c-lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
	(yylex): Record wide strings using target endianness, not host.

From-SVN: r16317
1997-11-04 22:28:20 +00:00
Richard Kenner
04b05982da (distdir-start): Add dependency on $(srcdir)/config.in.
From-SVN: r16314
1997-11-04 16:18:17 -05:00
Paul Eggert
82d41610fa (yylex): Don't warn about constants like 9223372036854775807 and 18446744073709551615U on a 32-bit host unless pedantic...
(yylex): Don't warn about constants like 9223372036854775807 and
18446744073709551615U on a 32-bit host unless pedantic, as
they're present in Solaris 2.6 <inttypes.h> and will probably
be blessed by C9X.  Make sure constant fits in unsigned long
before giving it that type.

From-SVN: r16310
1997-11-04 11:13:43 +00:00
Jim Wilson
587e7f4cdd (prologue_set_got, prologue_get_pc): Add UNSPEC_VOLATILE to pattern.
(prologue_set_got, prologue_get_pc): Add UNSPEC_VOLATILE
to pattern.
(prologue_get_pc_and_set_got): New pattern.

From-SVN: r16308
1997-11-03 15:42:07 -08:00
Jim Wilson
db6ba3ac55 (load_pic_register): Call prologue_get_pc_and_set_got.
From-SVN: r16307
1997-11-03 15:40:41 -08:00
Paul Eggert
f1ce7b6b0b (compare_defs): Use CPP_PEDANTIC (pfile) instead of `pedantic',
fixing a typo.  Accept pfile as new arg.  All callers changed.

From-SVN: r16271
1997-11-02 08:22:05 +00:00
Paul Eggert
ae45f41209 (compare_defs): Don't complain about arg name respellings unless pedantic.
From-SVN: r16259
1997-11-01 01:34:11 +00:00
Brendan Kehoe
4025961e93 global.c (global_alloc): Free the conflict matrix after reload has finished.
* global.c (global_alloc): Free the conflict matrix after
        reload has finished.

From-SVN: r16258
1997-10-31 18:21:28 -05:00
Jeff Law
4bc8e109f6 Fix typo.
From-SVN: r16254
1997-10-31 09:43:28 -07:00
Doug Evans
a5ef15c327 (sparc*-*-*): Recognize --with-cpu=v9.
From-SVN: r16244
1997-10-30 22:56:18 +00:00
No Author
f773063728 This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r16241
1997-10-30 22:38:33 +00:00
Doug Evans
2f28ee5ece (sparc-*-elf*): USe sparc/elf.h, sparc/t-elf. Set extra_parts.
From-SVN: r16238
1997-10-30 22:30:23 +00:00
Richard Kenner
be0c52d9ad (expand_asm_operand): If error in matching constraint, don't emit asm.
From-SVN: r16237
1997-10-30 16:36:15 -05:00
Joern Rennecke
986ce8a764 (__va_arg_sh1): Define.
(va_arg): Use it.
SH3E doesn't use any integer registers for subsequent arguments
once a non-float value was passed in the stack.

From-SVN: r16235
1997-10-30 17:18:32 +00:00
Joern Rennecke
45257e8f69 (machine_dependent_reorg): If optimizing, put explicit
alignment in front label for ADDR_DIFF_VEC.

From-SVN: r16234
1997-10-30 17:18:32 +00:00
Joern Rennecke
314534d3d8 (PASS_IN_REG_P): Fix SH3E case.
(ADJUST_INSN_LENGTH): If not optimizing, add two extra bytes length.

From-SVN: r16233
1997-10-30 17:18:32 +00:00
Jim Wilson
e02cf2b396 (btst patterns): Add 5200 support.
From-SVN: r16225
1997-10-28 18:09:03 -08:00
Brendan Kehoe
13898c3631 global.c (global_alloc): Use xmalloc instead of alloca for CONFLICTS...
* global.c (global_alloc): Use xmalloc instead of alloca for
        CONFLICTS, since max_allocno * allocno_row_words alone can be more
        than 2.5Mb sometimes.

From-SVN: r16224
1997-10-28 19:50:13 -05:00
Joern Rennecke
9962ee21c8 (PREFERRED_DEBUGGING_TYPE): Undefine before including svr4.h.
From-SVN: r16218
1997-10-28 20:06:31 +00:00
Jason Merrill
cb8670b604 (output_call_frame_info): Use l1 instead of ".".
From-SVN: r16214
1997-10-28 18:20:14 +00:00
Jeff Law
d4c9d240c4 mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Disable reg+reg.
Mon Oct 27 16:01:14 1997  Jeffrey A Law  (law@cygnus.com)

        * mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Disable reg+reg.

From-SVN: r16210
1997-10-27 16:08:38 -07:00
Joern Rennecke
70ac5b15d7 sh.md (use_sfunc_addr, dummy_jump): New insns.
(casesi): For TARGET_SH2, emit a dummy_jump after LAB.

From-SVN: r16208
1997-10-27 21:11:37 +00:00
Joern Rennecke
bb1826ab92 (machine_dependent_reorg): When -flag_delayed_branches,
put an use_sfunc_addr before each sfunc.

From-SVN: r16207
1997-10-27 21:11:04 +00:00
Jason Merrill
7eb81c1241 Don't include dwarf2.h.
From-SVN: r16205
1997-10-27 19:48:06 +00:00
Jason Merrill
9dde655e52 Remove dwarf2out prototypes.
From-SVN: r16204
1997-10-27 19:48:06 +00:00
Jason Merrill
f1624b9b11 Add dwarf2out prototypes.
From-SVN: r16203
1997-10-27 19:48:06 +00:00
Ulrich Drepper
b68e1fddda automatically generated from GPLed version
From-SVN: r16202
1997-10-27 00:14:42 +00:00
Paul Eggert
40fc2ba872 (CPP_SPEC): Define with -remap.
From-SVN: r16201
1997-10-27 00:02:13 +00:00
Paul Eggert
56bffdb156 (cpp_options_init): Set remap to 0.
(open_include_file): Remap only if `remap' is nonzero.
(cpp_handle_options): Set remap if user specifies "-remap".

From-SVN: r16200
1997-10-27 00:00:14 +00:00
Paul Eggert
93f6ff48a0 (struct cpp_options): New member `remap'.
From-SVN: r16199
1997-10-27 00:00:14 +00:00
Paul Eggert
463888022e (remap): New var.
(main): Set it if user specifies "-remap".
(open_include_file): Remap only if `remap' is nonzero.

From-SVN: r16198
1997-10-26 23:57:24 +00:00
Paul Eggert
c20fc7e4eb Formerly cpp.texi.~31~
From-SVN: r16197
1997-10-26 23:56:36 +00:00
Jason Merrill
86a59130cc (output_call_frame_info): The CIE pointer is now a 32 | bit PC-relative offset.
(output_call_frame_info): The CIE pointer is now a 32
|       bit PC-relative offset.  The exception range table pointer is now in
|       the CIE.

From-SVN: r16191
1997-10-26 19:48:03 +00:00
Jason Merrill
f728334530 (dwarf_cie, dwarf_fde): Rename CIE_pointer to CIE_delta.
|       (count_fdes, add_fdes, get_cie): Adjust.
|       (cie_info, extract_cie_info, __frame_state_for): Adjust eh_ptr uses.

From-SVN: r16190
1997-10-26 19:48:03 +00:00
Richard Kenner
2f0fb0169e (float.h-nat): If float.h is to be empty, ensure it is.
From-SVN: r16177
1997-10-25 20:29:38 -04:00
Richard Kenner
81ac3a95bd Use stdarg.h only ifdef __STDC__.
Use stdarg.h only ifdef __STDC__.  Otherwise, use varargs.h.  Wrap
header with <>, not "".

From-SVN: r16176
1997-10-25 20:16:51 -04:00
Richard Kenner
bb56c6f243 (EH_FRAME_SECTION_ASM_OP{,_ELF,_COFF}): Define.
(DWARF2_UNWIND_INFO): Likewise.
(EXTRA_SECTIONS): Add in_eh.

From-SVN: r16175
1997-10-25 20:10:55 -04:00
Jeff Law
e6472f9541 mn10300.h (TARGET_SWITCHES): Add -mmult-bug and -mno-mult-bug.
* mn10300.h (TARGET_SWITCHES): Add -mmult-bug and -mno-mult-bug.
        (TARGET_MULT_BUG): Define.
        (TARGET_DEFAULT): Default to TARGET_MULT_BUG.
        * mn10300.md (mulsi3): Handle TARGET_MULT_BUG.

From-SVN: r16174
1997-10-25 12:18:29 -06:00
Jeff Law
03ac9cacdf mn10200.c (indirect_memory_operand): Delete unused function.
* mn10200.c (indirect_memory_operand): Delete unused function.
        * mn10200.h (EXTRA_CONSTRAINT): Handle 'R'.
        * mn10200.md (bset, bclr insns): Handle output in a reg too.

From-SVN: r16170
1997-10-24 17:38:03 -06:00
Michael Meissner
8962a48cbe Apply changes from egcs
From-SVN: r16167
1997-10-24 20:13:24 +00:00
Jeff Law
dc2c6b5a3a Another thinko in last change.
From-SVN: r16166
1997-10-24 13:57:27 -06:00
Jeff Law
7bcba8495e FIx typo in last change.
From-SVN: r16161
1997-10-24 13:33:48 -06:00
Doug Evans
b157958e0c (ASM_SPEC): Delete asm_arch.
From-SVN: r16160
1997-10-24 19:20:50 +00:00
Jeff Law
93662a9f36 mn10300.c (symbolic_operand, [...]): New functions.
* mn10300.c (symbolic_operand, legitimize_address): New functions.
        * mn10300.h (LEGITIMIZE_ADDRESS): Call legitimize_address.
        (GO_IF_LEGITIMATE_ADDRESS): Don't allow base + symbolic.

From-SVN: r16159
1997-10-24 13:20:49 -06:00
Joern Rennecke
174b9746c6 (dbxout_start_new_source_file): Use output_quoted_string for FILENAME.
From-SVN: r16154
1997-10-23 13:03:43 +01:00
Jeff Law
803d703025 Fix typo in last change.
From-SVN: r16143
1997-10-21 18:50:35 -06:00
Jeff Law
beb7b0451c mn10300.md (movqi, movhi): Avoid using address registers as destinations unless absolutely necessary.
* mn10300.md (movqi, movhi): Avoid using address registers as
        destinations unless absolutely necessary.

From-SVN: r16142
1997-10-21 18:42:25 -06:00
Paul Eggert
383b0e2bdc (CPP_SPEC): Remove reference to obsolete option -lang-c-c++-comments.
From-SVN: r16138
1997-10-21 20:16:32 +00:00
Jeff Law
fb37e62070 mn10200.h (GO_IF_LEGITIMATE_ADDRESS): Do not allow indexed addresses.
* mn10200.h (GO_IF_LEGITIMATE_ADDRESS): Do not allow indexed
        addresses.
        * mn10200.md (neghi2): Provide an alternative which works if
        the input and output register are the same.

[[Split portion of a mixed commit.]]

From-SVN: r16137.1
1997-10-21 13:55:51 -06:00
Jeff Law
7705ee50d9 mn10300.c (print_operand): Handle 'S'.
* mn10300.c (print_operand): Handle 'S'.
        * mn10300.md (ashlsi3, lshrsi3, ashrsi3): Use %S for
        shift amount in last alternative

From-SVN: r16135
1997-10-21 13:10:33 -06:00
Jeff Law
bdb3156ae5 mn10300.c (expand_epilogue): Rework to handle register restores in "ret" and "retf" instructions correctly.
* mn10300.c (expand_epilogue): Rework to handle register restores
        in "ret" and "retf" instructions correctly.

From-SVN: r16133
1997-10-21 10:06:15 -06:00
Richard Earnshaw
43d619c006 (insv): Avoid writing result into a paradoxical subreg.
From-SVN: r16131
1997-10-21 11:34:55 +00:00
Joern Rennecke
14f863937b (PREFERRED_DEBUGGING_TYPE): Don't redefine.
From-SVN: r16130
1997-10-21 12:12:03 +01:00
Nick Clifton
8cd01247a6 Use __v850 rather than __v850__ to identify a v850 target.
From-SVN: r16128
1997-10-20 22:28:19 +00:00
Doug Evans
014352e34d Expect SPARC_DEFAULT_CMODEL to be overriden in cover file.
From-SVN: r16123
1997-10-20 21:27:09 +00:00
Doug Evans
75c59315e3 sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
	TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
	(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
	(sethi_di_fullany): Delete.

From-SVN: r16122
1997-10-20 21:25:41 +00:00
Doug Evans
434d72bc20 sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
	(sparc_override_options): Handle code model selection.
	(sparc_init_expanders): Renamed from sparc64_init_expanders.

From-SVN: r16121
1997-10-20 21:25:17 +00:00
Doug Evans
dfe355cca9 sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
	(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
	(BLOCK_PROFILER): Likewise.

From-SVN: r16120
1997-10-20 21:25:01 +00:00
Doug Evans
e01f9dc1bd * sparc/splet.h (CPP_SPEC): Delete.
From-SVN: r16119
1997-10-20 21:24:24 +00:00
Doug Evans
70bbdc38a6 sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
	(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.  Delete
	MASK_LONG64, MASK_MEDANY.
	(SPARC_DEFAULT_CMODEL): Define.
	(CPP_PREDEFINES): Delete.
	(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
	(ASM_SPEC): Add %(asm_arch).
	(LONG_DOUBLE_TYPE_SIZE): Define.
	(DWARF2_DEBUGGING_INFO): Define.

From-SVN: r16118
1997-10-20 21:23:54 +00:00
Doug Evans
23bcbe7649 sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
	(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
	(SPARC_DEFAULT_CMODEL): Define.

From-SVN: r16117
1997-10-20 21:23:06 +00:00
Doug Evans
c14d5bcc57 sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
	(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
	(TARGET_CPU_DEFAULT): Add ultrasparc case.

From-SVN: r16116
1997-10-20 21:22:30 +00:00
Doug Evans
e589bf33f5 linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
	(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
	(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
	(SPARC_DEFAULT_CMODEL): Define.
	(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
	(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
	(LONG_DOUBLE_TYPE_SIZE): Define.
	(ASM_SPEC): Add %(asm_arch).

From-SVN: r16115
1997-10-20 21:21:52 +00:00
Doug Evans
aac2248404 linux-aout.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
	CPP_SPEC.
	(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
	* sparc/linux.h: Likewise.

From-SVN: r16114
1997-10-20 21:21:27 +00:00
Doug Evans
36f55c59b8 linux-aout.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
	CPP_SPEC.
	(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.

From-SVN: r16113
1997-10-20 21:21:06 +00:00
Doug Evans
5d6b1d9396 sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
	(DEFAULT_ARCH32_P): New macro.
	(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
	(enum cmodel): Declare.
	(sparc_cmodel_string,sparc_cmodel): Declare.
	(SPARC_DEFAULT_CMODEL): Provide default.
	(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
	(TARGET_FULLANY): Deleted.
	(TARGET_CM_MEDMID): New macro.
	(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
	(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
	(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
	(CPP_SPEC): Rewrite.
	(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
	(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
	(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
	(ASM_SPEC): Add %(asm_arch).
	(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
	Rename asm_default to asm_cpu_default.
	Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
	cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
	(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
	({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
	(MASK_INT64,MASK_LONG64): Delete.
	(MASK_ARCH64): Renamed to MASK_64BIT.
	(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
	(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
	(TARGET_SWITCHES): Always provide 64 bit options.
	(ARCH64_SWITCHES): Delete.
	(TARGET_OPTIONS): New option -mcmodel=.
	(INT_TYPE_SIZE): Always 32.
	(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
	(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
	(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
	(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.

From-SVN: r16112
1997-10-20 21:20:16 +00:00
Jim Wilson
ddfbb2dec3 (compute_frame_size): Not a leaf function if profile_flag set.
From-SVN: r16111
1997-10-20 14:19:45 -07:00
Richard Kenner
9a2290c25e *** empty log message ***
From-SVN: r16105
1997-10-20 18:51:46 +00:00
Richard Kenner
00fd5a3200 (init_decl_processing): Call using_eh_for_cleanups.
From-SVN: r16104
1997-10-20 18:50:29 +00:00
Richard Kenner
b1c53ac391 (g++): Include prefix.o.
From-SVN: r16103
1997-10-20 18:50:29 +00:00
Richard Kenner
155d5eb4d6 (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
(unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.

From-SVN: r16102
1997-10-20 18:50:29 +00:00
Richard Kenner
5fad5361f1 (prefix.o): Properly pass in prefix.
From-SVN: r16094
1997-10-19 19:47:33 -04:00
Richard Kenner
0e7e2aabe0 (get_key_value): Initialize prefix to null.
From-SVN: r16093
1997-10-19 19:47:12 -04:00
Richard Kenner
9d6483e180 (distdir-start): Fix error in last change.
From-SVN: r16092
1997-10-19 18:59:21 -04:00
Richard Kenner
6c86626c16 (objc.distdir): Refine last change.
From-SVN: r16091
1997-10-19 18:53:40 -04:00
Richard Kenner
02b84e2329 (distdir-start): Finish last change.
From-SVN: r16090
1997-10-19 18:50:21 -04:00
Richard Kenner
3ec7088086 (distdir-start): Don't copy objc files here.
From-SVN: r16089
1997-10-19 18:45:26 -04:00
Richard Kenner
5ee8d32f4e (objc.distdir): Make the objc directory.
From-SVN: r16088
1997-10-19 18:45:06 -04:00
Richard Kenner
7d5413aadd (TAGS): Don't delete objc-parse.y
(TAGS): Don't delete objc-parse.y
(distdir-start): Don't depend on objc-parse.y.

From-SVN: r16087
1997-10-19 18:39:29 -04:00
Richard Kenner
c578fdfa60 (distdir-start): No longer depend on objc-parse.c.
From-SVN: r16086
1997-10-19 18:37:18 -04:00
Richard Kenner
ce26752b35 (objc.distdir): Depend on $(srcdir)/objc-parse.c.
From-SVN: r16085
1997-10-19 18:36:21 -04:00
Richard Kenner
1b80d9ce3d (LIB_SPEC): Add -ladvapi32.
(STARTFILE_SPEC): If -dll, use dllcrt1.o.
(INCOMING_RETURN_ADDR_RTX): Undefine.

From-SVN: r16084
1997-10-19 18:15:57 -04:00
Richard Kenner
a566f65003 (OBJECT_SUFFIX): Add default definition.
(main): Use OBJECT_SUFFIX.
(VMS_{freopen,fopen,open}): Use instead of using macro on
unprefixed name.
(VMS_fstat): Use decc$fstat explicitly, not via macro.

From-SVN: r16083
1997-10-19 17:45:58 -04:00
Richard Kenner
fc037ce987 (float.h-nat): Avoid using /dev/null for input, since it's not present
on all systems.

From-SVN: r16082
1997-10-19 17:35:11 -04:00
Doug Evans
b2c8e9b0da Undo rcs entry 1.122 "(sethi_{hi,si}): Reorg." and add comment why.
From-SVN: r16081
1997-10-19 16:57:44 +00:00
Richard Kenner
b03aba8f08 (INCLUDE_DEFAULTS): Delete from here.
From-SVN: r16079
1997-10-19 12:32:54 -04:00
Richard Kenner
d3074fe87a (INCLUDE_DEFAULTS): New macro.
From-SVN: r16078
1997-10-19 12:32:40 -04:00
Richard Kenner
7034493d0b (STANDARD_INCLUDE_COMPONENT): New macro.
From-SVN: r16077
1997-10-19 12:32:24 -04:00
Richard Kenner
e8f8e8885b (INCLUDE_DEFAULTS): Add `component' to values.
From-SVN: r16076
1997-10-19 12:32:04 -04:00
Richard Kenner
81b20e4235 (upate_path): Add extern definition.
(find_a_file): For MS-DOS-based, consider a drive spec as absolute.
(add_prefix): New arg component and pass to update_path;
all callers changed.

From-SVN: r16075
1997-10-19 12:30:23 -04:00
Richard Kenner
97ae6346ea (update_path): Add extern definition.
(struct default_include): New field `component'.
(default_include): Add initializer for new field to all entries.
(cpp_start_read): Call update_path.

From-SVN: r16074
1997-10-19 12:30:08 -04:00
Richard Kenner
c7bff242bc (update_path): Add extern definition.
(struct default_include): New field `component'.
(default_include): Add initializer for new field to all entries.
(new_include_prefix): Take new arg and call update_path;
all callers changed.
Add trailing "." before doing stat of file.

From-SVN: r16073
1997-10-19 12:29:50 -04:00
Richard Kenner
fcf263b8e0 Initial revision
From-SVN: r16072
1997-10-19 12:29:33 -04:00
No Author
4a4aaca01b This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r16071
1997-10-19 16:29:33 +00:00
Richard Kenner
7fe66c917b (xgcc, cccp, cppmain, fix-header): Add prefix.o.
(prefix.o): New rule.

From-SVN: r16069
1997-10-19 12:29:28 -04:00
Michael Meissner
4e569d97a1 Formerly tm.texi.~261~
From-SVN: r16068
1997-10-19 16:26:45 +00:00
Richard Kenner
eaeb940a7b (WIDEST_HARDWARE_FP_SIZE): New macro.
From-SVN: r16067
1997-10-19 11:47:35 -04:00
Richard Kenner
f724505a43 Formerly tm.texi.~260~
From-SVN: r16066
1997-10-19 11:47:04 -04:00
Richard Kenner
436ae6b090 (allocate_stack): Fix incorrect operand number.
From-SVN: r16065
1997-10-19 11:41:18 -04:00
Richard Kenner
6c014f394f Delete junk whitespace.
From-SVN: r16064
1997-10-19 11:40:53 -04:00
Richard Kenner
2354b3048f (ix86_prologue): Conditionalize Dwarf2 calls on #ifdef
INCOMING_RETURN_ADDR_RTX.

From-SVN: r16063
1997-10-19 11:40:44 -04:00
Richard Kenner
59ef176835 (vmskrunch): No longer define.
(ENCODE_SECTION_INFO): No longer call vmskrunch.
(ASM_DECLARE_FUNCTION_NAME): No longer override.

From-SVN: r16062
1997-10-19 11:35:15 -04:00
Richard Kenner
518d7bd584 (vmskrunch): Deleted.
(output_prolog, VMS): Use alloca for entry_label and don't
truncate to 64 characters.

From-SVN: r16061
1997-10-19 11:35:02 -04:00
Richard Kenner
52e2440372 (output_quoted_string): Call new OUTPUT_QUOTED_STRING macro.
From-SVN: r16060
1997-10-19 11:27:47 -04:00
Richard Kenner
9970f778de (OUTPUT_QUOTED_STRING): New macro.
From-SVN: r16059
1997-10-19 11:27:35 -04:00
Richard Kenner
9e72cd3d8d Formerly tm.texi.~259~
From-SVN: r16058
1997-10-19 11:27:08 -04:00
Richard Kenner
36b01eb4cc (using_eh_for_cleanups_p): New variable.
(using_eh_for_cleanups): New function.
(expand_decl_cleanup): Don't call expand_eh_region_start_tree unless using EH
for cleanups.

From-SVN: r16057
1997-10-19 10:55:08 -04:00
Richard Kenner
002a62d9ce (fix_argv, pexecute): Cast result of xmalloc.
From-SVN: r16056
1997-10-19 10:34:09 -04:00
Richard Kenner
1c3c7b05c6 (purge_addressof_1): When dealing with a bare (address (mem)), verify that what's inside is valid in insn.
(purge_addressof_1): When dealing with a bare (address (mem)), verify
that what's inside is valid in insn.
(instantiate_virtual_regs_1, case ADDRESSOF): If have MEM, just do
instantiation inside and leave alone here.

From-SVN: r16055
1997-10-19 10:31:28 -04:00
Richard Kenner
bd282e3f22 (fold, case COND_EXPR): Allow creation of {MIN,MAX}_EXPR, but preserve
info on orginal comparison code.

From-SVN: r16054
1997-10-19 10:27:55 -04:00
Richard Kenner
80ead7c7eb (restore_tree_status): Update prototype.
From-SVN: r16053
1997-10-19 09:27:45 -04:00
Richard Kenner
6c94d1f5bc (cse_basic_block): Flush the hash table every 1,000 insns.
From-SVN: r16052
1997-10-19 09:07:35 -04:00
Richard Kenner
f57a03e28a Fix typo in lst change.
From-SVN: r16051
1997-10-18 20:48:14 -04:00
Jason Merrill
1359729ef0 (restore_tree_status): Also free up temporary storage when we finish a toplevel function.
(restore_tree_status): Also free up temporary storage
        when we finish a toplevel function.
        (dump_tree_statistics): Print stats for backend obstacks.

From-SVN: r16049
1997-10-18 20:54:35 +00:00
Jason Merrill
41e69473b6 tweak comment
From-SVN: r16048
1997-10-18 20:30:00 +00:00
Jason Merrill
0dd82b159d fix thinko in last change.
From-SVN: r16047
1997-10-18 20:27:28 +00:00
Richard Kenner
7e2b025781 (record_address_regs, case PLUS): Refine how to choose which is base
and index.

From-SVN: r16045
1997-10-18 14:15:48 -04:00
Richard Kenner
a628dc382f (count_leading_zeros): Add missing casts to USItype.
From-SVN: r16044
1997-10-18 13:48:12 -04:00
Richard Kenner
ffb828869f (expand_builtin_dwarf_reg_size): Ignore return address.
From-SVN: r16043
1997-10-18 13:42:41 -04:00
Richard Kenner
e329340475 (__throw): Don't copy the return address.
From-SVN: r16042
1997-10-18 13:42:29 -04:00
Richard Kenner
686f1eea4f (main): Don't execute "ps" under MSDOS.
From-SVN: r16041
1997-10-18 13:35:07 -04:00
Richard Kenner
711cafe6ca (instantiate_virtual_regs): Don't instantiate the stack slots for the parm...
(instantiate_virtual_regs): Don't instantiate the stack slots for the
parm registers until after the insns have had their virtuals
instantiated.

From-SVN: r16040
1997-10-18 13:30:31 -04:00
Richard Kenner
0c71c2cab2 (va_arg): For ARM systems, definition is endian-dependent.
From-SVN: r16039
1997-10-18 13:26:41 -04:00
Richard Kenner
5ca3eebc7b (expr_tree_cons, build_expr_list, expralloc): New fns.
From-SVN: r16038
1997-10-18 13:21:26 -04:00
Richard Kenner
305d485601 (end_final): Use ASM_OUTPUT_ALIGNED_DECL_LOCAL if defined.
From-SVN: r16037
1997-10-18 11:23:02 -04:00
Richard Kenner
c2001b04a3 (assemble_static_space): Likewise.
(assemble_variable): Use ASM_OUTPUT_ALIGNED_DECL_{COMMON,LOCAL} if def.

From-SVN: r16036
1997-10-18 11:22:48 -04:00
Richard Kenner
cb218aefdb Formerly tm.texi.~258~
From-SVN: r16035
1997-10-18 11:22:18 -04:00
Richard Kenner
47bfaa5978 (use_group_regs): Don't call use_reg unless REG.
From-SVN: r16034
1997-10-18 11:02:14 -04:00
Richard Kenner
0a2437d3ef (__enable_execute_stack): Check for __sysV88__ not __DOLPHIN__.
From-SVN: r16033
1997-10-18 10:58:30 -04:00
Richard Kenner
14874b5080 Remove redundant change.
From-SVN: r16032
1997-10-18 10:57:25 -04:00
Richard Kenner
12169db6af (INITIALIZE_TRAMPOLINE): Unconditionally define.
From-SVN: r16031
1997-10-18 10:54:42 -04:00
Richard Kenner
a6cabd3114 (INITIALIZE_TRAMPOLINE): Delete here.
From-SVN: r16030
1997-10-18 10:54:29 -04:00
Richard Kenner
31ebdf4941 Fix typo.
From-SVN: r16029
1997-10-18 10:47:02 -04:00
Richard Kenner
644e513c56 (simplify_ternary_operation, case IF_THEN_ELSE): Collapse redundant
conditional moves to single operand.

From-SVN: r16028
1997-10-18 10:44:39 -04:00
Richard Kenner
c99fb52a8f (extract_bit_field): Don't make flag_force_mem disable extzv for
memory operands.

From-SVN: r16027
1997-10-18 10:39:19 -04:00
Richard Kenner
387fbcb415 (expand_expr): If -check-memory-usage, add call to chkr_check_addr if
SIZE not zero.

From-SVN: r16026
1997-10-18 10:07:29 -04:00
Richard Kenner
a411d97a2a Correct previous change.
From-SVN: r16025
1997-10-18 10:04:21 -04:00
Richard Kenner
c5a5a46a1c (save_for_inline_copying): Avoid undefined pointer& operations.
(expand_inline_function): Likewise.

From-SVN: r16024
1997-10-18 09:58:42 -04:00
Richard Kenner
e6f37cfd66 (exceptions_via_longjmp): Initialize to 2 (uninitialized).
From-SVN: r16023
1997-10-18 09:55:12 -04:00
Richard Kenner
1409924afd (main): Initialize exceptions_via_longjmp.
From-SVN: r16022
1997-10-18 09:54:21 -04:00
Richard Kenner
8977e11fdb Add extra_inline_obstacks.
(save_tree_status): Use it.
(restore_tree_status): If this is a toplevel inline obstack and we
didn't want to save anything on it, recycle it.
(print_inline_obstack_statistics): New fn.

From-SVN: r16021
1997-10-18 09:49:43 -04:00
Richard Kenner
04d82744ef (pop_function_context_from): Pass context to restore_tree_status.
From-SVN: r16020
1997-10-18 09:49:26 -04:00
Richard Kenner
187375c4cb (get_file_function_name): Remove declaration.
From-SVN: r16019
1997-10-18 09:45:20 -04:00
Richard Kenner
d30015b345 (finish_file): Likewise.
From-SVN: r16018
1997-10-18 09:43:16 -04:00
Richard Kenner
10f976a74e (ASM_OUTPUT_ALIGN): Accept any alignment.
From-SVN: r16017
1997-10-18 09:39:27 -04:00
Richard Kenner
0910ddaa6f (output_call_frame_info): Call app_enable and app_disable to let GNU
as accept the generated comments.

From-SVN: r16016
1997-10-18 09:39:13 -04:00
Richard Kenner
9fd121d427 (chkr_check_str_libfunc): New variable.
(init_optabs): Initialize it.

From-SVN: r16015
1997-10-18 09:35:39 -04:00
Richard Kenner
8edc026f78 (chkr_check_str_libfunc): Declare.
From-SVN: r16014
1997-10-18 09:35:24 -04:00
Richard Kenner
9470cfc1c3 (expand_assignment): If -fcheck-memory-usage, add call to chkr_check_addr if size not zero.
(expand_assignment): If -fcheck-memory-usage, add call to chkr_check_addr if
size not zero.
(expand_builtin): If -fcheck_memory-usage, check memory usage
of operands for strlen, strcpy, and memcpy or don't use builtins
for memcmp and strcmp.

From-SVN: r16013
1997-10-18 09:35:13 -04:00
Richard Kenner
8cf3ecde80 (ASM_COMMENT_START): Redefine.
From-SVN: r16012
1997-10-18 09:29:18 -04:00
Richard Kenner
14c5c3ce94 (__frame_state_for): Execute the FDE insns until the current pc value
is strictly bigger than the target pc value.

From-SVN: r16011
1997-10-18 09:25:53 -04:00
Richard Kenner
26fc4d2f4a (expand_expr, case TARGET_EXPR): If target and slot has no DECL_RTL,
then call mark_addressable again for the slot after we give it RTL.

From-SVN: r16010
1997-10-18 09:23:51 -04:00
Richard Kenner
1ec65043d3 (m88k_begin_prologue): Remove superfluous backslash.
From-SVN: r16009
1997-10-18 08:58:35 -04:00
Richard Kenner
6af9d62660 (print_rtl_with_bb): Cast alloca return values.
From-SVN: r16008
1997-10-18 08:50:03 -04:00
Richard Kenner
2d1fce4040 (LITERALS_SECTION_ASM_OP, ASM_OUTPUT_DEF):
(EXTRA_SECTION_FUNCTIONS): Add literals_section.
(EXTRA_SECTIONS): Include in_literals.

From-SVN: r16007
1997-10-18 08:47:45 -04:00
Richard Kenner
cca0794106 (cpp_lex): Cast string, for cpp_lookup, to type U_CHAR *.
From-SVN: r16006
1997-10-18 08:40:54 -04:00
Richard Kenner
1a4d7575f0 (initialize_builtins): Cast all string constants for the function install, to type U_CHAR *.
(initialize_builtins): Cast all string constants for the function
install, to type U_CHAR *.
(eval_if_expression): Likewise.

From-SVN: r16005
1997-10-18 08:40:30 -04:00
Richard Kenner
2fef698906 (check_newline) At `skipline', flush nextchar as well.
From-SVN: r16004
1997-10-18 08:38:11 -04:00
Richard Kenner
7b44e15486 (struct file_stack): Added indent_level.
From-SVN: r16003
1997-10-18 08:17:10 -04:00
Richard Kenner
69a90a0256 (check_newline): Add {}-count & balance warning.
From-SVN: r16002
1997-10-18 08:16:31 -04:00
Richard Kenner
2e9f80f296 (FUNCTION_VALUE): Use word_mode only for integral types, not types
with integral modes.

From-SVN: r16001
1997-10-18 07:29:47 -04:00
Richard Kenner
ace4e41e52 (alter_cond): Properly conditionalize forward decl.
From-SVN: r16000
1997-10-18 07:10:50 -04:00
Richard Kenner
90c238447f (contains_placeholder_p, case SAVE_EXPR): Avoid checking each
SAVE_EXPR more than once.

From-SVN: r15999
1997-10-18 06:57:52 -04:00
Richard Kenner
681ffc00f3 (SAVE_EXPR_NOPLACEHOLDER): New flag.
From-SVN: r15998
1997-10-18 06:57:36 -04:00
Richard Kenner
0e6a648476 (nonlocal_goto_receiver): Don't test pool size.
From-SVN: r15997
1997-10-18 06:56:33 -04:00
Richard Kenner
d0050e7948 (nolocal_goto_receiver): New pattern.
From-SVN: r15996
1997-10-18 06:55:46 -04:00
Richard Kenner
b2eb5a020b (load_pic_register): New function.
(ix86_prologue): Code to load PIC register moved to new function.

From-SVN: r15995
1997-10-18 06:55:35 -04:00
Richard Kenner
f80bb67866 Major cleanup, mostly reformatting.
Include dwarf2.h.
Remove many spurious casts.
(ix86_{pro,epi}logue): Use proper mode for SET rtx.

From-SVN: r15994
1997-10-18 06:54:37 -04:00
Doug Evans
7bf4bbe584 Rewrite v9 support.
From-SVN: r15988
1997-10-17 23:32:25 +00:00
Doug Evans
8a306be5ff (output_fp_move_quad): If TARGET_V9 and not TARGET_HARD_QUAD...
(output_fp_move_quad): If TARGET_V9 and not
TARGET_HARD_QUAD, use fmovd so it works if a quad float ends up in
one of the upper 32 float regs.

From-SVN: r15983
1997-10-17 23:05:56 +00:00
Doug Evans
dbdf6fe629 (pic_{lo_sum,sethi}_di): New patterns necessary for PIC support on sparc64.
From-SVN: r15981
1997-10-17 22:54:35 +00:00
Doug Evans
070f85b3d3 (sethi_{hi,si}): Reorg.
From-SVN: r15980
1997-10-17 22:51:21 +00:00
Doug Evans
61bb51e740 (output_double_int): Add endianness comment.
From-SVN: r15976
1997-10-17 21:54:15 +00:00
Doug Evans
4d7ec5ea04 (output_double_int): Output DI mode values
correctly when HOST_BITS_PER_WIDE_INT is 64.

From-SVN: r15975
1997-10-17 21:50:14 +00:00
Doug Evans
e4823580e4 (FUNCTION_PROFILER): Fix format string when TARGET_MEDANY.
From-SVN: r15973
1997-10-17 21:30:38 +00:00
Doug Evans
12b7684391 (LINK_SPEC): Dynamic linker is ld-linux64.so.2.
From-SVN: r15970
1997-10-17 21:13:33 +00:00
Doug Evans
9385365ad2 sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
	(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
	(doublemove_string): New function.
	(output_move_quad): Clean up some of the arch64 support.
	(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
	Don't add 8 bytes of reserved space if arch64.
	(sparc_builtin_saveregs): Combine arch32/arch64 versions.
	(init_cumulative_args): New function.
	(function_arg_slotno): New static function.
	(function_arg,function_arg_partial_nregs): New functions.
	(function_arg_{pass_by_reference,advance}): New functions.
	(function_arg_padding): New function.

From-SVN: r15967
1997-10-17 20:26:53 +00:00
Doug Evans
7150a0fe30 sparc.h (PROMOTE_MODE): Promote small ints if arch64.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
	(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
	(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
	(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
	(SPARC_FP_ARG_FIRST): New macro.
	(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
	(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
	(NPARM_REGS): There are 32 fp argument registers now.
	(FUNCTION_ARG_REGNO_P): Likewise.
	(FIRST_PARM_OFFSET): Update to new v9 abi.
	(REG_PARM_STACK_SPACE): Define for arch64.
	(enum sparc_arg_class): Delete.
	(sparc_arg_count,sparc_n_named_args): Delete.
	(struct sparc_args): Redefine and use for arch32 as well as arch64.
	(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
	(FUNCTION_ARG_ADVANCE): Rewrite.
	(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
	(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
	(FUNCTION_ARG_CALLEE_COPIES): Delete.
	(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
	(STRICT_ARGUMENT_NAMING): Define.
	(doublemove_string): Declare.

From-SVN: r15966
1997-10-17 20:26:25 +00:00
Doug Evans
b5d4712b12 * sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
From-SVN: r15965
1997-10-17 20:25:49 +00:00
Richard Earnshaw
539cbe8b37 (TYPE_OPERAND_FMT): use % not @ to avoid problems with comments.
From-SVN: r15964
1997-10-17 17:21:18 +00:00
Richard Earnshaw
fddef11eb7 (movsfcc): If not TARGET_HARD_FLOAT, ensure operand[3]
is valid.

From-SVN: r15963
1997-10-17 16:55:10 +00:00
Richard Earnshaw
fd3e7c74ad (ASM_OUTPUT_LABEL): Delete.
(ASM_OUTPUT_INTERNAL_LABEL): Call ASM_OUTPUT_LABEL directly.
(PUSH_ROUNDING): Delete; this is not what happens.
(ACCUMULATE_OUTGOING_ARGS): Define.
(PROMOTE_FUNCTION_ARGS): Define.
(INITIAL_ELIMINATION_OFFSET): Take current_function_outgoing_args_size
into account.
(ASM_OUTPUT_MI_THUNK): Use a branch instruction to
jump to the label.
(RETURN_ADDR_RTX): Use NULL_RTX rather than casting zero.
(output_move_double): Correct typo in prototype.

From-SVN: r15962
1997-10-17 16:45:06 +00:00
Richard Earnshaw
449f47bb6b (ASM_OUTPUT_LABEL): Define in place of ARM_OUTPUT_LABEL.
(ASM_OUTPUT_ALIGNED_LOCAL): Do what is needed inline.

From-SVN: r15961
1997-10-17 16:45:06 +00:00
Richard Earnshaw
6b81aff4db (CPP_PREDEFINES): Always predefine __arm__.
From-SVN: r15960
1997-10-17 16:45:06 +00:00
Richard Earnshaw
7039e94281 (CROSS_LIBGCC1, LIB1ASMSRC, LIB1ASMFUNCS) Don't define
these any more.

From-SVN: r15959
1997-10-17 16:45:06 +00:00
Richard Earnshaw
ef23f33a10 (arm_asm_output_label): Delete.
(output_lcomm_directive): Delete.
(use_return_insn, output_func_epilogue, arm_expand_prologue): Likewise.
(const_ok_for_arm): If HOST_WIDE_INT is more than 32
bits, then insist that the high bits are all zero, or all one.
(output_move_double): Handle case where a CONST_INT is more than
thirty-two bits.
(load_multiple_sequence): Don't fall over if a
memory operand happens to be a SUBREG of a MEM.
(store_multiple_sequence): Likewise.
(arm_gen_load_multiple): New arguments UNCHANGING_P
and IN_STRUCT_P.  Use them if we create any new MEMs.  All callers
changed.
(arm_gen_store_multiple): Likewise.
(arm_gen_movstrqi): Preserve RTX_UNCHANGING_P and MEM_IN_STRUCT_P
on any MEMs created.

From-SVN: r15958
1997-10-17 16:45:06 +00:00
Richard Earnshaw
d75ee73b23 (ASM_OUTPUT_LABEL):Define in place of ARM_OUTPUT_LABEL.
From-SVN: r15957
1997-10-17 16:45:06 +00:00
Richard Earnshaw
fa0e6a61ee (arm-*-netbsd*): Pick up t-netbsd before arm/t-netbsd.
From-SVN: r15956
1997-10-17 16:43:58 +00:00
Doug Evans
7b9b1d97f1 (INCOMING_RETURN_ADDR_RTX): MOve teo more appropriate place in file.
(INCOMIING_FRAME_SP_OFFSET): Likewise.

From-SVN: r15952
1997-10-17 15:38:50 +00:00
Jim Wilson
f034b0008f (ep_memory_offset): New function.
(ep_memory_operand, substitute_ep_register, v850_reorg): Call it.

From-SVN: r15951
1997-10-16 16:59:20 -07:00
Jim Wilson
6a02e54cb2 (CONST_OK_FOR_*): Add and correct comments.
(CONSTANT_ADDRESS_P): Add comment.
(EXTRA_CONSTRAINT): Define 'U'.

From-SVN: r15950
1997-10-16 16:53:04 -07:00
Jim Wilson
386d353b39 Add comments on bit field instructions.
(lshrsi3): Use N not J constraint.
(addsi3): Delete &r/r/r alternative.  Add r/r/U alternative.

From-SVN: r15949
1997-10-16 16:52:39 -07:00
Jim Wilson
8c78acf557 (v850_tst1+1): New define_split for tst1 instruction.
From-SVN: r15948
1997-10-16 16:42:12 -07:00
Jim Wilson
d1685b0690 (reg_or_0_operand): Call register_operand.
(reg_or_int5_operand): Likewise.

From-SVN: r15947
1997-10-16 16:40:35 -07:00
Jim Wilson
2029ece984 (cmpsi): Delete compare mode.
(casesi): New pattern.

From-SVN: r15946
1997-10-16 16:40:12 -07:00
Jim Wilson
98418769b1 (MASK_BIG_SWITCH, TARGET_BIG_SWITCH): New macros.
(TARGET_SWITCHES): Add "big-switch".
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT, CASE_VECTOR_MODE,
ASM_OUTPUT_BEFORE_BASE_LABEL): Add support for TARGET_BIG_SWITCH.
(CASE_DROPS_THROUGH): Comment out.
(CASE_VECTOR_PC_RELATIVE, JUMP_TABLES_IN_TEXT_SECTION): Define.

From-SVN: r15945
1997-10-16 16:39:51 -07:00
Jim Wilson
9247d0e6a4 (ashlsi3): Use SImode not QImode for shift count.
(lshrsi3): Likewise.

From-SVN: r15944
1997-10-16 16:36:18 -07:00
Jim Wilson
f313ff946a (CONST_OK_FOR_N): Delete redundant compare against zero.
From-SVN: r15943
1997-10-16 16:35:55 -07:00
Jim Wilson
9cee7317e8 (branch_normal, branch_invert): Change %b to b%b.
From-SVN: r15942
1997-10-16 16:31:13 -07:00
Jim Wilson
a7bbdd3af7 (print_operand): Add 'c', 'C', and 'z' support.
(print_operand): Add 'c', 'C', and 'z' support.  Delete
unreachable switch statement after 'b' support.  Remove "b" from
strings for 'b' support.

From-SVN: r15941
1997-10-16 16:23:04 -07:00
Doug Evans
b3c80e3d9c (sparc-*-elf*): New target.
From-SVN: r15935
1997-10-16 17:08:11 +00:00
Doug Evans
3c0908b5d3 Delete a.out file format comment.
From-SVN: r15934
1997-10-16 17:06:32 +00:00
Paul Eggert
9520de4d64 automatically generated from GPLed version
From-SVN: r15926
1997-10-16 03:19:56 +00:00
Joern Rennecke
1d0611ad39 (REG_CLASS_CONTENTS): AP is a general register.
(REG_OK_FOR_BASE_P, ! REG_OK_STRICT case): Reject special registers.

From-SVN: r15925
1997-10-16 03:30:13 +01:00
Jeff Law
a09108b0fe pa.c (following_call): Fail if the CALL_INSN is an indirect call.
* pa.c (following_call): Fail if the CALL_INSN is an indirect
        call.

From-SVN: r15924
1997-10-15 20:21:00 -06:00
Joern Rennecke
54905ecfb0 (va_arg): Fix big endian bugs for small integers.
From-SVN: r15923
1997-10-16 03:01:58 +01:00
Joern Rennecke
1e23fdf853 (HANDLE_SYSV_PRAGMA): Undefine.
From-SVN: r15922
1997-10-16 02:55:41 +01:00
Joern Rennecke
6e760932e4 Comment fix.
From-SVN: r15921
1997-10-16 02:52:37 +01:00
Joern Rennecke
fe10b22735 (movhi+1): Add x/r alternative.
From-SVN: r15920
1997-10-16 02:49:08 +01:00
Michael Meissner
1f8e015f19 601 fixup
From-SVN: r15919
1997-10-16 01:44:02 +00:00
Doug Evans
21b0c3e80a (LIBGCC2_CFLAGS): Delete.
From-SVN: r15913
1997-10-15 22:45:21 +00:00
Karl Berry
8f40cee0b7 (\titlefont): Explicitly set \rm.
From-SVN: r15894
1997-10-13 19:49:25 +00:00
Richard Kenner
ce0da87e49 (UNALIGNED_{SHORT,INT,DOUBLE_INT}_ASM_OP): Define.
From-SVN: r15831
1997-10-01 17:52:08 -04:00
Benjamin Kosnik
84b239a393 fixincludes: Fix sys/param.h so that MAXINT will not be redefined on HPUX.
* fixincludes: Fix sys/param.h so that MAXINT will not be redefined
        on HPUX.

From-SVN: r15829
1997-10-01 20:13:46 +00:00
Richard Kenner
74dee89306 (this_insn_cc0_mode): Initialize.
From-SVN: r15823
1997-10-01 08:08:18 -04:00
Richard Kenner
773067546c (RETURN_ADDR_RTX): Use FRAME arg, not ap.
From-SVN: r15822
1997-10-01 07:22:09 -04:00
Jim Wilson
196c2139eb (find_exception_handler_labels): Correct argument to free.
From-SVN: r15813
1997-09-30 16:19:38 -07:00
Mike Stump
e324d3c8fe c-decl.c (start_struct): Ensure that structs with forward declarations are in fact packed when...
* c-decl.c (start_struct): Ensure that structs with forward
	declarations are in fact packed when -fpack-struct is given.
	* stor-layout.c (layout_record): Ignore STRUCTURE_SIZE_BOUNDARY if
	we are packing a structure.  This allows a structure with only
	bytes to be aligned on a byte boundary and have no padding on a
	m68k.

From-SVN: r15810
1997-09-30 18:57:17 +00:00
Brendan Kehoe
9e0678c4fa except.c (find_exception_handler_labels): Free LABELS when we're done.
* except.c (find_exception_handler_labels): Free LABELS when we're
	done.

From-SVN: r15809
1997-09-30 14:27:48 -04:00
Paul Eggert
971fb3d80c (HOST_BITS_PER_WIDE_INT): Define only if not already defined.
From-SVN: r15805
1997-09-30 17:46:04 +00:00
Richard Kenner
3a3265658f (lang_options): Add new -W options.
From-SVN: r15800
1997-09-29 17:55:13 -04:00
Richard Kenner
f0d2806d1e (warn_implicit): Deleted.
(warn_implicit_int, mesg_implicit_function_declaration}): New vars.
(c_decode_option): For -Wimplicit, set both new variables.
Add -Wimplicit-function-declarations, -Wimplicit-int,
and -Werror-implicit-function-declaration.
(implicitly_declare, grokdeclarator): Use new flags.

From-SVN: r15799
1997-09-29 17:55:02 -04:00
Richard Kenner
926941a946 (check_format_info): Add check for scanf into constant object or via
constant pointer type.

From-SVN: r15798
1997-09-29 17:29:15 -04:00
Richard Kenner
babaf527e1 (beq): For registers and ints 0-255, use cmpeq+bne.
(bne): Likewise for cmpeq+beq.

From-SVN: r15797
1997-09-29 16:10:06 -04:00
Doug Evans
d77a38919e * reload1.c (reload_cse_simplify_set): Fix return values.
From-SVN: r15794
1997-09-29 19:57:58 +00:00
Ian Lance Taylor
f381888737 Use spawn if __CYGWIN32__
From-SVN: r15790
1997-09-29 16:28:20 +00:00
Richard Kenner
d21b51fe36 (notice_update_cc): Use reg_overlap_mentioned_p.
From-SVN: r15787
1997-09-29 08:21:32 -04:00
Jason Merrill
e96781594c (__throw): Fix thinko.
From-SVN: r15782
1997-09-29 02:02:49 +00:00
Mark Mitchell
e8b9d4ed9f cplus-dem.c (demangle_template): Add new parameter.
Sun Sep 28 12:00:52 1997  Mark Mitchell  <mmitchell@usa.net>

        * cplus-dem.c (demangle_template): Add new parameter.  Handle new
        template-function mangling.
        (consume_count_with_underscores): New function.
        (demangle_signature): Handle new name-mangling scheme.

From-SVN: r15779
1997-09-28 19:56:52 +00:00
Richard Kenner
f7bc43a975 (print_rtl_with_bb): Reformat messages about BB boundaries.
From-SVN: r15771
1997-09-28 13:00:38 -04:00
Richard Kenner
4595f333a4 (expand_builtin_dwarf_reg_size): Put in #ifdef TREE_CODE.
From-SVN: r15770
1997-09-28 11:59:31 -04:00
Richard Kenner
3952e7a648 (calls.o, profile.o): Depend on regs.h.
From-SVN: r15769
1997-09-28 11:59:18 -04:00
Richard Kenner
344dda5e24 Include regs.h.
From-SVN: r15768
1997-09-28 11:59:02 -04:00
Richard Kenner
6cc471ff70 (output_call_frame_info): Don't cast its result.
From-SVN: r15767
1997-09-28 11:19:05 -04:00
Richard Kenner
6296f8296b (get_file_function_name): Add decl.
From-SVN: r15766
1997-09-28 11:18:55 -04:00
Richard Kenner
96c87d07b9 (sub-makes): Pass value of LANGUAGES.
From-SVN: r15765
1997-09-28 10:58:19 -04:00
Richard Kenner
d4a41efc33 (SMALL_REGISTER_CLASSES): Default to 0.
From-SVN: r15764
1997-09-28 10:52:55 -04:00
Richard Kenner
b181e9470c (reload, scan_paradoxical_subregs): Remove #if test on SMALL_REGISTER_CLASSES.
(order_regs_for_reload, reload_as_needed): Likewise.
(choose_reload_regs): Likewise.
(merge_assigned_reloads): Declare unconditionally.

From-SVN: r15763
1997-09-28 10:51:59 -04:00
Richard Kenner
b10060f572 (push_secondary_reload, push_reload): Remove #if test on SMALL_REGISTER_CLASSES.
(push_secondary_reload, push_reload): Remove #if test on
SMALL_REGISTER_CLASSES.
(combine_reloads): Likewise.

From-SVN: r15762
1997-09-28 10:51:05 -04:00
Richard Kenner
7ce4abc27c (output_arc_profiler): Remove #if test on SMALL_REGISTER_CLASSES.
From-SVN: r15761
1997-09-28 10:50:20 -04:00
Richard Kenner
08ae8a58d3 (scan_loop, valid_initial_value_p): Remove #if test on SMALL_REGISTER_CLASSES.
From-SVN: r15760
1997-09-28 10:49:45 -04:00
Richard Kenner
ad8354a86b (optimize_reg_copy_1): Remove #if test on SMALL_REGISTER_CLASSES.
From-SVN: r15759
1997-09-28 10:49:26 -04:00
Richard Kenner
f4547809d2 (jump_optimize): Remove #if test on SMALL_REGISTER_CLASSES.
From-SVN: r15758
1997-09-28 10:49:03 -04:00
Richard Kenner
3d19b068e9 (expand_function_start): Remove #if test on SMALL_REGISTER_CLASSES.
From-SVN: r15757
1997-09-28 10:48:38 -04:00
Richard Kenner
b876f2f23c (canon_hash): Remove #if test on SMALL_REGISTER_CLASSES.
From-SVN: r15756
1997-09-28 10:48:18 -04:00
Richard Kenner
5925b9a4c1 (can_combine_p, combinable_i3pat, try_combine): Remove #if test on
SMALL_REGISTER_CLASSES.

From-SVN: r15755
1997-09-28 10:47:54 -04:00
Richard Kenner
818729e62d (prepare_call_address, expand_call): Remove #if test on SMALL_REGISTER_CLASSES.
From-SVN: r15754
1997-09-28 10:47:27 -04:00
Jason Merrill
a562f16ffd (expand_builtin):Add __builtin_dwarf_reg_size.
From-SVN: r15748
1997-09-27 18:05:25 +00:00
Jason Merrill
6418fe73cc (copy_reg): New fn.
(__throw): Use it.

From-SVN: r15747
1997-09-27 18:05:25 +00:00
Jason Merrill
10d553a7a8 Add __builtin_dwarf_reg_size.
From-SVN: r15746
1997-09-27 18:05:25 +00:00
Jason Merrill
591bb7f28f (built_in_function): Add __builtin_dwarf_reg_size.
From-SVN: r15745
1997-09-27 18:05:25 +00:00
Jason Merrill
8bd092245f (expand_builtin_dwarf_reg_size): New fn.
From-SVN: r15744
1997-09-27 18:05:25 +00:00
Jason Merrill
c19b833675 (init_decl_processing): Add __builtin_dwarf_reg_size.
From-SVN: r15743
1997-09-27 18:05:25 +00:00
Doug Evans
ccadb334ac Add vendor name.
From-SVN: r15737
1997-09-26 18:04:15 +00:00
Doug Evans
5c89d107b6 FIXME -> ???
Add vendor name.

From-SVN: r15736
1997-09-26 18:03:11 +00:00
Doug Evans
accc68ed8d FIXME -> ???.
Add vendor name.

From-SVN: r15735
1997-09-26 18:00:11 +00:00
Richard Kenner
abf42bdded (INCOMING_RETURN_ADDR_RTX, DWARF_FRAME_REGNUM): New macros.
(INCOMING_FRAME_SP_OFFSET): Likewise.

From-SVN: r15730
1997-09-26 10:27:19 -04:00
Richard Kenner
62f9b70885 (dwarf2.h): Include.
(output_function_prologue): Add dwarf2 support.

From-SVN: r15729
1997-09-26 10:27:04 -04:00
Richard Kenner
32d9f0e463 (dwarf2out_{do_frame,cfi_label,def_cfa}): New declarations.
(dwarf2out_{window_save,args_size,reg_save,return_save}): Likewise.
(dwarf2out_{return_reg,begin_prologue,end_epilogue}): Likewise.

From-SVN: r15728
1997-09-26 10:26:38 -04:00
Richard Kenner
d0fa809d34 Move inclusion of dwarf2.h down.
(dwarf2out_cfi_label): Don't declare here.

From-SVN: r15727
1997-09-26 10:25:49 -04:00
Richard Kenner
ef5198fe4f (gansidecl.h): New include, for PROTO.
From-SVN: r15726
1997-09-26 10:25:32 -04:00
Richard Kenner
7e9a02ac90 (copy_rtx_and_substitute, case ADDRESSOF): New case.
From-SVN: r15725
1997-09-26 09:04:15 -04:00
Richard Kenner
a1e02e942a (expand_inline_function): Make sure there is at least one insn that
can be used as an insertion point.

From-SVN: r15724
1997-09-26 09:00:11 -04:00
Richard Kenner
4c14a0a275 (build_binary_op): Warn about comparing signed vs unsigned if -W is
specified and -Wno-sign-compare is not.

From-SVN: r15723
1997-09-26 08:54:57 -04:00
Richard Kenner
7bb7214207 (warn_sign_compare): Initialize to -1.
(c_decode_option): -Wall no longer implies -Wsign-compare.

From-SVN: r15722
1997-09-26 08:54:36 -04:00
Jason Merrill
b90d97c075 s/flag_verbose_asm/flag_debug_asm/
From-SVN: r15712
1997-09-25 04:35:33 +00:00
Doug Evans
d7b45489c5 (DEFAULT_SPARC_ALIGN_FUNCS): Fix typo.
From-SVN: r15696
1997-09-24 23:46:09 +00:00
Doug Evans
f5eb0909ae (sparc_override_options): Add some comments regarding -malign-loops/jumps.
From-SVN: r15695
1997-09-24 23:38:11 +00:00
Doug Evans
0c0ef4bdf9 (get_pc_via_call): Renamed from get_pc_sp32.
(get_pc_via_rdpc): Renamed from get_pc_sp64.

From-SVN: r15694
1997-09-24 23:16:22 +00:00
Doug Evans
f0507d39f8 (finalize_pic): Update call to gen_get_pc_via_call.
From-SVN: r15693
1997-09-24 23:15:04 +00:00
Doug Evans
0cbd249334 sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
* sparc/sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
	(TARGET_OPTIONS): Add -malign-loops=, -malign-jumps=,
	-malign-functions=.
	(sparc_align_{loops,jumps,funcs}_string): Declare.
	(sparc_align_{loops,jumps,funcs}): Declare.
	(DEFAULT_SPARC_ALIGN_FUNCS): New macro.
	(FUNCTION_BOUNDARY): Use sparc_align_funcs.
	(STACK_BIAS): Define.
	(SPARC_SIMM*_P): Cast to unsigned HOST_WIDE_INT first, then perform
	test.
	(SPARC_SETHI_P): New macro.
	(CONST_OK_FOR_LETTER_P): Use it.
	(ASM_OUTPUT_ALIGN_CODE): Define.
	(ASM_OUTPUT_LOOP_ALIGN): Define.

From-SVN: r15692
1997-09-24 23:12:49 +00:00
Doug Evans
fd7514d931 sparc.c (sparc_align_{loops,jumps,funcs}_string): New globals.
* sparc/sparc.c (sparc_align_{loops,jumps,funcs}_string): New globals.
	(sparc_align_{loops,jumps,funcs}): New globals.
	(sparc_override_options): Handle -malign-loops=, -malign-jumps=,
	-malign-functions=.
	(move_operand): Use SPARC_SETHI_P.
	(arith_double_operand): Cast to unsigned HOST_WIDE_INT first, then
	perform test.
	(arith11_double_operand): Likewise.
	(arith10_double_operand): Likewise.
	(finalize_pic): Finish sparc64 support.
	(emit_move_sequence): Use SPARC_SETHI_P.  Simplify low part of
	64 bit constants if able.
	(output_fp_move_quad): Don't use fmovq unless TARGET_HARD_QUAD.
	(sparc_builtin_saveregs, sparc64 case): Don't save fp regs if
	! TARGET_FPU.

From-SVN: r15691
1997-09-24 23:12:18 +00:00
Doug Evans
9d8fd857c2 sparc.md (*): Use GEN_INT instead of gen_rtx.
* sparc/sparc.md (*): Use GEN_INT instead of gen_rtx.
	(get_pc_sp32): Use for sparc64 as well.
	(lo_sum_di_sp{32,64}): Fix handling on 64 bit hosts.
	(sethi_di_sp64_const): Likewise.
	(movtf_cc_sp64): Check TARGET_HARD_QUAD.
	(cmp_zero_extract_sp64): Use unsigned HOST_WIDE_INT in cast.
	(ashlsi3, ashldi3, ashrsi3, ashrdi3, lshrsi3, lshrdi3): Likewise.

From-SVN: r15690
1997-09-24 23:11:23 +00:00
Richard Kenner
63829751b7 (allocate_stack): Fix typo in last change.
From-SVN: r15688
1997-09-24 08:25:25 -04:00
Doug Evans
eb2b4a98bb (COMMENT_BEGIN): Delete.
From-SVN: r15686
1997-09-23 23:02:33 +00:00
Doug Evans
547f130f62 (sparc64-*-linux*): Recognize.
(sparc64-*-linux*): Recognize.  Add sparc/xm-sparc.h
to xm_file list on 32-bit sparc-linux.

From-SVN: r15684
1997-09-23 19:30:24 +00:00
Doug Evans
3cea5a1b7c Handle sparc64 as denoting 64-bit platform.
From-SVN: r15683
1997-09-23 19:11:51 +00:00
Doug Evans
d1445671d9 Include some standard headers if not inhibit_libc.
Don't include xm-sparc.h.

From-SVN: r15682
1997-09-23 18:56:39 +00:00
Doug Evans
9a2616876d Initial revision
From-SVN: r15681
1997-09-23 18:41:48 +00:00
No Author
730a7199ae This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r15680
1997-09-23 18:41:48 +00:00
No Author
1accb47251 This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r15676
1997-09-23 18:33:33 +00:00
Jason Merrill
fbe703ecb8 (final_end_function): Also do dwarf2 thing if DWARF2_DEBUGGING_INFO.
(final_end_function): Also do dwarf2 thing if
        DWARF2_DEBUGGING_INFO.
        (final_start_function): Likewise.

From-SVN: r15674
1997-09-23 15:32:13 +00:00
Richard Kenner
94a7e8fda0 (expand_divmod): If compute_mode is not same as mode...
(expand_divmod): If compute_mode is not same as mode, handle case
where convert_modes causes op1 to no longer be CONST_INT.

From-SVN: r15673
1997-09-23 06:55:38 -04:00
Jeff Law
b054f9fa03 Fix typo in last change.
From-SVN: r15663
1997-09-23 00:29:37 -06:00
Jim Wilson
f53762c153 (save_restore_insns): Only set RTX_FRAME_RELATED_P if store_p.
From-SVN: r15662
1997-09-22 21:58:32 -07:00
Richard Kenner
a3f45485f5 (computed_jump_p): Fix typo in last change.
From-SVN: r15659
1997-09-22 19:26:46 -04:00
Richard Kenner
ded3ee7f7e (CRTSTUFF_T_CFLAGS): Add -fPIC.
(CRTSTUFF_T_CFLAGS_S): Tweak for COFF.
(EXTRA_PARTS, TAROUTOPTS): Delete.
(libgcc1-elf, libgcc2-elf, libgcc-elf targets): Delete.
(MULTILIB_OPTIONS): Define.
(MULTILIB_DIRNAMES, MULTILIB_EXCEPTIONS): Likewise.
(MULTILIB_MATCHE, MULTILIB_EXTRA_OPTS): Likewise.

From-SVN: r15658
1997-09-22 18:26:24 -04:00
Richard Kenner
8b47759fe5 Make ELF default file format and add -mcoff/-melf..
(MULTILIB_DEFAULTS): Define.
(ASM_SPEC, CPP_SPEC): Handle -mcoff.
(STARTFILE_SPEC, ENDFILE_SPEC, LINK_SPEC): Likewise.
(LIBGCC_SPEC): Likewise.
(MASK_COFF, TARGET_COFF, TARGET_ELF): Define.
(SUBTARGET_SWITCHES): Add -mcoff and -melf.

From-SVN: r15657
1997-09-22 18:24:42 -04:00
Jeff Law
f7237c5d7b * reg-stack.c (find_blocks): Fix thinko in last change.
From-SVN: r15656
1997-09-22 14:48:29 -06:00
Richard Kenner
f1b9fe9aee (immed_double_const): Use NULL_RTX, not 0, in gen_rtx calls.
From-SVN: r15654
1997-09-22 16:27:26 -04:00
Richard Kenner
30267f7638 (schedule_insns): Use NULL_RTX, not 0, in gen_rtx calls.
From-SVN: r15653
1997-09-22 16:26:49 -04:00
Richard Kenner
7830d77982 (init_expr_once): Use NULL_RTX, not 0, in gen_rtx calls.
From-SVN: r15652
1997-09-22 16:26:09 -04:00
Richard Kenner
61f6f44603 (gen_label_rtx): Use NULL_RTX, not 0, in gen_rtx calls.
From-SVN: r15651
1997-09-22 16:25:43 -04:00
Richard Kenner
57aa4d0174 (cse_main): Use NULL_RTX, not 0, in gen_rtx calls.
From-SVN: r15650
1997-09-22 16:25:23 -04:00
Richard Kenner
440420ca61 (try_combine): Use NULL_RTX, not 0, in gen_rtx calls.
From-SVN: r15649
1997-09-22 16:25:08 -04:00
Richard Kenner
60e0cbd626 (INCOMING_FRAME_SP_OFFSET): Define as SPARC_STACK_BIAS.
From-SVN: r15648
1997-09-22 16:22:38 -04:00
Richard Kenner
144a5b84a1 (HANDLE_SYSV_PRAGMA): Define.
From-SVN: r15647
1997-09-22 16:13:20 -04:00
Richard Kenner
ec48c5ef06 (expand_end_bindings): Check DECL_NAME and DECL_ARTIFICIAL before
unused variable warning.

From-SVN: r15646
1997-09-22 16:02:00 -04:00
Richard Kenner
931c12008c (finish_decl): Set TREE_USED on decls if TREE_USED on type.
From-SVN: r15645
1997-09-22 16:01:47 -04:00
Richard Kenner
7ed1c12d04 (decl_attributes): Add support for TYPE_UNUSED on types.
From-SVN: r15644
1997-09-22 16:01:35 -04:00
Richard Kenner
8f857d7471 Formerly extend.texi.~117~
From-SVN: r15643
1997-09-22 16:00:59 -04:00
Richard Kenner
9050ffd420 (movstrhi): Fix (unused) pattern in define_expand.
From-SVN: r15642
1997-09-22 15:56:25 -04:00
Richard Kenner
4dd6ae6226 (movstrsi): Fix (unused) pattern in define_expand.
From-SVN: r15641
1997-09-22 15:56:08 -04:00
Richard Kenner
41e87827b8 (movstrsi): Use change_addres instead of making new MEM.
From-SVN: r15640
1997-09-22 15:55:49 -04:00
Richard Kenner
b00d768e16 (movstrqi): Use change_addres instead of making new MEM.
From-SVN: r15639
1997-09-22 15:54:32 -04:00
Richard Kenner
4488649ceb (allocate_stack): Use virtual_stack_dynamic for result.
From-SVN: r15638
1997-09-22 15:40:40 -04:00
Richard Kenner
fb5b4cd386 (FLOAT_STORE_FLAG_VALUE): Different for VAX and IEEE float.
From-SVN: r15637
1997-09-22 15:25:19 -04:00
Richard Kenner
5d54a84a54 (save_for_inline_{nocopy,copying}): Remove redundant assignment of
max_parm_reg.

From-SVN: r15636
1997-09-22 15:21:24 -04:00
Richard Kenner
31dca64868 (assign_parms): Make max_parm_reg handling more precise and make it
agree with size of parm_reg_stack_loc.

From-SVN: r15635
1997-09-22 15:21:08 -04:00
Richard Kenner
a0d965b03d (assign_parms): Properly set RTX_UNCHANGING_P for copy of parm.
From-SVN: r15634
1997-09-22 14:20:08 -04:00
Richard Kenner
b180c745b2 (copy_rtx_and_substitute...
(copy_rtx_and_substitute, case SET): Handle a SET_DEST of the virtual
fp or ap specially and undo the adjustment into the local area as
well.
(mark_stores): Don't wipe out map entries for virtual fp and ap.

From-SVN: r15633
1997-09-22 14:12:58 -04:00
Richard Kenner
fffce81456 (gen_lowpart): Handle ADDRESSOF.
From-SVN: r15632
1997-09-22 14:04:17 -04:00
Doug Evans
7d3bd0439e (replace_regs): Fix up lossage in last patch.
From-SVN: r15629
1997-09-22 17:35:42 +00:00
Jeff Law
608e78944f Opps. Forgot to check this in.
From-SVN: r15626
1997-09-22 10:24:14 -06:00
Jeff Law
8a725820c5 flow.c (jmp_uses_reg_or_mem): Deleted unused function.
* flow.c (jmp_uses_reg_or_mem): Deleted unused function.
        (find_basic_blocks): Use computed_jump_p to determine if a
        particular JUMP_INSN is a computed jump.
        * reg-stack.c (find_blocks): Use computed_jump_p to determine
        if a particular JUMP_INSN is a computed jump.
        * rtlanal.c (jmp_uses_reg_or_mem): New function.
        (computed_jump_p): Likewise.
        * rtl.h (computed_jump_p): Declare.
        * genattrtab.c (pc_rtx): Define and initialize.

From-SVN: r15618
1997-09-21 19:33:30 -06:00
Jeff Law
5f9fd8f370 cse.c (simplify_relational_operation): Set h0u just like h0s.
* cse.c (simplify_relational_operation): Set h0u just like h0s.
        Similarly for h1u and h1s.

From-SVN: r15617
1997-09-21 19:30:06 -06:00
Doug Evans
21275482a4 (instantiate_virtual_regs): Fix thinko in last patch.
From-SVN: r15612
1997-09-21 18:13:15 +00:00
Paul Eggert
7d66c98f29 (CPP_SPEC): Remove -D__STDC__=0; it's no longer needed now that
we have STDC_0_IN_SYSTEM_HEADERS.

From-SVN: r15611
1997-09-21 17:42:22 +00:00
Paul Eggert
4bbe970697 (subdirs_made): New var, to keep track of which subdirectories we've made (in reverse order).
(subdirs_made):  New var, to keep track of which
subdirectories we've made (in reverse order).  At the end,
attempt to rmdir them all, so that we don't create any empty
directories.

From-SVN: r15610
1997-09-21 17:30:15 +00:00
Paul Eggert
74842430a2 (STDC_0_IN_SYSTEM_HEADERS): New macro.
From-SVN: r15609
1997-09-21 17:30:15 +00:00
Paul Eggert
c696d91e9e (special_symbol): If STDC_0_IN_SYSTEM_HEADERS
is defined, expand __STDC__ to 0 in system headers.

From-SVN: r15608
1997-09-21 17:30:15 +00:00
Paul Eggert
a0225d22b3 (_MATH_H_WRAPPER): Define at the end of the wrapper...
(_MATH_H_WRAPPER):  Define at the end of the
wrapper, not the start, so that if #include_next gets another
instance of the wrapper, this will follow the #include_next
chain until we arrive at the real <math.h>.

From-SVN: r15607
1997-09-21 17:30:15 +00:00
Paul Eggert
3f3c098e52 Formerly extend.texi.~116~
From-SVN: r15606
1997-09-21 17:29:11 +00:00
Richard Kenner
84e4d77bcb (GO_IF_LEGITIMATE_ADDRESS): Respect -mdisable-indexing.
From-SVN: r15605
1997-09-21 10:02:05 -04:00
Richard Kenner
59fb6aad76 (move_operand): Respect -mdisable-indexing.
From-SVN: r15604
1997-09-21 10:00:22 -04:00
Richard Kenner
dab13a293b (purge_addressof_1): Don't convert (MEM (ADDRESSOF (REG))) to (SUBREG (REG)) on big endian machines.
(purge_addressof_1): Don't convert (MEM (ADDRESSOF (REG)))
to (SUBREG (REG)) on big endian machines.
Don't fall through to substitute the inner (REG) unchanged
when the above conversion cannot be validated.

From-SVN: r15603
1997-09-21 09:29:21 -04:00
Michael Meissner
6530eb23f8 fix typo
From-SVN: r15602
1997-09-21 12:35:04 +00:00
Jason Merrill
9864eca3f0 (__deregister_frame): Check properly for initialized object.
From-SVN: r15600
1997-09-20 23:36:15 +00:00
Jason Merrill
f1af852e43 (instantiate_virtual_regs): Instantiate
parm_reg_stack_locs.

From-SVN: r15599
1997-09-20 23:20:30 +00:00
Doug Evans
07ea019382 sparc.c (output_function_prologue): Use it.
* sparc/sparc.c (output_function_prologue): Use it.
	(sparc_flat_output_function_prologue): Likewise.
	(sparc_flat_output_function_epilogue): Likewise.

From-SVN: r15597
1997-09-20 07:15:33 +00:00
Doug Evans
d666e23032 (ASM_COMMENT_START): Define.
From-SVN: r15596
1997-09-20 07:09:39 +00:00
Doug Evans
e3956c4a18 (ASM_COMMENT_START): Delete.
From-SVN: r15595
1997-09-20 07:07:39 +00:00
Jeff Law
59c2aa54f6 xm-mot3300.h (alloca): Properly declare if __STDC__.
* m68k/xm-mot3300.h (alloca): Properly declare if __STDC__.
        * mips/mips.h (alloca): Likewise.
        * rs6000/xm-rs6000.h (alloca): Likewise.
        * rs6000/xm-sysv4.h: Likewise.

From-SVN: r15592
1997-09-19 19:41:56 -06:00
Jeff Law
e478798639 * loop.c (strength_reduce): Fix typo.
From-SVN: r15591
1997-09-19 19:41:08 -06:00
Doug Evans
d4e9bfa86f (find_use_as_address): Delete decl.
From-SVN: r15588
1997-09-20 00:10:18 +00:00
Richard Kenner
b4df318018 (thread_jumps): Check can_reverse_comparison_p before threading a
reversed-condition jump.

From-SVN: r15587
1997-09-19 08:36:11 -04:00
Richard Kenner
c78fbfb058 (FLOAT_H_TEST): New var.
(float.h-nat): Make it empty if we can use the system float.h without change.
(enquire.o): Define SYS_FLOAT_H_WRAP=1 if we can build a wrapper
around the system <float.h>.  Remove include/float.h before compiling.
(stmp-headers): Remove include/float.h if we would just be installing
an empty file (which is a placeholder that stands for no file).

From-SVN: r15586
1997-09-19 08:30:46 -04:00
Richard Kenner
0b8547d26d (SYS_FLOAT_H_WRAP): New macro.
Include "float.h" if SYS_FLOAT_H_WRAP is nonzero.
(f_define): New argument `req'.
(main): Output `#include_next <float.h>' if wrapping float.h.
(i_define, f_define): Don't output anything if wrapping float.h
and if the system defn is already correct.  Put other value tests
inside `#ifdef VERIFY'.
(UNDEFINED): New macro.
(I_MAX, I_MIN, U_MAX, F_RADIX, F_MANT_DIG, F_DIG, F_ROUNDS):
Define even if VERIFY isn't defined, because SYS_FLOAT_H_WRAP may need
these values.  Give them the value UNDEFINED if not already defined.
(F_EPSILON, F_MIN_EXP, F_MIN, F_MIN_10_EXP, F_MAX_EXP): Likewise.
(F_MAX, F_MAX_10_EXP): Likewise.
(FPROP): Prefer system float.h definition of F_ROUNDS.
Pass system values to f_define.

From-SVN: r15585
1997-09-19 08:29:12 -04:00
Richard Kenner
d59c27af9a (struct directive, directive_table): Remove members traditional_comments, pass_thru.
(struct directive, directive_table): Remove members
traditional_comments, pass_thru.  All code using struct directive now
uses `type' member instead.
(IS_INCLUDE_DIRECTIVE_TYPE): New macro.
(handle_directive, cpp_handle_options): Add support for new -dI option.

From-SVN: r15584
1997-09-19 08:16:07 -04:00
Richard Kenner
a318cd25d8 (struct cpp_options): New member dump_includes.
From-SVN: r15583
1997-09-19 08:15:27 -04:00
Richard Kenner
1718551e54 (dump_includes): New variable.
(struct directive, directive_table): Remove members angle_brackets,
traditional_comments, pass_thru; all code using struct directive
now uses `type' member instead.
(IS_INCLUDE_DIRECTIVE_TYPE): New macro.
(main, handle_directive): Add support for new -dI option.
(do_ident): Avoid unnecessary alloca.
(do_pragma): Avoid unnecessary comparison to newline.

From-SVN: r15582
1997-09-19 08:15:11 -04:00
Richard Kenner
4c1ef97328 (expand_builtin_{extract,set}_return_addr): New macros.
From-SVN: r15581
1997-09-19 07:57:15 -04:00
Richard Kenner
cd17d9bcd4 (gen_exp): Remove decl.
From-SVN: r15580
1997-09-19 07:47:27 -04:00
Richard Kenner
bfcf66e535 (simplify_by_alternatives): Pre-process out decl.
From-SVN: r15579
1997-09-19 07:47:15 -04:00
Richard Kenner
37ac06761e (pcstring_used, pcfinclude): Delete unused declarations.
(check_preconditions, print_containing_files, pipe_closed): Likewise.
(dump_defn_1, dump_arg_n, make_undef): Likewise.
(trigraph_pcp): Pre-process out decl.
(quote_string): Cast CPP_PWRITTEN macro to char * for sprintf.
(output_line_command): Likewise.
(macro_expand): Likewise.
(do_line): Cast atoi argument to char *.

From-SVN: r15578
1997-09-19 07:47:03 -04:00
Richard Kenner
8518073d2e (emit-rtl.o, integrate.o, jump.o, unroll.o): Depend on recog.h.
From-SVN: r15577
1997-09-19 07:29:38 -04:00
Richard Kenner
92b53ed523 Include recog.h.
From-SVN: r15576
1997-09-19 07:29:16 -04:00
Richard Kenner
fc76375a40 (note_stores, reg_set_p): Don't declare.
(rtx_addr_can_trap_p): Add prototype, make static.
(reg_set_p_1): Add declaration for parameter pat.

From-SVN: r15575
1997-09-19 07:28:32 -04:00
Richard Kenner
fd995453f1 (struct rtvec_def): Make num_elem an integer.
(PUT_NUM_ELEM): Delete cast to unsigned.
(rtx_unstable_p, rtx_varies_p, reg_mentioned_p): Declare.
(reg_{referenced,used_between,referenced_between}_p: Likewise.
({reg_set,modified,no_labels}_between_p, modified_in_p): Likewise.
(reg_set_p, refers_to_regno_p, reg_overlap_mentioned_p): Likewise.
(note_stores, rtx_equal_p, dead_or_set{,_regno}_p): Likewise.
(remove_note, side_effects_p, volatile_{refs,insn}_p): Likewise.
(may_trap_p, inequality_comparison_p): Likewise.

From-SVN: r15574
1997-09-19 07:28:17 -04:00
Richard Kenner
508cc7163c (strict_memory_address_p): Don't declare here.
From-SVN: r15573
1997-09-19 07:27:57 -04:00
Richard Kenner
474b0d56d4 (init_recog, init_recog_no_volatile): Declare.
(check_asm_operands, constrain_operands, memory_address_p): Likewise.
(strict_memory_address_p, validate_replace_rtx): Likewise.
(reg_fits_class_p, find_single_use, general_operand): Likewise.
(address_operand, register_operand, scratch_operand): Likewise.
(immediate_operand, const_int_operand, const_double_operand): Likewise.
(nonimmediate_operand, nonmemory_operand, push_operand): Likewise.
(memory_operand, indirect_operand, mode_independent_operand): Likewise.
(comparison_operator, offsettable_{,nonstrict_}memref_p): Likewise.
(offsettable_address_p, mode_dependent_address_p, recog): Likewise.
(add_clobbers): Likewise.

From-SVN: r15572
1997-09-19 07:27:41 -04:00
Richard Kenner
275167b5b8 (strict_memory_address_p, memory_address_p): Don't declare.
(find_single_use_1): Add prototype.

From-SVN: r15571
1997-09-19 07:27:18 -04:00
Richard Kenner
59fd69d8b7 (real_value_truncate): Add proper prototype.
(target_isnan, target_isinf, target_negative, debug_real): Declare.
(assemble_real): Likewise.

From-SVN: r15570
1997-09-19 07:27:03 -04:00
Richard Kenner
d653aadf8d ({save,restore}_machine_status): Add proper prototype.
({save,restore}_{tree,eh,stmt,expr,emit,storage}_status): Declare.

From-SVN: r15569
1997-09-19 07:26:21 -04:00
Richard Kenner
db11e76729 (clear_storage): Don't return without a value.
From-SVN: r15568
1997-09-19 07:26:03 -04:00
Richard Kenner
6f3ed581bd (struct function, save_eh_status, restore_eh_status): Don't declare.
From-SVN: r15567
1997-09-19 07:25:19 -04:00
Richard Kenner
6ec0251c70 (basic): Elminate dangling else warning.
From-SVN: r15566
1997-09-19 07:24:58 -04:00
Richard Kenner
cbd9def548 Don't munge headers for POSIX and XOPEN, as this is too error-prone.
(ADD_MISSING_POSIX, ADD_MISSING_XOPEN): New macros, normally undefed.
(POSIX1_SYMBOL, POSIX2_SYMBOL): Now 0 unless ADD_MISSING_POSIX.
(XOPEN_SYMBOL, XOPEN_EXTENDED_SYMBOL): Now 0 unless ADD_MISSING_XOPEN.
(main): Ignore symbols whose flags are 0.

From-SVN: r15565
1997-09-19 06:52:20 -04:00
Jeff Law
6221841f53 v850.c (compute_register_save_size): Correct register number.
* v850.c (compute_register_save_size): Correct register
        number.
        * v850.md (save_interrupt, return_interrupt): Correct
        register number.
        * v850/lib1funcs.asm (save_interrupt): Correct register number.
        (return_interrupt): Use stack pointer, not element pointer.

From-SVN: r15551
1997-09-18 17:21:31 -06:00
Jason Merrill
b82e3b74f8 (__throw): Subtract 1 from return address.
(find_exception_handler): Don't change PC here.  Compare end with >.

From-SVN: r15549
1997-09-18 22:58:15 +00:00
Jason Merrill
1c868f7e4e * final.c (final_scan_insn): Hand BARRIERs off to the dwarf2 code.
From-SVN: r15548
1997-09-18 22:58:15 +00:00
Jason Merrill
2231c04847 dwarf2out.c (dwarf2out_frame_debug): Pass the whole insn along.
* dwarf2out.c (dwarf2out_frame_debug): Pass the whole insn along.
        (dwarf2out_stack_adjust): A BARRIER resets the args space to 0.

From-SVN: r15547
1997-09-18 22:58:15 +00:00
Jason Merrill
4d6f2381c8 * except.c (end_eh_unwinder): Subtract 1 from return address.
From-SVN: r15546
1997-09-18 22:58:15 +00:00
Brendan Kehoe
7b24255f26 configure.in: Make sure to create the stage* and include symbolic links in each subdirectory.
* configure.in: Make sure to create the stage* and include
        symbolic links in each subdirectory.

From-SVN: r15542
1997-09-18 14:27:41 -04:00
Joern Rennecke
dce826967c (LOCAL): Define.
(whole file): Use it.

From-SVN: r15541
1997-09-18 18:20:14 +01:00
Richard Kenner
f140ab6dfb (collect_execute): Specify name of new file when
redirecting stdout/stderr.

From-SVN: r15540
1997-09-18 09:52:23 -04:00
Richard Kenner
afeb93a2bf (__enable_execute_stack): Provide for sysV88 too.
From-SVN: r15539
1997-09-18 09:23:38 -04:00
Richard Kenner
bfc75317af (INITIALIZE_TRAMPOLINE) Define.
From-SVN: r15538
1997-09-18 09:23:24 -04:00
Jeff Law
56351e030f pa.md (reload_peepholes): Don't allow addresses with side effects for the memory operand.
* pa.md (reload_peepholes): Don't allow addresses with side
        effects for the memory operand.

From-SVN: r15537
1997-09-18 01:52:51 -06:00
Jason Merrill
764af6ad9b (find_exception_handler): Subtract one from our PC when looking for a handler...
(find_exception_handler): Subtract one from our PC when
        looking for a handler, to avoid hitting the beginning of the next
        region.

From-SVN: r15533
1997-09-18 01:20:30 +00:00
Jason Merrill
4e95c0d72a (expand_builtin_set_return_addr_reg): Use force_operand.
From-SVN: r15532
1997-09-18 01:20:30 +00:00
Jeff Law
b7a8ee5a35 abi64.h (LONG_MAX_SPEC): Define.
* mips/abi64.h (LONG_MAX_SPEC): Define.
        * mips.h (LONG_MAX_SPEC): Define.
        (CPP_SPEC): Include long_max_spec.
        (EXTRA_SPECS): Include long_max_spec.

From-SVN: r15530
1997-09-17 18:31:32 -06:00
Doug Evans
757d5fbed7 (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Preface ascii version with `~'
to denote "about" (or "approximately").

From-SVN: r15527
1997-09-17 23:04:38 +00:00
Doug Evans
941ccbd4cc (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Print ascii form as well.
From-SVN: r15526
1997-09-17 21:28:01 +00:00
Paul Eggert
470814e903 (AC_CHECK_HEADERS): Add inttypes.h, limits.h.
({sparc,i[3456]86,powerpcle}-*-solaris2*):
Use fixinc.math for fixincludes.

From-SVN: r15525
1997-09-17 21:15:45 +00:00
Paul Eggert
e4299eade1 <limits.h>: Include if HAVE_LIMITS_H.
<limits.h>: Include if HAVE_LIMITS_H.
(HOST_WIDE_INT): Use intmax_t or long long if available.
(CHAR_BIT): New macro.
(HOST_BITS_PER_WIDE_INT): Define in terms of CHAR_BIT and sizeof.

From-SVN: r15524
1997-09-17 21:15:45 +00:00
Paul Eggert
209904cab6 (HAVE_STDLIB_H): Do not define any more; now autoconfed.
<limits.h>: Include if HAVE_LIMITS_H.
(HOST_WIDE_INT): Use intmax_t or long long if available.
(unsigned_HOST_WIDE_INT, CHAR_BIT): New macros.
(HOST_BITS_PER_WIDE_INT): Define in terms of CHAR_BIT and sizeof.
(MAX_CHAR_TYPE_MASK, MAX_CHAR_TYPE_MASK): Rewrite so that we don't use
HOST_BITS_PER_WIDE_INT in a preprocessor expression, since it now
uses sizeof.

From-SVN: r15523
1997-09-17 21:15:45 +00:00
Paul Eggert
1063ad8403 (PWDCMD, ORIGDIR, LINKS): Remove.
Remove duplicate test for missing $1.
Don't cd to $INPUT.
Build wrapper around system <math.h> instead of copying it;
this is better if the system <math.h> is updated later by a software
patch or upgrade.

From-SVN: r15522
1997-09-17 21:15:45 +00:00
Paul Eggert
1405bd8a70 (HAVE_STDLIB_H, HAVE_UNISTD_H):
Do not define any more; now autoconfed.
<limits.h>: Include if HAVE_LIMITS_H.
(HOST_BITS_PER_WIDE_INT): Remove.
(HOST_WIDE_INT): Use intmax_t or long long if available.
(pcfinclude): Use size_t, not HOST_WIDE_INT, for cast from pointer;
this is less likely to annoy the compiler.

From-SVN: r15521
1997-09-17 21:15:45 +00:00
Paul Eggert
603db72382 <limits.h>: Include if HAVE_LIMITS_H.
<limits.h>: Include if HAVE_LIMITS_H.
(HOST_WIDE_INT): Use intmax_t or long long if available.
(HOST_BITS_PER_WIDE_INT): Remove.

From-SVN: r15520
1997-09-17 21:15:45 +00:00
Jeff Law
ba4a5fa0f8 * v850.c (construct_save_jarl): Fix thinko in last change.
From-SVN: r15519
1997-09-17 14:12:16 -06:00
Doug Evans
29efc0f960 (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Delete, use sparc.h's copies.
From-SVN: r15517
1997-09-17 19:04:07 +00:00
Richard Kenner
073afa1a44 (allocate_stack): Alter in accordance with new operand.
From-SVN: r15515
1997-09-17 14:08:15 -04:00
Richard Kenner
19cc091d0e (allocate_stack): Alter in accordance with new operand.
From-SVN: r15513
1997-09-17 14:01:37 -04:00
Richard Kenner
98d45206eb (expand_builtin_apply): Use allocate_dynamic_stack_space to push a
block of memory onto the stack.

From-SVN: r15512
1997-09-17 13:59:15 -04:00
Richard Kenner
7ca9451822 (allocate_dynamic_stack_space): Make allocate_stack pass 'target' as
an extra operand.

From-SVN: r15511
1997-09-17 13:58:56 -04:00
Richard Kenner
28e271d767 (sys_siglist, SYS_SYGLIST_DECLARED): Define.
From-SVN: r15510
1997-09-17 13:34:41 -04:00
Richard Kenner
296a54d074 (native): Correct dependency to auto-config.h from config.h.
From-SVN: r15509
1997-09-17 13:27:02 -04:00
Jason Merrill
5563fd5111 (find_exception_handler): Not found is -1.
From-SVN: r15503
1997-09-17 01:54:04 +00:00
Jason Merrill
84f9986204 (expand_inline_function): Move expand_start_bindings
after expanding the arguments.

From-SVN: r15498
1997-09-16 21:16:01 +00:00
Jason Merrill
f0ea10b269 Initial revision
From-SVN: r15495
1997-09-16 20:39:45 +00:00
No Author
0745e35bba This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r15494
1997-09-16 20:39:45 +00:00
Jason Merrill
07c407fc77 Merge
From-SVN: r15493
1997-09-16 20:39:45 +00:00
Jason Merrill
7ee6e2a40b Pass the SYMBOL_REF to
gen_prologue_{get_pc,set_got}.

From-SVN: r15490
1997-09-16 17:01:03 +00:00
Jason Merrill
ddec936c5e *** empty log message ***
From-SVN: r15489
1997-09-16 17:00:19 +00:00
Richard Kenner
db7ed8067b (make_range): Correctly handle cases of converting from unsigned to
signed type.

From-SVN: r15485
1997-09-16 08:27:36 -04:00
Richard Kenner
e97ff21d11 (flush_addressof): New function.
From-SVN: r15484
1997-09-16 08:24:38 -04:00
Richard Kenner
7ed13b0d62 (num_sign_bit_copies): If asking about wider mode, treat like
paradoxical subreg.

From-SVN: r15483
1997-09-16 07:33:11 -04:00
Jeff Law
2fca6de719 cse.c (simplify_relational_operation): If MODE specifies a mode wider than HOST_WIDE_INT...
* cse.c (simplify_relational_operation): If MODE specifies a
        mode wider than HOST_WIDE_INT, then the high word of a CONST_INT
        is derived from the sign bit of the low word.

From-SVN: r15481
1997-09-16 00:39:50 -06:00
Jeff Law
5b69e1e9ac v850.c (register_is_ok_for_epilogue, [...]): New functions.
* v850.c (register_is_ok_for_epilogue,
        pattern_is_ok_for_epilogue, construct_restore_jr,
        pattern_is_ok_for_prologue, construct_save_jarl): New functions.

        * v850.h (pattern_is_ok_for_prologue,
        pattern_is_ok_for_epilogue, register_is_ok_for_epilogue): New
        predicates.

        * v850.md: Replace prologue and epilogue patterns with a
        match_parallel pattern.

        * v850.c (output_move_single_unsigned): Cope with zero
        extending and moving between registers at the same time.

From-SVN: r15479
1997-09-16 00:17:09 -06:00
Jeff Law
f55289982a fixinc.math: New file to fix math.h on some systems.
* fixinc.math: New file to fix math.h on some systems.
        * configure.in (*-*-freebsd*, *-*-netbsd*): Use fixinc.math on these
        systems.

From-SVN: r15468
1997-09-15 22:07:00 -06:00
Jeff Law
5a34430085 Initial revision
From-SVN: r15467
1997-09-15 21:59:49 -06:00
No Author
48f154194d This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r15466
1997-09-16 03:59:49 +00:00
Jason Merrill
ee6e725aea x
From-SVN: r15462
1997-09-15 23:31:18 +00:00
Joern Rennecke
4e06f22303 (casesi_0): Reduce functionality, exclude insns from mova onwards.
(casesi_0): Reduce functionality, exclude insns from
mova onwards.  Changed expander caller.
(casesi_worker_0): New insn.
(casesi_worker_0+[12]): New define_splits.
(casesi_worker): Need no gen_* function.
(casesi): Use casesi_worker_0 instead of casesi_worker.

From-SVN: r15461
1997-09-16 00:01:10 +01:00
Joern Rennecke
26b4c80488 (update_flow_info) When looking if to set found_split_dest
or found_orig_dest, look at all parts of a PARALLEL.

(update_flow_info): Don't pass SCRATCH to dead_or_set_p.

From-SVN: r15460
1997-09-15 23:59:56 +01:00
Jason Merrill
23b0ddb4be x
From-SVN: r15457
1997-09-15 22:25:31 +00:00
No Author
fad381b924 This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r15456
1997-09-15 22:25:31 +00:00
Brendan Kehoe
530fe0f637 except.c (find_exception_handler_labels): Use xmalloc instead of alloca...
* except.c (find_exception_handler_labels): Use xmalloc instead of
        alloca, since MAX_LABELNO - MIN_LABELNO can be more than 1 million
        in some cases.

From-SVN: r15451
1997-09-15 15:04:34 -04:00
Paul Eggert
65830ec60b (xrealloc): Declare first arg as void *, not char *, to avoid type mismatch.
(xrealloc): Declare first arg as void *, not char *, to avoid
type mismatch.
(cpp_lex): Cast 2nd arg of cpp_parse_escape from const char ** to
char ** to avoid type mismatch.

From-SVN: r15434
1997-09-14 06:07:32 +00:00
Paul Eggert
6d2c007a85 (PARAMS): Fix misspelling of __STDC__.
(cpp_get_token): Arg is cpp_reader *, not struct parse_marker *.

From-SVN: r15433
1997-09-14 06:07:32 +00:00
Paul Eggert
d79f8f4503 (cpp_fatal, cpp_file_line_for_message, cpp_hash_cleanup, cpp_message,
cpp_print_containing_files): Add extern decls for functions not
yielding int.
(copy_rest_of_line): Fix typo that prevented recognition of
C++ style comments.
(output_line_command, special_symbol): Use %ld for long, not %d.

From-SVN: r15432
1997-09-14 06:07:32 +00:00
Doug Evans
525bcfaf0e (bitmpa_print): Don't use STDIO_PROTO.
From-SVN: r15428
1997-09-12 20:53:55 +00:00
Jason Merrill
38b5dfcff9 x
From-SVN: r15427
1997-09-12 20:53:30 +00:00
Jeff Law
a0218a0afc *** empty log message ***
From-SVN: r15426
1997-09-12 02:23:04 -06:00
Jim Wilson
131f62a9b1 (contains_replace_regs): New function.
(update_equiv_regs): When adding a REG_EQUIV note for a set of a MEM,
verify that there is no existing REG_EQUIV note, and add a call to
contains_place_regs.

From-SVN: r15417
1997-09-11 15:39:43 -07:00
Jim Wilson
1d5bc5aaad (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Add
__HPUX_ASM__ versions.

From-SVN: r15416
1997-09-11 15:36:20 -07:00
Stan Cox
bf33ed3c9d (override_options): Don't set TARGET_SCHEDULE_PROLOGUE
From-SVN: r15414
1997-09-11 19:54:03 +00:00
Paul Eggert
b5eb5b58b2 automatically generated from GPLed version
From-SVN: r15412
1997-09-11 18:13:19 +00:00
Ulrich Drepper
48bba22fab automatically generated from GPLed version
From-SVN: r15411
1997-09-11 18:13:18 +00:00
Paul Eggert
0329f777d9 automatically generated from GPLed version
From-SVN: r15410
1997-09-11 18:13:17 +00:00
Ulrich Drepper
6800c10caf automatically generated from GPLed version
From-SVN: r15409
1997-09-11 18:13:16 +00:00
Jason Merrill
c071156d62 x
From-SVN: r15405
1997-09-11 04:21:50 +00:00
Michael Meissner
1f226ca28a print basic block information on later passes; Use separate obstack for bitmap links; Add new iterator macro
From-SVN: r15396
1997-09-11 02:03:49 +00:00
Jason Merrill
6a9bc8a8e9 x
From-SVN: r15395
1997-09-11 01:09:03 +00:00
Joern Rennecke
37e6dc3b96 (addr_diff_vec_adjust): Properly propagate considered
address changes through alignments.

From-SVN: r15390
1997-09-10 22:53:10 +01:00
Jeff Law
c1e1432c25 typos.
From-SVN: r15271
1997-09-10 15:16:20 -06:00
Jeff Law
f6a5b52b86 config.sub: Use "amigaos" instread of "amigados".
* config.sub: Use "amigaos" instread of "amigados".  Still
        recognize "amigados" for backward compatability.

From-SVN: r15270
1997-09-10 15:13:00 -06:00
Per Bothner
1ef1b8dd9c * stor-layout.c (layout_type): Simplify special BOOLEAN_TYPE handling.
From-SVN: r15267
1997-09-10 13:12:48 -07:00
Jason Merrill
3f3ca11575 x
From-SVN: r15266
1997-09-10 20:10:58 +00:00
Jason Merrill
823b15d925 x
From-SVN: r15265
1997-09-10 19:46:37 +00:00
Paul Eggert
509fe13e74 (scan_decls): Don't ignore the first CPP_NAME in a declaration,
so that we see the `extern' in `extern int errno;' and handle
errno crrectly.

From-SVN: r15261
1997-09-10 18:12:24 +00:00
Paul Eggert
f117da6690 (recognized_extern): Use name_length when comparing string,
so that we recognize `errno' correctly.

From-SVN: r15260
1997-09-10 18:05:47 +00:00
Jason Merrill
c23475b7ec x
From-SVN: r15259
1997-09-10 18:03:45 +00:00
No Author
5b1202c25e This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r15258
1997-09-10 18:03:45 +00:00
Jason Merrill
bcb7dc48bb Formerly tm.texi.~257~
From-SVN: r15254
1997-09-10 17:59:14 +00:00
Jeff Law
14681a6741 expr.c (do_jump_by_parts_equality_rtx): Don't clobber the source operand when performing an IOR of the parts.
* expr.c (do_jump_by_parts_equality_rtx): Don't clobber the
        source operand when performing an IOR of the parts.

        * expr.c (emit_block_move): Always return a value.

From-SVN: r15253
1997-09-10 11:42:56 -06:00
Jason Merrill
6731f1b32b x
From-SVN: r15251
1997-09-10 15:55:47 +00:00
Jeff Law
5c6c4a223d * xm-m88k.h (USG): Only define if it hasn't already been defined.
From-SVN: r15250
1997-09-10 09:25:18 -06:00
Jeff Law
977cfcc0b5 * i386.h (CPP_CPU_DEFAULT): Avoid using #elif.
From-SVN: r15249
1997-09-10 09:22:21 -06:00
Jeff Law
7715b146af expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
* expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.

From-SVN: r15248
1997-09-10 09:14:30 -06:00
Jeff Law
3da1310ca3 final.c (shorten_branches): Remove last change for ADDR_VEC alignment computation.
* final.c (shorten_branches): Remove last change for ADDR_VEC
        alignment computation.   During first pass, assume worst
        possible alignment for ADDR_VEC and ADDR_VEC_DIFF insns.

From-SVN: r15247
1997-09-10 08:48:28 -06:00
Richard Kenner
7405b69853 (emit_stack_save, emit_stack_restore): Correctly handle
HAVE_{save,restore}_stack_* evaluating to 0.

From-SVN: r15246
1997-09-10 09:33:18 -04:00
Richard Kenner
8ed255f367 (sdbout.o): Add dependency on insn-config.h.
From-SVN: r15245
1997-09-10 09:27:43 -04:00
Richard Kenner
a8ec95bce8 (dectoe, etodec, todec): Declare proto if DEC is defined
(dectoe, etodec, todec): Declare proto if DEC is defined
(ibmtoe, etoibm, toibm): Declare proto if IBM is defined

From-SVN: r15244
1997-09-10 09:24:54 -04:00
Richard Kenner
4173c6f8bf (replace_call_address): Pre-process out prototype decl.
From-SVN: r15243
1997-09-10 09:24:37 -04:00
Richard Kenner
cb7c7f049f (merge_assigned_reloads): Declare prototype only if
SMALL_REGISTER_CLASSES is defined.

From-SVN: r15242
1997-09-10 09:24:24 -04:00
Richard Kenner
ef4acd74a9 (leaf_renumber_regs, alter_cond): Declare prototype only if
LEAF_REGISTERS is defined.

From-SVN: r15241
1997-09-10 09:24:02 -04:00
Richard Kenner
24d8bcbcc2 (birthing_insn_p): Rename prototype decl from birthing_insn.
From-SVN: r15240
1997-09-10 09:23:42 -04:00
Richard Kenner
ef9f2a855b (out_file): Emit definition to config.status.
From-SVN: r15239
1997-09-10 09:13:47 -04:00
Richard Kenner
5cc17cbef1 (shorten_branches): Don't count the lengths of deleted instructions.
From-SVN: r15238
1997-09-10 08:39:35 -04:00
Richard Kenner
ee81bc5a89 (shorten_branches): Fix alignment calculation.
From-SVN: r15237
1997-09-10 08:37:54 -04:00
Richard Kenner
db8528b416 (cpp_start_read): Make known_suffixes static.
From-SVN: r15236
1997-09-10 08:34:08 -04:00
Richard Kenner
07b61eb71d (print_operand_address) [MOTOROLA]: When compiling with -fpic (not
-fPIC) force the GOT offset to 16 bits.

From-SVN: r15235
1997-09-10 08:27:03 -04:00
Richard Kenner
a2a1233dc9 (convert_move): Add missing use of trunctqtf2.
From-SVN: r15234
1997-09-10 08:22:47 -04:00
Richard Kenner
a3b3180e2e (eh_outer_context): Do masking using expand_and.
From-SVN: r15233
1997-09-10 08:17:07 -04:00
Richard Kenner
cba53c407d (sh*-*-rtems*): New target.
From-SVN: r15232
1997-09-10 07:52:19 -04:00
Richard Kenner
021c249f9c (TARGET_SWITCHES: Call SUBTARGET_SWITCHES.
(SUBTARGET_SWITCHES): Provide default definition.

From-SVN: r15231
1997-09-10 07:52:04 -04:00
Richard Kenner
5a3ff6f2db Clean up comments and copyright notice.
From-SVN: r15230
1997-09-10 07:51:33 -04:00
Richard Kenner
cd77257079 (subtarget_switches): Removed -mrtems subtarget_switch.
From-SVN: r15229
1997-09-10 07:50:59 -04:00
Richard Kenner
497fcc4830 Delete junk comments.
From-SVN: r15228
1997-09-10 07:49:04 -04:00
Richard Kenner
c4fbdc7bff ({LIB,LINK}_SPEC): Check for -mwindows, not -windows.
From-SVN: r15227
1997-09-10 07:04:40 -04:00
Richard Kenner
601fd10a65 (ASM_OUTPUT_SECTION): Clear NAME if overlaid.
From-SVN: r15226
1997-09-10 07:02:36 -04:00
Richard Kenner
afc9ca8cf9 (default_conversion): Likewise.
From-SVN: r15225
1997-09-10 07:00:08 -04:00
Richard Kenner
5d0e670737 (unary_expr): Test DECL_C_BIT_FIELD, not DECL_BIT_FIELD.
From-SVN: r15224
1997-09-10 06:59:55 -04:00
Richard Kenner
c984b31314 (contains_placeholder_p, substitute_in_expr): Handle placeholders
inside args of CALL_EXPR (and hence in TREE_LIST).

From-SVN: r15223
1997-09-10 06:37:03 -04:00
Richard Kenner
3f32cee14f (expand_expr, case PLACEHOLDER_EXPR): Check all expressions in
placeholder_list.

From-SVN: r15222
1997-09-10 06:33:43 -04:00
Jeff Law
b3cd7c9610 Add missing libgcc2 exception in copyright notice.
From-SVN: r15206
1997-09-09 17:35:19 -06:00
Doug Evans
02274155aa Add arc support.
From-SVN: r15204
1997-09-09 23:32:49 +00:00
Doug Evans
fe227228bd Add ARC support.
From-SVN: r15203
1997-09-09 22:32:47 +00:00
Doug Evans
dc4d587625 (arc-*-elf*): Add.
From-SVN: r15202
1997-09-09 22:26:46 +00:00
Doug Evans
382f0b42fb Recognize ARC cpu.
From-SVN: r15201
1997-09-09 22:23:48 +00:00
No Author
367620aab2 This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r15199
1997-09-09 22:21:05 +00:00
Doug Evans
baad5284bf (USER_H): Add va-arc.h.
From-SVN: r15196
1997-09-09 22:18:01 +00:00
Doug Evans
a6171f19f2 Update fsf address.
From-SVN: r15195
1997-09-09 22:08:51 +00:00
Doug Evans
f1547fbe41 Update FSf address.
From-SVN: r15194
1997-09-09 22:02:52 +00:00
Doug Evans
697914dbea Update FSF address.
From-SVN: r15193
1997-09-09 22:01:56 +00:00
Doug Evans
dd67cd4240 Initial revision
From-SVN: r15192
1997-09-09 21:58:24 +00:00
No Author
a92039d168 This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r15191
1997-09-09 21:58:24 +00:00
Jason Merrill
59fe9ccdc5 x
From-SVN: r15182
1997-09-09 19:36:16 +00:00
Jeff Law
79e434964a v850.h (ASM_SPEC): Pass on target processor.
* v850.h (ASM_SPEC): Pass on target processor.
        (CPP_PREDEFINES): Only define if not already specified.
        (TARGET_VERSION): Only define if not already specified.
        (MASK_CPU, MASK_V850, MASK_DEFAULT): Bits to specify target
        processor.
        (EXTRA_SWITCHES): Extra entries in the switches array.
        (TARGET_DEFAULT): Set default target processor.

From-SVN: r15179
1997-09-09 09:01:50 -06:00
Richard Kenner
0bf206bdde (alpha*-*-*): Support pca56 and ev6.
From-SVN: r15178
1997-09-09 10:14:29 -04:00
Richard Kenner
4ee6b65d53 (alpha): Replace CPU-determining program with one that's more precise and also supports pca56 and ev6.
(alpha): Replace CPU-determining program with one that's more precise
and also supports pca56 and ev6.  Handle those in returned name.

From-SVN: r15177
1997-09-09 10:10:23 -04:00
Richard Kenner
d8fe11e9b3 (output_call_frame_info): Call named_section.
From-SVN: r15176
1997-09-09 09:48:44 -04:00
Richard Kenner
4875991e45 (named_section): Set in section after writing directive.
From-SVN: r15175
1997-09-09 09:48:16 -04:00
Jason Merrill
4933f26fdd x
From-SVN: r15173
1997-09-08 20:40:45 +00:00
Jim Wilson
c619010b87 (main): Change #elif to #else/#ifdef
From-SVN: r15172
1997-09-08 12:06:08 -07:00
Jim Wilson
89099edd6b (TARGET_LIBGCC2_CFLAGS): Define to -fPIC.
From-SVN: r15171
1997-09-08 11:57:49 -07:00
Richard Kenner
698359b322 (alpha*-dec-osf*): Set MASK_SUPPORT_ARCH for >= 4.0B.
Rename MASK_BYTE_OPS to MASK_BWX.

From-SVN: r15167
1997-09-08 09:51:09 -04:00
Richard Kenner
3f3262938a Rename TARGET_BYTE_OPS to TARGET_BWX.
(cpu attr): Add "ev6".
(ev5 function units): Use for ev6 as well, for now.
(ffsdi2): New define_expand and define_insn, for TARGET_CIX.
(sqrt[sd]f2): New patterns, for TARGET_CIX.
(s{min,max}[qh]i3): New patterns, for TARGET_MAX.
(movsi): Use ldf/lsf when appropriate, instead of lds/sts.
(mov[sd]i): Add use of ftio/itof for TARGET_CIX.

From-SVN: r15166
1997-09-08 09:50:52 -04:00
Richard Kenner
c000244246 (input_operand): Rename TARGET_BYTE_OPS to TARGET_BWX.
(override_options): Likewise; also add new CPU types and subset flags.

From-SVN: r15165
1997-09-08 09:50:28 -04:00
Richard Kenner
f205cd2ac5 (processor_type): Add EV6.
({TARGET,MASK}_BWX): Renamed from _BYTE_OPS.
({TARGET,MASK}_{CIX,MAX}): New macros.
(MASK_CPU_EV5): Change bit number.
(MASK_CPU_EV6, {TARGET,MASK}_SUPPORT_ARCH): New macros.
(TARGET_OPTIONS): Rename "byte" to "bwx" and add "cix" and "max".
(MINIMUM_ATOMIC_ALIGNMENT): Rename TARGET_BYTE_OPS to TARGET_BWX.
(SECONDARY_{INPUT,OUTPUT}_RELOAD_CLASS, ASM_FILE_START): Likewise.
(SECONDARY_MEMORY_NEEDED): Not needed if CIX.
(ASM_FILE_START): Only write if TARGET_SUPPORT_ARCH.
Add "pca56" and "ev6".

From-SVN: r15164
1997-09-08 09:50:04 -04:00
Richard Kenner
2aaa90b89c (STANDARD_INCLUDE_DIR): New macros.
(STARTFILE_SPEC, PATH_SEPARATOR): Likewise.

From-SVN: r15163
1997-09-08 08:58:08 -04:00
Richard Kenner
4b77ae6410 (LN): Add new symbol.
(FLAGS_TO_PASS): Pass it down.
(stage[1-4]-start): Use $(LN), not "ln -s".

From-SVN: r15162
1997-09-08 08:53:41 -04:00
Richard Kenner
960a31ca58 (AC_PROG_LN_S): Remove; unneeded.
(*cygwin32*, *mingw32*): Default prefix to /usr.
(symbolic_link): Set to "cp -p" if no "ln -s"; add AC_SUBST.
(configure.lang call): Change remaining use of config.h to auto-conf.h.

From-SVN: r15161
1997-09-08 08:53:17 -04:00
Richard Kenner
c758e1adfb (dwarf2out_cfi_label): Add declaration.
(save_regs, output_function_prologue): Remove cast for it.
(sparc_flat_{save_restore,output_function_prologue): Likewise.
({save,restore}_regs): No longer inline.

From-SVN: r15160
1997-09-08 08:43:43 -04:00
Richard Kenner
ad894ddabd Remove unneeded declarations of `optimize'.
From-SVN: r15159
1997-09-08 08:43:22 -04:00
Richard Kenner
d22996f903 (flag_omit_frame_pointer, frame_pointer_needed, optimize):
Remove declarations: no longer needed.

From-SVN: r15158
1997-09-08 08:42:24 -04:00
Richard Kenner
67cb1ca1c7 (alpha:OSF1:*:*): For V4.0, get the letter suffix.
From-SVN: r15157
1997-09-08 08:29:17 -04:00
Jim Wilson
c10c01864a (LINK_SPEC): Handle -mjX and -mrp switches.
From-SVN: r15153
1997-09-08 01:24:17 -07:00
Jim Wilson
16b6cafa39 (nonlocal_goto_receiver): Define.
From-SVN: r15152
1997-09-08 01:18:27 -07:00
Jim Wilson
c36a203649 (output_arc_profiler): Check next_insert_after for non NULL before deferencing it.
(output_arc_profiler): Check next_insert_after for non
NULL before deferencing it.
(output_func_start_profiler): Set DECL_EXTERNAL to zero.

From-SVN: r15151
1997-09-08 01:15:12 -07:00
Jim Wilson
0158e767de (calculate_giv_inc): Handle increment with code PLUS.
From-SVN: r15150
1997-09-08 01:10:11 -07:00
Jim Wilson
be67bd3c7b (PREFERRED_RELOAD_CLASS): Return NO_REGS if NO_REGS
is passed in.

From-SVN: r15149
1997-09-08 01:07:52 -07:00
Jim Wilson
1c5d63f151 (gen_lowpart_common): Add code to convert CONST_INT to
SFmode for 64 bit hosts.

From-SVN: r15148
1997-09-08 01:06:13 -07:00
Jim Wilson
58e3744f95 (output_arc_profiler): Verify next_insert_after is an
INSN before and after skipping a stack pop.

From-SVN: r15147
1997-09-08 01:00:37 -07:00
Jim Wilson
27e9276a32 Add _VA_MIPS_H_ENUM ifdef/define/endif.
From-SVN: r15146
1997-09-08 00:58:25 -07:00
Jim Wilson
f47d13b886 (iorsi_zexthi_ashl16): Disable.
From-SVN: r15145
1997-09-08 00:14:16 -07:00
Jim Wilson
bb92731718 (mark_constants): Don't look inside CONST_DOUBLEs.
From-SVN: r15144
1997-09-08 00:06:46 -07:00
Jason Merrill
aa78c29ea1 x
From-SVN: r15140
1997-09-08 02:24:40 +00:00
Paul Eggert
40d82922aa (std_include_table): Remove bogus entry for popen under stdio.h with ANSI_SYMBOL.
(std_include_table): Remove bogus entry for popen under stdio.h
with ANSI_SYMBOL.  popen is a POSIX2_SYMBOL.  This error sometimes
caused fix-header to create a stdio.h that equaled /usr/include/stdio.h.

From-SVN: r15132
1997-09-07 10:30:58 +00:00
Doug Evans
a4ae1b89e3 whitespace and indentation cleanup.
From-SVN: r15124
1997-09-05 22:03:54 +00:00
Joern Rennecke
792f2abe35 (movsf_ie+1): Typo fix.
From-SVN: r15122
1997-09-05 22:19:39 +01:00
Paul D. Smith
8c405ea0cf Changes for GNU make 3.75.93.
From-SVN: r15119
1997-09-05 21:01:56 +00:00
Joern Rennecke
1d1505fdf7 Fix corrupted files.
From-SVN: r15118
1997-09-05 21:06:37 +01:00
Jeff Law
8b288ea677 v850: New directory for v850 port.
* v850: New directory for v850 port.
        * v850/lib1funcs.asm: New file.
        * t-v850, v850.c, v850.h, v850.md, xm-v850.h: New files.
        * ginclude/va-v850.h: New file.
        * varargs.h, stdarg.h: Include va-mn10200.h.
        * configure.in (mn10200-*-*): New target.
        * Makefile.in (USER_H): Add va-mn10200.h.

From-SVN: r15113
1997-09-05 12:11:13 -06:00
Jeff Law
4a1775952f * config.sub: Recognize v850-elf.
From-SVN: r15109
1997-09-05 12:08:34 -06:00
Jeff Law
3577f98496 v850: New directory for v850 port.
* v850: New directory for v850 port.
        * v850/lib1funcs.asm: New file.
        * t-v850, v850.c, v850.h, v850.md, xm-v850.h: New files.
        * ginclude/va-v850.h: New file.
        * varargs.h, stdarg.h: Include va-mn10200.h.
        * configure.in (mn10200-*-*): New target.
        * Makefile.in (USER_H): Add va-mn10200.h.

From-SVN: r15108
1997-09-05 11:55:55 -06:00
Jeff Law
0ec8fbb499 Remove CYGNUS LOCAL markers.
From-SVN: r15107
1997-09-05 11:48:22 -06:00
Jeff Law
bfc8b4565f Initial revision
From-SVN: r15106
1997-09-05 11:43:52 -06:00
No Author
ad6d71ca7e This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r15105
1997-09-05 17:43:52 +00:00
David Edelsohn
e2b05b4baa fix FUSED_MADD patch to include DFmode
From-SVN: r15095
1997-09-05 03:49:00 +00:00
Ulrich Drepper
a0af5be776 automatically generated from GPLed version
From-SVN: r15094
1997-09-05 02:58:19 +00:00
Paul Eggert
8770c5aefb automatically generated from GPLed version
From-SVN: r15093
1997-09-05 02:58:17 +00:00
Paul Eggert
8ca7fc6449 automatically generated from GPLed version
From-SVN: r15092
1997-09-05 02:58:17 +00:00
Doug Evans
2114378511 (RTX_COSTS): For MULT give v9 a cost of 25 insns.
From-SVN: r15089
1997-09-05 00:05:39 +00:00
Doug Evans
48a70ae604 Add scheduling parameters for ultrasparc.
From-SVN: r15087
1997-09-04 23:53:22 +00:00
Miles Bader
cae6c92200 automatically generated from GPLed version
From-SVN: r15084
1997-09-04 21:02:45 +00:00
Joern Rennecke
85eed43723 (UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP): Define.
From-SVN: r15070
1997-09-04 01:56:06 +01:00
Joern Rennecke
f82012a2d7 Initial revision
From-SVN: r15069
1997-09-04 01:50:49 +01:00
No Author
466ee2633f This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r15068
1997-09-04 00:50:49 +00:00
Stan Cox
8abee44171 (subst_stack_regs): Pop the stack register for a computed goto
From-SVN: r15066
1997-09-03 21:34:34 +00:00
Stan Cox
0de5b68813 (ix86_expand_epilogue): Emit blockage instruction when pic.
From-SVN: r15065
1997-09-03 21:22:17 +00:00
Jeff Law
5417662829 * pa.md (reload peepholes): Fix typo in last change.
From-SVN: r15060
1997-09-03 11:23:37 -06:00
Joern Rennecke
029fd84623 (movsi_ie): Move t/r alternative after r/r alternative.
From-SVN: r15050
1997-09-03 04:01:50 +01:00
Jeff Law
c29778a69b cccp.c (sys_errlist): Remove special 4.4bsd declaration.
* cccp.c (sys_errlist): Remove special 4.4bsd declaration.
        * collect2.c (sys_errlist): Likewise.
        * cpplib.c (sys_errlist): Likewise.
        * gcc.c (sys_errlist): Likewise.
        * protoize.c (sys_errlist): Likewise.
        * configure.in: Check for strerror.
        * xm-freebsd.h (HAVE_STRERROR): Remove definition.
        * xm-gnu.h (HAVE_STRERROR): Likewise.
        * xm-linux.h (HAVE_STRERROR): Likewise.
        * xm-netbsd.h (HAVE_STRERROR): Likewise.
        * xm-bsd386.h (HAVE_STRERROR): Likewise.
        * xm-cygwin32.h (HAVE_STRERROR): Likewise.
        * xm-dos.h (HAVE_STRERROR): Likewise.
        * xm-mingw32.h (HAVE_STRERROR): Likewise.
        * xm-pa.h (HAVE_STRERROR): Likewise.
        * xm-papro.h (HAVE_STRERROR): Likewise.
        * xm-sysv4.h (HAVE_STRERROR): Likewise.

From-SVN: r15049
1997-09-02 20:55:58 -06:00
Jeff Law
d9da5e9eec collect2.c (SYS_SIGLIST_DECLARED): Renamed from DONT_DECLARE_SYS_SIGLIST.
* collect2.c (SYS_SIGLIST_DECLARED): Renamed from
        DONT_DECLARE_SYS_SIGLIST.
        * mips-tfile.c (SYS_SIGLIST_DECLARED): Likewise.
        * xm-linux.h (DONT_DECLARE_SYS_SIGLIST): Delete definition.
        * xm-freebsd.h (DONT_DECLARE_SYS_SIGLIST): Likewise.
        * xm-bsd386.h (DONT_DECLARE_SYS_SIGLIST): Likewise.
        * xm-sysv4.h (DONT_DECLARE_SYS_SIGLIST): Likewise.
        * xm-sol2.h (DONT_DECLARE_SYS_SIGLIST): Likewise.
        * configure.in: Check for sys_siglist declaration.

From-SVN: r15048
1997-09-02 20:46:45 -06:00
Jeff Law
39e17992f7 Makefile.in (libgcc2.a): Add missing "else true" clause.
* Makefile.in (libgcc2.a): Add missing "else true" clause.
        (stage1-start): Likewise.
        (stage2-start): Likewise.
        (stage3-start): Likewise.
        (stage4-start): Likewise.

From-SVN: r15047
1997-09-02 20:37:41 -06:00
Jeff Law
29af19724f mn10200.h (INITIALIZE_TRAMPOLINE): PC relative instructions are relative to the next instruction...
* mn10200.h (INITIALIZE_TRAMPOLINE): PC relative instructions
        are relative to the next instruction, not the current instruction.

From-SVN: r15044
1997-09-02 18:47:17 -06:00
Jason Merrill
08274477b2 x
From-SVN: r15039
1997-09-02 21:16:43 +00:00
Jason Merrill
ef3daede75 x
From-SVN: r15038
1997-09-02 21:13:25 +00:00
Ian Lance Taylor
5cff72feff Fixincludes patches for HP/UX 10.20.
From-SVN: r15033
1997-09-02 17:43:57 +00:00
Richard Kenner
cc36c19670 (ROUND_TYPE_ALIGN): Don't blow up if no fields.
From-SVN: r15032
1997-09-02 09:28:27 -04:00
Jason Merrill
a5f4224060 x
From-SVN: r15031
1997-09-02 07:17:21 +00:00
Jeff Law
14678a8868 pa.c (restore_unscaled_index_insn_codes): New function.
* pa.c (restore_unscaled_index_insn_codes): New function.
        (record_unscaled_index_insn_codes): Likewise.
        (output_function_prologue): Call restore_unscaled_index_insn_codes.
        (output_function_epilogue): Free memory for unscaled_index_insn_codes.
        (pa_reorg): Call record_unscaled_index_insn_codes.

From-SVN: r15030
1997-09-01 23:37:08 -06:00
Joern Rennecke
5a7b4c85ea (casesi_jump_1, casesi_jump2): Generate expanders.
(casesi_jump): Delete.
(casesi) Use gen_casesi_jump_1 and gen_casesi_jump2 instead of
gen_casesi_jump.

From-SVN: r15021
1997-09-01 19:45:41 +01:00
Richard Kenner
b64d7fc1ec (auto-config.h): New rule; was config.h.
(distclean): Remove auto-config.h, not config2.h.

From-SVN: r15020
1997-09-01 14:43:36 -04:00
Richard Kenner
7869110399 Build auto-config.h, not config.h, from autoconf data.
Add auto-conf.h in front of all other host_xm_file entries.
Make config.h, not config2.h, from host_xm_file.

From-SVN: r15019
1997-09-01 14:43:21 -04:00
Richard Kenner
9c4ead7973 Remove include of config2.h.
From-SVN: r15018
1997-09-01 14:43:08 -04:00
Richard Kenner
975c267ea7 ({sparc,i[3456]86,powerpcle}-*-solaris2*): Set fixincludes=Makefile.in.
From-SVN: r15017
1997-09-01 14:36:34 -04:00
Richard Kenner
160eeaefb0 (CPP_SPEC): Add -D__STDC__=0 unless -ansi or -traditional, for
compatibility with Sun's practice.

From-SVN: r15016
1997-09-01 14:36:12 -04:00
Richard Kenner
218c40bfdc (config.status): Depend on version.c.
From-SVN: r15015
1997-09-01 14:08:21 -04:00
Richard Kenner
a2e33b0d31 (do_jump_by_parts_equality_rtx): Try to do by IOR of all the words.
From-SVN: r15014
1997-09-01 13:47:58 -04:00
Richard Kenner
df918e6f45 (TARGET_LIBGCC2_CFLAGS): New definition.
(LIBGCC2_CFLAGS): Deleted.

From-SVN: r15012
1997-09-01 13:07:35 -04:00
Jeff Law
71fedf1d49 mips.md (movstrsi_internal[23]): Set insn type to "store" to get more accurate schedules.
* mips.md (movstrsi_internal[23]): Set insn type to "store" to
        get more accurate schedules.

From-SVN: r15009
1997-09-01 09:03:57 -06:00
Jeff Law
d08ed41351 pa.md (reload_peepholes): Make sure operand is a REG before examining REGNO.
* pa.md (reload_peepholes): Make sure operand is a REG before
        examining REGNO.  Allow general registers too.

From-SVN: r15008
1997-09-01 09:01:17 -06:00
Paul Eggert
b9e6ca5921 (EMULONG): Correct typo in spelling of HOST_BITS_PER_LONGLONG.
From-SVN: r15005
1997-08-31 21:12:21 +00:00
Doug Evans
a6054f16e0 reload1.c (reload_cse_no_longer_dead): Don't pass incremented regno to SET_HARD_REG_BIT, it can be evaluated twice.
* reload1.c (reload_cse_no_longer_dead): Don't pass incremented regno
	to SET_HARD_REG_BIT, it can be evaluated twice.

From-SVN: r14991
1997-08-28 16:34:40 +00:00
Joern Rennecke
34f7339286 (ADJUST_COST): Lower cost of non-address sfunc dependencies.
Adjust cost of load_si / pcload_si insns when not used for call.
(enum reg_class): Move GENERAL_REGS after FPUL_REGS.
(REG_CLASS_NAMES, REG_CLASS_CONTENTS): Likewise.
(REGISTER_MOVE_COST): Add costs for fpul <-> mac, pr moves.
Fix to match default cost in regclass.  Move to T reg not costly.
When checking for GENERAL_REGS, check for R0_REGS too.
(INITIALIZE_TRAMPOLINE): Include code for constant parts.
(SHIFT_COUNT_TRUNCATED): Not true for TARGET_SH3.
(CPP_SPEC): Define __sh1__ if no specific cpu is selected.
(FUNCTION_BOUNDARY): Align to cache line boundary.
(optimize, sh_addr_diff_vec_mode, machine_dependent_reorg): Declare.
(addr_diff_vec_adjust, code_for_indirect_jump_scratch): Declare.
(short_cbranch_p, med_branch_p, braf_branch_p, align_length): Declare.
(output_ieee_ccmpeq, output_branchy_insn, sfunc_uses_reg): Declare.
(ASM_OUTPUT_ADDR_DIFF_ELT): Depends on sh_addr_diff_vec_mode.
(PREDICATE_CODES): Add braf_label_ref_operand and register_operand.
(IEEE_BIT, TAGET_IEEE, LOCAL_LABEL_PREFIX, ASSEMBLER_DIALECT): Define.
(CACHE_LOG, enum mdep_reorg_phase_e, TRAMPOLINE_ALIGNMENT): Define.
(SH_DYNAMIC_SHIFT_COST): Define.
(TARGET_SWITCHES): Remove -m0 entry.  Add -mieee, -mno-ieee.
(OVERRIDE_OPTIONS): sh_cpu defaults to CPU_SH1.
Initialize sh_addr_diff_vec_mode.
(REG_ALLOC_ORDER): Move FP0 behind FP7.
Move all FP registers in front of the general registers.
(SECONDARY_OUTPUT_RELOAD_CLASS): Add case for MAC_REGS / PR_REGS.
When checking for GENERAL_REGS, check for R0_REGS too.
Fix direction of compares to {FIR,LA}ST_FP_REG.
(SECONDARY_INPUT_RELOAD_CLASS): check for fp_one_operand.
(ASM_OUTPUT_ALIGN_CODE, ASM_OUTPUT_LOOP_ALIGN, SH0_BIT): Delete.
(TARGET_SH0, PUSH_ROUNDING, TRAMPOLINE_TEMPLATE): Delete.
(TRAMPOLINE_ALIGN): Delete.
(processor_type): Remove PROCESSOR_SH0.
(ADJUST_INSN_LENGTH): Remove check for preceding BARRIER.
Adjust ADDR_DIFF_VECs.  Add code for alignment instructions.
Check if insn needing a delay slot is already inside a SEQUENCE.
(INITIAL_ELIMINATION_OFFSET, REGNO_REG_CLASS): Proper bracketing.
(PREFERRED_RELOAD_CLASS, SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
(SECONDARY_INPUT_RELOAD_CLASS, LIBCALL_VALUE, ROUND_ADVANCE): Likewise.
(FUNCTION_ARG, FUNCTION_ARG_PARTIAL_NREGS, FUNCTION_PROFILER): Likewise.
(FUNCTION_EPILOGUE, RETURN_ADDR_RTX, REGNO_OK_FOR_INDEX_P): Likewise.
(EXTRA_CONSTRAINT_Q, MODE_DISP_OK_4, GO_IF_LEGITIMATE_INDEX): Likewise.
(GO_IF_LEGITIMATE_ADDRESS, LEGITIMIZE_ADDRESS, CONST_COSTS): Likewise.
(REGISTER_MOVE_COST, ASM_OUTPUT_CONSTRUCTOR): Likewise.
(ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Likewise.
(ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP, ASM_OUTPUT_LABEL): Likewise.
(ASM_OUTPUT_ALIGN),  ASM_DECLARE_FUNCTION_NAME): Likewise.
(ASM_GLOBALIZE_LABEL, ASM_OUTPUT_CASE_LABEL): Likewise.
(ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_VEC_ELT) Likewise.
(ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, ASM_OUTPUT_INT): Likewise.
(ASM_OUTPUT_SHORT, ASM_OUTPUT_CHAR, ASM_OUTPUT_BYTE): Likewise.
(ASM_OUTPUT_SKIP, FINAL_PRESCAN_INSN, PRINT_OPERAND): Likewise.
(PRINT_OPERAND_ADDRESS, HANDLE_PRAGMA, ADJUST_INSN_LENGTH): Likewise.
(PROMOTE_MODE): Likewise.
(ASM_GENERATE_INTERNAL_LABEL): Use LOCAL_LABEL_PREFIX.
(ASM_OUTPUT_INTERNAL_LABEL): Use %L.

From-SVN: r14983
1997-08-28 01:15:18 +01:00
Joern Rennecke
038d1a1cc9 (rotlsi3_16): Named insn.
(rotlsi3): Rewritten to use superoptimizer patterns.
(adddi3, subdi3, ashrsi2_16, ashrsi2_31): Always split.
(movsi_i, movsi_ie): replace t/z alternative with t/r alternative.
Use pcload_si and load_si insn types.
(adddi3+1, subdi3+1, ashrsi2_16+1, ashrsi2_31+1) New define_splits.
(addc, subc, ashlsi_c): New insns.
(attribute "type"): New values dyn_shift, load_si, pcload_si, fmove,
jump_ind, arith3 and arith3b.
(function_unit "fp"): Take fmove into account.
(function_unit "int"): Uses one cycle for !dyn_shift.
(function_unit "memory"): Special case for load_si and pcload_si.
(attribute "in_delay_slot): handle pcload_si.
(cmpgtdi_t, cmpgedi_t, cmpgeudi_t, cmpgtudi_t): Type arith3.
(cmpsi+1, cmpeqdi_t) Type arith3b.
(movsf_ie, alternatives f/fGH/X, f/y/X, y/f/X): Type fmove.
(extendsidi2): Delete.
(cmpeqsi_t-2): Delete. (Redundant with movt.)
(*rotlhi3_8) Name.
(iorsi3, rotlsi3_1, rotlsi3_31, rotlsi3_16, (*rotlhi3_8): Type arith.
(ashlsi3_k, ashlhi3_ki, ashrsi2_16, ashrsi2_31, lshrsi3_m): Likewise.
(lshrsi3_k, lshrhi3_m, lshrhi3_k, ashldi3_k, lshrdi3_k): Likewise.
(ashrdi3_k, xtrct_left, xtrct_right, dect, mova, movt): Likewise.
(movt): Likewise.
(ashlsi3_d, ashrsi3_d, lshrsi3_d): Type dyn_shift.
(indirect_jump_scratch, *casesi_jump_1, *casesi_jump_2): Type jump_ind.
(ashlsi3, ashlsi3_n, lshrsi3, lshrsi3_n): Use sh_dynamicalize_shift_p.
(movsf_ie+1, movsf_ie+2): Exchange.
(cmpeqdi_t-1, cmpeqdi_t, cmpgtdi_t, cmpgedi_t): New insns.
(cmpgeudi_t, cmpgtudi_t, movsi_i_lowpart, ieee_ccmpeqsf_t): Likewise.
(cmpdi, movnegt): New define_expands.
(movsi_ie): Add y,y alternative.
(sge): Use it for ! TARGET_IEEE.  Use special code for TARGET_IEEE.
(sle): Use sge.
(align_4, casesi_jump): Now define_expand.
(casesi_0, addr_diff_vec_adjust, align_log): New patterns.
(*casesi_jump_[12]): Likewise.
(casesi): Use casesi_0 and casesi_jump.
(casesi_worker): Depends on the mode used for the table.
(define_delay for cbranches):  Test TARGET_SH2.
Changed all callers of from_compare.
(attribute "length"): Take use of braf and scratch registers into
account.
(indirect_jump_scratch, block_branch_redirect): New patterns.
(jump): Call output_far_jump for any jump larger than 4 bytes.
(inverse_branch_true, inverse_branch_false): Remove.
(bne, blt, ble, bltu, bleu): Canonicalize.
(attribute "cpu"): Remove "sh0" alternative.

From-SVN: r14982
1997-08-28 01:14:14 +01:00
Joern Rennecke
618513a1a1 (sfunc_uses_reg): No longer static.
Check for SImode inside the USE.
(shiftcosts, expand_ashiftrt, shl_sext_kind): Use SH_DYNAMIC_SHIFT_COST.
(sh_dynamicalize_shift_p, output_branchy_insn): New functions.
(output_ieee_ccmpeq, mova_p, cache_align_p, fixup_aligns): Likewise.
(branch_offset, short_cbranch_p, med_branch_p): Likewise.
(braf_branch_p, align_length, fixup_addr_diff_vecs): Likewise.
(addr_diff_vec_adjust, get_dest_uid, gen_far_branch): Likewise.
(split_branches, regs_used, gen_block_redirect): Likewise.
(from_compare): Can't compare non-zero DImode constant directly.
Emit special code for TARGET_SH3E floating point with code == GE.
Force 0. into a register for SH3E.
(print_operand): Add ','.
Emit the actual comparison instruction.
(sh_builtin_saveregs): Save floating point registers in order that
allows pre-decrement.
(find_barrier): New arguments num_mova and mova.  Changed caller.
When rewinding to before a mova, also restore the last found barrier.
Branch is now known to be shortened.
Prefer barriers where no new alignment is needed.
More generic alignment for cache lines.
Add checks for pieces of code that use more table space than their
own size.
Fix up the barrier we return so that the alignment will always be
after the table.
Remove limit adjustments for table alignment.
Handle PARALLELs correctly.
(machine_dependent_reorg): Add extra pass to split insns.
Don't scan instructions twice for broken moves.
Calculate insn length, call fixup_addr_diff_vecs.
Call split_branches.
Add alignment for loops and after BARRIERs.
Initialize max_uid_before_fixup_addr_diff_vecs.
Advance mdep_reorg_phase.
Clear insn_addresses.
(output_far_jump): Use braf and/or pre-allocated scratch register
when possible.
(expand_ashiftrt): Truncate shift count.
(push_regs): Push PR last.
(sh_expand_epilogue): Pop PR first.
(code_for_indirect_jump_scratch, mdep_reorg_phase): New variables.
(uid_align, uid_align_max): Likewise.
(max_uid_before_fixup_addr_diff_vecs, sh_addr_diff_vec_mode): Likewise.
(braf_label_ref_operand): New predicate.
(initial_elimination_offset): calculate offset from
RETURN_ADDRESS_POINTER_REGNUM starting with total_saved_regs_space.
(output_branch): Expect out-of-range condbranches to have been split.

From-SVN: r14981
1997-08-28 01:13:08 +01:00
Joern Rennecke
09289d6438 (___ashrsi3, ___ashlsi3, ___lshrsi3):
Truncate shift count.  Use braf if not SH1.

From-SVN: r14980
1997-08-28 01:10:51 +01:00
Joern Rennecke
f38e81c3b8 (LINK_SPEC): Use shlelf.
(USER_LABEL_PREFIX, LOCAL_LABEL_PREFIX, ASM_FILE_START): Redefine.
From Fred Fish:
(ASM_OUTPUT_LABELREF): Use %U.
(ASM_GENERATE_INTERNAL_LABEL): Use LOCAL_LABEL_PREFIX.
(ASM_OUTPUT_INTERNAL_LABEL, ASM_OUTPUT_SOURCE_LINE): Use %L.

From-SVN: r14979
1997-08-28 01:09:31 +01:00
Joern Rennecke
22513f214e (__va_rounded_size): Delete.
(__LITTLE_ENDIAN_P, __SCALAR_TYPE, __PASS_AS_FLOAT): Define.
(va_arg): Unify big and little endian code.
Optimization for small integers.

From-SVN: r14978
1997-08-28 00:56:54 +01:00
Jim Wilson
31b0d2daf8 (iorsi3_internal): Readd ! TARGET_5200 check lost in
last change.

From-SVN: r14973
1997-08-27 14:10:05 -07:00
Jeff Law
c03191865f reorg.c (dbr_schedule): Allow current_function_return_rtx to be something other than a REG.
* reorg.c (dbr_schedule): Allow current_function_return_rtx
        to be something other than a REG.
        * function.c (expand_function_end): Fix current_function_return_rtx
        if it was a pseudo.

From-SVN: r14971
1997-08-27 13:53:49 -06:00
Joern Rennecke
bc9dc21e35 (dwarfout_start_new_source_file): Strip leading '*'s from label names.
From-SVN: r14970
1997-08-27 20:19:39 +01:00
Jim Wilson
1d25785427 (find_reloads, case '0'): Reject matching a non-offsettable
address where an offsettable address is required.

From-SVN: r14968
1997-08-27 11:32:12 -07:00
Jeff Law
1df9bb0360 t-freebsd (USER_H): Include EXTRA_HEADERS and LANG_EXTRA_HEADERS.
* t-freebsd (USER_H): Include EXTRA_HEADERS and LANG_EXTRA_HEADERS.
        * x-netbsd: Likewise
        * x-dgux (USER_H): Include EXTRA_HEADERS and LANG_EXTRA_HEADERS
        (INSTALL_HEADERS): Delete.
        * x-dguxbcs: Likewise.
        * x-hp3bsd44: Likewise
        * x-pa: Likewise.

From-SVN: r14965
1997-08-27 10:36:23 -06:00
Richard Kenner
65cc6819df (AC_PROG_CC, AC_PROG_MAKE_SET): Check for gcc before testing for flex.
From-SVN: r14963
1997-08-27 07:15:56 -04:00
Doug Evans
50a5bb706b (int_const_binop): Remove unnecessary STRIP_NOPS's.
From-SVN: r14958
1997-08-27 06:32:03 +00:00
Jim Wilson
8903807290 (dwarfout_file_scope_decl, case TYPE_DECL): Check
TYPE_DECL_IS_STUB instead of DECL_NAME.

From-SVN: r14957
1997-08-26 23:30:48 -07:00
Doug Evans
1351cd3d33 * loop.c (combine_movables): Earlier insns don't match later ones.
From-SVN: r14955
1997-08-27 06:27:58 +00:00
Jim Wilson
8c19cb0ebf (install-info): Don't cd into srcdir.
(install-info): Don't cd into srcdir.  Add srcdir to
filenames.  Use sed to extract base filename for install.

From-SVN: r14954
1997-08-26 23:22:52 -07:00
Jeff Law
552f542d8a loop.c (check_final_value): Don't miss a biv increment in a parallel.
* loop.c (check_final_value): Don't miss a biv increment in a
        parallel.

From-SVN: r14952
1997-08-26 23:59:46 -06:00
Doug Evans
e293c02634 (build_index_type): Add comment clarifying usage.
From-SVN: r14951
1997-08-27 05:56:05 +00:00
Doug Evans
9d54d38090 c-decl.c (grokdeclarator): If array index or size calculations overflow, issue an error.
* c-decl.c (grokdeclarator): If array index or size calculations
	overflow, issue an error.
	* fold-const.c (int_const_binop): New static function.
	(const_binop, size_binop): Call it.

From-SVN: r14950
1997-08-27 05:54:19 +00:00
Jason Merrill
245dc6928c x
From-SVN: r14946
1997-08-26 21:46:30 +00:00
Joern Rennecke
d454ed335e (try_combine): Distribute REG_DEAD notes created for i3dest_killed similar to...
(try_combine): Distribute REG_DEAD notes created for i3dest_killed similar
to the ones created for i2dest_in_i2src and for i1dest_in_i1src.

From-SVN: r14942
1997-08-26 18:50:49 +01:00
Joern Rennecke
d8fd5df0e1 (layout_record): Test DECL_PACKED instead of TYPE_PACKED to determine alignment.
From-SVN: r14941
1997-08-26 18:49:23 +01:00
Jeff Law
8d845b0301 loop.c (check_dbra_loop): If the loop biv is only used for counting...
* loop.c (check_dbra_loop): If the loop biv is only used
        for counting, then normalize it so that the initial
        value is zero.

From-SVN: r14940
1997-08-26 11:33:35 -06:00
Jason Merrill
7ce28446d3 x
From-SVN: r14938
1997-08-26 10:18:53 +00:00
Richard Kenner
f591f06221 (alpha-*-linux-gnulibc1): New target.
(alpha-*-linux-gnu*): Don't build crtbegin/end.

From-SVN: r14937
1997-08-26 05:27:22 -04:00
Richard Kenner
dcae9bf67b (LINK_SPEC): Conditionalize on USE_GNULIBC_1.
From-SVN: r14936
1997-08-26 05:27:08 -04:00
Richard Kenner
58e7db0e2a (*:Linux:*:*): Recognize alpha-linux-gnulibc1.
From-SVN: r14925
1997-08-26 05:21:29 -04:00
Richard Kenner
feb6f19406 (reload_cse_simplify_operands): Fix typo.
From-SVN: r14921
1997-08-25 19:11:34 -04:00
Richard Kenner
b52e2b2495 (common_type): Always prefer long double to double.
From-SVN: r14920
1997-08-25 19:04:39 -04:00
Jeff Law
57c3d60852 pa.c (secondary_reload_class): (mem (mem ...
* pa.c (secondary_reload_class): (mem (mem ... )) does not need
        secondary reloads.

        * pa.c (hppa_builtin_saveregs): Emit a blockage insn after the
        store of the argument registers.

From-SVN: r14917
1997-08-25 09:26:44 -06:00
Richard Kenner
203def11a8 (reload_cse_mem_conflict_p, case MEM): Also check for conflict with
the address.

From-SVN: r14912
1997-08-24 21:25:02 -04:00
Jim Wilson
e7260f9134 (malloc, realloc, calloc, free): Delete
declarations.

From-SVN: r14907
1997-08-23 15:54:37 -07:00
Jim Wilson
50d6f52d4a (NEED_DECLARATION_CALLOC): Add.
From-SVN: r14906
1997-08-23 15:52:14 -07:00
Jim Wilson
bb75e771d0 Add GCC_NEED_DECLARATION call for calloc.
From-SVN: r14905
1997-08-23 15:51:49 -07:00
Jim Wilson
6b37ec4844 (LIB_SPEC): Add missing comment end before it.
From-SVN: r14904
1997-08-23 15:43:09 -07:00
Jim Wilson
352257372d (GO_IF_INDEXABLE_BASE): Fix typo in undef.
From-SVN: r14903
1997-08-23 15:39:21 -07:00
Jeff Law
57e669dac3 *** empty log message ***
From-SVN: r14901
1997-08-23 13:20:43 -06:00
Jeff Law
0528ae6232 pa.c (pa_reorg): Always put begin_brtab and end_brtab insns around branch tables.
Sat Aug 23 00:18:22 1997  Jeffrey A Law  (law@cygnus.com)

        * pa.c (pa_reorg): Always put begin_brtab and end_brtab insns
        around branch tables.
        * pa.md (begin_brtab, end_brtab): Only emit the .begin_brtab
        and .end_brtab directives if TARGET_GAS.

From-SVN: r14900
1997-08-23 00:25:17 -06:00
Richard Kenner
289ab09bf4 (instantiate_virtual_regs_1, case ADDRESSOF): New case.
(fix_lexical_addr): Handle (addressof (mem ...)).

From-SVN: r14897
1997-08-22 19:17:21 -04:00
Paul Eggert
c432c7f79b Add 1997 copyright notice.
From-SVN: r14895
1997-08-22 17:32:03 +00:00
Jeff Law
2cf45edbdb * config.sub: Recognize tx39/r3900.
From-SVN: r14889
1997-08-22 08:49:11 -06:00
Richard Kenner
9fb5e8c4e3 (push_secondary_reload): If SECONDARY_MEM_NEEDED...
(push_secondary_reload): If SECONDARY_MEM_NEEDED, call get_secondary_mem for
input before adding reload and for output after.
(push_reload): Likewise.

From-SVN: r14875
1997-08-21 17:56:02 -04:00
Jim Wilson
75e91089f2 (start_cleanup_deferal, end_cleanup_deferal): Test
block_stack before dereferencing it.

From-SVN: r14872
1997-08-21 12:50:57 -07:00
Jim Wilson
4f0f736930 (enum dwarf_call_frame_info): Remove trailing comma from
list.

From-SVN: r14863
1997-08-20 12:45:29 -07:00
Stan Cox
124fdd7a6e (ix86_prologue, ix86_epilogue): New
(ix86_prologue, ix86_epilogue): New
(function_prologue, ix86_expand_prologue): Changed to use ix86_prologue
(function_epilogue, ix86_expand_epilogue): Changed to use ix86_epilogue

From-SVN: r14860
1997-08-20 19:22:23 +00:00
Michael Meissner
80952c9ffe Change to use ISSUE_RATE
From-SVN: r14859
1997-08-20 19:17:48 +00:00
Jason Merrill
d79b85f64f x
From-SVN: r14855
1997-08-20 00:10:41 +00:00
Jason Merrill
691f70144a x
From-SVN: r14844
1997-08-19 09:13:14 +00:00
Jim Wilson
8d031ffb5a (find_reloads): Add code to convert RELOAD_FOR_OPADDR_ADDR
reloads	to RELOAD_FOR_OPERAND_ADDRESS reloads.

From-SVN: r14838
1997-08-18 18:48:39 -07:00
Michael Meissner
fa102d165f Fix --with-cpu
From-SVN: r14836
1997-08-18 21:54:01 +00:00
Doug Evans
ca72e581b1 * mips/mips.md (movsi_ulw,movsi_usw,loadgp): Give unspec a mode.
From-SVN: r14835
1997-08-18 21:26:25 +00:00
Jeff Law
6d2b0b9797 Initial revision
From-SVN: r14833
1997-08-18 11:13:01 -06:00
No Author
c81f55b36c This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r14832
1997-08-18 17:13:01 +00:00
Jeff Law
8f8f70cb28 Fix typo in last change.
From-SVN: r14830
1997-08-18 10:52:16 -06:00
Jeff Law
4d76b5aad9 elf.h (PREFERRED_DEBUGGING_TYPE): Only set if not already set.
* config/mips/elf.h (PREFERRED_DEBUGGING_TYPE): Only set
        if not already set.
        * config/mips/mips.c (TARGET_SINGLE_FLOAT,
        TARGET_SOFT_FLOAT): Make sure both aren't set.
        (PROCESSOR_R3900): Set flag from option.
        * config/mips/mips.h: Add m3900 option.
        (PROCESSOR_R3900,TARGET_MIPS3900,MASK_MIPS3900,GENERATE_BRANCHLIKELY,
        GENERATE_MADD,GENERATE_MULT3): Define.
        (debugj,MASK_DEBUG_J): Delete to make room for m3900.
        (BRANCH_LIKELY_P): Redefine to include 3900.
        (GAS_ASM_SPEC,CC1_SPEC): Add m3900 option.
        (RTX_COSTS): Add 3900.
        * config/mips/mips.md: Add 3900, including three op madd and mult.
        * configure.in: Add 3900.
        * configure: Rebuilt.
        * config.sub: Recognize 3900.
        * config/mips/r3900.h: New.

From-SVN: r14821
1997-08-17 14:41:10 -06:00
Richard Earnshaw
c5d35f3b9e (arm_rtx_costs, case TRUNCATE): New case.
From-SVN: r14809
1997-08-15 11:27:53 +00:00
Richard Earnshaw
4b10fadbf3 (umulsi3_highpart, smulsi3_highpart): New patterns.
From-SVN: r14808
1997-08-15 11:27:53 +00:00
Richard Kenner
372e40025d (main): Write an include for flags.h.
From-SVN: r14807
1997-08-15 06:57:16 -04:00
Richard Kenner
5469f8eafb (allocate_stack): If stupid reg allocation, add USE for loop variable.
From-SVN: r14806
1997-08-15 06:50:35 -04:00
Richard Kenner
7707377777 (override_options): Turn off byte insns for cpu=ev4 or ev5.
From-SVN: r14805
1997-08-15 06:50:22 -04:00
Richard Kenner
743ea54349 (fold, compare cases): Add calls to `fold' to previous change.
From-SVN: r14804
1997-08-15 06:39:56 -04:00
Jason Merrill
fc90d69d73 x
From-SVN: r14798
1997-08-14 02:36:44 +00:00
Miles Bader
151b16d410 automatically generated from GPLed version
From-SVN: r14797
1997-08-14 02:25:35 +00:00
Paul Eggert
5a8a64e5eb automatically generated from GPLed version
From-SVN: r14795
1997-08-14 02:16:15 +00:00
Richard Kenner
796a7dc0df (check_newline): Pass finput again to HANDLE_PRAGMA.
From-SVN: r14794
1997-08-13 17:29:23 -04:00
Richard Kenner
e0a7eeb7c0 Minor reformatting.
From-SVN: r14793
1997-08-13 16:57:55 -04:00
Richard Kenner
de4c02ce57 (reload_cse_simplify_operands): New function.
(reload_cse_no_longer_dead,reload_cse_delete_death_notes): Likewise.
(no_longer_dead_regs): New static variable.
(reload_cse_simplify_set): Now returns int.
Don't delete death notes on previous insns, call
reload_cse_no_longer_dead instead.
Call validate_change with nonzero value for in_group.
(reload_cse_noop_set_p): Don't delete death notes on previous insns,
call reload_cse_no_longer_dead instead.
(reload_cse_regs): Initialize no_longer_dead_regs and call
reload_cse_delete_death_notes as appropriate.
Call apply_change_group after calling reload_cse_simplify_set.
Call reload_cse_simplify_set on elements of a PARALLEL.
Call reload_cse_simplify_operands if reload_cse_simplify_set could
not simplify things.

From-SVN: r14792
1997-08-13 16:51:32 -04:00
Richard Kenner
4b513a2e24 (LINK_SPEC): Echo -shared, not -share, to linker.
From-SVN: r14791
1997-08-13 16:18:41 -04:00
Richard Stallman
6b6b4652ea Add braces to clarify nesting.
From-SVN: r14790
1997-08-13 20:16:27 +00:00
Jason Merrill
056bc4a685 x
From-SVN: r14789
1997-08-13 20:09:19 +00:00
Richard Kenner
74572f05b1 (install-man): Add missing $(exeext).
From-SVN: r14788
1997-08-13 16:08:06 -04:00
Richard Kenner
ce83250e2b (alpha*-dec-osf*): Merge various cases;
split off version-specific files in new case statement.
Include osf2or3.h even for OSF1.2.

From-SVN: r14787
1997-08-13 15:53:33 -04:00
Richard Kenner
7b04d39e2d (enum avms_arg_type, avms_arg_info): New types.
(CUMULATIVE_ARGS, INIT_CUMULATIVE_ARGS): Update definitions to use new types.
(SETUP_INCOMING_VARARGS): Likewise.
(FUNCTION_ARG{,_PARTIAL_NREGS}, FUNCTION_ARG_ADVANCE): Likewise.
Only update CUM in FUNCTION_ARG_ADVANCE.

From-SVN: r14786
1997-08-13 12:40:13 -04:00
Richard Kenner
cb983843fa (NUM_ARGS): New macro.
(CURRENT_FUNCTION_ARGS_INFO): Deleted.
(alpha_builtin_saveregs): Use new macro.
(function_arg): Deleted.
(alpha_arg_type, alpha_arg_info_reg_val): New functions.

From-SVN: r14785
1997-08-13 12:39:57 -04:00
Richard Kenner
4ff0ae4102 (BYTECODE_LABEL): Use XSTR, not XEXP.
From-SVN: r14782
1997-08-12 19:35:08 -04:00
Richard Kenner
98c3543330 (save_for_inline_copying): Use 0, not NULL_PTR, as initial value for real_label_map.
(save_for_inline_copying): Use 0, not NULL_PTR, as initial value for
real_label_map.
(copy_for_inline): Likewise.

From-SVN: r14781
1997-08-12 19:27:30 -04:00
Jason Merrill
1caa88c36e x
From-SVN: r14780
1997-08-12 22:30:56 +00:00
Richard Kenner
9897aed607 (expand_calls): Properly call any_pending_cleanups.
From-SVN: r14779
1997-08-12 16:15:34 -04:00
Jason Merrill
0646086cbe x
From-SVN: r14778
1997-08-12 19:33:38 +00:00
Stan Cox
ec87fc9eef (compare_for_stack_reg): Swap only if the source and destination are both on the regstack.
From-SVN: r14763
1997-08-11 13:43:32 +00:00
Richard Kenner
05cf13d552 (probe_stack_range): Add USE for test_addr if -O0.
From-SVN: r14762
1997-08-10 22:19:18 -04:00
Jason Merrill
cd3b41b134 x
From-SVN: r14761
1997-08-11 02:16:30 +00:00
Jim Wilson
40a65a9824 (main): In -g handling code, add code to set len.
From-SVN: r14760
1997-08-10 15:20:42 -07:00
Jim Wilson
a1210b28c8 (plain_type_1, case ARRAY_TYPE): Verify that TYPE_DOMAIN
has integer TYPE_{MAX,MIN}_VALUE before using them.

From-SVN: r14759
1997-08-10 15:00:31 -07:00
Jim Wilson
00710d5182 (extendqihi2): Use HImode not QImode in force_reg call.
From-SVN: r14758
1997-08-10 12:25:21 -07:00
Richard Earnshaw
6d12b87666 aof.h (COMMON_SECTION): New macro, define common_section()
* aof.h (COMMON_SECTION): New macro, define common_section()
(EXTRA_SECTION_FUNCTIONS): Use COMMON_SECTION
(EXTRA_SECTIONS): Define in_common.
(ASM_OUTPUT_COMMON): Call common_section() to indicate we've
changed areas.

From-SVN: r14757
1997-08-10 16:46:31 +00:00
Jim Wilson
527cf44f79 (gen_subprogram_die): Handle redefinition of an
extern inline function.

From-SVN: r14756
1997-08-09 17:02:57 -07:00
Michael Meissner
f28a9c115f Add -myellowknife, -mads. fix -mmvme.
From-SVN: r14755
1997-08-09 17:18:46 +00:00
Per Bothner
5434a7a49a dwarf2out.c (gen_enumeration_type_die): Make code work for a tag name, without a TYPE_STUB_DECL.
*  dwarf2out.c (gen_enumeration_type_die):
Make code work for a tag name, without a TYPE_STUB_DECL.
(gen_struct_or_union_type_die):  Likewise.

From-SVN: r14754
1997-08-08 17:14:04 -07:00
Stan Cox
85fea7307d (m88k_expand_prologue): Set MEM_IN_STRUCT_P of va_list template
From-SVN: r14753
1997-08-08 20:36:13 +00:00
Stan Cox
ce89f5f5a9 (ix86_expand_prologue): Use prologue_set_stack_ptr
(output_pic_addr_const, case PLUS):

From-SVN: r14752
1997-08-08 20:33:17 +00:00
Stan Cox
6012000b13 (prologue_set_stack_ptr): New pattern.
From-SVN: r14751
1997-08-08 20:33:17 +00:00
Stan Cox
b1c6f081e1 (HAS_INIT_SECTION): define
(HAS_INIT_SECTION): define
(HAVE_ATEXIT): define

From-SVN: r14750
1997-08-08 20:33:17 +00:00
Paul Eggert
df3b44ac7c Include <stdio.h> before include files that formerly used STDIO_PROTO.
From-SVN: r14749
1997-08-08 20:09:02 +00:00
Paul Eggert
9fc3a9ffe6 (main): Generate files that include <stdio.h>
before including files that formerly used STDIO_PROTO.

From-SVN: r14748
1997-08-08 20:09:02 +00:00
Paul Eggert
2239c71b84 (STDIO_PROTO): Remove.
(PROTO): Use "gansidecl.h" to define this instead.
(half_pic_finish): Declare without prototype; FILE isn't defined.

From-SVN: r14747
1997-08-08 20:09:02 +00:00
Paul Eggert
4b7c78f549 Replace STDIO_PROTO with PROTO in include files.
From-SVN: r14746
1997-08-08 20:09:02 +00:00
Paul Eggert
192c8cc919 (STDIO_PROTO): Remove.
From-SVN: r14745
1997-08-08 20:09:02 +00:00
Paul Eggert
23cbee6570 Include "config.h" first, as per autoconf manual.
From-SVN: r14744
1997-08-08 20:09:02 +00:00
Paul Eggert
ca764fb861 Include <stdio.h> before include files that formerly used STDIO_PROTO.
(main): Generate files that include <stdio.h>
before including files that formerly used STDIO_PROTO.

From-SVN: r14743
1997-08-08 20:09:02 +00:00
Paul Eggert
47105f9896 (output_prologue): Generate files that include <stdio.h>
before including files that formerly used STDIO_PROTO.

From-SVN: r14742
1997-08-08 20:09:02 +00:00
Jason Merrill
64b250c827 x
From-SVN: r14741
1997-08-08 18:24:45 +00:00
Jim Wilson
de809b411c (reg_loc_descriptor): Fix prototype.
(concat_loc_descriptor): New function.
(loc_descriptor): Call it.
(add_AT_location_description): Also elide the descriptor if both
halves of a CONCAT are pseudos.
(add_location_or_const_value_attribute): Recognize CONCAT too.

From-SVN: r14740
1997-08-08 11:13:18 -07:00
Richard Kenner
bd3c2d6652 compstmt_count): New static variable.
(compstmt_start): New rule.
(compstmt): Use new rule.
(do_stmt_start): Update compstmt_count.
(simple_if, stmt): Use new versions of start_cond, start_else, and end_cond.

From-SVN: r14739
1997-08-08 06:36:28 -04:00
Richard Kenner
4a87b7d4b3 (if_stack{,_space,_pointer}): New static variables.
(c_expand_{start_cond,start_else,end_cond}): New functions.

From-SVN: r14738
1997-08-08 06:36:02 -04:00
Jim Wilson
3f31f9eab0 (override_options): Set MASK_LONG64 for ABI_64.
From-SVN: r14737
1997-08-07 13:54:36 -07:00
Jim Wilson
82d220273d (TARGET_LONG64): Don't define here.
From-SVN: r14736
1997-08-07 13:54:05 -07:00
Jim Wilson
3ee585b938 (function_prologue): Don't emit ".ent",
".frame", ".mask", ".fmask" if flag_inhibit_size_directive is
true.
(function_epilogue): Don't emit ".end" if
flag_inhibit_size_directive is true.

From-SVN: r14735
1997-08-07 12:42:30 -07:00
Jim Wilson
86ff95af55 (STARTFILE_SPEC, LIB_SPEC): Move -L/usr/lib{32,64}/mips?
(STARTFILE_SPEC, LIB_SPEC): Move
-L/usr/lib{32,64}/mips? from STARTFILE_SPEC to LIB_SPEC.

From-SVN: r14734
1997-08-07 12:34:55 -07:00
Richard Kenner
67de6d3762 (fold): Optimize unsigned x <= 0x7fffffff.
From-SVN: r14733
1997-08-07 13:14:16 -04:00
Richard Kenner
d816d63dae (convert_memory_address, case LABEL_REF): Copy LABEL_REF_NONLOCAL_P.
From-SVN: r14732
1997-08-07 12:53:41 -04:00
Richard Kenner
c9f72e91b3 (store_constructor): Use CONST0_RTX macro, not always the integer
version, when clearing a register.

From-SVN: r14731
1997-08-07 12:51:37 -04:00
Richard Kenner
a8560503b0 (output_constructor): Correctly check for multi-word constant.
From-SVN: r14730
1997-08-07 12:46:27 -04:00
No Author
f46e7282a4 This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r14728
1997-08-07 16:29:50 +00:00
Richard Kenner
9382098d1b (execute): Don't allow -pipe on VMS.
From-SVN: r14726
1997-08-07 10:07:09 -04:00
Richard Kenner
3f7405fcdc (TRAMPOLINE_TEMPLATE): Add another quadword of zeros.
(TRAMPOLINE_SIZE): Now 32 bytes.
(INITIALIZE_TRAMPOLINE): Put FNADDR at offset 16, CXT at 24.
(DBX_DEBUGGING_INFO, ASM_FORMAT_PRIVATE_NAME): Always undefine.
(STARTFILE_SPEC): Likewise.
(PREFERRED_DEBUGGING_TYPE): Define to be Dwarf-2.
(VALID_MACHINE_DECL_ATTRIBUTE, ASM_OUTPUT_SECTION{,_NAME}): New macros.
(ASM_OUTPUT_ALIGN{,ED_COMMON}): Redefine.
(LINK_SPEC): Pass -share and -v.
(ENDFILE_SPEC, LIBGCC2_SPEC): Don't redefine.

From-SVN: r14725
1997-08-07 10:04:40 -04:00
Richard Kenner
fd9fc6b002 (vmskrunch): Don't strip off trailing digits.
(vms_valid_decl_attribute_p): New function.

From-SVN: r14724
1997-08-07 10:04:21 -04:00
Richard Kenner
5c2fa4ba44 Fix error in comments.
From-SVN: r14723
1997-08-07 08:18:00 -04:00
Richard Kenner
28ce770c5d (const_hash, compare_constant_1): Add default case to switch.
(decode_rtx_const, output_addressed_constants): Likewise.
(output_constant): Likewise.

From-SVN: r14722
1997-08-07 06:59:36 -04:00
Richard Kenner
806cc53754 (remap_split_bivs): Add default case to switch.
From-SVN: r14721
1997-08-07 06:59:13 -04:00
Richard Kenner
710c6eaafa (staticp, unsave_expr_now, contains_placeholder_p): Add default case to switch.
(substitute_in_expr, build_type_attribute_variant): Likewise.
(simple_cst_equal): Likewise.

From-SVN: r14720
1997-08-07 06:58:49 -04:00
Richard Kenner
c22d1abfb7 (expand_return): Add default case to switch.
From-SVN: r14719
1997-08-07 06:58:10 -04:00
Richard Kenner
7a01cf8e1b (sched_analyze_2): Add default case to switch.
(memrefs_conflict_p): Convert switch with one case into an if.

From-SVN: r14718
1997-08-07 06:57:43 -04:00
Richard Kenner
430eac7886 (rtx_varies_p, rtx_addr_can_trap_p): Add default case to switch.
(reg_mentioned_p, reg_referenced_p, modified_between_p): Likewise.
(modified_in_p, refers_to_regno_p, volatile_insn_p): Likewise.
(volatile_refs_p, side_effects_p): Likewise.
(inequality_comparison_p, replace_regs): Likewise.

From-SVN: r14717
1997-08-07 06:57:11 -04:00
Richard Kenner
80c6fbce30 (copy_rtx, copy_most_rtx): Add default case to switch.
From-SVN: r14716
1997-08-07 06:56:49 -04:00
Richard Kenner
57b237e0de (set_label_offsets, eliminate_regs): Add default case to switch.
(scan_paradoxical_subregs, count_occurrences): Likewise.

From-SVN: r14715
1997-08-07 06:56:31 -04:00
Richard Kenner
8d0be52389 (subst_reg_equivs, find_reloads_address_1): Add default case to switch.
(refers_to_regno_for_reload_p, find_equiv_reg): Likewise.

From-SVN: r14714
1997-08-07 06:56:12 -04:00
Richard Kenner
5316dda764 (validate_replace_rtx_1, find_single_use_1): Add default case to switch.
From-SVN: r14713
1997-08-07 06:55:46 -04:00
Richard Kenner
135a6b0d1c (print_node): Add default case to switch.
Convert switch with one case into an if.

From-SVN: r14712
1997-08-07 06:55:13 -04:00
Richard Kenner
c4f2c0d295 (emit_float_lib_cmp): Add default case to switch.
From-SVN: r14711
1997-08-07 06:54:26 -04:00
Richard Kenner
71e1c8158c (record_excess_regs, reg_in_basic_block_p): Add default case to switch.
(get_condition, replace_call_address): Likewise.
(count_nonfixed_reads, find_and_verify_loops, find_mem_givs): Likewise.
(maybe_eliminate_biv_1, invariant_p, simplify_giv_expr): Likewise.

From-SVN: r14710
1997-08-07 06:53:49 -04:00
Richard Kenner
0c9c361532 (memref_referenced_p): Add default case to switch.
From-SVN: r14709
1997-08-07 06:53:26 -04:00
Richard Kenner
5de68712b3 (duplicate_loop_exit_test, comparison_dominates_p): Add default case to switch.
(mark_jump_label, rtx_renumbered_equal_p): Likewise.
(rtx_equal_for_thread_p): Likewise.

From-SVN: r14708
1997-08-07 06:53:04 -04:00
Richard Kenner
914dce760e (copy_for_inline, copy_rtx_and_substitute): Add default case to switch.
(subst_constants): Likewise.

From-SVN: r14707
1997-08-07 06:52:47 -04:00
Richard Kenner
9dcc8e8a00 (add_to_sequence): Add default case to switch.
(write_tree_1): Output default case for every switch.

From-SVN: r14706
1997-08-07 06:52:23 -04:00
Richard Kenner
bfd4bce203 (match_rtx): Add default case to switch.
From-SVN: r14705
1997-08-07 06:51:34 -04:00
Richard Kenner
b7c327e911 (scan_operands): Add default case to switch.
From-SVN: r14704
1997-08-07 06:51:13 -04:00
Richard Kenner
b36c6260b6 (walk_rtx): Add default case to switch.
From-SVN: r14703
1997-08-07 06:50:50 -04:00
Richard Kenner
9d3397213e (walk_insn_part): Add default case to switch.
From-SVN: r14702
1997-08-07 06:50:24 -04:00
Richard Kenner
7e40b60b0a (attr_copy_rtx, make_canonical): Add default case to switch.
(encode_units_mask, simplify_test_exp): Likewise.
(find_and_mark_used_attributes, write_test_expr): Likewise.
(simplify_with_current_value_aux, clear_struct_flag): Likewise.
(count_sub_rtxs, gen_insn walk_attr_value): Likewise.
(copy_rtx_unchanging): Likewise.

From-SVN: r14701
1997-08-07 06:49:57 -04:00
Richard Kenner
f0e983d4e6 (fixup_var_refs_1, instantiate_virtual_regs_1): Add default case to switch.
From-SVN: r14700
1997-08-07 06:49:16 -04:00
Richard Kenner
c6b8882dfa (operand_equal_p, twoval_comparison_p): Add default case to switch.
(eval_subst, invert_truthvalue, range_binop): Likewise.
(make_range, fold): Likewise.

From-SVN: r14699
1997-08-07 06:48:50 -04:00
Richard Kenner
4850416cb4 (jmp_uses_reg_or_mem, mark_used_regs): Add default case to switch.
From-SVN: r14698
1997-08-07 06:48:30 -04:00
Richard Kenner
ab55d9d51e (get_attr_length, final_scan_insn): Add default case to switch.
(walk_alter_subreg, alter_cond): Likewise.

From-SVN: r14697
1997-08-07 06:48:11 -04:00
Richard Kenner
744809be76 (queued_subexp_p, is_zeros_p, safe_from_p): Add default case to switch.
(bc_expand_expr, preexpand_calls, convert_move): Likewise.

From-SVN: r14696
1997-08-07 06:47:49 -04:00
Richard Kenner
d4667917e0 (expand_divmod, emit_store_flag): Add default case to switch.
From-SVN: r14695
1997-08-07 06:47:24 -04:00
Richard Kenner
81599eb0b9 (plus_constant_wide, convert_memory_address): Add default case to switch.
(promote_mode, emit_stack_save, emit_stack_restore): Likewise.

From-SVN: r14694
1997-08-07 06:47:03 -04:00
Richard Kenner
ada499a762 (copy_rtx_if_shared, reset_used_flags): Add default case to switch.
From-SVN: r14693
1997-08-07 06:46:43 -04:00
Richard Kenner
ec051cbac1 (lookup_cfa_1, print_die): Add default case to switch.
From-SVN: r14692
1997-08-07 06:46:19 -04:00
Richard Kenner
34b626ad30 (dbxout_symbol): Add default case to switch.
From-SVN: r14691
1997-08-07 06:45:23 -04:00
Richard Kenner
b390019c6b (canon_hash, exp_equiv_p): Add default case to switch.
(set_nonvarying_address_components, canon_reg): Likewise.
(simplify_unary_operation, simplify_plus_minus): Likewise.
(simplify_relational_operation, fold_rtx): Likewise.
(cse_process_note,  count_reg_usage): Likewise.

From-SVN: r14690
1997-08-07 06:44:59 -04:00
Richard Kenner
a6c59034dc (convert_to_integer): Add default case to switch.
From-SVN: r14689
1997-08-07 06:44:32 -04:00
Richard Kenner
ad15548a1e (find_split_point, simplify_rtx): Add default case to switch.
(simplify_if_then_else, simplify_logical): Likewise.
(extract_left_shift, make_compound_operation, force_to_mode): Likewise.
(known_cond, nonzero_bits, num_sign_bit_copies): Likewise.
(merge_outer_ops, simplify_shift_const, simplify_comparison): Likewise.
(reversible_comparison_p, mark_used_regs_combine): Likewise.

From-SVN: r14688
1997-08-07 06:44:07 -04:00
Richard Kenner
0353eaae91 (calls_function_1): Add default case to switch.
From-SVN: r14687
1997-08-07 06:43:42 -04:00
Richard Kenner
865b42deea (comptypes, build_component_ref): Add default case to switch.
(build_binary_op, lvalue_p, build_unary_op): Likewise.
(build_modify_expr, initializer_constant_valid_p): Likewise.
(c_expand_return): Likewise.

From-SVN: r14686
1997-08-07 06:43:18 -04:00
Richard Kenner
6a102abcc3 (collect_iteratores): Add default case to switch.
From-SVN: r14685
1997-08-07 06:42:48 -04:00
Richard Kenner
de4e5e124d (binary_op_error): Add default case to switch.
(shorten_compare, truthvalue_conversion): Likewise.

From-SVN: r14684
1997-08-07 06:42:17 -04:00
Richard Kenner
8047ea17a0 (output_arc_profiler) [SMALL_REGISTER_CLASSES]: Apply PATTERN only to insns.
From-SVN: r14683
1997-08-07 06:21:45 -04:00
Richard Kenner
7f4ea783da (libgcc2-elf.a): Resync with Makefile.in.
From-SVN: r14682
1997-08-07 06:13:18 -04:00
Jim Wilson
694d20c977 (build_abbrev_table): Use xrealloc not xmalloc.
From-SVN: r14681
1997-08-06 16:27:10 -07:00
Jason Merrill
8ae18f8fde x
From-SVN: r14680
1997-08-06 20:29:51 +00:00
Jason Merrill
a919aa4195 x
From-SVN: r14679
1997-08-06 19:58:27 +00:00
Jason Merrill
05d3fb613d entered into RCS
From-SVN: r14678
1997-08-06 19:57:48 +00:00
No Author
925c92856e This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r14677
1997-08-06 19:57:48 +00:00
Jason Merrill
7b516ea330 x
From-SVN: r14675
1997-08-05 23:11:00 +00:00
Doug Evans
5dd94bc63d * configure.in (sparc-*-solaris2): Set float_format to i128.
From-SVN: r14674
1997-08-05 16:27:21 +00:00
No Author
f9fea41e64 This commit was manufactured by cvs2svn to create branch
'premerge-fsf-branch'.

From-SVN: r14672
1997-08-05 16:26:37 +00:00
Richard Kenner
a4ce9dd20f (try_combine): If have PARALLEL of independent SETs and have cc0,
ensure insn using CC0 come first.

From-SVN: r14670
1997-08-04 17:45:14 -04:00
Michael Meissner
45ce23bc3b Put switch tables in .rodata
From-SVN: r14669
1997-08-04 19:30:16 +00:00
Richard Kenner
691a629d49 (arm-*-aout): Set tmake_file correctly.
From-SVN: r14668
1997-08-04 12:34:35 -04:00
Richard Kenner
a9a284fac5 (find_reloads_address_1): Don't pass VOIDmode for an integer argument
of push_reload.

From-SVN: r14667
1997-08-04 08:15:15 -04:00
Richard Kenner
66579b36cb (may_trap_p): Fix unintended fall-through so divisions by non-zero constants are handled properly.
(may_trap_p): Fix unintended fall-through so divisions by non-zero
constants are handled properly.  Return 1 for FP divisions.

From-SVN: r14666
1997-08-04 08:06:46 -04:00
Richard Kenner
6b7c7e83f4 (check_format_info): Store each flag character only once in the
flag_chars array.

From-SVN: r14665
1997-08-04 06:52:17 -04:00
Richard Kenner
d037b05c67 (INSTALL): Build in $(srcdir).
From-SVN: r14664
1997-08-03 21:59:24 -04:00
Richard Kenner
6b22827b3f (objc/*.o): Depend on $(GCC_PASSES).
From-SVN: r14663
1997-08-03 21:57:29 -04:00
Richard Kenner
f799ac03f1 (cpp_start_read): Recognise suffixes 'cp' and 'c++'.
From-SVN: r14662
1997-08-03 21:54:49 -04:00
Richard Kenner
b8e95bd726 (store_field): Return quickly if EXP is ERROR_MARK.
From-SVN: r14661
1997-08-03 21:52:01 -04:00
Richard Kenner
df44c9f805 (unary_complex_lvalue): Don't warn about COMPOUND_EXPR or COND_EXPR if
FUNCTION_TYPE.

From-SVN: r14660
1997-08-03 21:40:57 -04:00
Richard Kenner
abf078fd5a (mostlyclean): Remove libgcc1-test.
From-SVN: r14659
1997-08-03 19:18:24 -04:00
Richard Kenner
6068602ec0 (T): Move to place where it can be overridden.
(install_common): Fix permissions of specs and EXTRA_PARTS files.

From-SVN: r14658
1997-08-03 19:10:24 -04:00
Richard Kenner
db1848f77a (default_compilers): Add default entries for Pascal.
From-SVN: r14657
1997-08-03 19:07:00 -04:00
Richard Kenner
1990bb1495 (RETURN_ADDR_RTX): Call alpha_return_addr.
From-SVN: r14656
1997-08-03 18:38:33 -04:00
Richard Kenner
064ed69cd0 (alpha_return_addr): New function.
(output_epilog): Zero alpha_return_addr_rtx.

From-SVN: r14655
1997-08-03 18:38:07 -04:00
Richard Kenner
9675ef284c (ASM_SPEC): Add -O0.
From-SVN: r14654
1997-08-03 17:48:45 -04:00
Richard Kenner
6e567b38e8 (DEFAULT_VTABLE_THUNKS): New macro.
From-SVN: r14653
1997-08-03 17:27:43 -04:00
Richard Kenner
cc3fbd4803 (expand_builtin, case BUILT_IN_RETURN_ADDRESS): Emit a warning if the
return address cannot be determined.

From-SVN: r14652
1997-08-03 17:18:28 -04:00
Richard Kenner
3367003bc3 (stupid_life_analysis): If function receives non-local goto, don't let
any registers live across calls.

From-SVN: r14651
1997-08-03 17:07:24 -04:00
Richard Kenner
08db2d03b7 (merge_ranges): Make sure that if one range is subset of another, it will always be the second range.
(merge_ranges): Make sure that if one range is subset of another, it
will always be the second range.  Correct (+,-) case to account for this.

From-SVN: r14650
1997-08-03 17:03:57 -04:00
Richard Kenner
3b258198dd (yylex): Remove duplicate check on high bit before invoking int_fits_type_p.
From-SVN: r14649
1997-08-03 16:48:28 -04:00
Richard Kenner
cc4ae0616f (find_equiv_reg): If goal is a pseudo that got memory, a store into memory makes it invalid.
(find_equiv_reg): If goal is a pseudo that got memory, a store into
memory makes it invalid.  This was handled in the single set case, but
missing in the PARALLEL case.

From-SVN: r14648
1997-08-03 16:44:38 -04:00
Richard Kenner
b6c7c650ab (clear_storage, emit_block_move): Return address of dest if calling memset memcpy.
(clear_storage, emit_block_move): Return address of dest if calling memset
memcpy.
(expand_builtin, BUILT_IN_MEM{CPY,SET}): Return value from clear_storage or
emit_block_move if present.

From-SVN: r14647
1997-08-03 10:06:24 -04:00
Richard Kenner
e4f7d879b4 (clear_storage): Now returns rtx.
(emit_block_move): Likewise; delete duplicate declaration.

From-SVN: r14646
1997-08-03 10:05:42 -04:00
Richard Kenner
889922be4c Minor reformatting.
From-SVN: r14645
1997-08-03 09:40:17 -04:00
Richard Kenner
2316014d09 (start_function): Reset immediate_size_expand on error return.
From-SVN: r14644
1997-08-03 09:13:44 -04:00
Richard Kenner
cdafbc93f5 (grokdeclarator): Give error for `long double' and refine text of some
error messages.

From-SVN: r14643
1997-08-02 20:59:49 -04:00
Richard Kenner
a25134e0d4 (FLOAT_VALUE_TYPE): Fix typo; was FLOAT_TYPE_VALLUE.
From-SVN: r14642
1997-08-02 20:41:26 -04:00
Richard Kenner
8cae4b0a9a (FLOAT_VALUE_TYPE, INTIFY, FLOATIFY, FLOAT_ARG_TYPE): Define.
From-SVN: r14641
1997-08-02 20:40:18 -04:00
527 changed files with 184259 additions and 27340 deletions

340
gcc/COPYING Normal file
View File

@@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

482
gcc/COPYING.LIB Normal file
View File

@@ -0,0 +1,482 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

15188
gcc/ChangeLog Normal file

File diff suppressed because it is too large Load Diff

6670
gcc/ChangeLog.0 Normal file

File diff suppressed because it is too large Load Diff

9207
gcc/ChangeLog.1 Normal file

File diff suppressed because it is too large Load Diff

10110
gcc/ChangeLog.10 Normal file

File diff suppressed because it is too large Load Diff

7229
gcc/ChangeLog.2 Normal file

File diff suppressed because it is too large Load Diff

8063
gcc/ChangeLog.3 Normal file

File diff suppressed because it is too large Load Diff

10783
gcc/ChangeLog.4 Normal file

File diff suppressed because it is too large Load Diff

8954
gcc/ChangeLog.5 Normal file

File diff suppressed because it is too large Load Diff

8173
gcc/ChangeLog.6 Normal file

File diff suppressed because it is too large Load Diff

10376
gcc/ChangeLog.7 Normal file

File diff suppressed because it is too large Load Diff

11080
gcc/ChangeLog.8 Normal file

File diff suppressed because it is too large Load Diff

9968
gcc/ChangeLog.9 Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

276
gcc/NEWS
View File

@@ -1,71 +1,256 @@
Noteworthy changes in GCC version 2.8.0:
Noteworthy changes in GCC version 2.8.1
---------------------------------------
The -specs=file switch allows you to override default specs used in invoking
programs like cc1, as, etc.
Numerous bugs have been fixed and some minor performance
improvements (compilation speed) have been made.
The following new targets are supported:
Noteworthy changes in GCC version 2.8.0
---------------------------------------
Solaris 2.5 running on UltraSPARC's.
The sparclet cpu (a.out file format).
Solaris 2.51 running on PowerPC's.
Linux running on PowerPC's.
A major change in this release is the addition of a framework for
exception handling, currently used by C++. Many internal changes and
optimization improvements have been made. These increase the
maintainability and portability of GCC. GCC now uses autoconf to
compute many host parameters.
New features for the Hitachi H8/300(H).
A new project, egcs (pronounced ``eggs''), is maintaining an
experimental version of the GNU C compiler. The egcs compiler
contains features that are candidates for inclusion in future versions
of GCC. The standard GCC distribution is intended to contain a mature
compiler that is stable and reliable; egcs aims at making experimental
changes available to interested users at an earlier stage in their
development process than would be appropriate for a production
compiler. Please see <http://www.cygnus.com/egcs/> for more
information about egcs. A major motivation for the egcs project was
the long release cycle for GCC 2.8.0. This was due to changes for
exception handling that took a long time to complete. In the future,
changes of this nature can be developed in the egcs framework and not
interfere with the frequent releases of the standard GCC distribution.
-malign-300
-ms
Due to a bug fix related to exception handling, if you have previously
built a sharable library with some recent unofficial versions of GCC
on some systems and then rebuild the library with GCC 2.8.0, programs
previously linked with that library may fail during initialization
with a message about an undefined symbols __register_frame. If that
happens, you must either relink the application or rebuild the
sharable library with "-Wl,-u,__register_frame" on the command line.
The -ms switch generates code for the Hitachi H8/S processor.
The following lists changes that add new features or targets.
See cp/NEWS for new features of C++ in this release.
New tools and features:
The Dwarf 2 debugging information format is supported on ELF systems, and
is the default for -ggdb where available. It can also be used for C++.
The Dwarf version 1 debugging format is also permitted for C++, but
does not work well.
gcov.c is provided for test coverage analysis and branch profiling
analysis is also supported; see -fprofile-arcs, -ftest-coverage,
and -fbranch-probabilities.
Support for the Checker memory checking tool.
New switch, -fstack-check, to check for stack overflow on systems that
don't have such built into their ABI.
New switches, -Wundef and -Wno-undef to warn if an undefined identifier
is evaluated in an #if directive.
Options -Wall and -Wimplicit now cause GCC to warn about implicit int
in declarations (e.g. `register i;'), since the C Standard committee
has decided to disallow this in the next revision of the standard;
-Wimplicit-function-declarations and -Wimplicit-int are subsets of
this.
Option -Wsign-compare causes GCC to warn about comparison of signed and
unsigned values.
Add -dI option of cccp for cxref.
New features in configuration, installation and specs file handling:
New option --enable-c-cpplib to configure script.
You can use --with-cpu on the configure command to specify the default
CPU that GCC should generate code for.
The -specs=file switch allows you to override default specs used in
invoking programs like cc1, as, etc.
Allow including one specs file from another and renaming a specs
variable.
You can now relocate all GCC files with a single environment variable
or a registry entry under Windows 95 and Windows NT.
Changes in Objective-C:
The Objective-C Runtime Library has been made thread-safe.
The Objective-C Runtime Library contains an interface for creating
mutexes, condition mutexes, and threads; it requires a back-end
implementation for the specific platform and/or thread package.
Currently supported are DEC/OSF1, IRIX, Mach, OS/2, POSIX, PCThreads,
Solaris, and Windows32. The --enable-threads parameter can be used
when configuring GCC to enable and select a thread back-end.
Objective-C is now configured as separate front-end language to GCC,
making it more convenient to conditionally build it.
The internal structures of the Objective-C Runtime Library have
changed sufficiently to warrant a new version number; now version 8.
Programs compiled with an older version must be recompiled.
The Objective-C Runtime Library can be built as a DLL on Windows 95
and Windows NT systems.
The Objective-C Runtime Library implements +load.
The following new targets are supported (see also list under each
individual CPU below):
Embedded target m32r-elf.
Embedded Hitachi Super-H using ELF.
RTEMS real-time system on various CPU targets.
ARC processor.
NEC V850 processor.
Matsushita MN10200 processor.
Matsushita MN10300 processor.
Sparc and PowerPC running on VxWorks.
Support both glibc versions 1 and 2 on Linux-based GNU systems.
New features for DEC Alpha systems:
Allow detailed specification of IEEE fp support:
-mieee, -mieee-with-inexact, and -mieee-conformant
-mfp-trap-mode=xxx, -mfp-round-mode=xxx, -mtrap-precision=xxx
-mcpu=xxx for CPU selection
Support scheduling parameters for EV5.
Add support for BWX, CIX, and MAX instruction set extensions.
Support Linux-based GNU systems.
Support VMS.
Additional supported processors and systems for MIPS targets:
MIPS4 instruction set.
R4100, R4300 and R5000 processors.
N32 and N64 ABI.
IRIX 6.2.
SNI SINIX.
New features for Intel x86 family:
Add scheduling parameters for Pentium and Pentium Pro.
Support stabs on Solaris-x86.
Intel x86 processors running the SCO OpenServer 5 family.
Intel x86 processors running DG/UX.
Intel x86 using Cygwin32 or Mingw32 on Windows 95 and Windows NT.
New features for Motorola 68k family:
Support for 68060 processor.
More consistent switches to specify processor.
Motorola 68k family running AUX.
68040 running pSOS, ELF object files, DBX debugging.
Coldfire variant of Motorola m68k family.
New features for the HP PA RISC:
-mspace and m-no-space
-mlong-load-store and -mno-long-load-store
-mbig-switch -mno-big-switch
GCC on the PA requires either gas-2.7 or the HP assembler; for best
results using GAS is highly recommended. GAS is required for -g and
exception handling support.
New features for SPARC-based systems:
The ultrasparc cpu.
The sparclet cpu, supporting only a.out file format.
Sparc running SunOS 4 with the GNU assembler.
Sparc running the Linux-based GNU system.
Embedded Sparc processors running the ELF object file format.
-mcpu=xxx
-mtune=xxx
-malign-loops=xxx
-malign-jumps=xxx
-malign-functions=xxx
-mimpure-text and -mno-impure-text
New features for PowerPC-based systems running either System V, Linux, Solaris,
or embedded systems:
Options -mno-v8 and -mno-sparclite are no longer supported on SPARC
targets. Options -mcypress, -mv8, -msupersparc, -msparclite, -mf930,
and -mf934 are deprecated and will be deleted in GCC 2.9. Use
-mcpu=xxx instead.
New features for rs6000 and PowerPC systems:
Solaris 2.51 running on PowerPC's.
The Linux-based GNU system running on PowerPC's.
-mcpu=604e,602,603e,620,801,823,mpc505,821,860,power2
-mtune=xxx
-mrelocatable-lib, m-no-relocatable-lib
-msim, -mmve, -memb
-mupdate, -mno-update
-mfused-madd, -mno-fused-madd
-mregnames
-meabi
-mcall-linux
-mcall-solaris
-mcall-sysv-eabi
-mcall-sysv-noeabi
-msdata
-memb
-mtune=xxx
-msim
-mmvme
-mcall-linux, -mcall-solaris, -mcall-sysv-eabi, -mcall-sysv-noeabi
-msdata, -msdata=none, -msdata=default, -msdata=sysv, -msdata=eabi
-memb, -msim, -mmvme
-myellowknife, -mads
wchar_t is now of type long as per the ABI, not unsigned short.
-p/-pg support
-mcpu=403 now implies -mstrict-align.
Implement System V profiling.
Options -mno-v8 and -mno-sparclite are no longer supported on SPARC
targets. Options -mcypress, -mv8, -msupersparc, -msparclite, -mf930,
and -mf934 are deprecated and will be deleted in GCC 2.9.
Use -mcpu=xxx instead.
Aix 4.1 GCC targets now default to -mcpu=common so that programs
compiled can be moved between rs6000 and powerpc based systems. A
consequence of this is that -static won't work, and that some programs
may be slightly slower.
GCC on the PA requires either gas-2.7 or the HP assembler; for best
results using GAS is highly recommended. GAS is required for -g
and exception handling support.
You can select the default value to use for -mcpu=xxx on rs6000 and
powerpc targets by using the --with-cpu=xxx option when configuring the
compiler. In addition, a new options, -mtune=xxx was added that
selects the machine to schedule for but does not select the
architecture level.
Aix 4.1 GCC targets now default to -mcpu=common so that programs compiled can
be moved between rs6000 and powerpc based systems. A consequence of this is
that -static won't work, and that some programs may be slightly slower.
Directory names used for storing the multilib libraries on System V
and embedded PowerPC systems have been shortened to work with commands
like tar that have fixed limits on pathname size.
You can select the default value to use for -mcpu=xxx on rs6000 and powerpc
targets by using the --with-cpu=xxx option when confiuring the compiler. In
addition, a new options, -mtune=xxx was added that selects the machine to
schedule for but does not select the architecture level.
New features for the Hitachi H8/300(H):
Directory names used for storing the multilib libraries on System V and
embedded PowerPC systems have been shortened to work with commands like tar
that have fixed limits on pathname size.
-malign-300
-ms (for the Hitachi H8/S processor)
-mint32
Noteworthy changes in GCC version 2.7.2:
New features for the ARM:
-march=xxx, -mtune=xxx, -mcpu=xxx
Support interworking with Thumb code.
ARM processor with a.out object format, COFF, or AOF assembler.
ARM on "semi-hosted" platform.
ARM running NetBSD.
ARM running the Linux-based GNU system.
New feature for Solaris systems:
GCC installation no longer makes a copy of system include files,
thus insulating GCC better from updates to the operating system.
Noteworthy changes in GCC version 2.7.2
---------------------------------------
A few bugs have been fixed (most notably the generation of an
invalid assembler opcode on some RS/6000 systems).
Noteworthy changes in GCC version 2.7.1:
Noteworthy changes in GCC version 2.7.1
---------------------------------------
This release fixes numerous bugs (mostly minor) in GCC 2.7.0, but
also contains a few new features, mostly related to specific targets.
@@ -89,8 +274,9 @@ sequence used in GCC version 2.7.0. That calling sequence was based on the AIX
calling sequence without function descriptors. To compile code for that older
calling sequence, either configure the compiler for powerpc-*-eabiaix or use
the -mcall-aix switch when compiling and linking.
Noteworthy changes in GCC version 2.7.0:
Noteworthy changes in GCC version 2.7.0
---------------------------------------
GCC now works better on systems that use ".obj" and ".exe" instead of
".o" and no extension. This involved changes to the driver program,
@@ -342,7 +528,7 @@ The following new configurations are supported:
GNU on x86 (instead of treating it like MACH)
NetBSD on Sparc and Motorola 68k
AIX 4.1 on RS/6000 and PowerPC systems
Sequent DYNUX/ptx 1.x and 2.x.
Sequent DYNIX/ptx 1.x and 2.x.
Both COFF and ELF configurations on AViiON without using /bin/gcc
Windows/NT on x86 architecture; preliminary
AT&T DSP1610 digital signal processor chips

26
gcc/README Normal file
View File

@@ -0,0 +1,26 @@
This directory contains the version 2.8.1 release of the GNU C
compiler. It includes all of the support for compiling C++ and
Objective C, including a run-time library for Objective C.
The GNU C compiler is free software. See the file COPYING for copying
permission.
See the file gcc.texi (together with other files that it includes) for
installation and porting information. The file INSTALL contains a
copy of the installation information, as plain ASCII.
Installing this package will create various files in subdirectories of
/usr/local/lib, which are passes used by the compiler and a library
named libgcc.a. It will also create /usr/local/bin/gcc, which is
the user-level command to do a compilation.
See the Bugs chapter of the GCC Manual for how to report bugs
usefully. An online readable version of the manual is in the files
gcc.info*.
The files pself.c and pself1.c are not part of GCC.
They are programs that print themselves on standard output.
They were written by Dario Dariol and Giovanni Cozzi, and are
included for your hacking pleasure. Likewise pself2.c
(Who is the author of that?) and pself3.c (by Vlad Taeerov and Rashit
Fakhreyev).

View File

@@ -1,3 +1,80 @@
AIX 4.3 assembler
The AIX 4.3.0.0 assembler generates incorrect object files if the ".bs"
pseudo-op references symbols in certain sections. If GCC is invoked with
the -g debugging option (including during bootstrapping), incorrect object
files will be produced and the AIX linker will fail with a severe error.
A fix for APAR IX74254 (64BIT DISASSEMBLED OUPUT FROM COMPILER FAILS TO
ASSEMBLE/BIND) is available from IBM Customer Support and IBM's
service.boulder.ibm.com website.
AIX 4.1 binder
Due to changes in the way that GCC invokes the binder (linker) for AIX 4.1,
the link step now may produce warnings of duplicate symbols which were not
reported before. The assembly files generated by GCC for AIX always have
included multiple symbol definitions for certain global variable and
function declarations in the original program. The warnings should not
prevent the linker from producing a correct library or runnable executable.
AIX NLS problems
AIX on the RS/6000 provides support (NLS) for environments outside of
the United States. Compilers and assemblers use NLS to support
locale-specific representations of various objects including
floating-point numbers ("." vs "," for separating decimal fractions).
There have been problems reported where the library linked with GCC does
not produce the same floating-point formats that the assembler accepts.
If you have this problem, set the LANG environment variable to "C" or
"En_US".
AIX 3.2.5 XLC-1.3 problems
XLC version 1.3.0.0 distributed with AIX 3.2.5 will miscompile jump.c when
building the stage1 compiler during the bootstrap process. This will cause
GCC to crash and the bootstrap to fail later while compiling libgcc2.c. XLC
version 1.3.0.1 or later fixes this problem. XLC-1.3.0.19 also cannot
bootstrap GCC so please avoid that release as well. You can obtain
XLC-1.3.0.24 by requesting PTF 432238 from IBM, or just ask for the latest
release of XLC-1.3.
There also have been reports of problems bootstrapping GCC with some older
releases of xlc-1.2.1, including xlc-1.2.1.8. Newer releases of xlc-1.2.1
do not exhibit this problem: xlc-1.2.1.28 is known to bootstrap properly.
AIX 3.2 common-mode support
AIX common-mode providing transparent support of both the POWER and PowerPC
architectures is usable in AIX 3.2.3 and above but an export file and
support for hidden export via libc.a will not exist until AIX 4.1. libgcc.a
also must be compiled in common-mode. Note that executables generated for
the POWER (RIOS1 and RSC) architecture will run directly on systems using
the MPC601 chip. Common-mode only improves the performance of a single
executable run on both POWER and PowerPC architecture platforms by not using
POWER- or PowerPC-specific instructions and eliminating the need to trap to
emulation (for POWER instructions run on PowerPC).
To link a common-mode application prior to AIX 4.1 and run it on a system at
AIX level 3.2.3 or above, use the text between the "<>" as an export file
(e.g. milli.exp)
<><><><><><><><><><><>
#!
__mulh 0x3100
__mull 0x3180
__divss 0x3200
__divus 0x3280
__quoss 0x3300
__quous 0x3380
<><><><><><><><><><><>
and then link with -Wl,-bI:milli.exp.
AIX 3.1 and 3.2 assembler problems
Specifying the -g flag to GCC on the RS/6000 requires upgrading the
@@ -43,69 +120,3 @@ an assembler modified after October 16th, 1995 in order to build the GNU C
compiler. This is because the GNU C compiler wants to build a variant of its
library, libgcc.a with the -mcpu=common switch to support building programs
that can run on either the Power or PowerPC machines.
AIX NLS problems
AIX on the RS/6000 provides support (NLS) for environments outside of
the United States. Compilers and assemblers use NLS to support
locale-specific representations of various objects including
floating-point numbers ("." vs "," for separating decimal fractions).
There have been problems reported where the library linked with GCC does
not produce the same floating-point formats that the assembler accepts.
If you have this problem, set the LANG environment variable to "C" or
"En_US".
AIX 3.2.5 XLC-1.3 problems
XLC version 1.3.0.0 distributed with AIX 3.2.5 will miscompile jump.c when
building the stage1 compiler during the bootstrap process. This will cause
GCC to crash and the bootstrap to fail later while compiling libgcc2.c. XLC
version 1.3.0.1 or later fixes this problem. XLC-1.3.0.19 also cannot
bootstrap GCC so please avoid that release as well. You can obtain
XLC-1.3.0.24 by requesting PTF 432238 from IBM, or just ask for the latest
release of XLC-1.3.
There also have been reports of problems bootstrapping GCC with some older
releases of xlc-1.2.1, including xlc-1.2.1.8. Newer releases of xlc-1.2.1
do not exhibit this problem: xlc-1.2.1.28 is known to bootstrap properly.
AIX 3.2 common-mode support
AIX common-mode providing transparent support of both the POWER and PowerPC
architectures is usable in AIX 3.2.3 and above but an export file and
support for hidden export via libc.a will not exist until AIX 4.1. libgcc.a
also must be compiled in common-mode. Note that executables generated for
the POWER (RIOS1 and RSC) architecture will run directly on systems using
the MPC601 chip. Common-mode only improves the performance of a single
executable run on both POWER and PowerPC architecture platforms by not using
POWER- or PowerPC-specific instructions and eliminating the need to trap to
emulation (for POWER instructions run on PowerPC).
To link a common-mode application prior to AIX 4.1 and run it on a system at
AIX level 3.2.3 or above, use the text between the "<>" as an export file
(e.g. milli.exp)
<><><><><><><><><><><>
#!
__mulh 0x3100
__mull 0x3180
__divss 0x3200
__divus 0x3280
__quoss 0x3300
__quous 0x3380
<><><><><><><><><><><>
and then link with -Wl,-bI:milli.exp.
AIX 4.1 binder
Due to changes in the way that GCC invokes the binder (linker) for AIX 4.1,
the link step now may produce warnings of duplicate symbols which were not
reported before. The assembly files generated by GCC for AIX always have
included multiple symbol definitions for certain global variable and
function declarations in the original program. The warnings should not
prevent the linker from producing a correct library or runnable executable.

View File

@@ -20,7 +20,7 @@ IF YOU THINK YOU MIGHT COMPILE X FOR SOLARIS 2, then you really don't
need this patch: get /contrib/R5.SunOS5.patch.tar.Z from
export.lcs.mit.edu instead. It has everything you need to do the
build for Solaris 2, sets you up to everything with GCC, and is
backward compatible with Sunos 4.*. Get the the README
backward compatible with SunOS 4.*. Get the the README
(/contrib/R5.SunOS5.patch.README at export) for more info.
If you see undefined symbols _dlopen, _dlsym, or _dlclose when linking

39
gcc/TESTS.FLUNK Normal file
View File

@@ -0,0 +1,39 @@
This is a collection of things that test suites have
said were "wrong" with GCC--but that I don't agree with.
First, test suites sometimes test for compatibility with
traditional C. GCC with -traditional is not completely
compatible with traditional C, and in some ways I think it
should not be.
* K&R C allowed \x to appear in a string literal (or character
literal?) even in cases where it is *not* followed by a sequence of
hex digits. I'm not convinced this is desirable.
* K&R compilers allow comments to cross over an inclusion boundary (i.e.
started in an include file and ended in the including file).
I think this would be quite ugly and can't imagine it could
be needed.
Sometimes tests disagree with GCC's interpretation of the ANSI standard.
* One test claims that this function should return 1.
enum {A, B} foo;
func (enum {B, A} arg)
{
return B;
}
I think it should return 0, because the definition of B that
applies is the one in func.
* Some tests report failure when the compiler does not produce
an error message for a certain program.
ANSI C requires a "diagnostic" message for certain kinds of invalid
programs, but a warning counts as a diagnostic. If GCC produces
a warning but not an error, that is correct ANSI support.
When test suites call this "failure", the tests are broken.

View File

@@ -1,7 +1,5 @@
/* Include the old config.h as config2.h to simplify the transition
to autoconf. */
#include "config2.h"
/* Define if you have a working <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Whether malloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_MALLOC
@@ -9,6 +7,21 @@
/* Whether realloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_REALLOC
/* Whether calloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_CALLOC
/* Whether free must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_FREE
/* Whether index must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_INDEX
/* Whether rindex must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_RINDEX
/* Whether getenv must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_GETENV
/* Whether sbrk must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_SBRK
@TOP@

6
gcc/aclocal.m4 vendored
View File

@@ -16,6 +16,12 @@ AC_CACHE_VAL(gcc_cv_decl_needed_$1,
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifndef HAVE_RINDEX
#define rindex strrchr
#endif
#ifndef HAVE_INDEX
#define index strchr
#endif],
[char *(*pfn) = (char *(*)) $1],
gcc_cv_decl_needed_$1=no, gcc_cv_decl_needed_$1=yes)])

View File

@@ -73,6 +73,12 @@ do { \
#define EXECUTE_IF_AND_COMPL_IN_REG_SET(REGSET1, REGSET2, MIN, REGNUM, CODE) \
EXECUTE_IF_AND_COMPL_IN_BITMAP (REGSET1, REGSET2, MIN, REGNUM, CODE)
/* Loop over all registers in REGSET1 and REGSET2, starting with MIN, setting
REGNUM to the register number and executing CODE for all registers that are
set in both regsets. */
#define EXECUTE_IF_AND_IN_REG_SET(REGSET1, REGSET2, MIN, REGNUM, CODE) \
EXECUTE_IF_AND_IN_BITMAP (REGSET1, REGSET2, MIN, REGNUM, CODE)
/* Allocate a register set with oballoc. */
#define OBSTACK_ALLOC_REG_SET(OBSTACK) BITMAP_OBSTACK_ALLOC (OBSTACK)

View File

@@ -1,5 +1,5 @@
/* Output bytecodes for GNU C-compiler.
Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -20,6 +20,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include <stdio.h>
#ifdef __STDC__
#include <stdarg.h>
#else
@@ -38,8 +39,6 @@ Boston, MA 02111-1307, USA. */
#include "bc-typecd.h"
#include "bi-run.h"
#include <stdio.h>
extern char *xmalloc (), *xrealloc ();
extern struct obstack *rtl_obstack;

View File

@@ -1,5 +1,5 @@
/* Bytecode conversion definitions for GNU C-compiler.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -20,6 +20,10 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include "tree.h"
#include "rtl.h"
#include "machmode.h"

View File

@@ -18,20 +18,25 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "config.h"
#include <stdio.h>
#include "rtl.h"
#include "flags.h"
#include "obstack.h"
#include "regs.h"
#include "basic-block.h"
/* The contents of the current function definition are allocated
in this obstack, and all are freed at the end of the function.
For top-level functions, this is temporary_obstack.
Separate obstacks are made for nested functions. */
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
extern struct obstack *function_obstack;
#ifdef NEED_DECLARATION_FREE
extern void free PROTO((void *));
#endif
/* Obstack to allocate bitmap elements from. */
static struct obstack bitmap_obstack;
static int bitmap_obstack_init = FALSE;
#ifndef INLINE
@@ -95,8 +100,39 @@ bitmap_element_allocate (head)
bitmap_free = element->next;
}
else
element = (bitmap_element *) obstack_alloc (function_obstack,
sizeof (bitmap_element));
{
/* We can't use gcc_obstack_init to initialize the obstack since
print-rtl.c now calls bitmap functions, and bitmap is linked
into the gen* functions. */
if (!bitmap_obstack_init)
{
bitmap_obstack_init = TRUE;
/* Let particular systems override the size of a chunk. */
#ifndef OBSTACK_CHUNK_SIZE
#define OBSTACK_CHUNK_SIZE 0
#endif
/* Let them override the alloc and free routines too. */
#ifndef OBSTACK_CHUNK_ALLOC
#define OBSTACK_CHUNK_ALLOC xmalloc
#endif
#ifndef OBSTACK_CHUNK_FREE
#define OBSTACK_CHUNK_FREE free
#endif
#if !defined(__GNUC__) || (__GNUC__ < 2)
#define __alignof__(type) 0
#endif
obstack_specify_allocation (&bitmap_obstack, OBSTACK_CHUNK_SIZE,
__alignof__ (bitmap_element),
(void *(*) ()) OBSTACK_CHUNK_ALLOC,
(void (*) ()) OBSTACK_CHUNK_FREE);
}
element = (bitmap_element *) obstack_alloc (&bitmap_obstack,
sizeof (bitmap_element));
}
#if BITMAP_ELEMENT_WORDS == 2
element->bits[0] = element->bits[1] = 0;
@@ -573,11 +609,37 @@ debug_bitmap (head)
bitmap_debug_file (stdout, head);
}
/* Release any memory allocated by bitmaps. Since we allocate off of the
function_obstack, just zap the free list. */
/* Function to print out the contents of a bitmap. Unlike bitmap_debug_file,
it does not print anything but the bits. */
void
bitmap_print (file, head, prefix, suffix)
FILE *file;
bitmap head;
char *prefix;
char *suffix;
{
char *comma = "";
int i;
fputs (prefix, file);
EXECUTE_IF_SET_IN_BITMAP (head, 0, i,
{
fprintf (file, "%s%d", comma, i);
comma = ", ";
});
fputs (suffix, file);
}
/* Release any memory allocated by bitmaps. */
void
bitmap_release_memory ()
{
bitmap_free = 0;
if (bitmap_obstack_init)
{
bitmap_obstack_init = FALSE;
obstack_free (&bitmap_obstack, NULL_PTR);
}
}

View File

@@ -86,7 +86,10 @@ extern int bitmap_bit_p PROTO((bitmap, int));
/* Debug functions to print a bitmap linked list. */
extern void bitmap_debug PROTO((bitmap));
extern void bitmap_debug_file STDIO_PROTO((FILE *, bitmap));
extern void bitmap_debug_file PROTO((FILE *, bitmap));
/* Print a bitmap */
extern void bitmap_print PROTO((FILE *, bitmap, char *, char *));
/* Initialize a bitmap header. */
extern bitmap bitmap_initialize PROTO((bitmap));
@@ -197,7 +200,7 @@ do { \
for (; ptr1_ != 0 ; ptr1_ = ptr1_->next) \
{ \
/* Advance BITMAP2 to the equivalent link, using an all \
zero element if an equavialent link doesn't exist. */ \
zero element if an equivalent link doesn't exist. */ \
bitmap_element *tmp2_; \
\
while (ptr2_ != 0 && ptr2_->indx < ptr1_->indx) \
@@ -237,3 +240,76 @@ do { \
word_num_ = 0; \
} \
} while (0)
/* Loop over all bits in BITMAP1 and BITMAP2, starting with MIN, setting
BITNUM to the bit number and executing CODE for all bits that are set in
the both bitmaps. */
#define EXECUTE_IF_AND_IN_BITMAP(BITMAP1, BITMAP2, MIN, BITNUM, CODE) \
do { \
bitmap_element *ptr1_ = (BITMAP1)->first; \
bitmap_element *ptr2_ = (BITMAP2)->first; \
unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \
unsigned bit_num_ = (MIN) % ((unsigned) HOST_BITS_PER_WIDE_INT); \
unsigned word_num_ = (((MIN) / ((unsigned) HOST_BITS_PER_WIDE_INT)) \
% BITMAP_ELEMENT_WORDS); \
\
/* Find the block the minimum bit is in in the first bitmap. */ \
while (ptr1_ != 0 && ptr1_->indx < indx_) \
ptr1_ = ptr1_->next; \
\
if (ptr1_ != 0 && ptr1_->indx != indx_) \
{ \
bit_num_ = 0; \
word_num_ = 0; \
} \
\
for (; ptr1_ != 0 ; ptr1_ = ptr1_->next) \
{ \
/* Advance BITMAP2 to the equivalent link */ \
while (ptr2_ != 0 && ptr2_->indx < ptr1_->indx) \
ptr2_ = ptr2_->next; \
\
if (ptr2_ == 0) \
{ \
/* If there are no more elements in BITMAP2, exit loop now.*/ \
ptr1_ = (bitmap_element *)0; \
break; \
} \
else if (ptr2_->indx > ptr1_->indx) \
{ \
bit_num_ = word_num_ = 0; \
continue; \
} \
\
for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \
{ \
unsigned HOST_WIDE_INT word_ = (ptr1_->bits[word_num_] \
& ptr2_->bits[word_num_]); \
if (word_ != 0) \
{ \
for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \
{ \
unsigned HOST_WIDE_INT mask_ \
= ((unsigned HOST_WIDE_INT)1) << bit_num_; \
\
if ((word_ & mask_) != 0) \
{ \
word_ &= ~ mask_; \
(BITNUM) = (ptr1_->indx * BITMAP_ELEMENT_ALL_BITS \
+ word_num_ * HOST_BITS_PER_WIDE_INT \
+ bit_num_); \
\
CODE; \
if (word_ == 0) \
break; \
} \
} \
} \
\
bit_num_ = 0; \
} \
\
word_num_ = 0; \
} \
} while (0)

View File

@@ -1,7 +1,7 @@
/* Generate information regarding function declarations and definitions based
on information stored in GCC's tree structure. This code implements the
-aux-info option.
Copyright (C) 1989, 1991, 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1989, 1991, 1994, 1995, 1997 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@segfault.us.com).
This file is part of GNU CC.
@@ -21,8 +21,8 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "config.h"
#include <stdio.h>
#include "flags.h"
#include "tree.h"
#include "c-tree.h"
@@ -39,14 +39,14 @@ typedef enum formals_style_enum formals_style;
static char *data_type;
static char *concat ();
static char *concat3 ();
static char *gen_formal_list_for_type ();
static int deserves_ellipsis ();
static char *gen_formal_list_for_func_def ();
static char *gen_type ();
static char *gen_decl ();
void gen_aux_info_record ();
static char *concat PROTO((char *, char *));
static char *concat3 PROTO((char *, char *, char *));
static char *affix_data_type PROTO((char *));
static char *gen_formal_list_for_type PROTO((tree, formals_style));
static int deserves_ellipsis PROTO((tree));
static char *gen_formal_list_for_func_def PROTO((tree, formals_style));
static char *gen_type PROTO((char *, tree, formals_style));
static char *gen_decl PROTO((tree, int, formals_style));
/* Take two strings and mash them together into a newly allocated area. */

View File

@@ -1,5 +1,5 @@
/* Subroutines shared by all languages that are variants of C.
Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -19,12 +19,12 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include <stdio.h>
#include "tree.h"
#include "c-lex.h"
#include "c-tree.h"
#include "flags.h"
#include "obstack.h"
#include <stdio.h>
#include <ctype.h>
#ifndef WCHAR_TYPE_SIZE
@@ -51,6 +51,61 @@ static void add_attribute PROTO((enum attrs, char *,
static void init_attributes PROTO((void));
static void record_international_format PROTO((tree, tree, int));
/* Keep a stack of if statements. The value recorded is the number of
compound statements seen up to the if keyword. */
static int *if_stack;
/* Amount of space in the if statement stack. */
static int if_stack_space = 0;
/* Stack pointer. */
static int if_stack_pointer = 0;
void
c_expand_start_cond (cond, exitflag, compstmt_count)
tree cond;
int exitflag;
int compstmt_count;
{
/* Make sure there is enough space on the stack. */
if (if_stack_space == 0)
{
if_stack_space = 10;
if_stack = (int *)xmalloc (10 * sizeof (int));
}
else if (if_stack_space == if_stack_pointer)
{
if_stack_space += 10;
if_stack = (int *)xrealloc (if_stack, if_stack_space * sizeof (int));
}
/* Record this if statement. */
if_stack[if_stack_pointer++] = compstmt_count;
expand_start_cond (cond, exitflag);
}
void
c_expand_end_cond ()
{
if_stack_pointer--;
expand_end_cond ();
}
void
c_expand_start_else ()
{
if (warn_parentheses
&& if_stack_pointer > 1
&& if_stack[if_stack_pointer - 1] == if_stack[if_stack_pointer - 2])
warning ("suggest explicit braces to avoid ambiguous `else'");
/* This if statement can no longer cause a dangling else. */
if_stack[if_stack_pointer - 1]--;
expand_start_else ();
}
/* Make bindings for __FUNCTION__ and __PRETTY_FUNCTION__. */
void
@@ -268,7 +323,7 @@ init_attributes ()
add_attribute (A_COMMON, "common", 0, 0, 1);
add_attribute (A_NORETURN, "noreturn", 0, 0, 1);
add_attribute (A_NORETURN, "volatile", 0, 0, 1);
add_attribute (A_UNUSED, "unused", 0, 0, 1);
add_attribute (A_UNUSED, "unused", 0, 0, 0);
add_attribute (A_CONST, "const", 0, 0, 1);
add_attribute (A_T_UNION, "transparent_union", 0, 0, 0);
add_attribute (A_CONSTRUCTOR, "constructor", 0, 0, 1);
@@ -385,8 +440,11 @@ decl_attributes (node, attributes, prefix_attributes)
break;
case A_UNUSED:
if (TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == VAR_DECL
|| TREE_CODE (decl) == FUNCTION_DECL)
if (is_type)
TREE_USED (type) = 1;
else if (TREE_CODE (decl) == PARM_DECL
|| TREE_CODE (decl) == VAR_DECL
|| TREE_CODE (decl) == FUNCTION_DECL)
TREE_USED (decl) = 1;
else
warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
@@ -860,37 +918,39 @@ typedef struct {
/* Type of argument if length modifier `L' is used.
If NULL, then this modifier is not allowed. */
tree *bigllen;
/* Type of argument if length modifier `Z' is used.
If NULL, then this modifier is not allowed. */
tree *zlen;
/* List of other modifier characters allowed with these options. */
char *flag_chars;
} format_char_info;
static format_char_info print_char_table[] = {
{ "di", 0, T_I, T_I, T_L, T_LL, T_LL, "-wp0 +" },
{ "oxX", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, "-wp0#" },
{ "u", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, "-wp0" },
/* Two GNU extensions. */
{ "Z", 0, T_ST, NULL, NULL, NULL, NULL, "-wp0" },
{ "m", 0, T_V, NULL, NULL, NULL, NULL, "-wp" },
{ "feEgG", 0, T_D, NULL, NULL, NULL, T_LD, "-wp0 +#" },
{ "c", 0, T_I, NULL, T_W, NULL, NULL, "-w" },
{ "C", 0, T_W, NULL, NULL, NULL, NULL, "-w" },
{ "s", 1, T_C, NULL, T_W, NULL, NULL, "-wp" },
{ "S", 1, T_W, NULL, NULL, NULL, NULL, "-wp" },
{ "p", 1, T_V, NULL, NULL, NULL, NULL, "-w" },
{ "n", 1, T_I, T_S, T_L, T_LL, NULL, "" },
{ "di", 0, T_I, T_I, T_L, T_LL, T_LL, T_ST, "-wp0 +" },
{ "oxX", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, "-wp0#" },
{ "u", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, "-wp0" },
/* A GNU extension. */
{ "m", 0, T_V, NULL, NULL, NULL, NULL, NULL, "-wp" },
{ "feEgGaA", 0, T_D, NULL, NULL, NULL, T_LD, NULL, "-wp0 +#" },
{ "c", 0, T_I, NULL, T_W, NULL, NULL, NULL, "-w" },
{ "C", 0, T_W, NULL, NULL, NULL, NULL, NULL, "-w" },
{ "s", 1, T_C, NULL, T_W, NULL, NULL, NULL, "-wp" },
{ "S", 1, T_W, NULL, NULL, NULL, NULL, NULL, "-wp" },
{ "p", 1, T_V, NULL, NULL, NULL, NULL, NULL, "-w" },
{ "n", 1, T_I, T_S, T_L, T_LL, NULL, NULL, "" },
{ NULL }
};
static format_char_info scan_char_table[] = {
{ "di", 1, T_I, T_S, T_L, T_LL, T_LL, "*" },
{ "ouxX", 1, T_UI, T_US, T_UL, T_ULL, T_ULL, "*" },
{ "efgEG", 1, T_F, NULL, T_D, NULL, T_LD, "*" },
{ "sc", 1, T_C, NULL, T_W, NULL, NULL, "*a" },
{ "[", 1, T_C, NULL, NULL, NULL, NULL, "*a" },
{ "C", 1, T_W, NULL, NULL, NULL, NULL, "*" },
{ "S", 1, T_W, NULL, NULL, NULL, NULL, "*" },
{ "p", 2, T_V, NULL, NULL, NULL, NULL, "*" },
{ "n", 1, T_I, T_S, T_L, T_LL, NULL, "" },
{ "di", 1, T_I, T_S, T_L, T_LL, T_LL, NULL, "*" },
{ "ouxX", 1, T_UI, T_US, T_UL, T_ULL, T_ULL, NULL, "*" },
{ "efgEGaA", 1, T_F, NULL, T_D, NULL, T_LD, NULL, "*" },
{ "sc", 1, T_C, NULL, T_W, NULL, NULL, NULL, "*a" },
{ "[", 1, T_C, NULL, NULL, NULL, NULL, NULL, "*a" },
{ "C", 1, T_W, NULL, NULL, NULL, NULL, NULL, "*" },
{ "S", 1, T_W, NULL, NULL, NULL, NULL, NULL, "*" },
{ "p", 2, T_V, NULL, NULL, NULL, NULL, NULL, "*" },
{ "n", 1, T_I, T_S, T_L, T_LL, NULL, NULL, "" },
{ NULL }
};
@@ -1229,12 +1289,15 @@ check_format_info (info, params)
if (index (flag_chars, *format_chars) != 0)
{
sprintf (message, "repeated `%c' flag in format",
*format_chars);
*format_chars++);
warning (message);
}
i = strlen (flag_chars);
flag_chars[i++] = *format_chars++;
flag_chars[i] = 0;
else
{
i = strlen (flag_chars);
flag_chars[i++] = *format_chars++;
flag_chars[i] = 0;
}
}
/* "If the space and + flags both appear,
the space flag will be ignored." */
@@ -1334,6 +1397,12 @@ check_format_info (info, params)
pedwarn ("ANSI C does not support the `%c' length modifier",
length_char);
}
else if (*format_chars == 'Z')
{
length_char = *format_chars++;
if (pedantic)
pedwarn ("ANSI C does not support the `Z' length modifier");
}
else
length_char = 0;
if (length_char == 'l' && *format_chars == 'l')
@@ -1343,10 +1412,15 @@ check_format_info (info, params)
pedwarn ("ANSI C does not support the `ll' length modifier");
}
aflag = 0;
if (*format_chars == 'a')
if (*format_chars == 'a' && info->is_scan)
{
aflag = 1;
format_chars++;
if (format_chars[1] == 's' || format_chars[1] == 'S'
|| format_chars[1] == '[')
{
/* `a' is used as a flag. */
aflag = 1;
format_chars++;
}
}
if (suppressed && length_char != 0)
{
@@ -1451,6 +1525,7 @@ check_format_info (info, params)
case 'l': wanted_type = fci->llen ? *(fci->llen) : 0; break;
case 'q': wanted_type = fci->qlen ? *(fci->qlen) : 0; break;
case 'L': wanted_type = fci->bigllen ? *(fci->bigllen) : 0; break;
case 'Z': wanted_type = fci->zlen ? *fci->zlen : 0; break;
}
if (wanted_type == 0)
{
@@ -1485,6 +1560,8 @@ check_format_info (info, params)
++arg_num;
cur_type = TREE_TYPE (cur_param);
STRIP_NOPS (cur_param);
/* Check the types of any additional pointer arguments
that precede the "real" argument. */
for (i = 0; i < fci->pointer_count + aflag; ++i)
@@ -1492,6 +1569,12 @@ check_format_info (info, params)
if (TREE_CODE (cur_type) == POINTER_TYPE)
{
cur_type = TREE_TYPE (cur_type);
if (TREE_CODE (cur_param) == ADDR_EXPR)
cur_param = TREE_OPERAND (cur_param, 0);
else
cur_param = 0;
continue;
}
if (TREE_CODE (cur_type) != ERROR_MARK)
@@ -1506,6 +1589,21 @@ check_format_info (info, params)
break;
}
/* See if this is an attempt to write into a const type with
scanf. */
if (info->is_scan && i == fci->pointer_count + aflag
&& wanted_type != 0
&& TREE_CODE (cur_type) != ERROR_MARK
&& (TYPE_READONLY (cur_type)
|| (cur_param != 0
&& (TREE_CODE_CLASS (TREE_CODE (cur_param)) == 'c'
|| (TREE_CODE_CLASS (TREE_CODE (cur_param)) == 'd'
&& TREE_READONLY (cur_param))))))
{
sprintf (message, "writing into constant object (arg %d)", arg_num);
warning (message);
}
/* Check the type of the "real" argument, if there's a type we want. */
if (i == fci->pointer_count + aflag && wanted_type != 0
&& TREE_CODE (cur_type) != ERROR_MARK
@@ -1856,7 +1954,7 @@ void
binary_op_error (code)
enum tree_code code;
{
register char *opname = "unknown";
register char *opname;
switch (code)
{
@@ -1909,6 +2007,8 @@ binary_op_error (code)
case LROTATE_EXPR:
case RROTATE_EXPR:
opname = "rotate"; break;
default:
opname = "unknown"; break;
}
error ("invalid operands to binary %s", opname);
}
@@ -1995,6 +2095,8 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
case GE_EXPR:
code = LE_EXPR;
break;
default:
break;
}
*rescode_ptr = code;
}
@@ -2125,6 +2227,9 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
primop1 = TYPE_MAX_VALUE (type);
val = 0;
break;
default:
break;
}
type = unsigned_type (type);
}
@@ -2222,6 +2327,10 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
primop0))))
warning ("unsigned value < 0 is always 0");
value = boolean_false_node;
break;
default:
break;
}
if (value != 0)
@@ -2409,6 +2518,9 @@ truthvalue_conversion (expr)
if (warn_parentheses && C_EXP_ORIGINAL_CODE (expr) == MODIFY_EXPR)
warning ("suggest parentheses around assignment used as truth value");
break;
default:
break;
}
if (TREE_CODE (TREE_TYPE (expr)) == COMPLEX_TYPE)

View File

@@ -1,5 +1,5 @@
/* Process declarations and variables for C compiler.
Copyright (C) 1988, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Copyright (C) 1988, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -27,12 +27,12 @@ Boston, MA 02111-1307, USA. */
line numbers. For example, the CONST_DECLs for enum values. */
#include "config.h"
#include <stdio.h>
#include "tree.h"
#include "flags.h"
#include "output.h"
#include "c-tree.h"
#include "c-lex.h"
#include <stdio.h>
/* In grokdeclarator, distinguish syntactic contexts of declarators. */
enum decl_context
@@ -471,9 +471,14 @@ int explicit_flag_signed_bitfields = 0;
int flag_no_ident = 0;
/* Nonzero means warn about implicit declarations. */
/* Nonzero means warn about use of implicit int. */
int warn_implicit;
int warn_implicit_int;
/* Nonzero means message about use of implicit function declarations;
1 means warning; 2 means error. */
int mesg_implicit_function_declaration;
/* Nonzero means give string constants the type `const char *'
to get extra warnings from them. These warnings will be too numerous
@@ -553,9 +558,10 @@ int warn_missing_braces;
int warn_main;
/* Warn about comparison of signed and unsigned values. */
/* Warn about comparison of signed and unsigned values.
If -1, neither -Wsign-compare nor -Wno-sign-compare has been specified. */
int warn_sign_compare;
int warn_sign_compare = -1;
/* Nonzero means `$' can be in an identifier. */
@@ -647,10 +653,24 @@ c_decode_option (p)
flag_no_ident = 0;
else if (!strcmp (p, "-ansi"))
flag_no_asm = 1, flag_no_nonansi_builtin = 1;
else if (!strcmp (p, "-Werror-implicit-function-declaration"))
mesg_implicit_function_declaration = 2;
else if (!strcmp (p, "-Wimplicit-function-declaration"))
mesg_implicit_function_declaration = 1;
else if (!strcmp (p, "-Wno-implicit-function-declaration"))
mesg_implicit_function_declaration = 0;
else if (!strcmp (p, "-Wimplicit-int"))
warn_implicit_int = 1;
else if (!strcmp (p, "-Wno-implicit-int"))
warn_implicit_int = 0;
else if (!strcmp (p, "-Wimplicit"))
warn_implicit = 1;
{
warn_implicit_int = 1;
if (mesg_implicit_function_declaration != 2)
mesg_implicit_function_declaration = 1;
}
else if (!strcmp (p, "-Wno-implicit"))
warn_implicit = 0;
warn_implicit_int = 0, mesg_implicit_function_declaration = 0;
else if (!strcmp (p, "-Wwrite-strings"))
warn_write_strings = 1;
else if (!strcmp (p, "-Wno-write-strings"))
@@ -750,7 +770,8 @@ c_decode_option (p)
warning about not using it without also specifying -O. */
if (warn_uninitialized != 1)
warn_uninitialized = 2;
warn_implicit = 1;
warn_implicit_int = 1;
mesg_implicit_function_declaration = 1;
warn_return_type = 1;
warn_unused = 1;
warn_switch = 1;
@@ -758,7 +779,6 @@ c_decode_option (p)
warn_char_subscripts = 1;
warn_parentheses = 1;
warn_missing_braces = 1;
warn_sign_compare = 1;
/* We set this to 2 here, but 1 in -Wmain, so -ffreestanding can turn
it off only if it's not explicit. */
warn_main = 2;
@@ -1738,7 +1758,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
/* Optionally warn about more than one declaration for the same name. */
if (errmsg == 0 && warn_redundant_decls && DECL_SOURCE_LINE (olddecl) != 0
/* Dont warn about a function declaration
/* Don't warn about a function declaration
followed by a definition. */
&& !(TREE_CODE (newdecl) == FUNCTION_DECL && DECL_INITIAL (newdecl) != 0
&& DECL_INITIAL (olddecl) == 0)
@@ -1948,13 +1968,14 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
}
if (different_binding_level)
{
/* Don't output a duplicate symbol for this declaration. */
TREE_ASM_WRITTEN (newdecl) = 1;
/* Don't output a duplicate symbol or debugging information for this
declaration. */
TREE_ASM_WRITTEN (newdecl) = DECL_IGNORED_P (newdecl) = 1;
return 0;
}
/* Copy most of the decl-specific fields of NEWDECL into OLDDECL.
But preserve OLDdECL's DECL_UID. */
But preserve OLDDECL's DECL_UID. */
{
register unsigned olddecl_uid = DECL_UID (olddecl);
@@ -2112,7 +2133,8 @@ pushdecl (x)
if (TYPE_NAME (TREE_TYPE (x)) == 0)
TYPE_NAME (TREE_TYPE (x)) = x;
}
else if (TREE_TYPE (x) != error_mark_node)
else if (TREE_TYPE (x) != error_mark_node
&& DECL_ORIGINAL_TYPE (x) == NULL_TREE)
{
tree tt = TREE_TYPE (x);
DECL_ORIGINAL_TYPE (x) = tt;
@@ -2467,9 +2489,15 @@ implicitly_declare (functionid)
rest_of_decl_compilation (decl, NULL_PTR, 0, 0);
if (warn_implicit && implicit_warning)
warning ("implicit declaration of function `%s'",
IDENTIFIER_POINTER (functionid));
if (mesg_implicit_function_declaration && implicit_warning)
{
if (mesg_implicit_function_declaration == 2)
error ("implicit declaration of function `%s'",
IDENTIFIER_POINTER (functionid));
else
warning ("implicit declaration of function `%s'",
IDENTIFIER_POINTER (functionid));
}
else if (warn_traditional && traditional_warning)
warning ("function `%s' was previously declared within a block",
IDENTIFIER_POINTER (functionid));
@@ -2849,7 +2877,7 @@ init_decl_processing ()
tree traditional_ptr_type_node;
/* Data types of memcpy and strlen. */
tree memcpy_ftype, memset_ftype, strlen_ftype;
tree void_ftype_any;
tree void_ftype_any, ptr_ftype_void, ptr_ftype_ptr;
int wchar_type_size;
tree temp;
tree array_domain_type;
@@ -3165,6 +3193,11 @@ init_decl_processing ()
sizetype,
endlink))));
ptr_ftype_void = build_function_type (ptr_type_node, endlink);
ptr_ftype_ptr
= build_function_type (ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node, endlink));
builtin_function ("__builtin_constant_p", default_function_type,
BUILT_IN_CONSTANT_P, NULL_PTR);
@@ -3186,6 +3219,38 @@ init_decl_processing ()
build_function_type (ptr_type_node, NULL_TREE),
BUILT_IN_AGGREGATE_INCOMING_ADDRESS, NULL_PTR);
/* Hooks for the DWARF 2 __throw routine. */
builtin_function ("__builtin_unwind_init",
build_function_type (void_type_node, endlink),
BUILT_IN_UNWIND_INIT, NULL_PTR);
builtin_function ("__builtin_fp", ptr_ftype_void, BUILT_IN_FP, NULL_PTR);
builtin_function ("__builtin_sp", ptr_ftype_void, BUILT_IN_SP, NULL_PTR);
builtin_function ("__builtin_dwarf_fp_regnum",
build_function_type (unsigned_type_node, endlink),
BUILT_IN_DWARF_FP_REGNUM, NULL_PTR);
builtin_function ("__builtin_dwarf_reg_size", int_ftype_int,
BUILT_IN_DWARF_REG_SIZE, NULL_PTR);
builtin_function ("__builtin_frob_return_addr", ptr_ftype_ptr,
BUILT_IN_FROB_RETURN_ADDR, NULL_PTR);
builtin_function ("__builtin_extract_return_addr", ptr_ftype_ptr,
BUILT_IN_EXTRACT_RETURN_ADDR, NULL_PTR);
builtin_function ("__builtin_set_return_addr_reg",
build_function_type (void_type_node,
tree_cons (NULL_TREE,
ptr_type_node,
endlink)),
BUILT_IN_SET_RETURN_ADDR_REG, NULL_PTR);
builtin_function ("__builtin_eh_stub", ptr_ftype_void,
BUILT_IN_EH_STUB, NULL_PTR);
builtin_function
("__builtin_set_eh_regs",
build_function_type (void_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE,
type_for_mode (ptr_mode, 0),
endlink))),
BUILT_IN_SET_EH_REGS, NULL_PTR);
builtin_function ("__builtin_alloca",
build_function_type (ptr_type_node,
tree_cons (NULL_TREE,
@@ -3843,6 +3908,9 @@ finish_decl (decl, init, asmspec_tree)
else
error_with_decl (decl, "storage size of `%s' isn't constant");
}
if (TREE_USED (type))
TREE_USED (decl) = 1;
}
/* If this is a function and an assembler name is specified, it isn't
@@ -4324,9 +4392,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
For now, issue a warning if -Wreturn-type and this is a function,
or if -Wimplicit; prefer the former warning since it is more
explicit. */
if ((warn_implicit || warn_return_type) && funcdef_flag)
if ((warn_implicit_int || warn_return_type) && funcdef_flag)
warn_about_return_type = 1;
else if (warn_implicit)
else if (warn_implicit_int)
warning ("type defaults to `int' in declaration of `%s'", name);
}
@@ -4339,7 +4407,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
/* Long double is a special combination. */
if ((specbits & 1 << (int) RID_LONG)
if ((specbits & 1 << (int) RID_LONG) && ! longlong
&& TYPE_MAIN_VARIANT (type) == double_type_node)
{
specbits &= ~ (1 << (int) RID_LONG);
@@ -4353,11 +4421,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
{
int ok = 0;
if (TREE_CODE (type) != INTEGER_TYPE)
error ("long, short, signed or unsigned invalid for `%s'", name);
else if ((specbits & 1 << (int) RID_LONG)
&& (specbits & 1 << (int) RID_SHORT))
error ("long and short specified together for `%s'", name);
if ((specbits & 1 << (int) RID_LONG)
&& (specbits & 1 << (int) RID_SHORT))
error ("both long and short specified for `%s'", name);
else if (((specbits & 1 << (int) RID_LONG)
|| (specbits & 1 << (int) RID_SHORT))
&& explicit_char)
@@ -4365,10 +4431,21 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
else if (((specbits & 1 << (int) RID_LONG)
|| (specbits & 1 << (int) RID_SHORT))
&& TREE_CODE (type) == REAL_TYPE)
error ("long or short specified with floating type for `%s'", name);
{
static int already = 0;
error ("long or short specified with floating type for `%s'", name);
if (! already && ! pedantic)
{
error ("the only valid combination is `long double'");
already = 1;
}
}
else if ((specbits & 1 << (int) RID_SIGNED)
&& (specbits & 1 << (int) RID_UNSIGNED))
error ("signed and unsigned given together for `%s'", name);
error ("both signed and unsigned specified for `%s'", name);
else if (TREE_CODE (type) != INTEGER_TYPE)
error ("long, short, signed or unsigned invalid for `%s'", name);
else
{
ok = 1;
@@ -4663,6 +4740,18 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
convert (index_type, size),
convert (index_type, size_one_node)));
/* If that overflowed, the array is too big.
??? While a size of INT_MAX+1 technically shouldn't cause
an overflow (because we subtract 1), the overflow is recorded
during the conversion to index_type, before the subtraction.
Handling this case seems like an unnecessary complication. */
if (TREE_OVERFLOW (itype))
{
error ("size of array `%s' is too large", name);
type = error_mark_node;
continue;
}
if (size_varies)
itype = variable_size (itype);
itype = build_index_type (itype);
@@ -4838,6 +4927,13 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
/* Now TYPE has the actual type. */
/* Did array size calculations overflow? */
if (TREE_CODE (type) == ARRAY_TYPE
&& TYPE_SIZE (type)
&& TREE_OVERFLOW (TYPE_SIZE (type)))
error ("size of array `%s' is too large", name);
/* If this is declaring a typedef name, return a TYPE_DECL. */
if (specbits & (1 << (int) RID_TYPEDEF))
@@ -5058,9 +5154,6 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if (! strcmp (IDENTIFIER_POINTER (declarator), "main"))
warning ("cannot inline function `main'");
else if (last && (TYPE_MAIN_VARIANT (TREE_VALUE (last))
!= void_type_node))
warning ("inline declaration ignored for function with `...'");
else
/* Assume that otherwise the function can be inlined. */
DECL_INLINE (decl) = 1;
@@ -5483,6 +5576,7 @@ start_struct (code, name)
if (ref && TREE_CODE (ref) == code)
{
C_TYPE_BEING_DEFINED (ref) = 1;
TYPE_PACKED (ref) = flag_pack_struct;
if (TYPE_FIELDS (ref))
error ((code == UNION_TYPE ? "redefinition of `union %s'"
: "redefinition of `struct %s'"),
@@ -6164,7 +6258,10 @@ start_function (declspecs, declarator, prefix_attributes, attributes, nested)
/* If the declarator is not suitable for a function definition,
cause a syntax error. */
if (decl1 == 0)
return 0;
{
immediate_size_expand = old_immediate_size_expand;
return 0;
}
decl_attributes (decl1, prefix_attributes, attributes);

186
gcc/c-gperf.h Normal file
View File

@@ -0,0 +1,186 @@
/* C code produced by gperf version 2.5 (GNU C++ version) */
/* Command-line: gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ ./c-parse.gperf */
/* Command-line: gperf -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
struct resword { char *name; short token; enum rid rid; };
#define TOTAL_KEYWORDS 79
#define MIN_WORD_LENGTH 2
#define MAX_WORD_LENGTH 20
#define MIN_HASH_VALUE 10
#define MAX_HASH_VALUE 144
/* maximum key range = 135, duplicates = 0 */
#ifdef __GNUC__
inline
#endif
static unsigned int
hash (str, len)
register char *str;
register int unsigned len;
{
static unsigned char asso_values[] =
{
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 25, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 1, 145, 46, 8, 15,
61, 6, 36, 48, 3, 5, 145, 18, 63, 25,
29, 76, 1, 145, 13, 2, 1, 51, 37, 9,
9, 1, 3, 145, 145, 145, 145, 145,
};
register int hval = len;
switch (hval)
{
default:
case 3:
hval += asso_values[str[2]];
case 2:
case 1:
hval += asso_values[str[0]];
break;
}
return hval + asso_values[str[len - 1]];
}
static struct resword wordlist[] =
{
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"",},
{"int", TYPESPEC, RID_INT},
{"",}, {"",},
{"__typeof__", TYPEOF, NORID},
{"__signed__", TYPESPEC, RID_SIGNED},
{"__imag__", IMAGPART, NORID},
{"switch", SWITCH, NORID},
{"__inline__", SCSPEC, RID_INLINE},
{"else", ELSE, NORID},
{"__iterator__", SCSPEC, RID_ITERATOR},
{"__inline", SCSPEC, RID_INLINE},
{"__extension__", EXTENSION, NORID},
{"struct", STRUCT, NORID},
{"__real__", REALPART, NORID},
{"__const", TYPE_QUAL, RID_CONST},
{"while", WHILE, NORID},
{"__const__", TYPE_QUAL, RID_CONST},
{"case", CASE, NORID},
{"__complex__", TYPESPEC, RID_COMPLEX},
{"__iterator", SCSPEC, RID_ITERATOR},
{"bycopy", TYPE_QUAL, RID_BYCOPY},
{"",}, {"",}, {"",},
{"__complex", TYPESPEC, RID_COMPLEX},
{"",},
{"in", TYPE_QUAL, RID_IN},
{"break", BREAK, NORID},
{"@defs", DEFS, NORID},
{"",}, {"",}, {"",},
{"extern", SCSPEC, RID_EXTERN},
{"if", IF, NORID},
{"typeof", TYPEOF, NORID},
{"typedef", SCSPEC, RID_TYPEDEF},
{"__typeof", TYPEOF, NORID},
{"sizeof", SIZEOF, NORID},
{"",},
{"return", RETURN, NORID},
{"const", TYPE_QUAL, RID_CONST},
{"__volatile__", TYPE_QUAL, RID_VOLATILE},
{"@private", PRIVATE, NORID},
{"@selector", SELECTOR, NORID},
{"__volatile", TYPE_QUAL, RID_VOLATILE},
{"__asm__", ASM_KEYWORD, NORID},
{"",}, {"",},
{"continue", CONTINUE, NORID},
{"__alignof__", ALIGNOF, NORID},
{"__imag", IMAGPART, NORID},
{"__attribute__", ATTRIBUTE, NORID},
{"",}, {"",},
{"__attribute", ATTRIBUTE, NORID},
{"for", FOR, NORID},
{"",},
{"@encode", ENCODE, NORID},
{"id", OBJECTNAME, RID_ID},
{"static", SCSPEC, RID_STATIC},
{"@interface", INTERFACE, NORID},
{"",},
{"__signed", TYPESPEC, RID_SIGNED},
{"",},
{"__label__", LABEL, NORID},
{"",}, {"",},
{"__asm", ASM_KEYWORD, NORID},
{"char", TYPESPEC, RID_CHAR},
{"",},
{"inline", SCSPEC, RID_INLINE},
{"out", TYPE_QUAL, RID_OUT},
{"register", SCSPEC, RID_REGISTER},
{"__real", REALPART, NORID},
{"short", TYPESPEC, RID_SHORT},
{"",},
{"enum", ENUM, NORID},
{"inout", TYPE_QUAL, RID_INOUT},
{"",},
{"oneway", TYPE_QUAL, RID_ONEWAY},
{"union", UNION, NORID},
{"",},
{"__alignof", ALIGNOF, NORID},
{"",},
{"@implementation", IMPLEMENTATION, NORID},
{"",},
{"@class", CLASS, NORID},
{"",},
{"@public", PUBLIC, NORID},
{"asm", ASM_KEYWORD, NORID},
{"",}, {"",}, {"",}, {"",}, {"",},
{"default", DEFAULT, NORID},
{"",},
{"void", TYPESPEC, RID_VOID},
{"",},
{"@protected", PROTECTED, NORID},
{"@protocol", PROTOCOL, NORID},
{"",}, {"",}, {"",},
{"volatile", TYPE_QUAL, RID_VOLATILE},
{"",}, {"",},
{"signed", TYPESPEC, RID_SIGNED},
{"float", TYPESPEC, RID_FLOAT},
{"@end", END, NORID},
{"",}, {"",},
{"unsigned", TYPESPEC, RID_UNSIGNED},
{"@compatibility_alias", ALIAS, NORID},
{"double", TYPESPEC, RID_DOUBLE},
{"",}, {"",},
{"auto", SCSPEC, RID_AUTO},
{"",},
{"goto", GOTO, NORID},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"do", DO, NORID},
{"",}, {"",}, {"",}, {"",},
{"long", TYPESPEC, RID_LONG},
};
#ifdef __GNUC__
inline
#endif
struct resword *
is_reserved_word (str, len)
register char *str;
register unsigned int len;
{
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
register int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
{
register char *s = wordlist[key].name;
if (*s == *str && !strcmp (str + 1, s + 1))
return &wordlist[key];
}
}
return 0;
}

View File

@@ -1,5 +1,5 @@
/* Build expressions with type checking for C compiler.
Copyright (C) 1987, 88, 89, 92, 93, 1996 Free Software Foundation, Inc.
Copyright (C) 1987, 88, 89, 92, 93, 96, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -255,6 +255,8 @@ collect_iterators (exp, list)
break;
case RTL_EXPR:
return list;
default:
break;
}
for (i = 0; i < num_args; i++)

View File

@@ -1,5 +1,5 @@
/* Language-specific hook definitions for C front end.
Copyright (C) 1991, 1995 Free Software Foundation, Inc.
Copyright (C) 1991, 1995, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -137,7 +137,6 @@ void
finish_file ()
{
extern tree static_ctors, static_dtors;
extern tree get_file_function_name ();
extern tree build_function_call PROTO((tree, tree));
tree void_list_node = build_tree_list (NULL_TREE, void_type_node);
#ifndef ASM_OUTPUT_CONSTRUCTOR

View File

@@ -1,5 +1,5 @@
/* Lexical analyzer for C and Objective C.
Copyright (C) 1987, 88, 89, 92, 94, 95, 1996 Free Software Foundation, Inc.
Copyright (C) 1987, 88, 89, 92, 94-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -18,12 +18,12 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include <stdio.h>
#include <errno.h>
#include <setjmp.h>
#include "config.h"
#include "rtl.h"
#include "tree.h"
#include "input.h"
@@ -35,6 +35,13 @@ Boston, MA 02111-1307, USA. */
#include <ctype.h>
/* MULTIBYTE_CHARS support only works for native compilers.
??? Ideally what we want is to model widechar support after
the current floating point support. */
#ifdef CROSS_COMPILE
#undef MULTIBYTE_CHARS
#endif
#ifdef MULTIBYTE_CHARS
#include <stdlib.h>
#include <locale.h>
@@ -118,6 +125,8 @@ char *token_buffer; /* Pointer to token buffer.
Actual allocated length is maxtoken + 2.
This is not static because objc-parse.y uses it. */
static int indent_level = 0; /* Number of { minus number of }. */
/* Nonzero if end-of-file has been seen on input. */
static int end_of_file;
@@ -126,6 +135,9 @@ static int end_of_file;
static int nextchar = -1;
#endif
static int skip_which_space PROTO((int));
static char *extend_token_buffer PROTO((char *));
static int readescape PROTO((int *));
int check_newline ();
/* Do not insert generated code into the source, instead, include it.
@@ -321,7 +333,6 @@ yyprint (file, yychar, yylval)
break;
}
}
/* If C is not whitespace, return C.
Otherwise skip whitespace and return first nonwhite char read. */
@@ -413,7 +424,6 @@ extend_token_buffer (p)
return token_buffer + offset;
}
#if !USE_CPPLIB
#define GET_DIRECTIVE_LINE() get_directive_line (finput)
@@ -560,7 +570,7 @@ check_newline ()
token = yylex ();
if (token != IDENTIFIER)
goto skipline;
if (HANDLE_PRAGMA (yylval.ttype))
if (HANDLE_PRAGMA (finput, yylval.ttype))
{
c = GETC ();
return c;
@@ -747,6 +757,7 @@ linenum:
input_file_stack->line = old_lineno;
p->next = input_file_stack;
p->name = input_filename;
p->indent_level = indent_level;
input_file_stack = p;
input_file_stack_tick++;
debug_start_source_file (input_filename);
@@ -758,6 +769,14 @@ linenum:
if (input_file_stack->next)
{
struct file_stack *p = input_file_stack;
if (indent_level != p->indent_level)
{
warning_with_file_and_line
(p->name, old_lineno,
"This file contains more `%c's than `%c's.",
indent_level > p->indent_level ? '{' : '}',
indent_level > p->indent_level ? '}' : '{');
}
input_file_stack = p->next;
free (p);
input_file_stack_tick++;
@@ -816,6 +835,10 @@ linenum:
/* skip the rest of this line. */
skipline:
#if !USE_CPPLIB
if (c != '\n' && c != EOF && nextchar >= 0)
c = nextchar, nextchar = -1;
#endif
while (c != '\n' && c != EOF)
c = GETC();
return c;
@@ -1451,8 +1474,8 @@ yylex ()
if (floatflag != NOT_FLOAT)
{
tree type = double_type_node;
int exceeds_double = 0;
int imag = 0;
int conversion_errno = 0;
REAL_VALUE_TYPE value;
jmp_buf handler;
@@ -1481,7 +1504,6 @@ yylex ()
}
*p = 0;
errno = 0;
/* Convert string to a double, checking for overflow. */
if (setjmp (handler))
@@ -1551,7 +1573,9 @@ yylex ()
error ("both `f' and `l' in floating constant");
type = float_type_node;
errno = 0;
value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
conversion_errno = errno;
/* A diagnostic is required here by some ANSI C testsuites.
This is not pedwarn, become some people don't want
an error for this. */
@@ -1561,13 +1585,17 @@ yylex ()
else if (lflag)
{
type = long_double_type_node;
errno = 0;
value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
conversion_errno = errno;
if (REAL_VALUE_ISINF (value) && pedantic)
warning ("floating point number exceeds range of `long double'");
}
else
{
errno = 0;
value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
conversion_errno = errno;
if (REAL_VALUE_ISINF (value) && pedantic)
warning ("floating point number exceeds range of `double'");
}
@@ -1575,17 +1603,12 @@ yylex ()
set_float_handler (NULL_PTR);
}
#ifdef ERANGE
if (errno == ERANGE && !flag_traditional && pedantic)
{
/* ERANGE is also reported for underflow,
so test the value to distinguish overflow from that. */
if (REAL_VALUES_LESS (dconst1, value)
|| REAL_VALUES_LESS (value, dconstm1))
{
warning ("floating point number exceeds range of `double'");
exceeds_double = 1;
}
}
/* ERANGE is also reported for underflow,
so test the value to distinguish overflow from that. */
if (conversion_errno == ERANGE && !flag_traditional && pedantic
&& (REAL_VALUES_LESS (dconst1, value)
|| REAL_VALUES_LESS (value, dconstm1)))
warning ("floating point number exceeds range of `double'");
#endif
/* If the result is not a number, assume it must have been
@@ -1648,20 +1671,15 @@ yylex ()
c = GETC();
}
/* If the constant is not long long and it won't fit in an
unsigned long, or if the constant is long long and won't fit
in an unsigned long long, then warn that the constant is out
of range. */
/* If the constant won't fit in an unsigned long long,
then warn that the constant is out of range. */
/* ??? This assumes that long long and long integer types are
a multiple of 8 bits. This better than the original code
though which assumed that long was exactly 32 bits and long
long was exactly 64 bits. */
if (spec_long_long)
bytes = TYPE_PRECISION (long_long_integer_type_node) / 8;
else
bytes = TYPE_PRECISION (long_integer_type_node) / 8;
bytes = TYPE_PRECISION (long_long_integer_type_node) / 8;
warn = overflow;
for (i = bytes; i < TOTAL_PARTS; i++)
@@ -1728,11 +1746,11 @@ yylex ()
else if (! spec_unsigned && !spec_long_long
&& int_fits_type_p (yylval.ttype, long_integer_type_node))
ansi_type = long_integer_type_node;
else if (! spec_long_long)
else if (! spec_long_long
&& int_fits_type_p (yylval.ttype,
long_unsigned_type_node))
ansi_type = long_unsigned_type_node;
else if (! spec_unsigned
/* Verify value does not overflow into sign bit. */
&& TREE_INT_CST_HIGH (yylval.ttype) >= 0
&& int_fits_type_p (yylval.ttype,
long_long_integer_type_node))
ansi_type = long_long_integer_type_node;
@@ -1754,8 +1772,9 @@ yylex ()
warning ("width of integer constant may change on other systems with -traditional");
}
if (!flag_traditional && !int_fits_type_p (yylval.ttype, type)
&& !warn)
if (pedantic && !flag_traditional && !spec_long_long && !warn
&& (TYPE_PRECISION (long_integer_type_node)
< TYPE_PRECISION (type)))
pedwarn ("integer constant out of range");
if (base == 10 && ! spec_unsigned && TREE_UNSIGNED (type))
@@ -1986,15 +2005,9 @@ yylex ()
bzero (widep + (len * WCHAR_BYTES), WCHAR_BYTES);
#else
{
union { long l; char c[sizeof (long)]; } u;
int big_endian;
char *wp, *cp;
/* Determine whether host is little or big endian. */
u.l = 1;
big_endian = u.c[sizeof (long) - 1];
wp = widep + (big_endian ? WCHAR_BYTES - 1 : 0);
wp = widep + (BYTES_BIG_ENDIAN ? WCHAR_BYTES - 1 : 0);
bzero (widep, (p - token_buffer) * WCHAR_BYTES);
for (cp = token_buffer + 1; cp < p; cp++)
*wp = *cp, wp += WCHAR_BYTES;
@@ -2122,13 +2135,13 @@ yylex ()
break;
case '<':
if (c1 == '%')
{ value = '{'; goto done; }
{ value = '{'; indent_level++; goto done; }
if (c1 == ':')
{ value = '['; goto done; }
break;
case '%':
if (c1 == '>')
{ value = '}'; goto done; }
{ value = '}'; indent_level--; goto done; }
break;
}
UNGETC (c1);
@@ -2145,6 +2158,16 @@ yylex ()
value = 1;
break;
case '{':
indent_level++;
value = c;
break;
case '}':
indent_level--;
value = c;
break;
default:
value = c;
}

View File

@@ -1,5 +1,5 @@
/* YACC parser for C syntax and for Objective C. -*-c-*-
Copyright (C) 1987, 88, 89, 92-6, 1997 Free Software Foundation, Inc.
Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -58,11 +58,12 @@ State 434 contains 2 shift/reduce conflicts. (Four ways to parse this.) */
end ifc
%{
#include "config.h"
#include <stdio.h>
#include <errno.h>
#include <setjmp.h>
#include "config.h"
#include "tree.h"
#include "input.h"
#include "c-lex.h"
@@ -232,9 +233,11 @@ ifobjc
end ifobjc
%{
/* Number of statements (loosely speaking) seen so far. */
/* Number of statements (loosely speaking) and compound statements
seen so far. */
static int stmt_count;
static int compstmt_count;
/* Input file and line number of the end of the body of last simple_if;
used by the stmt-rule immediately after simple_if returns. */
static char *if_stmt_file;
@@ -487,7 +490,7 @@ unary_expr:
| sizeof unary_expr %prec UNARY
{ skip_evaluation--;
if (TREE_CODE ($2) == COMPONENT_REF
&& DECL_BIT_FIELD (TREE_OPERAND ($2, 1)))
&& DECL_C_BIT_FIELD (TREE_OPERAND ($2, 1)))
error ("`sizeof' applied to a bit-field");
$$ = c_sizeof (TREE_TYPE ($2)); }
| sizeof '(' typename ')' %prec HYPERUNARY
@@ -679,7 +682,7 @@ end ifobjc
if (IDENTIFIER_GLOBAL_VALUE ($1) != error_mark_node
|| IDENTIFIER_ERROR_LOCUS ($1) != current_function_decl)
{
error ("`%s' undeclared (first use this function)",
error ("`%s' undeclared (first use in this function)",
IDENTIFIER_POINTER ($1));
if (! undeclared_variable_notice)
@@ -1735,9 +1738,11 @@ compstmt_or_error:
| error compstmt
;
compstmt: '{' '}'
compstmt_start: '{' { compstmt_count++; }
compstmt: compstmt_start '}'
{ $$ = convert (void_type_node, integer_zero_node); }
| '{' pushlevel maybe_label_decls decls xstmts '}'
| compstmt_start pushlevel maybe_label_decls decls xstmts '}'
{ emit_line_note (input_filename, lineno);
expand_end_bindings (getdecls (), 1, 0);
$$ = poplevel (1, 1, 0);
@@ -1745,7 +1750,7 @@ compstmt: '{' '}'
pop_momentary_nofree ();
else
pop_momentary (); }
| '{' pushlevel maybe_label_decls error '}'
| compstmt_start pushlevel maybe_label_decls error '}'
{ emit_line_note (input_filename, lineno);
expand_end_bindings (getdecls (), kept_level_p (), 0);
$$ = poplevel (kept_level_p (), 0, 0);
@@ -1753,7 +1758,7 @@ compstmt: '{' '}'
pop_momentary_nofree ();
else
pop_momentary (); }
| '{' pushlevel maybe_label_decls stmts '}'
| compstmt_start pushlevel maybe_label_decls stmts '}'
{ emit_line_note (input_filename, lineno);
expand_end_bindings (getdecls (), kept_level_p (), 0);
$$ = poplevel (kept_level_p (), 0, 0);
@@ -1766,8 +1771,8 @@ compstmt: '{' '}'
/* Value is number of statements counted as of the closeparen. */
simple_if:
if_prefix lineno_labeled_stmt
/* Make sure expand_end_cond is run once
for each call to expand_start_cond.
/* Make sure c_expand_end_cond is run once
for each call to c_expand_start_cond.
Otherwise a crash is likely. */
| if_prefix error
;
@@ -1775,7 +1780,8 @@ simple_if:
if_prefix:
IF '(' expr ')'
{ emit_line_note ($<filename>-1, $<lineno>0);
expand_start_cond (truthvalue_conversion ($3), 0);
c_expand_start_cond (truthvalue_conversion ($3), 0,
compstmt_count);
$<itype>$ = stmt_count;
if_stmt_file = $<filename>-1;
if_stmt_line = $<lineno>0;
@@ -1788,6 +1794,7 @@ if_prefix:
do_stmt_start:
DO
{ stmt_count++;
compstmt_count++;
emit_line_note ($<filename>-1, $<lineno>0);
/* See comment in `while' alternative, above. */
emit_nop ();
@@ -1850,15 +1857,15 @@ stmt:
iterator_expand ($1);
clear_momentary (); }
| simple_if ELSE
{ expand_start_else ();
{ c_expand_start_else ();
$<itype>1 = stmt_count;
position_after_white_space (); }
lineno_labeled_stmt
{ expand_end_cond ();
{ c_expand_end_cond ();
if (extra_warnings && stmt_count == $<itype>1)
warning ("empty body in an else-statement"); }
| simple_if %prec IF
{ expand_end_cond ();
{ c_expand_end_cond ();
/* This warning is here instead of in simple_if, because we
do not want a warning if an empty if is followed by an
else statement. Increment stmt_count so we don't
@@ -1866,11 +1873,11 @@ stmt:
if (extra_warnings && stmt_count++ == $<itype>1)
warning_with_file_and_line (if_stmt_file, if_stmt_line,
"empty body in an if-statement"); }
/* Make sure expand_end_cond is run once
for each call to expand_start_cond.
/* Make sure c_expand_end_cond is run once
for each call to c_expand_start_cond.
Otherwise a crash is likely. */
| simple_if ELSE error
{ expand_end_cond (); }
{ c_expand_end_cond (); }
| WHILE
{ stmt_count++;
emit_line_note ($<filename>-1, $<lineno>0);

View File

@@ -1,5 +1,5 @@
/* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack.
Copyright (C) 1992 Free Software Foundation, Inc.
Copyright (C) 1992, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -18,8 +18,8 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "config.h"
#include <stdio.h>
#include "tree.h"
#include "except.h"
#include "function.h"
@@ -65,7 +65,7 @@ handle_pragma_token (string, token)
if (HANDLE_PRAGMA_WEAK)
handle_pragma_weak (state, name, value);
#endif /* HANDLE_PRAMA_WEAK */
#endif /* HANDLE_PRAGMA_WEAK */
}
type = state = ps_start;

View File

@@ -177,7 +177,7 @@ extern tree convert_and_check PROTO((tree, tree));
extern void overflow_warning PROTO((tree));
extern void unsigned_conversion_warning PROTO((tree, tree));
/* Read the rest of the current #-directive line. */
extern char *get_directive_line STDIO_PROTO((FILE *));
extern char *get_directive_line PROTO((FILE *));
/* Subroutine of build_binary_op, used for comparison operations.
See if the operands have both been converted from subword integer types
and, if so, perhaps change them both back to their original type. */
@@ -288,12 +288,9 @@ extern void pending_xref_error PROTO((void));
extern void pop_c_function_context PROTO((void));
extern void pop_label_level PROTO((void));
extern tree poplevel PROTO((int, int, int));
extern void print_lang_decl STDIO_PROTO((FILE *, tree,
int));
extern void print_lang_identifier STDIO_PROTO((FILE *, tree,
int));
extern void print_lang_type STDIO_PROTO((FILE *, tree,
int));
extern void print_lang_decl PROTO((FILE *, tree, int));
extern void print_lang_identifier PROTO((FILE *, tree, int));
extern void print_lang_type PROTO((FILE *, tree, int));
extern void push_c_function_context PROTO((void));
extern void push_label_level PROTO((void));
extern void push_parm_decl PROTO((tree));

View File

@@ -1,5 +1,5 @@
/* Build expressions with type checking for C compiler.
Copyright (C) 1987, 88, 91-6, 1997 Free Software Foundation, Inc.
Copyright (C) 1987, 88, 91-7, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -35,12 +35,29 @@ Boston, MA 02111-1307, USA. */
#include "flags.h"
#include "output.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
/* Nonzero if we've already printed a "missing braces around initializer"
message within this initializer. */
static int missing_braces_mentioned;
#ifdef NEED_DECLARATION_INDEX
extern char *index ();
#endif
#ifdef NEED_DECLARATION_RINDEX
extern char *rindex ();
#endif
static tree qualify_type PROTO((tree, tree));
static int comp_target_types PROTO((tree, tree));
@@ -261,6 +278,12 @@ common_type (t1, t2)
return build_type_attribute_variant (t1, attributes);
}
/* Likewise, prefer long double to double even if same size. */
if (TYPE_MAIN_VARIANT (t1) == long_double_type_node
|| TYPE_MAIN_VARIANT (t2) == long_double_type_node)
return build_type_attribute_variant (long_double_type_node,
attributes);
/* Otherwise prefer the unsigned one. */
if (TREE_UNSIGNED (t1))
@@ -507,6 +530,9 @@ comptypes (type1, type2)
if (maybe_objc_comptypes (t1, t2, 0) == 1)
val = 1;
break;
default:
break;
}
return attrval == 2 && val == 1 ? 2 : val;
}
@@ -776,7 +802,7 @@ signed_or_unsigned_type (unsignedp, type)
int unsignedp;
tree type;
{
if (! INTEGRAL_TYPE_P (type)
if ((! INTEGRAL_TYPE_P (type) && ! POINTER_TYPE_P (type))
|| TREE_UNSIGNED (type) == unsignedp)
return type;
if (TYPE_PRECISION (type) == TYPE_PRECISION (signed_char_type_node))
@@ -1008,13 +1034,14 @@ default_conversion (exp)
type = type_for_size (MAX (TYPE_PRECISION (type),
TYPE_PRECISION (integer_type_node)),
((flag_traditional
|| TYPE_PRECISION (type) >= TYPE_PRECISION (integer_type_node))
|| (TYPE_PRECISION (type)
>= TYPE_PRECISION (integer_type_node)))
&& TREE_UNSIGNED (type)));
return convert (type, exp);
}
if (TREE_CODE (exp) == COMPONENT_REF
&& DECL_BIT_FIELD (TREE_OPERAND (exp, 1)))
&& DECL_C_BIT_FIELD (TREE_OPERAND (exp, 1)))
{
tree width = DECL_SIZE (TREE_OPERAND (exp, 1));
HOST_WIDE_INT low = TREE_INT_CST_LOW (width);
@@ -1242,6 +1269,9 @@ build_component_ref (datum, component)
(TREE_OPERAND (datum, 0),
build_component_ref (TREE_OPERAND (datum, 1), component),
build_component_ref (TREE_OPERAND (datum, 2), component));
default:
break;
}
/* See if there is a field or component with name COMPONENT. */
@@ -1573,6 +1603,8 @@ build_function_call (function, params)
if (coerced_params == 0)
return integer_zero_node;
return build_unary_op (ABS_EXPR, TREE_VALUE (coerced_params), 0);
default:
break;
}
{
@@ -2333,6 +2365,9 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
pedwarn ("comparison between pointer and integer");
}
break;
default:
break;
}
if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE)
@@ -2477,7 +2512,8 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
converted = 1;
resultcode = xresultcode;
if (warn_sign_compare && skip_evaluation == 0)
if ((warn_sign_compare < 0 ? extra_warnings : warn_sign_compare != 0)
&& skip_evaluation == 0)
{
int op0_signed = ! TREE_UNSIGNED (TREE_TYPE (orig_op0));
int op1_signed = ! TREE_UNSIGNED (TREE_TYPE (orig_op1));
@@ -3111,6 +3147,9 @@ build_unary_op (code, xarg, noconvert)
TREE_CONSTANT (addr) = 1;
return addr;
}
default:
break;
}
if (!errstring)
@@ -3179,17 +3218,16 @@ lvalue_p (ref)
case PARM_DECL:
case RESULT_DECL:
case ERROR_MARK:
if (TREE_CODE (TREE_TYPE (ref)) != FUNCTION_TYPE
&& TREE_CODE (TREE_TYPE (ref)) != METHOD_TYPE)
return 1;
break;
return (TREE_CODE (TREE_TYPE (ref)) != FUNCTION_TYPE
&& TREE_CODE (TREE_TYPE (ref)) != METHOD_TYPE);
case BIND_EXPR:
case RTL_EXPR:
if (TREE_CODE (TREE_TYPE (ref)) == ARRAY_TYPE)
return 1;
return TREE_CODE (TREE_TYPE (ref)) == ARRAY_TYPE;
default:
return 0;
}
return 0;
}
/* Return nonzero if REF is an lvalue valid for this language;
@@ -3221,7 +3259,12 @@ unary_complex_lvalue (code, arg)
if (TREE_CODE (arg) == COMPOUND_EXPR)
{
tree real_result = build_unary_op (code, TREE_OPERAND (arg, 1), 0);
pedantic_lvalue_warning (COMPOUND_EXPR);
/* If this returns a function type, it isn't really being used as
an lvalue, so don't issue a warning about it. */
if (TREE_CODE (TREE_TYPE (arg)) != FUNCTION_TYPE)
pedantic_lvalue_warning (COMPOUND_EXPR);
return build (COMPOUND_EXPR, TREE_TYPE (real_result),
TREE_OPERAND (arg, 0), real_result);
}
@@ -3230,6 +3273,9 @@ unary_complex_lvalue (code, arg)
if (TREE_CODE (arg) == COND_EXPR)
{
pedantic_lvalue_warning (COND_EXPR);
if (TREE_CODE (TREE_TYPE (arg)) != FUNCTION_TYPE)
pedantic_lvalue_warning (COMPOUND_EXPR);
return (build_conditional_expr
(TREE_OPERAND (arg, 0),
build_unary_op (code, TREE_OPERAND (arg, 1), 0),
@@ -3871,6 +3917,8 @@ build_modify_expr (lhs, modifycode, rhs)
/* But cast it to void to avoid an "unused" error. */
convert (void_type_node, rhs), cond);
}
default:
break;
}
/* If a binary op has been requested, combine the old LHS value with the RHS
@@ -3912,6 +3960,9 @@ build_modify_expr (lhs, modifycode, rhs)
pedantic_lvalue_warning (CONVERT_EXPR);
return convert (TREE_TYPE (lhs), result);
}
default:
break;
}
/* Now we have handled acceptable kinds of LHS that are not truly lvalues.
@@ -4425,9 +4476,10 @@ initializer_constant_valid_p (value, endtype)
return null_pointer_node;
return 0;
}
}
return 0;
default:
return 0;
}
}
/* If VALUE is a compound expr all of whose expressions are constant, then
@@ -6616,6 +6668,9 @@ c_expand_return (retval)
&& DECL_CONTEXT (inner) == current_function_decl)
warning ("function returns address of local variable");
break;
default:
break;
}
break;

View File

@@ -19,6 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include <stdio.h>
#include "rtl.h"
#include "insn-config.h"
#include "flags.h"

View File

@@ -1,5 +1,5 @@
/* Convert function calls to rtl insns, for GNU C compiler.
Copyright (C) 1989, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Copyright (C) 1989, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -19,10 +19,12 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include <stdio.h>
#include "rtl.h"
#include "tree.h"
#include "flags.h"
#include "expr.h"
#include "regs.h"
#ifdef __STDC__
#include <stdarg.h>
#else
@@ -123,7 +125,8 @@ int stack_arg_under_construction;
static int calls_function PROTO((tree, int));
static int calls_function_1 PROTO((tree, int));
static void emit_call_1 PROTO((rtx, tree, tree, int, int, rtx, rtx,
static void emit_call_1 PROTO((rtx, tree, tree, HOST_WIDE_INT,
HOST_WIDE_INT, rtx, rtx,
int, rtx, int));
static void store_one_arg PROTO ((struct arg_data *, rtx, int, int,
tree, int));
@@ -232,6 +235,9 @@ calls_function_1 (exp, which)
case RTL_EXPR:
return 0;
default:
break;
}
for (i = 0; i < length; i++)
@@ -267,15 +273,11 @@ prepare_call_address (funexp, fndecl, call_fusage, reg_parm_seen)
/* Make a valid memory address and copy constants thru pseudo-regs,
but not for a constant address if -fno-function-cse. */
if (GET_CODE (funexp) != SYMBOL_REF)
funexp =
#ifdef SMALL_REGISTER_CLASSES
/* If we are using registers for parameters, force the
function address into a register now. */
(SMALL_REGISTER_CLASSES && reg_parm_seen)
? force_not_mem (memory_address (FUNCTION_MODE, funexp))
:
#endif
memory_address (FUNCTION_MODE, funexp);
function address into a register now. */
funexp = ((SMALL_REGISTER_CLASSES && reg_parm_seen)
? force_not_mem (memory_address (FUNCTION_MODE, funexp))
: memory_address (FUNCTION_MODE, funexp));
else
{
#ifndef NO_FUNCTION_CSE
@@ -346,8 +348,8 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, struct_value_size,
rtx funexp;
tree fndecl;
tree funtype;
int stack_size;
int struct_value_size;
HOST_WIDE_INT stack_size;
HOST_WIDE_INT struct_value_size;
rtx next_arg_reg;
rtx valreg;
int old_inhibit_defer_pop;
@@ -508,7 +510,7 @@ expand_call (exp, target, ignore)
/* Size of aggregate value wanted, or zero if none wanted
or if we are using the non-reentrant PCC calling convention
or expecting the value in registers. */
int struct_value_size = 0;
HOST_WIDE_INT struct_value_size = 0;
/* Nonzero if called function returns an aggregate in memory PCC style,
by returning the address of where to find it. */
int pcc_struct_value = 0;
@@ -693,7 +695,8 @@ expand_call (exp, target, ignore)
structure_value_addr = XEXP (target, 0);
else
{
/* Assign a temporary on the stack to hold the value. */
/* Assign a temporary to hold the value. */
tree d;
/* For variable-sized objects, we must be called with a target
specified. If we were to allocate space on the stack here,
@@ -702,10 +705,13 @@ expand_call (exp, target, ignore)
if (struct_value_size < 0)
abort ();
structure_value_addr
= XEXP (assign_stack_temp (BLKmode, struct_value_size, 1), 0);
MEM_IN_STRUCT_P (structure_value_addr)
= AGGREGATE_TYPE_P (TREE_TYPE (exp));
/* This DECL is just something to feed to mark_addressable;
it doesn't get pushed. */
d = build_decl (VAR_DECL, NULL_TREE, TREE_TYPE (exp));
DECL_RTL (d) = assign_temp (TREE_TYPE (exp), 1, 0, 1);
mark_addressable (d);
structure_value_addr = XEXP (DECL_RTL (d), 0);
TREE_USED (d) = 1;
target = 0;
}
}
@@ -1666,13 +1672,8 @@ expand_call (exp, target, ignore)
&& GET_CODE (SUBREG_REG (args[i].value)) == REG)))
&& args[i].mode != BLKmode
&& rtx_cost (args[i].value, SET) > 2
#ifdef SMALL_REGISTER_CLASSES
&& ((SMALL_REGISTER_CLASSES && reg_parm_seen)
|| preserve_subexpressions_p ())
#else
&& preserve_subexpressions_p ()
#endif
)
|| preserve_subexpressions_p ()))
args[i].value = copy_to_mode_reg (args[i].mode, args[i].value);
}
@@ -1858,7 +1859,8 @@ expand_call (exp, target, ignore)
VOIDmode, 3,
structure_value_addr, ptr_mode,
GEN_INT (struct_value_size), TYPE_MODE (sizetype),
GEN_INT (MEMORY_USE_WO), QImode);
GEN_INT (MEMORY_USE_WO),
TYPE_MODE (integer_type_node));
if (GET_CODE (struct_value_rtx) == REG)
use_reg (&call_fusage, struct_value_rtx);
@@ -1999,7 +2001,7 @@ expand_call (exp, target, ignore)
/* If there are cleanups to be called, don't use a hard reg as target.
We need to double check this and see if it matters anymore. */
if (any_pending_cleanups ()
if (any_pending_cleanups (1)
&& target && REG_P (target)
&& REGNO (target) < FIRST_PSEUDO_REGISTER)
target = 0;
@@ -2712,26 +2714,26 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
#ifdef ACCUMULATE_OUTGOING_ARGS
#ifdef REG_PARM_STACK_SPACE
if (save_area)
{
enum machine_mode save_mode = GET_MODE (save_area);
rtx stack_area
= gen_rtx (MEM, save_mode,
memory_address (save_mode,
if (save_area)
{
enum machine_mode save_mode = GET_MODE (save_area);
rtx stack_area
= gen_rtx (MEM, save_mode,
memory_address (save_mode,
#ifdef ARGS_GROW_DOWNWARD
plus_constant (argblock, - high_to_save)
plus_constant (argblock, - high_to_save)
#else
plus_constant (argblock, low_to_save)
plus_constant (argblock, low_to_save)
#endif
));
));
if (save_mode != BLKmode)
emit_move_insn (stack_area, save_area);
else
emit_block_move (stack_area, validize_mem (save_area),
GEN_INT (high_to_save - low_to_save + 1),
PARM_BOUNDARY / BITS_PER_UNIT);
}
if (save_mode != BLKmode)
emit_move_insn (stack_area, save_area);
else
emit_block_move (stack_area, validize_mem (save_area),
GEN_INT (high_to_save - low_to_save + 1),
PARM_BOUNDARY / BITS_PER_UNIT);
}
#endif
/* If we saved any argument areas, restore them. */
@@ -2750,7 +2752,6 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
highest_outgoing_arg_in_use = initial_highest_arg_in_use;
stack_usage_map = initial_stack_usage_map;
#endif
}
/* Like emit_library_call except that an extra argument, VALUE,
@@ -3306,26 +3307,26 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
#ifdef ACCUMULATE_OUTGOING_ARGS
#ifdef REG_PARM_STACK_SPACE
if (save_area)
{
enum machine_mode save_mode = GET_MODE (save_area);
rtx stack_area
= gen_rtx (MEM, save_mode,
memory_address (save_mode,
if (save_area)
{
enum machine_mode save_mode = GET_MODE (save_area);
rtx stack_area
= gen_rtx (MEM, save_mode,
memory_address (save_mode,
#ifdef ARGS_GROW_DOWNWARD
plus_constant (argblock, - high_to_save)
plus_constant (argblock, - high_to_save)
#else
plus_constant (argblock, low_to_save)
plus_constant (argblock, low_to_save)
#endif
));
));
if (save_mode != BLKmode)
emit_move_insn (stack_area, save_area);
else
emit_block_move (stack_area, validize_mem (save_area),
GEN_INT (high_to_save - low_to_save + 1),
if (save_mode != BLKmode)
emit_move_insn (stack_area, save_area);
else
emit_block_move (stack_area, validize_mem (save_area),
GEN_INT (high_to_save - low_to_save + 1),
PARM_BOUNDARY / BITS_PER_UNIT);
}
}
#endif
/* If we saved any argument areas, restore them. */
@@ -3564,7 +3565,8 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl,
XEXP (arg->stack, 0), ptr_mode,
GEN_INT (GET_MODE_SIZE (arg->mode)),
TYPE_MODE (sizetype),
GEN_INT (MEMORY_USE_RW), QImode);
GEN_INT (MEMORY_USE_RW),
TYPE_MODE (integer_type_node));
}
}
else if (arg->mode != BLKmode)

674
gcc/cccp.1 Normal file
View File

@@ -0,0 +1,674 @@
.\" Copyright (c) 1991, 1992, 1993 Free Software Foundation \-*-Text-*-
.\" See section COPYING for conditions for redistribution
.TH cpp 1 "30apr1993" "GNU Tools" "GNU Tools"
.SH NAME
cccp, cpp \- The GNU C-Compatible Compiler Preprocessor.
.SH SYNOPSIS
.hy 0
.na
.TP
.B cccp
.RB "[\|" \-$ "\|]"
.RB "[\|" \-A \c
.I predicate\c
.RB [ (\c
.I value\c
.BR ) ]\|]
.RB "[\|" \-C "\|]"
.RB "[\|" \-D \c
.I name\c
.RB [ =\c
.I definition\c
\&]\|]
.RB "[\|" \-dD "\|]"
.RB "[\|" \-dM "\|]"
.RB "[\|" "\-I\ "\c
.I directory\c
\&\|]
.RB "[\|" \-H "\|]"
.RB "[\|" \-I\- "\|]"
.RB "[\|" "\-imacros\ "\c
.I file\c
\&\|]
.RB "[\|" "\-include\ "\c
.I file\c
\&\|]
.RB "[\|" "\-idirafter\ "\c
.I dir\c
\&\|]
.RB "[\|" "\-iprefix\ "\c
.I prefix\c
\&\|]
.RB "[\|" "\-iwithprefix\ "\c
.I dir\c
\&\|]
.RB "[\|" \-lang\-c "\|]"
.RB "[\|" \-lang\-c++ "\|]"
.RB "[\|" \-lang\-objc "\|]"
.RB "[\|" \-lang\-objc++ "\|]"
.RB "[\|" \-lint "\|]"
.RB "[\|" \-M\ [ \-MG "\|]]"
.RB "[\|" \-MM\ [ \-MG "\|]]"
.RB "[\|" \-MD\ \c
.I file\ \c
\&\|]
.RB "[\|" \-MMD\ \c
.I file\ \c
\&\|]
.RB "[\|" \-nostdinc "\|]"
.RB "[\|" \-nostdinc++ "\|]"
.RB "[\|" \-P "\|]"
.RB "[\|" \-pedantic "\|]"
.RB "[\|" \-pedantic\-errors "\|]"
.RB "[\|" \-traditional "\|]"
.RB "[\|" \-trigraphs "\|]"
.RB "[\|" \-U \c
.I name\c
\&\|]
.RB "[\|" \-undef "\|]"
.RB "[\|" \-Wtrigraphs "\|]"
.RB "[\|" \-Wcomment "\|]"
.RB "[\|" \-Wall "\|]"
.RB "[\|" \-Wtraditional "\|]"
.br
.RB "[\|" \c
.I infile\c
.RB | \- "\|]"
.RB "[\|" \c
.I outfile\c
.RB | \- "\|]"
.ad b
.hy 1
.SH DESCRIPTION
The C preprocessor is a \c
.I macro processor\c
\& that is used automatically by
the C compiler to transform your program before actual compilation. It is
called a macro processor because it allows you to define \c
.I macros\c
\&,
which are brief abbreviations for longer constructs.
The C preprocessor provides four separate facilities that you can use as
you see fit:
.TP
\(bu
Inclusion of header files. These are files of declarations that can be
substituted into your program.
.TP
\(bu
Macro expansion. You can define \c
.I macros\c
\&, which are abbreviations
for arbitrary fragments of C code, and then the C preprocessor will
replace the macros with their definitions throughout the program.
.TP
\(bu
Conditional compilation. Using special preprocessing directives, you
can include or exclude parts of the program according to various
conditions.
.TP
\(bu
Line control. If you use a program to combine or rearrange source files into
an intermediate file which is then compiled, you can use line control
to inform the compiler of where each source line originally came from.
.PP
C preprocessors vary in some details. For a full explanation of the
GNU C preprocessor, see the
.B info
file `\|\c
.B cpp.info\c
\&\|', or the manual
.I The C Preprocessor\c
\&. Both of these are built from the same documentation source file, `\|\c
.B cpp.texinfo\c
\&\|'. The GNU C
preprocessor provides a superset of the features of ANSI Standard C.
ANSI Standard C requires the rejection of many harmless constructs commonly
used by today's C programs. Such incompatibility would be inconvenient for
users, so the GNU C preprocessor is configured to accept these constructs
by default. Strictly speaking, to get ANSI Standard C, you must use the
options `\|\c
.B \-trigraphs\c
\&\|', `\|\c
.B \-undef\c
\&\|' and `\|\c
.B \-pedantic\c
\&\|', but in
practice the consequences of having strict ANSI Standard C make it
undesirable to do this.
Most often when you use the C preprocessor you will not have to invoke it
explicitly: the C compiler will do so automatically. However, the
preprocessor is sometimes useful individually.
When you call the preprocessor individually, either name
(\c
.B cpp\c
\& or \c
.B cccp\c
\&) will do\(em\&they are completely synonymous.
The C preprocessor expects two file names as arguments, \c
.I infile\c
\& and
\c
.I outfile\c
\&. The preprocessor reads \c
.I infile\c
\& together with any other
files it specifies with `\|\c
.B #include\c
\&\|'. All the output generated by the
combined input files is written in \c
.I outfile\c
\&.
Either \c
.I infile\c
\& or \c
.I outfile\c
\& may be `\|\c
.B \-\c
\&\|', which as \c
.I infile\c
\&
means to read from standard input and as \c
.I outfile\c
\& means to write to
standard output. Also, if \c
.I outfile\c
\& or both file names are omitted,
the standard output and standard input are used for the omitted file names.
.SH OPTIONS
Here is a table of command options accepted by the C preprocessor.
These options can also be given when compiling a C program; they are
passed along automatically to the preprocessor when it is invoked by
the compiler.
.TP
.B \-P
Inhibit generation of `\|\c
.B #\c
\&\|'-lines with line-number information in
the output from the preprocessor. This might be
useful when running the preprocessor on something that is not C code
and will be sent to a program which might be confused by the
`\|\c
.B #\c
\&\|'-lines.
.TP
.B \-C
Do not discard comments: pass them through to the output file.
Comments appearing in arguments of a macro call will be copied to the
output before the expansion of the macro call.
.TP
.B \-traditional
Try to imitate the behavior of old-fashioned C, as opposed to ANSI C.
.TP
.B \-trigraphs
Process ANSI standard trigraph sequences. These are three-character
sequences, all starting with `\|\c
.B ??\c
\&\|', that are defined by ANSI C to
stand for single characters. For example, `\|\c
.B ??/\c
\&\|' stands for
`\|\c
.BR "\e" "\|',"
so `\|\c
.B '??/n'\c
\&\|' is a character constant for a newline.
Strictly speaking, the GNU C preprocessor does not support all
programs in ANSI Standard C unless `\|\c
.B \-trigraphs\c
\&\|' is used, but if
you ever notice the difference it will be with relief.
You don't want to know any more about trigraphs.
.TP
.B \-pedantic
Issue warnings required by the ANSI C standard in certain cases such
as when text other than a comment follows `\|\c
.B #else\c
\&\|' or `\|\c
.B #endif\c
\&\|'.
.TP
.B \-pedantic\-errors
Like `\|\c
.B \-pedantic\c
\&\|', except that errors are produced rather than
warnings.
.TP
.B \-Wtrigraphs
Warn if any trigraphs are encountered (assuming they are enabled).
.TP
.B \-Wcomment
.TP
.B \-Wcomments
Warn whenever a comment-start sequence `\|\c
.B /*\c
\&\|' appears in a comment.
(Both forms have the same effect).
.TP
.B \-Wall
Requests both `\|\c
.B \-Wtrigraphs\c
\&\|' and `\|\c
.B \-Wcomment\c
\&\|' (but not
`\|\c
.B \-Wtraditional\c
\&\|').
.TP
.B \-Wtraditional
Warn about certain constructs that behave differently in traditional and
ANSI C.
.TP
.BI "\-I " directory\c
\&
Add the directory \c
.I directory\c
\& to the end of the list of
directories to be searched for header files.
This can be used to override a system header file, substituting your
own version, since these directories are searched before the system
header file directories. If you use more than one `\|\c
.B \-I\c
\&\|' option,
the directories are scanned in left-to-right order; the standard
system directories come after.
.TP
.B \-I\-
Any directories specified with `\|\c
.B \-I\c
\&\|' options before the `\|\c
.B \-I\-\c
\&\|'
option are searched only for the case of `\|\c
.B #include "\c
.I file\c
\&"\c
\&\|';
they are not searched for `\|\c
.B #include <\c
.I file\c
\&>\c
\&\|'.
If additional directories are specified with `\|\c
.B \-I\c
\&\|' options after
the `\|\c
.B \-I\-\c
\&\|', these directories are searched for all `\|\c
.B #include\c
\&\|'
directives.
In addition, the `\|\c
.B \-I\-\c
\&\|' option inhibits the use of the current
directory as the first search directory for `\|\c
.B #include "\c
.I file\c
\&"\c
\&\|'.
Therefore, the current directory is searched only if it is requested
explicitly with `\|\c
.B \-I.\c
\&\|'. Specifying both `\|\c
.B \-I\-\c
\&\|' and `\|\c
.B \-I.\c
\&\|'
allows you to control precisely which directories are searched before
the current one and which are searched after.
.TP
.B \-nostdinc
Do not search the standard system directories for header files.
Only the directories you have specified with `\|\c
.B \-I\c
\&\|' options
(and the current directory, if appropriate) are searched.
.TP
.B \-nostdinc++
Do not search for header files in the C++ specific standard
directories, but do still search the other standard directories.
(This option is used when building libg++.)
.TP
.BI "\-D " "name"\c
\&
Predefine \c
.I name\c
\& as a macro, with definition `\|\c
.B 1\c
\&\|'.
.TP
.BI "\-D " "name" = definition
\&
Predefine \c
.I name\c
\& as a macro, with definition \c
.I definition\c
\&.
There are no restrictions on the contents of \c
.I definition\c
\&, but if
you are invoking the preprocessor from a shell or shell-like program
you may need to use the shell's quoting syntax to protect characters
such as spaces that have a meaning in the shell syntax. If you use more than
one `\|\c
.B \-D\c
\&\|' for the same
.I name\c
\&, the rightmost definition takes effect.
.TP
.BI "\-U " "name"\c
\&
Do not predefine \c
.I name\c
\&. If both `\|\c
.B \-U\c
\&\|' and `\|\c
.B \-D\c
\&\|' are
specified for one name, the `\|\c
.B \-U\c
\&\|' beats the `\|\c
.B \-D\c
\&\|' and the name
is not predefined.
.TP
.B \-undef
Do not predefine any nonstandard macros.
.TP
.BI "\-A " "name(" value )
Assert (in the same way as the \c
.B #assert\c
\& directive)
the predicate \c
.I name\c
\& with tokenlist \c
.I value\c
\&. Remember to escape or quote the parentheses on
shell command lines.
You can use `\|\c
.B \-A-\c
\&\|' to disable all predefined assertions; it also
undefines all predefined macros.
.TP
.B \-dM
Instead of outputting the result of preprocessing, output a list of
`\|\c
.B #define\c
\&\|' directives for all the macros defined during the
execution of the preprocessor, including predefined macros. This gives
you a way of finding out what is predefined in your version of the
preprocessor; assuming you have no file `\|\c
.B foo.h\c
\&\|', the command
.sp
.br
touch\ foo.h;\ cpp\ \-dM\ foo.h
.br
.sp
will show the values of any predefined macros.
.TP
.B \-dD
Like `\|\c
.B \-dM\c
\&\|' except in two respects: it does \c
.I not\c
\& include the
predefined macros, and it outputs \c
.I both\c
\& the `\|\c
.B #define\c
\&\|'
directives and the result of preprocessing. Both kinds of output go to
the standard output file.
.PP
.TP
.BR \-M\ [ \-MG ]
Instead of outputting the result of preprocessing, output a rule
suitable for \c
.B make\c
\& describing the dependencies of the main
source file. The preprocessor outputs one \c
.B make\c
\& rule containing
the object file name for that source file, a colon, and the names of
all the included files. If there are many included files then the
rule is split into several lines using `\|\c
.B \\\\\c
\&\|'-newline.
`\|\c
.B \-MG\c
\&\|' says to treat missing header files as generated files and assume \c
they live in the same directory as the source file. It must be specified \c
in addition to `\|\c
.B \-M\c
\&\|'.
This feature is used in automatic updating of makefiles.
.TP
.BR \-MM\ [ \-MG ]
Like `\|\c
.B \-M\c
\&\|' but mention only the files included with `\|\c
.B #include
"\c
.I file\c
\&"\c
\&\|'. System header files included with `\|\c
.B #include
<\c
.I file\c
\&>\c
\&\|' are omitted.
.TP
.BI \-MD\ file
Like `\|\c
.B \-M\c
\&\|' but the dependency information is written to `\|\c
.I file\c
\&\|'. This is in addition to compiling the file as
specified\(em\&`\|\c
.B \-MD\c
\&\|' does not inhibit ordinary compilation the way
`\|\c
.B \-M\c
\&\|' does.
When invoking gcc, do not specify the `\|\c
.I file\c
\&\|' argument. Gcc will create file names made by replacing `\|\c
.B .c\c
\&\|' with `\|\c
.B .d\c
\&\|' at the end of the input file names.
In Mach, you can use the utility \c
.B md\c
\& to merge multiple files
into a single dependency file suitable for using with the `\|\c
.B make\c
\&\|'
command.
.TP
.BI \-MMD\ file
Like `\|\c
.B \-MD\c
\&\|' except mention only user header files, not system
header files.
.TP
.B \-H
Print the name of each header file used, in addition to other normal
activities.
.TP
.BI "\-imacros " "file"\c
\&
Process \c
.I file\c
\& as input, discarding the resulting output, before
processing the regular input file. Because the output generated from
\c
.I file\c
\& is discarded, the only effect of `\|\c
.B \-imacros \c
.I file\c
\&\c
\&\|' is to
make the macros defined in \c
.I file\c
\& available for use in the main
input. The preprocessor evaluates any `\|\c
.B \-D\c
\&\|' and `\|\c
.B \-U\c
\&\|' options
on the command line before processing `\|\c
.B \-imacros \c
.I file\c
\&\|' \c
\&.
.TP
.BI "\-include " "file"
Process
.I file
as input, and include all the resulting output,
before processing the regular input file.
.TP
.BI "-idirafter " "dir"\c
\&
Add the directory \c
.I dir\c
\& to the second include path. The directories
on the second include path are searched when a header file is not found
in any of the directories in the main include path (the one that
`\|\c
.B \-I\c
\&\|' adds to).
.TP
.BI "-iprefix " "prefix"\c
\&
Specify \c
.I prefix\c
\& as the prefix for subsequent `\|\c
.B \-iwithprefix\c
\&\|'
options.
.TP
.BI "-iwithprefix " "dir"\c
\&
Add a directory to the second include path. The directory's name is
made by concatenating \c
.I prefix\c
\& and \c
.I dir\c
\&, where \c
.I prefix\c
\&
was specified previously with `\|\c
.B \-iprefix\c
\&\|'.
.TP
.B \-lang-c
.TP
.B \-lang-c++
.TP
.B \-lang-objc
.TP
.B \-lang-objc++
Specify the source language. `\|\c
.B \-lang-c++\c
\&\|' makes the preprocessor
handle C++ comment syntax, and includes extra default include
directories for C++, and `\|\c
.B \-lang-objc\c
\&\|' enables the Objective C
`\|\c
.B #import\c
\&\|' directive. `\|\c
.B \-lang-c\c
\&\|' explicitly turns off both of
these extensions, and `\|\c
.B \-lang-objc++\c
\&\|' enables both.
These options are generated by the compiler driver \c
.B gcc\c
\&, but not
passed from the `\|\c
.B gcc\c
\&\|' command line.
.TP
.B \-lint
Look for commands to the program checker \c
.B lint\c
\& embedded in
comments, and emit them preceded by `\|\c
.B #pragma lint\c
\&\|'. For example,
the comment `\|\c
.B /* NOTREACHED */\c
\&\|' becomes `\|\c
.B #pragma lint
NOTREACHED\c
\&\|'.
This option is available only when you call \c
.B cpp\c
\& directly;
\c
.B gcc\c
\& will not pass it from its command line.
.TP
.B \-$
Forbid the use of `\|\c
.B $\c
\&\|' in identifiers. This was formerly required for strict conformance
to the C Standard before the standard was corrected. \c
This option is available only when you call \c
.B cpp\c
\& directly;
.B gcc\c
\& will not pass it from its command line.
.SH "SEE ALSO"
.RB "`\|" Cpp "\|'"
entry in
.B info\c
\&;
.I The C Preprocessor\c
, Richard M. Stallman.
.br
.BR gcc "(" 1 ");"
.RB "`\|" Gcc "\|'"
entry in
.B info\c
\&;
.I
Using and Porting GNU CC (for version 2.0)\c
, Richard M. Stallman.
.SH COPYING
Copyright (c) 1991, 1992, 1993 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
.PP
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
.PP
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be included in
translations approved by the Free Software Foundation instead of in
the original English.

File diff suppressed because it is too large Load Diff

View File

@@ -29,29 +29,19 @@ Boston, MA 02111-1307, USA.
#include <setjmp.h>
/* #define YYDEBUG 1 */
/* The following symbols should be autoconfigured:
HAVE_STDLIB_H
STDC_HEADERS
In the mean time, we'll get by with approximations based
on existing GCC configuration symbols. */
#ifdef POSIX
# ifndef HAVE_STDLIB_H
# define HAVE_STDLIB_H 1
# endif
# ifndef STDC_HEADERS
# define STDC_HEADERS 1
# endif
#endif /* defined (POSIX) */
#if STDC_HEADERS
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#if HAVE_STDLIB_H || defined (MULTIBYTE_CHARS)
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
#ifdef MULTIBYTE_CHARS
#include <locale.h>
#endif
@@ -87,18 +77,36 @@ struct arglist {
#endif
/* Find the largest host integer type and set its size and type.
Don't blindly use `long'; on some crazy hosts it is shorter than `int'. */
Watch out: on some crazy hosts `long' is shorter than `int'. */
#ifndef HOST_BITS_PER_WIDE_INT
#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
#define HOST_WIDE_INT long
#else
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
#define HOST_WIDE_INT int
#ifndef HOST_WIDE_INT
# if HAVE_INTTYPES_H
# include <inttypes.h>
# define HOST_WIDE_INT intmax_t
# define unsigned_HOST_WIDE_INT uintmax_t
# else
# if (HOST_BITS_PER_LONG <= HOST_BITS_PER_INT && HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_INT)
# define HOST_WIDE_INT int
# else
# if (HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_LONG || ! (defined LONG_LONG_MAX || defined LLONG_MAX))
# define HOST_WIDE_INT long
# else
# define HOST_WIDE_INT long long
# endif
# endif
# endif
#endif
#ifndef unsigned_HOST_WIDE_INT
#define unsigned_HOST_WIDE_INT unsigned HOST_WIDE_INT
#endif
#ifndef CHAR_BIT
#define CHAR_BIT 8
#endif
#ifndef HOST_BITS_PER_WIDE_INT
#define HOST_BITS_PER_WIDE_INT (CHAR_BIT * sizeof (HOST_WIDE_INT))
#endif
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
@@ -137,11 +145,14 @@ struct arglist {
#define PRINTF_PROTO_1(ARGS) PRINTF_PROTO(ARGS, 1, 2)
HOST_WIDE_INT parse_c_expression PROTO((char *));
HOST_WIDE_INT parse_c_expression PROTO((char *, int));
static int yylex PROTO((void));
static void yyerror PROTO((char *)) __attribute__ ((noreturn));
static HOST_WIDE_INT expression_value;
#ifdef TEST_EXP_READER
static int expression_signedp;
#endif
static jmp_buf parse_return_error;
@@ -152,6 +163,9 @@ static int keyword_parsing = 0;
This is a count, since unevaluated expressions can nest. */
static int skip_evaluation;
/* Nonzero means warn if undefined identifiers are evaluated. */
static int warn_undef;
/* some external tables of character types */
extern unsigned char is_idstart[], is_idchar[], is_space[];
@@ -164,9 +178,6 @@ extern int traditional;
/* Flag for -lang-c89. */
extern int c89;
/* Flag for -Wundef. */
extern int warn_undef;
#ifndef CHAR_TYPE_SIZE
#define CHAR_TYPE_SIZE BITS_PER_UNIT
#endif
@@ -199,17 +210,13 @@ extern int warn_undef;
#define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE
#endif
#if MAX_CHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT
#define MAX_CHAR_TYPE_MASK (~ (~ (HOST_WIDE_INT) 0 << MAX_CHAR_TYPE_SIZE))
#else
#define MAX_CHAR_TYPE_MASK (~ (HOST_WIDE_INT) 0)
#endif
#define MAX_CHAR_TYPE_MASK (MAX_CHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT \
? (~ (~ (HOST_WIDE_INT) 0 << MAX_CHAR_TYPE_SIZE)) \
: ~ (HOST_WIDE_INT) 0)
#if MAX_WCHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT
#define MAX_WCHAR_TYPE_MASK (~ (~ (HOST_WIDE_INT) 0 << MAX_WCHAR_TYPE_SIZE))
#else
#define MAX_WCHAR_TYPE_MASK (~ (HOST_WIDE_INT) 0)
#endif
#define MAX_WCHAR_TYPE_MASK (MAX_WCHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT \
? ~ (~ (HOST_WIDE_INT) 0 << MAX_WCHAR_TYPE_SIZE) \
: ~ (HOST_WIDE_INT) 0)
/* Suppose A1 + B1 = SUM1, using 2's complement arithmetic ignoring overflow.
Suppose A, B and SUM have the same respective signs as A1, B1, and SUM1.
@@ -232,8 +239,8 @@ void pedwarn PRINTF_PROTO_1((char *, ...));
void warning PRINTF_PROTO_1((char *, ...));
static int parse_number PROTO((int));
static HOST_WIDE_INT left_shift PROTO((struct constant *, unsigned HOST_WIDE_INT));
static HOST_WIDE_INT right_shift PROTO((struct constant *, unsigned HOST_WIDE_INT));
static HOST_WIDE_INT left_shift PROTO((struct constant *, unsigned_HOST_WIDE_INT));
static HOST_WIDE_INT right_shift PROTO((struct constant *, unsigned_HOST_WIDE_INT));
static void integer_overflow PROTO((void));
/* `signedp' values */
@@ -272,7 +279,12 @@ static void integer_overflow PROTO((void));
%%
start : exp1
{ expression_value = $1.value; }
{
expression_value = $1.value;
#ifdef TEST_EXP_READER
expression_signedp = $1.signedp;
#endif
}
;
/* Expressions, including the comma operator. */
@@ -324,7 +336,7 @@ exp : exp '*' exp
integer_overflow ();
}
else
$$.value = ((unsigned HOST_WIDE_INT) $1.value
$$.value = ((unsigned_HOST_WIDE_INT) $1.value
* $3.value); }
| exp '/' exp
{ if ($3.value == 0)
@@ -341,7 +353,7 @@ exp : exp '*' exp
integer_overflow ();
}
else
$$.value = ((unsigned HOST_WIDE_INT) $1.value
$$.value = ((unsigned_HOST_WIDE_INT) $1.value
/ $3.value); }
| exp '%' exp
{ if ($3.value == 0)
@@ -354,7 +366,7 @@ exp : exp '*' exp
if ($$.signedp)
$$.value = $1.value % $3.value;
else
$$.value = ((unsigned HOST_WIDE_INT) $1.value
$$.value = ((unsigned_HOST_WIDE_INT) $1.value
% $3.value); }
| exp '+' exp
{ $$.value = $1.value + $3.value;
@@ -391,28 +403,28 @@ exp : exp '*' exp
if ($1.signedp & $3.signedp)
$$.value = $1.value <= $3.value;
else
$$.value = ((unsigned HOST_WIDE_INT) $1.value
$$.value = ((unsigned_HOST_WIDE_INT) $1.value
<= $3.value); }
| exp GEQ exp
{ $$.signedp = SIGNED;
if ($1.signedp & $3.signedp)
$$.value = $1.value >= $3.value;
else
$$.value = ((unsigned HOST_WIDE_INT) $1.value
$$.value = ((unsigned_HOST_WIDE_INT) $1.value
>= $3.value); }
| exp '<' exp
{ $$.signedp = SIGNED;
if ($1.signedp & $3.signedp)
$$.value = $1.value < $3.value;
else
$$.value = ((unsigned HOST_WIDE_INT) $1.value
$$.value = ((unsigned_HOST_WIDE_INT) $1.value
< $3.value); }
| exp '>' exp
{ $$.signedp = SIGNED;
if ($1.signedp & $3.signedp)
$$.value = $1.value > $3.value;
else
$$.value = ((unsigned HOST_WIDE_INT) $1.value
$$.value = ((unsigned_HOST_WIDE_INT) $1.value
> $3.value); }
| exp '&' exp
{ $$.value = $1.value & $3.value;
@@ -495,7 +507,7 @@ parse_number (olen)
{
register char *p = lexptr;
register int c;
register unsigned HOST_WIDE_INT n = 0, nd, max_over_base;
register unsigned_HOST_WIDE_INT n = 0, nd, max_over_base;
register int base = 10;
register int len = olen;
register int overflow = 0;
@@ -513,7 +525,7 @@ parse_number (olen)
}
}
max_over_base = (unsigned HOST_WIDE_INT) -1 / base;
max_over_base = (unsigned_HOST_WIDE_INT) -1 / base;
for (; len > 0; len--) {
c = *p++;
@@ -684,7 +696,7 @@ yylex ()
It is mostly copied from c-lex.c. */
{
register HOST_WIDE_INT result = 0;
register num_chars = 0;
register int num_chars = 0;
unsigned width = MAX_CHAR_TYPE_SIZE;
int max_chars;
char *token_buffer;
@@ -751,11 +763,11 @@ yylex ()
sizeof ("__CHAR_UNSIGNED__") - 1, -1)
|| ((result >> (num_bits - 1)) & 1) == 0)
yylval.integer.value
= result & (~ (unsigned HOST_WIDE_INT) 0
= result & (~ (unsigned_HOST_WIDE_INT) 0
>> (HOST_BITS_PER_WIDE_INT - num_bits));
else
yylval.integer.value
= result | ~(~ (unsigned HOST_WIDE_INT) 0
= result | ~(~ (unsigned_HOST_WIDE_INT) 0
>> (HOST_BITS_PER_WIDE_INT - num_bits));
}
else
@@ -962,7 +974,7 @@ parse_escape (string_ptr, result_mask)
}
case 'x':
{
register unsigned HOST_WIDE_INT i = 0, overflow = 0;
register unsigned_HOST_WIDE_INT i = 0, overflow = 0;
register int digits_found = 0, digit;
for (;;)
{
@@ -1015,7 +1027,7 @@ integer_overflow ()
static HOST_WIDE_INT
left_shift (a, b)
struct constant *a;
unsigned HOST_WIDE_INT b;
unsigned_HOST_WIDE_INT b;
{
/* It's unclear from the C standard whether shifts can overflow.
The following code ignores overflow; perhaps a C standard
@@ -1023,36 +1035,39 @@ left_shift (a, b)
if (b >= HOST_BITS_PER_WIDE_INT)
return 0;
else
return (unsigned HOST_WIDE_INT) a->value << b;
return (unsigned_HOST_WIDE_INT) a->value << b;
}
static HOST_WIDE_INT
right_shift (a, b)
struct constant *a;
unsigned HOST_WIDE_INT b;
unsigned_HOST_WIDE_INT b;
{
if (b >= HOST_BITS_PER_WIDE_INT)
return a->signedp ? a->value >> (HOST_BITS_PER_WIDE_INT - 1) : 0;
else if (a->signedp)
return a->value >> b;
else
return (unsigned HOST_WIDE_INT) a->value >> b;
return (unsigned_HOST_WIDE_INT) a->value >> b;
}
/* This page contains the entry point to this file. */
/* Parse STRING as an expression, and complain if this fails
to use up all of the contents of STRING. */
/* STRING may contain '\0' bytes; it is terminated by the first '\n'
outside a string constant, so that we can diagnose '\0' properly. */
/* We do not support C comments. They should be removed before
to use up all of the contents of STRING.
STRING may contain '\0' bytes; it is terminated by the first '\n'
outside a string constant, so that we can diagnose '\0' properly.
If WARN_UNDEFINED is nonzero, warn if undefined identifiers are evaluated.
We do not support C comments. They should be removed before
this function is called. */
HOST_WIDE_INT
parse_c_expression (string)
parse_c_expression (string, warn_undefined)
char *string;
int warn_undefined;
{
lexptr = string;
warn_undef = warn_undefined;
/* if there is some sort of scanning error, just return 0 and assume
the parsing routine has printed an error message somewhere.
@@ -1080,6 +1095,7 @@ int traditional;
int main PROTO((int, char **));
static void initialize_random_junk PROTO((void));
static void print_unsigned_host_wide_int PROTO((unsigned_HOST_WIDE_INT));
/* Main program for testing purposes. */
int
@@ -1089,6 +1105,7 @@ main (argc, argv)
{
int n, c;
char buf[1024];
unsigned_HOST_WIDE_INT u;
pedantic = 1 < argc;
traditional = 2 < argc;
@@ -1104,12 +1121,35 @@ main (argc, argv)
n++;
if (c == EOF)
break;
printf ("parser returned %ld\n", (long) parse_c_expression (buf));
parse_c_expression (buf, 1);
printf ("parser returned ");
u = (unsigned_HOST_WIDE_INT) expression_value;
if (expression_value < 0 && expression_signedp) {
u = -u;
printf ("-");
}
if (u == 0)
printf ("0");
else
print_unsigned_host_wide_int (u);
if (! expression_signedp)
printf("u");
printf ("\n");
}
return 0;
}
static void
print_unsigned_host_wide_int (u)
unsigned_HOST_WIDE_INT u;
{
if (u) {
print_unsigned_host_wide_int (u / 10);
putchar ('0' + (int) (u % 10));
}
}
/* table to tell if char can be part of a C identifier. */
unsigned char is_idchar[256];
/* table to tell if char can be first char of a c identifier. */

View File

@@ -1,5 +1,5 @@
/* Utility to pick a temporary filename prefix.
Copyright (C) 1996 Free Software Foundation, Inc.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
@@ -22,7 +22,11 @@ Boston, MA 02111-1307, USA. */
/* This file lives in at least two places: libiberty and gcc.
Don't change one without the other. */
#ifndef NO_SYS_FILE_H
#ifdef IN_GCC
#include "config.h"
#endif
#ifdef HAVE_SYS_FILE_H
#include <sys/types.h>
#include <sys/file.h> /* May get R_OK, etc. on some systems. */
#endif
@@ -36,7 +40,6 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h> /* May get P_tmpdir. */
#ifdef IN_GCC
#include "config.h"
#include "gansidecl.h"
extern char *xmalloc ();
#else
@@ -54,7 +57,7 @@ extern char *xmalloc ();
/* On MSDOS, write temp files in current dir
because there's no place else we can expect to use. */
/* ??? Although the current directory is tried as a last resort,
this is left in so that on MSDOS it is prefered to /tmp on the
this is left in so that on MSDOS it is preferred to /tmp on the
off chance that someone requires this, since that was the previous
behaviour. */
#ifdef __MSDOS__
@@ -68,7 +71,7 @@ extern char *xmalloc ();
#define TEMP_FILE "ccXXXXXX"
/* Subroutine of choose_temp_base.
If BASE is non-NULL, returh it.
If BASE is non-NULL, return it.
Otherwise it checks if DIR is a usable directory.
If success, DIR is returned.
Otherwise NULL is returned. */
@@ -114,11 +117,7 @@ choose_temp_base ()
/* If all else fails, use the current directory! */
if (base == 0)
#ifdef VMS
base = "[";
#else
base = ".";
#endif
#else /* MPW */
base = ":";

View File

@@ -34,6 +34,18 @@ Boston, MA 02111-1307, USA. */
#include <sys/file.h>
#include <sys/stat.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
#define COLLECT
#include "demangle.h"
@@ -45,11 +57,7 @@ extern int errno;
#endif
#ifndef HAVE_STRERROR
#if defined(bsd4_4)
extern const char *const sys_errlist[];
#else
extern char *sys_errlist[];
#endif
extern int sys_nerr;
#else
char *strerror();
@@ -213,7 +221,7 @@ enum pass {
};
#ifndef NO_SYS_SIGLIST
#ifndef DONT_DECLARE_SYS_SIGLIST
#ifndef SYS_SIGLIST_DECLARED
extern char *sys_siglist[];
#endif
#endif
@@ -243,6 +251,7 @@ static char *initname, *fininame; /* names of init and fini funcs */
static struct head constructors; /* list of constructors found */
static struct head destructors; /* list of destructors found */
static struct head exports; /* list of exported symbols */
static struct head frame_tables; /* list of frame unwind info tables */
struct obstack temporary_obstack;
struct obstack permanent_obstack;
@@ -295,9 +304,17 @@ static void scan_libraries PROTO((char *));
char *xcalloc ();
char *xmalloc ();
#ifdef NEED_DECLARATION_INDEX
extern char *index ();
#endif
#ifdef NEED_DECLARATION_RINDEX
extern char *rindex ();
#endif
#ifdef NEED_DECLARATION_FREE
extern void free ();
#endif
#ifdef NO_DUP2
int
@@ -603,13 +620,16 @@ is_ctor_dtor (s)
#ifdef NO_DOT_IN_LABEL
{ "GLOBAL__I_", sizeof ("GLOBAL__I_")-1, 1, 0 },
{ "GLOBAL__D_", sizeof ("GLOBAL__D_")-1, 2, 0 },
{ "GLOBAL__F_", sizeof ("GLOBAL__F_")-1, 5, 0 },
#else
{ "GLOBAL_.I.", sizeof ("GLOBAL_.I.")-1, 1, 0 },
{ "GLOBAL_.D.", sizeof ("GLOBAL_.D.")-1, 2, 0 },
{ "GLOBAL_.F.", sizeof ("GLOBAL_.F.")-1, 5, 0 },
#endif
#else
{ "GLOBAL_$I$", sizeof ("GLOBAL_$I$")-1, 1, 0 },
{ "GLOBAL_$D$", sizeof ("GLOBAL_$D$")-1, 2, 0 },
{ "GLOBAL_$F$", sizeof ("GLOBAL_$F$")-1, 5, 0 },
#endif
{ "GLOBAL__FI_", sizeof ("GLOBAL__FI_")-1, 3, 0 },
{ "GLOBAL__FD_", sizeof ("GLOBAL__FD_")-1, 4, 0 },
@@ -997,6 +1017,7 @@ main (argc, argv)
num_c_args++;
}
obstack_free (&temporary_obstack, temporary_firstobj);
++num_c_args;
c_ptr = c_argv = (char **) xcalloc (sizeof (char *), num_c_args);
@@ -1292,6 +1313,7 @@ main (argc, argv)
shared_obj = 1;
}
obstack_free (&temporary_obstack, temporary_firstobj);
*c_ptr++ = "-fno-exceptions";
#ifdef COLLECT_EXPORT_LIST
/* The AIX linker will discard static constructors in object files if
@@ -1397,7 +1419,8 @@ main (argc, argv)
}
if (constructors.number == 0 && destructors.number == 0
#ifdef LDD_SUFFIX
&& frame_tables.number == 0
#ifdef SCAN_LIBRARIES
/* If we will be running these functions ourselves, we want to emit
stubs into the shared library so that we don't have to relink
dependent programs when we add static objects. */
@@ -1586,9 +1609,9 @@ collect_execute (prog, argv, redir)
{
unlink (redir);
if (freopen (redir, "a", stdout) == NULL)
fatal_perror ("redirecting stdout");
fatal_perror ("redirecting stdout: %s", redir);
if (freopen (redir, "a", stderr) == NULL)
fatal_perror ("redirecting stderr");
fatal_perror ("redirecting stderr: %s", redir);
}
execvp (argv[0], argv);
@@ -1691,6 +1714,7 @@ write_c_file_stat (stream, name)
char *name;
{
char *prefix, *p, *q;
int frames = (frame_tables.number > 0);
/* Figure out name of output_file, stripping off .so version. */
p = rindex (output_file, '/');
@@ -1744,15 +1768,49 @@ write_c_file_stat (stream, name)
fprintf (stream, "static int count;\n");
fprintf (stream, "typedef void entry_pt();\n");
write_list_with_asm (stream, "extern entry_pt ", constructors.first);
if (frames)
{
write_list_with_asm (stream, "extern void *", frame_tables.first);
fprintf (stream, "\tstatic void *frame_table[] = {\n");
write_list (stream, "\t\t&", frame_tables.first);
fprintf (stream, "\t0\n};\n");
/* This must match what's in frame.h. */
fprintf (stream, "struct object {\n");
fprintf (stream, " void *pc_begin;\n");
fprintf (stream, " void *pc_end;\n");
fprintf (stream, " void *fde_begin;\n");
fprintf (stream, " void *fde_array;\n");
fprintf (stream, " __SIZE_TYPE__ count;\n");
fprintf (stream, " struct object *next;\n");
fprintf (stream, "};\n");
fprintf (stream, "extern void __register_frame_info_table (void *, struct object *);\n");
fprintf (stream, "extern void __deregister_frame_info (void *);\n");
fprintf (stream, "static void reg_frame () {\n");
fprintf (stream, "\tstatic struct object ob;\n");
fprintf (stream, "\t__register_frame_info_table (frame_table, &ob);\n");
fprintf (stream, "\t}\n");
fprintf (stream, "static void dereg_frame () {\n");
fprintf (stream, "\t__deregister_frame_info (frame_table);\n");
fprintf (stream, "\t}\n");
}
fprintf (stream, "void %s() {\n", initname);
if (constructors.number > 0)
if (constructors.number > 0 || frames)
{
fprintf (stream, "\tstatic entry_pt *ctors[] = {\n");
write_list (stream, "\t\t", constructors.first);
if (frames)
fprintf (stream, "\treg_frame,\n");
fprintf (stream, "\t};\n");
fprintf (stream, "\tentry_pt **p;\n");
fprintf (stream, "\tif (count++ != 0) return;\n");
fprintf (stream, "\tp = ctors + %d;\n", constructors.number);
fprintf (stream, "\tp = ctors + %d;\n", constructors.number + frames);
fprintf (stream, "\twhile (p > ctors) (*--p)();\n");
}
else
@@ -1760,16 +1818,18 @@ write_c_file_stat (stream, name)
fprintf (stream, "}\n");
write_list_with_asm (stream, "extern entry_pt ", destructors.first);
fprintf (stream, "void %s() {\n", fininame);
if (destructors.number > 0)
if (destructors.number > 0 || frames)
{
fprintf (stream, "\tstatic entry_pt *dtors[] = {\n");
write_list (stream, "\t\t", destructors.first);
if (frames)
fprintf (stream, "\tdereg_frame,\n");
fprintf (stream, "\t};\n");
fprintf (stream, "\tentry_pt **p;\n");
fprintf (stream, "\tif (--count != 0) return;\n");
fprintf (stream, "\tp = dtors;\n");
fprintf (stream, "\twhile (p < dtors + %d) (*p++)();\n",
destructors.number);
destructors.number + frames);
}
fprintf (stream, "}\n");
@@ -1789,20 +1849,57 @@ write_c_file_glob (stream, name)
{
/* Write the tables as C code */
int frames = (frame_tables.number > 0);
fprintf (stream, "typedef void entry_pt();\n\n");
write_list_with_asm (stream, "extern entry_pt ", constructors.first);
if (frames)
{
write_list_with_asm (stream, "extern void *", frame_tables.first);
fprintf (stream, "\tstatic void *frame_table[] = {\n");
write_list (stream, "\t\t&", frame_tables.first);
fprintf (stream, "\t0\n};\n");
/* This must match what's in frame.h. */
fprintf (stream, "struct object {\n");
fprintf (stream, " void *pc_begin;\n");
fprintf (stream, " void *pc_end;\n");
fprintf (stream, " void *fde_begin;\n");
fprintf (stream, " void *fde_array;\n");
fprintf (stream, " __SIZE_TYPE__ count;\n");
fprintf (stream, " struct object *next;\n");
fprintf (stream, "};\n");
fprintf (stream, "extern void __register_frame_info_table (void *, struct object *);\n");
fprintf (stream, "extern void __deregister_frame_info (void *);\n");
fprintf (stream, "static void reg_frame () {\n");
fprintf (stream, "\tstatic struct object ob;\n");
fprintf (stream, "\t__register_frame_info_table (frame_table, &ob);\n");
fprintf (stream, "\t}\n");
fprintf (stream, "static void dereg_frame () {\n");
fprintf (stream, "\t__deregister_frame_info (frame_table);\n");
fprintf (stream, "\t}\n");
}
fprintf (stream, "\nentry_pt * __CTOR_LIST__[] = {\n");
fprintf (stream, "\t(entry_pt *) %d,\n", constructors.number);
fprintf (stream, "\t(entry_pt *) %d,\n", constructors.number + frames);
write_list (stream, "\t", constructors.first);
if (frames)
fprintf (stream, "\treg_frame,\n");
fprintf (stream, "\t0\n};\n\n");
write_list_with_asm (stream, "extern entry_pt ", destructors.first);
fprintf (stream, "\nentry_pt * __DTOR_LIST__[] = {\n");
fprintf (stream, "\t(entry_pt *) %d,\n", destructors.number);
fprintf (stream, "\t(entry_pt *) %d,\n", destructors.number + frames);
write_list (stream, "\t", destructors.first);
if (frames)
fprintf (stream, "\tdereg_frame,\n");
fprintf (stream, "\t0\n};\n\n");
fprintf (stream, "extern entry_pt %s;\n", NAME__MAIN);
@@ -1986,6 +2083,10 @@ scan_prog_file (prog_name, which_pass)
#endif
break;
case 5:
if (which_pass != PASS_LIB)
add_to_list (&frame_tables, name);
default: /* not a constructor or destructor */
continue;
}

View File

@@ -1,5 +1,5 @@
/* Optimize by combining instructions for GNU compiler.
Copyright (C) 1987, 88, 92-96, 1997 Free Software Foundation, Inc.
Copyright (C) 1987, 88, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -970,13 +970,10 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc)
inputs. */
|| (REGNO (src) < FIRST_PSEUDO_REGISTER
&& (! HARD_REGNO_MODE_OK (REGNO (src), GET_MODE (src))
#ifdef SMALL_REGISTER_CLASSES
|| (SMALL_REGISTER_CLASSES
&& ((! all_adjacent && ! REG_USERVAR_P (src))
|| (FUNCTION_VALUE_REGNO_P (REGNO (src))
&& ! REG_USERVAR_P (src))))
#endif
))))
&& ! REG_USERVAR_P (src))))))))
return 0;
}
else if (GET_CODE (dest) != CC0)
@@ -1051,6 +1048,43 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc)
return 1;
}
/* Check if PAT is an insn - or a part of it - used to set up an
argument for a function in a hard register. */
static int
sets_function_arg_p (pat)
rtx pat;
{
int i;
rtx inner_dest;
switch (GET_CODE (pat))
{
case INSN:
return sets_function_arg_p (PATTERN (pat));
case PARALLEL:
for (i = XVECLEN (pat, 0); --i >= 0;)
if (sets_function_arg_p (XVECEXP (pat, 0, i)))
return 1;
break;
case SET:
inner_dest = SET_DEST (pat);
while (GET_CODE (inner_dest) == STRICT_LOW_PART
|| GET_CODE (inner_dest) == SUBREG
|| GET_CODE (inner_dest) == ZERO_EXTRACT)
inner_dest = XEXP (inner_dest, 0);
return (GET_CODE (inner_dest) == REG
&& REGNO (inner_dest) < FIRST_PSEUDO_REGISTER
&& FUNCTION_ARG_REGNO_P (REGNO (inner_dest)));
}
return 0;
}
/* LOC is the location within I3 that contains its pattern or the component
of a PARALLEL of the pattern. We validate that it is valid for combining.
@@ -1079,7 +1113,7 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc)
If I1_NOT_IN_SRC is non-zero, it means that finding I1 in the source
of a SET must prevent combination from occurring.
On machines where SMALL_REGISTER_CLASSES is defined, we don't combine
On machines where SMALL_REGISTER_CLASSES is non-zero, we don't combine
if the destination of a SET is a hard register that isn't a user
variable.
@@ -1146,22 +1180,28 @@ combinable_i3pat (i3, loc, i2dest, i1dest, i1_not_in_src, pi3dest_killed)
if ((inner_dest != dest
&& (reg_overlap_mentioned_p (i2dest, inner_dest)
|| (i1dest && reg_overlap_mentioned_p (i1dest, inner_dest))))
/* This is the same test done in can_combine_p except that we
allow a hard register with SMALL_REGISTER_CLASSES if SRC is a
CALL operation.
Moreover, we can't test all_adjacent; we don't have to, since
this instruction will stay in place, thus we are not considering
to increase the lifetime of INNER_DEST. */
CALL operation. Moreover, we can't test all_adjacent; we don't
have to, since this instruction will stay in place, thus we are
not considering increasing the lifetime of INNER_DEST.
Also, if this insn sets a function argument, combining it with
something that might need a spill could clobber a previous
function argument; the all_adjacent test in can_combine_p also
checks this; here, we do a more specific test for this case. */
|| (GET_CODE (inner_dest) == REG
&& REGNO (inner_dest) < FIRST_PSEUDO_REGISTER
&& (! HARD_REGNO_MODE_OK (REGNO (inner_dest),
GET_MODE (inner_dest))
#ifdef SMALL_REGISTER_CLASSES
|| (SMALL_REGISTER_CLASSES
&& GET_CODE (src) != CALL && ! REG_USERVAR_P (inner_dest)
&& FUNCTION_VALUE_REGNO_P (REGNO (inner_dest)))
#endif
))
|| (SMALL_REGISTER_CLASSES && GET_CODE (src) != CALL
&& ! REG_USERVAR_P (inner_dest)
&& (FUNCTION_VALUE_REGNO_P (REGNO (inner_dest))
|| (FUNCTION_ARG_REGNO_P (REGNO (inner_dest))
&& i3 != 0
&& sets_function_arg_p (prev_nonnote_insn (i3)))))))
|| (i1_not_in_src && reg_overlap_mentioned_p (i1dest, src)))
return 0;
@@ -1301,12 +1341,10 @@ try_combine (i3, i2, i1)
if (i1 == 0 && GET_CODE (i3) == INSN && GET_CODE (PATTERN (i3)) == SET
&& GET_CODE (SET_SRC (PATTERN (i3))) == REG
&& REGNO (SET_SRC (PATTERN (i3))) >= FIRST_PSEUDO_REGISTER
#ifdef SMALL_REGISTER_CLASSES
&& (! SMALL_REGISTER_CLASSES
|| GET_CODE (SET_DEST (PATTERN (i3))) != REG
|| REGNO (SET_DEST (PATTERN (i3))) >= FIRST_PSEUDO_REGISTER
|| REG_USERVAR_P (SET_DEST (PATTERN (i3))))
#endif
|| (GET_CODE (SET_DEST (PATTERN (i3))) != REG
|| REGNO (SET_DEST (PATTERN (i3))) >= FIRST_PSEUDO_REGISTER
|| REG_USERVAR_P (SET_DEST (PATTERN (i3)))))
&& find_reg_note (i3, REG_DEAD, SET_SRC (PATTERN (i3)))
&& GET_CODE (PATTERN (i2)) == PARALLEL
&& ! side_effects_p (SET_DEST (PATTERN (i3)))
@@ -1401,8 +1439,8 @@ try_combine (i3, i2, i1)
as I2 will not cause a problem. */
subst_prev_insn = i1
= gen_rtx (INSN, VOIDmode, INSN_UID (i2), 0, i2,
XVECEXP (PATTERN (i2), 0, 1), -1, 0, 0);
= gen_rtx (INSN, VOIDmode, INSN_UID (i2), NULL_RTX, i2,
XVECEXP (PATTERN (i2), 0, 1), -1, NULL_RTX, NULL_RTX);
SUBST (PATTERN (i2), XVECEXP (PATTERN (i2), 0, 0));
SUBST (XEXP (SET_SRC (PATTERN (i2)), 0),
@@ -2059,8 +2097,21 @@ try_combine (i3, i2, i1)
&& ! reg_referenced_p (SET_DEST (XVECEXP (newpat, 0, 0)),
XVECEXP (newpat, 0, 1)))
{
newi2pat = XVECEXP (newpat, 0, 1);
newpat = XVECEXP (newpat, 0, 0);
/* Normally, it doesn't matter which of the two is done first,
but it does if one references cc0. In that case, it has to
be first. */
#ifdef HAVE_cc0
if (reg_referenced_p (cc0_rtx, XVECEXP (newpat, 0, 0)))
{
newi2pat = XVECEXP (newpat, 0, 0);
newpat = XVECEXP (newpat, 0, 1);
}
else
#endif
{
newi2pat = XVECEXP (newpat, 0, 1);
newpat = XVECEXP (newpat, 0, 0);
}
i2_code_number
= recog_for_combine (&newi2pat, i2, &new_i2_notes, &i2_scratches);
@@ -2286,7 +2337,9 @@ try_combine (i3, i2, i1)
}
/* If I3DEST was used in I3SRC, it really died in I3. We may need to
put a REG_DEAD note for it somewhere. Similarly for I2 and I1.
put a REG_DEAD note for it somewhere. If NEWI2PAT exists and sets
I3DEST, the death must be somewhere before I2, not I3. If we passed I3
in that case, it might delete I2. Similarly for I2 and I1.
Show an additional death due to the REG_DEAD note we make here. If
we discard it in distribute_notes, we will decrement it again. */
@@ -2295,16 +2348,17 @@ try_combine (i3, i2, i1)
if (GET_CODE (i3dest_killed) == REG)
REG_N_DEATHS (REGNO (i3dest_killed))++;
distribute_notes (gen_rtx (EXPR_LIST, REG_DEAD, i3dest_killed,
NULL_RTX),
NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
NULL_RTX, NULL_RTX);
if (newi2pat && reg_set_p (i3dest_killed, newi2pat))
distribute_notes (gen_rtx (EXPR_LIST, REG_DEAD, i3dest_killed,
NULL_RTX),
NULL_RTX, i2, NULL_RTX, elim_i2, elim_i1);
else
distribute_notes (gen_rtx (EXPR_LIST, REG_DEAD, i3dest_killed,
NULL_RTX),
NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
elim_i2, elim_i1);
}
/* For I2 and I1, we have to be careful. If NEWI2PAT exists and sets
I2DEST or I1DEST, the death must be somewhere before I2, not I3. If
we passed I3 in that case, it might delete I2. */
if (i2dest_in_i2src)
{
if (GET_CODE (i2dest) == REG)
@@ -2723,6 +2777,9 @@ find_split_point (loc, insn)
unsignedp = (code == ZERO_EXTRACT);
}
break;
default:
break;
}
if (len && pos >= 0 && pos + len <= GET_MODE_BITSIZE (GET_MODE (inner)))
@@ -2819,6 +2876,9 @@ find_split_point (loc, insn)
SUBST (XEXP (x, 1), tem);
}
break;
default:
break;
}
/* Otherwise, select our actions depending on our rtx class. */
@@ -4020,11 +4080,16 @@ simplify_rtx (x, op0_mode, last, in_dest)
case XOR:
return simplify_logical (x, last);
case ABS:
case ABS:
/* (abs (neg <foo>)) -> (abs <foo>) */
if (GET_CODE (XEXP (x, 0)) == NEG)
SUBST (XEXP (x, 0), XEXP (XEXP (x, 0), 0));
/* If the mode of the operand is VOIDmode (i.e. if it is ASM_OPERANDS),
do nothing. */
if (GET_MODE (XEXP (x, 0)) == VOIDmode)
break;
/* If operand is something known to be positive, ignore the ABS. */
if (GET_CODE (XEXP (x, 0)) == FFS || GET_CODE (XEXP (x, 0)) == ABS
|| ((GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0)))
@@ -4076,6 +4141,9 @@ simplify_rtx (x, op0_mode, last, in_dest)
#endif
break;
default:
break;
}
return x;
@@ -4223,6 +4291,8 @@ simplify_if_then_else (x)
case LT:
case LE:
return gen_unary (NEG, mode, mode, gen_unary (ABS, mode, mode, true));
default:
break;
}
/* Look for MIN or MAX. */
@@ -4246,6 +4316,8 @@ simplify_if_then_else (x)
case LEU:
case LTU:
return gen_binary (UMIN, mode, true, false);
default:
break;
}
/* If we have (if_then_else COND (OP Z C1) Z) and OP is an identity when its
@@ -4936,6 +5008,9 @@ simplify_logical (x, last)
return gen_rtx_combine (reverse_condition (GET_CODE (op0)),
mode, XEXP (op0, 0), XEXP (op0, 1));
break;
default:
abort ();
}
return x;
@@ -5649,6 +5724,9 @@ extract_left_shift (x, count)
GEN_INT (INTVAL (XEXP (x, 1)) >> count));
break;
default:
break;
}
return 0;
@@ -5890,6 +5968,10 @@ make_compound_operation (x, in_code)
return newer;
}
break;
default:
break;
}
if (new)
@@ -5970,8 +6052,11 @@ force_to_mode (x, mode, mask, reg, just_select)
/* If this is a CALL or ASM_OPERANDS, don't do anything. Some of the
code below will do the wrong thing since the mode of such an
expression is VOIDmode. */
if (code == CALL || code == ASM_OPERANDS)
expression is VOIDmode.
Also do nothing if X is a CLOBBER; this can happen if X was
the return value from a call to gen_lowpart_for_combine. */
if (code == CALL || code == ASM_OPERANDS || code == CLOBBER)
return x;
/* We want to perform the operation is its present mode unless we know
@@ -6459,6 +6544,9 @@ force_to_mode (x, mode, mask, reg, just_select)
force_to_mode (XEXP (x, 2), mode,
mask, reg,next_select)));
break;
default:
break;
}
/* Ensure we return a value of the proper mode. */
@@ -6681,6 +6769,8 @@ known_cond (x, cond, reg, val)
case LT: case LE:
return gen_unary (NEG, GET_MODE (XEXP (x, 0)), GET_MODE (XEXP (x, 0)),
XEXP (x, 0));
default:
break;
}
/* The only other cases we handle are MIN, MAX, and comparisons if the
@@ -6717,6 +6807,8 @@ known_cond (x, cond, reg, val)
return unsignedp ? XEXP (x, 1) : x;
case LEU: case LTU:
return unsignedp ? XEXP (x, 0) : x;
default:
break;
}
}
}
@@ -7138,7 +7230,7 @@ simplify_and_const_int (x, mode, varop, constop)
/* We let num_sign_bit_copies recur into nonzero_bits as that is useful.
We don't let nonzero_bits recur into num_sign_bit_copies, because that
is less useful. We can't allow both, because that results in exponential
run time recusion. There is a nullstone testcase that triggered
run time recursion. There is a nullstone testcase that triggered
this. This macro avoids accidental uses of num_sign_bit_copies. */
#define num_sign_bit_copies()
@@ -7428,6 +7520,8 @@ nonzero_bits (x, mode)
result_width = MIN (width0, width1);
result_low = MIN (low0, low1);
break;
default:
abort ();
}
if (result_width < mode_width)
@@ -7530,6 +7624,9 @@ nonzero_bits (x, mode)
nonzero &= (nonzero_bits (XEXP (x, 1), mode)
| nonzero_bits (XEXP (x, 2), mode));
break;
default:
break;
}
return nonzero;
@@ -7571,13 +7668,25 @@ num_sign_bit_copies (x, mode)
return MAX (1, (num_sign_bit_copies (x, GET_MODE (x))
- (GET_MODE_BITSIZE (GET_MODE (x)) - bitwidth)));
if (GET_MODE (x) != VOIDmode && bitwidth > GET_MODE_BITSIZE (GET_MODE (x)))
{
#ifndef WORD_REGISTER_OPERATIONS
/* If this machine does not do all register operations on the entire
register and MODE is wider than the mode of X, we can say nothing
at all about the high-order bits. */
if (GET_MODE (x) != VOIDmode && bitwidth > GET_MODE_BITSIZE (GET_MODE (x)))
return 1;
return 1;
#else
/* Likewise on machines that do, if the mode of the object is smaller
than a word and loads of that size don't sign extend, we can say
nothing about the high order bits. */
if (GET_MODE_BITSIZE (GET_MODE (x)) < BITS_PER_WORD
#ifdef LOAD_EXTEND_OP
&& LOAD_EXTEND_OP (GET_MODE (x)) != SIGN_EXTEND
#endif
)
return 1;
#endif
}
switch (code)
{
@@ -7817,6 +7926,10 @@ num_sign_bit_copies (x, mode)
case GEU: case GTU: case LEU: case LTU:
if (STORE_FLAG_VALUE == -1)
return bitwidth;
break;
default:
break;
}
/* If we haven't been able to figure it out by one of the above rules,
@@ -7928,6 +8041,8 @@ merge_outer_ops (pop0, pconst0, op1, const1, mode, pcomp_p)
case NEG:
op0 = NIL;
break;
default:
break;
}
}
@@ -7969,6 +8084,8 @@ merge_outer_ops (pop0, pconst0, op1, const1, mode, pcomp_p)
/* (a ^ b) & b) == (~a) & b */
*pcomp_p = 1;
break;
default:
break;
}
/* Check for NO-OP cases. */
@@ -8602,6 +8719,9 @@ simplify_shift_const (x, code, result_mode, varop, count)
continue;
}
break;
default:
break;
}
break;
@@ -9434,6 +9554,9 @@ simplify_comparison (code, pop0, pop1)
code = LT;
}
break;
default:
break;
}
/* Compute some predicates to simplify code below. */
@@ -9966,6 +10089,9 @@ simplify_comparison (code, pop0, pop1)
continue;
}
break;
default:
break;
}
break;
@@ -10096,9 +10222,10 @@ reversible_comparison_p (x)
x = get_last_value (XEXP (x, 0));
return (x && GET_CODE (x) == COMPARE
&& ! FLOAT_MODE_P (GET_MODE (XEXP (x, 0))));
default:
return 0;
}
return 0;
}
/* Utility function for following routine. Called when X is part of a value
@@ -10705,8 +10832,11 @@ mark_used_regs_combine (x)
mark_used_regs_combine (XEXP (testreg, 0));
mark_used_regs_combine (SET_SRC (x));
return;
}
return;
default:
break;
}
/* Recursively scan the operands of this expression. */
@@ -11177,15 +11307,21 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
if (reg_set_p (XEXP (note, 0), PATTERN (tem)))
{
rtx set = single_set (tem);
rtx inner_dest = 0;
if (set != 0)
for (inner_dest = SET_DEST (set);
GET_CODE (inner_dest) == STRICT_LOW_PART
|| GET_CODE (inner_dest) == SUBREG
|| GET_CODE (inner_dest) == ZERO_EXTRACT;
inner_dest = XEXP (inner_dest, 0))
;
/* Verify that it was the set, and not a clobber that
modified the register. */
if (set != 0 && ! side_effects_p (SET_SRC (set))
&& (rtx_equal_p (XEXP (note, 0), SET_DEST (set))
|| (GET_CODE (SET_DEST (set)) == SUBREG
&& rtx_equal_p (XEXP (note, 0),
XEXP (SET_DEST (set), 0)))))
&& rtx_equal_p (XEXP (note, 0), inner_dest))
{
/* Move the notes and links of TEM elsewhere.
This might delete other dead insns recursively.
@@ -11202,6 +11338,20 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
NOTE_LINE_NUMBER (tem) = NOTE_INSN_DELETED;
NOTE_SOURCE_FILE (tem) = 0;
}
/* If the register is both set and used here, put the
REG_DEAD note here, but place a REG_UNUSED note
here too unless there already is one. */
else if (reg_referenced_p (XEXP (note, 0),
PATTERN (tem)))
{
place = tem;
if (! find_regno_note (tem, REG_UNUSED,
REGNO (XEXP (note, 0))))
REG_NOTES (tem)
= gen_rtx (EXPR_LIST, REG_UNUSED, XEXP (note, 0),
REG_NOTES (tem));
}
else
{
PUT_REG_NOTE_KIND (note, REG_UNUSED);
@@ -11258,13 +11408,12 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
}
/* If the register is set or already dead at PLACE, we needn't do
anything with this note if it is still a REG_DEAD note.
anything with this note if it is still a REG_DEAD note.
We can here if it is set at all, not if is it totally replace,
which is what `dead_or_set_p' checks, so also check for it being
set partially. */
Note that we cannot use just `dead_or_set_p' here since we can
convert an assignment to a register into a bit-field assignment.
Therefore, we must also omit the note if the register is the
target of a bitfield assignment. */
if (place && REG_NOTE_KIND (note) == REG_DEAD)
{
int regno = REGNO (XEXP (note, 0));

89
gcc/config.guess vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -52,6 +52,9 @@ trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
@@ -62,9 +65,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d84
cmoveq \$4,0,\$3
addl \$3,\$31,\$0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
@@ -72,16 +80,25 @@ EOF
if test "$?" = 0 ; then
./dummy
case "$?" in
1)
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
2)
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
@@ -461,10 +478,10 @@ EOF
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo i386-pc-cygwin32
echo ${UNAME_MACHINE}-pc-cygwin32
exit 0 ;;
i*:MINGW*:*)
echo i386-pc-mingw32
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin32
@@ -476,6 +493,12 @@ EOF
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
# uname on the ARM produces all sorts of strangeness, and we need to
# filter it out.
case "$UNAME_MACHINE" in
arm* | sa110*) UNAME_MACHINE="arm" ;;
esac
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
@@ -489,6 +512,7 @@ EOF
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
@@ -500,26 +524,47 @@ EOF
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d84
cmoveq \$4,0,\$3
addl \$3,\$31,\$0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
LIBC=""
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
1)
UNAME_MACHINE="alphaev5"
;;
2)
UNAME_MACHINE="alphaev56"
;;
esac
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu ; exit 0
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
objdump --private-headers dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >dummy.c <<EOF
main(argc, argv)

64
gcc/config.sub vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
@@ -149,19 +149,20 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arm \
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 \
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
| sparc | sparclet | sparclite | sparc64)
| mipstx39 | mipstx39el \
| sparc | sparclet | sparclite | sparc64 | v850)
basic_machine=$basic_machine-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i[3456]86)
i[34567]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
@@ -170,8 +171,8 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
@@ -179,7 +180,9 @@ case $basic_machine in
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
| mips64el-* | mips64orion-* | mips64orionel-* \
| mipstx39-* | mipstx39el-* \
| f301-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -206,9 +209,9 @@ case $basic_machine in
amiga | amiga-*)
basic_machine=m68k-cbm
;;
amigados)
amigaos | amigados)
basic_machine=m68k-cbm
os=-amigados
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-cbm
@@ -347,19 +350,19 @@ case $basic_machine in
os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[3456]86v32)
i[34567]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i[3456]86v4*)
i[34567]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i[3456]86v)
i[34567]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i[3456]86sol2)
i[34567]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
@@ -466,25 +469,23 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5)
basic_machine=i586-intel
pentium | p5 | k5 | nexen)
basic_machine=i586-pc
;;
pentiumpro | p6)
basic_machine=i686-intel
pentiumpro | p6 | k6 | 6x86)
basic_machine=i686-pc
;;
pentium-* | p5-*)
pentiumii | pentium2)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-*)
pentiumpro-* | p6-* | k6-* | 6x86-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
k5)
# We don't have specific support for AMD's K5 yet, so just call it a Pentium
basic_machine=i586-amd
;;
nexen)
# We don't have specific support for Nexgen yet, so just call it a Pentium
basic_machine=i586-nexgen
pentiumii-* | pentium2-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
@@ -568,6 +569,12 @@ case $basic_machine in
basic_machine=i386-sequent
os=-dynix
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
@@ -698,7 +705,8 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
@@ -832,7 +840,7 @@ case $basic_machine in
os=-sysv
;;
*-cbm)
os=-amigados
os=-amigaos
;;
*-dg)
os=-dgux

View File

@@ -19,13 +19,10 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef FILE
#include <stdio.h>
#endif
#include <string.h>
#define __datalbl
#include "config.h"
#include <stdio.h>
#include <string.h>
#include "rtl.h"
#include "tree.h"
#include "expr.h"

View File

@@ -1105,7 +1105,7 @@
;********************
;; Bit field instructions, general cases.
;; "o,d" constraint causes a nonoffsetable memref to match the "o"
;; "o,d" constraint causes a nonoffsettable memref to match the "o"
;; so that its address is reloaded.
;; (define_insn "extv" ...

View File

@@ -1,5 +1,5 @@
/* Subroutines used for code generation on AMD Am29000.
Copyright (C) 1987, 88, 90-94, 1995 Free Software Foundation, Inc.
Copyright (C) 1987, 88, 90-94, 1995, 1997 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@nyu.edu)
This file is part of GNU CC.
@@ -19,8 +19,8 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "config.h"
#include <stdio.h>
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"

View File

@@ -987,13 +987,18 @@ extern char *a29k_function_name;
On the 29k, we must be able to place it in a delay slot, it must
not use sp if the frame pointer cannot be eliminated, and it cannot
use local regs if we need to push the register stack. */
use local regs if we need to push the register stack.
If this is a SET with a memory as source, it might load from
a stack slot, unless the address is constant. */
#define ELIGIBLE_FOR_EPILOGUE_DELAY(INSN,N) \
(get_attr_in_delay_slot (INSN) == IN_DELAY_SLOT_YES \
&& ! (frame_pointer_needed \
&& reg_mentioned_p (stack_pointer_rtx, PATTERN (INSN))) \
&& ! (needs_regstack_p () && uses_local_reg_p (PATTERN (INSN))))
&& ! (needs_regstack_p () && uses_local_reg_p (PATTERN (INSN))) \
&& (GET_CODE (PATTERN (INSN)) != SET \
|| GET_CODE (SET_SRC (PATTERN (INSN))) != MEM \
|| ! rtx_varies_p (XEXP (SET_SRC (PATTERN (INSN)), 0))))
/* Output assembler code for a block containing the constant parts
of a trampoline, leaving space for the variable parts.

View File

@@ -6,7 +6,7 @@ LIBGCC1_TEST =
# We don't want to put exit in libgcc.a for VxWorks, because VxWorks
# does not have _exit.
LIBGCC2_CFLAGS = -O2 $(GCC_CFLAGS) -g1 -Dexit=unused_exit
TARGET_LIBGCC2_CFLAGS = -Dexit=unused_exit
LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c

View File

@@ -1,5 +1,5 @@
/* Subroutines used for code generation on the DEC Alpha.
Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
@@ -20,8 +20,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "config.h"
#include <stdio.h>
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
@@ -95,10 +95,13 @@ static void add_long_const PROTO((FILE *, HOST_WIDE_INT, int, int, int));
/* Compute the size of the save area in the stack. */
static void alpha_sa_mask PROTO((unsigned long *imaskP,
unsigned long *fmaskP));
/* Strip type information. */
#define CURRENT_FUNCTION_ARGS_INFO \
(TARGET_OPEN_VMS ? current_function_args_info & 0xff \
: current_function_args_info)
/* Get the number of args of a function in one of two ways. */
#ifdef OPEN_VMS
#define NUM_ARGS current_function_args_info.num_args
#else
#define NUM_ARGS current_function_args_info
#endif
/* Parse target option strings. */
@@ -106,21 +109,42 @@ void
override_options ()
{
alpha_cpu
= TARGET_CPU_DEFAULT & MASK_CPU_EV5 ? PROCESSOR_EV5 : PROCESSOR_EV4;
= TARGET_CPU_DEFAULT & MASK_CPU_EV6 ? PROCESSOR_EV6
: (TARGET_CPU_DEFAULT & MASK_CPU_EV5 ? PROCESSOR_EV5 : PROCESSOR_EV4);
if (alpha_cpu_string)
{
if (! strcmp (alpha_cpu_string, "ev4")
|| ! strcmp (alpha_cpu_string, "21064"))
alpha_cpu = PROCESSOR_EV4;
{
alpha_cpu = PROCESSOR_EV4;
target_flags &= ~ (MASK_BWX | MASK_CIX | MASK_MAX);
}
else if (! strcmp (alpha_cpu_string, "ev5")
|| ! strcmp (alpha_cpu_string, "21164"))
alpha_cpu = PROCESSOR_EV5;
{
alpha_cpu = PROCESSOR_EV5;
target_flags &= ~ (MASK_BWX | MASK_CIX | MASK_MAX);
}
else if (! strcmp (alpha_cpu_string, "ev56")
|| ! strcmp (alpha_cpu_string, "21164a"))
{
alpha_cpu = PROCESSOR_EV5;
target_flags |= MASK_BYTE_OPS;
target_flags |= MASK_BWX;
target_flags &= ~ (MASK_CIX | MASK_MAX);
}
else if (! strcmp (alpha_cpu_string, "pca56")
|| ! strcmp (alpha_cpu_string, "21164PC"))
{
alpha_cpu = PROCESSOR_EV5;
target_flags |= MASK_BWX | MASK_MAX;
target_flags &= ~ MASK_CIX;
}
else if (! strcmp (alpha_cpu_string, "ev6")
|| ! strcmp (alpha_cpu_string, "21264"))
{
alpha_cpu = PROCESSOR_EV6;
target_flags |= MASK_BWX | MASK_CIX | MASK_MAX;
}
else
error ("bad value `%s' for -mcpu switch", alpha_cpu_string);
@@ -476,7 +500,7 @@ input_operand (op, mode)
return 1;
/* ... fall through ... */
case MEM:
return ((TARGET_BYTE_OPS || (mode != HImode && mode != QImode))
return ((TARGET_BWX || (mode != HImode && mode != QImode))
&& general_operand (op, mode));
case CONST_DOUBLE:
@@ -1162,7 +1186,7 @@ alpha_adjust_cost (insn, link, dep_insn, cost)
/* EV5 costs are as given in alpha.md; exceptions are given here. */
if (alpha_cpu == PROCESSOR_EV5)
{
/* And the lord DEC sayeth: "A special bypass provides an effective
/* And the lord DEC saith: "A special bypass provides an effective
latency of 0 cycles for an ICMP or ILOG insn producing the test
operand of an IBR or CMOV insn." */
if (recog_memoized (dep_insn) >= 0
@@ -1312,12 +1336,12 @@ print_operand (file, x, code)
case ',':
/* Generates single precision instruction suffix. */
fprintf (file, "%c", (TARGET_FLOAT_VAX?'f':'s'));
fprintf (file, "%c", (TARGET_FLOAT_VAX ? 'f' : 's'));
break;
case '-':
/* Generates double precision instruction suffix. */
fprintf (file, "%c", (TARGET_FLOAT_VAX?'g':'t'));
fprintf (file, "%c", (TARGET_FLOAT_VAX ? 'g' : 't'));
break;
case 'r':
@@ -1544,9 +1568,9 @@ alpha_builtin_saveregs (arglist)
/* Compute the current position into the args, taking into account
both registers and memory. Both of these are already included in
current_function_args_info. */
NUM_ARGS. */
argsize = GEN_INT (CURRENT_FUNCTION_ARGS_INFO * UNITS_PER_WORD);
argsize = GEN_INT (NUM_ARGS * UNITS_PER_WORD);
/* For Unix, SETUP_INCOMING_VARARGS moves the starting address base up by 48,
storing fp arg registers in the first 48 bytes, and the integer arg
@@ -1559,10 +1583,10 @@ alpha_builtin_saveregs (arglist)
if (TARGET_OPEN_VMS)
addr = plus_constant (virtual_incoming_args_rtx,
CURRENT_FUNCTION_ARGS_INFO <= 5 + stdarg
NUM_ARGS <= 5 + stdarg
? UNITS_PER_WORD : - 6 * UNITS_PER_WORD);
else
addr = (CURRENT_FUNCTION_ARGS_INFO <= 5 + stdarg
addr = (NUM_ARGS <= 5 + stdarg
? plus_constant (virtual_incoming_args_rtx,
6 * UNITS_PER_WORD)
: plus_constant (virtual_incoming_args_rtx,
@@ -1595,10 +1619,12 @@ alpha_builtin_saveregs (arglist)
emit_move_insn (dest, addr);
if (flag_check_memory_usage)
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3, dest,
ptr_mode, GEN_INT (GET_MODE_SIZE (ptr_mode)),
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3,
dest, ptr_mode,
GEN_INT (GET_MODE_SIZE (ptr_mode)),
TYPE_MODE (sizetype),
GEN_INT (MEMORY_USE_RW), QImode);
GEN_INT (MEMORY_USE_RW),
TYPE_MODE (integer_type_node));
/* Store the argsize as the __va_offset member. */
dest = change_address (block, TYPE_MODE (integer_type_node),
@@ -1607,12 +1633,13 @@ alpha_builtin_saveregs (arglist)
emit_move_insn (dest, argsize);
if (flag_check_memory_usage)
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3, dest,
ptr_mode,
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3,
dest, ptr_mode,
GEN_INT (GET_MODE_SIZE
(TYPE_MODE (integer_type_node))),
TYPE_MODE (sizetype),
GEN_INT (MEMORY_USE_RW), QImode);
GEN_INT (MEMORY_USE_RW),
TYPE_MODE (integer_type_node));
/* Return the address of the va_list constructor, but don't put it in a
register. Doing so would fail when not optimizing and produce worse
@@ -1621,6 +1648,39 @@ alpha_builtin_saveregs (arglist)
}
}
#if OPEN_VMS
#define REG_PV 27
#define REG_RA 26
#else
#define REG_RA 26
#endif
/* Find the current function's return address.
??? It would be better to arrange things such that if we would ordinarily
have been a leaf function and we didn't spill the hard reg that we
wouldn't have to save the register in the prolog. But it's not clear
how to get the right information at the right time. */
static rtx alpha_return_addr_rtx;
rtx
alpha_return_addr ()
{
rtx ret;
if ((ret = alpha_return_addr_rtx) == NULL)
{
alpha_return_addr_rtx = ret = gen_reg_rtx (Pmode);
emit_insn_after (gen_rtx (SET, VOIDmode, ret,
gen_rtx (REG, Pmode, REG_RA)),
get_insns ());
}
return ret;
}
/* This page contains routines that are used to determine what the function
prologue and epilogue code will do and write them out. */
@@ -1628,9 +1688,6 @@ alpha_builtin_saveregs (arglist)
#if OPEN_VMS
#define REG_PV 27
#define REG_RA 26
/* These variables are used for communication between the following functions.
They indicate various things about the current function being compiled
that are used to tell what kind of prologue, epilogue and procedure
@@ -1861,150 +1918,6 @@ add_long_const (file, c, in_reg, out_reg, temp_reg)
#if OPEN_VMS
/*
Quick and dirty vmskrunch routine to ensure symbols are within the
64 bytes limit imposed by VMS.
This is written specifically for GNAT, and may not work for C++.
This routine duplicates every symbol passed to it whether it is too
long or not, which is a waste of space, fix later.
*/
#include <string.h>
char*
vmskrunch (name)
char *name;
{
char *foo;
int max = 60; /* Allow for the ..xx extension */
int len, tlen;
if (name[0] == '*')
return (&name[1]);
len = tlen = strlen (name);
foo = xstrdup (name);
/* Don't muck with the ..xx extenstion */
if ((foo [tlen-4] == '.') && (foo [tlen-3] == '.'))
{
max = max + 4;
if (tlen > max)
{
foo [tlen-4] = 0;
len = len - 4;
max = max - 4;
}
}
if (len > max)
{
char *bar;
int i, j, slen, nlen, xlen, chopchar;
nlen = len;
/* Change all _ and . characters to spaces, if thats enough then quit.
For example: "foobar__foo__bar" becomes "foobar foo bar" */
for (i = 0; bar = index (foo, '_'); i++)
*bar = ' ';
nlen = nlen - i;
for (i = 0; bar = index (foo, '.'); i++)
*bar = ' ';
nlen = nlen - i;
for (i = 0; bar = index (foo, '$'); i++)
*bar = ' ';
nlen = nlen - i;
/* Iteratively make blank the rightmost non-blank character on the
longest leftmost substring delmited by blanks, until it's short
enough. For example: "foobar foo bar" becomes, successively:
"fooba foo bar"
"foob foo bar"
"foo foo bar"
"fo foo bar"
"fo fo bar"
"fo fo ba "
"f fo ba "
"f f ba "
"f f b "
etc. */
while (nlen > max)
{
j = 0;
xlen = 0;
while (foo[j])
{
/* Find first non-blank */
if (foo[j])
for (i = j; foo[i]==' ' && foo[i]; i++)
;
/* Find the first blank */
j = i;
if (foo[j])
for (i = j + 1; foo[i] != ' ' && foo[i]; i++)
;
/* If this substring is the longest so far, remember the
position of the character to chop off. */
slen = i - j;
if (slen > xlen)
{
chopchar = i - 1;
xlen = slen;
}
j = i;
}
/* Try to avoid chopping uppercase suffix letters */
if (isupper (foo [chopchar]))
{
for (i = chopchar;
isupper (foo[i]) && foo[i] != ' ' && i >= 0;
i--)
;
if (islower (foo[i]))
chopchar = i;
}
foo [chopchar] = ' ';
nlen--;
}
/* Put the ..xx extension back */
if (len != tlen)
{
foo [len] = '.';
len = len + 4;
}
/* Collapse all the blanks */
j = 0;
for (i = 0; foo[i]; i++)
if (foo[i] != ' ')
foo[j++] = foo[i];
foo[j] = 0;
return foo;
}
/* Put back the ..xx extension */
if (len != tlen)
{
foo [len] = '.';
len = len + 4;
}
free (foo);
return name;
}
/* On vms we have two kinds of functions:
- stack frame (PROC_STACK)
@@ -2035,7 +1948,7 @@ output_prolog (file, size)
/* Offset during register save. */
int reg_offset;
/* Label for the procedure entry. */
char entry_label[70];
char *entry_label = (char *) alloca (strlen (alpha_function_name) + 5);
int i;
sa_size = alpha_sa_size ();
@@ -2048,7 +1961,7 @@ output_prolog (file, size)
fprintf (file, "\t.ent ");
assemble_name (file, alpha_function_name);
fprintf (file, "\n");
sprintf (entry_label, "%.64s..en", alpha_function_name);
sprintf (entry_label, "%s..en", alpha_function_name);
ASM_OUTPUT_LABEL (file, entry_label);
inside_function = TRUE;
@@ -2170,8 +2083,18 @@ output_prolog (file, size)
STACK_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM);
/* Describe our frame. */
fprintf (file, "\t.frame $%d,%d,$26,%d\n",
unwind_regno, frame_size, rsa_offset);
fprintf (file, "\t.frame $%d,", unwind_regno);
/* If the frame size is larger than an integer, print it as zero to
avoid an assembler error. We won't be properly describing such a
frame, but that's the best we can do. */
fprintf (file, HOST_WIDE_INT_PRINT_DEC,
#if HOST_BITS_PER_WIDE_INT == 64
frame_size >= (1l << 31) ? 0:
#endif
frame_size
);
fprintf (file, ",$26,%d\n", rsa_offset);
/* If we have to allocate space for outgoing args, do it now. */
if (current_function_outgoing_args_size != 0)
@@ -2296,6 +2219,19 @@ output_epilog (file, size)
/* Show that we know this function if it is called again. */
SYMBOL_REF_FLAG (XEXP (DECL_RTL (current_function_decl), 0)) = 1;
alpha_return_addr_rtx = 0;
}
int
vms_valid_decl_attribute_p (decl, attributes, identifier, args)
tree decl;
tree attributes;
tree identifier;
tree args;
{
if (is_attribute_p ("overlaid", identifier))
return (args == NULL_TREE);
}
#else /* !OPEN_VMS */
@@ -2303,7 +2239,7 @@ output_epilog (file, size)
void
output_prolog (file, size)
FILE *file;
int size;
HOST_WIDE_INT size;
{
HOST_WIDE_INT out_args_size
= ALPHA_ROUND (current_function_outgoing_args_size);
@@ -2458,10 +2394,20 @@ output_prolog (file, size)
/* Describe our frame. */
if (!flag_inhibit_size_directive)
{
fprintf (file, "\t.frame $%d,%d,$26,%d\n",
fprintf (file, "\t.frame $%d,",
(frame_pointer_needed
? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM),
frame_size, current_function_pretend_args_size);
? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM));
/* If the frame size is larger than an integer, print it as zero to
avoid an assembler error. We won't be properly describing such a
frame, but that's the best we can do. */
fprintf (file, HOST_WIDE_INT_PRINT_DEC,
#if HOST_BITS_PER_WIDE_INT == 64
frame_size >= (1l << 31) ? 0 :
#endif
frame_size
);
fprintf (file, ",$26,%d\n", current_function_pretend_args_size);
}
/* Save register 26 if any other register needs to be saved. */
@@ -2485,8 +2431,15 @@ output_prolog (file, size)
/* Print the register mask and do floating-point saves. */
if (reg_mask && !flag_inhibit_size_directive)
fprintf (file, "\t.mask 0x%x,%d\n", reg_mask,
actual_start_reg_offset - frame_size);
{
fprintf (file, "\t.mask 0x%x,", reg_mask);
fprintf (file, HOST_WIDE_INT_PRINT_DEC,
#if HOST_BITS_PER_WIDE_INT == 64
frame_size >= (1l << 31) ? 0 :
#endif
actual_start_reg_offset - frame_size);
fprintf (file, "\n");
}
start_reg_offset = reg_offset;
reg_mask = 0;
@@ -2618,6 +2571,8 @@ output_epilog (file, size)
/* Show that we know this function if it is called again. */
SYMBOL_REF_FLAG (XEXP (DECL_RTL (current_function_decl), 0)) = 1;
alpha_return_addr_rtx = 0;
}
#endif /* !OPEN_VMS */
@@ -2678,7 +2633,7 @@ alpha_output_filename (stream, name)
}
else if (name != current_function_file
&& strcmp (name, current_function_file) != 0)
&& strcmp (name, current_function_file) != 0)
{
if (inside_function && ! TARGET_GAS)
fprintf (stream, "\t#.file\t%d ", num_source_filenames);
@@ -3057,46 +3012,39 @@ check_float_value (mode, d, overflow)
#if OPEN_VMS
void *
function_arg (cum, mode, type, named)
CUMULATIVE_ARGS *cum;
enum machine_mode mode;
tree type;
int named;
/* Return the VMS argument type corresponding to MODE. */
enum avms_arg_type
alpha_arg_type (mode)
enum machine_mode mode;
{
int arg;
if (mode == VOIDmode) /* final call, return argument information */
{
return GEN_INT (*cum);
}
arg = *cum & 0xff;
switch (mode)
{
case SFmode:
*cum |= (((TARGET_FLOAT_VAX)?1:4) << ((arg * 3)+8)); /* 4 = AI$K_AR_FS, IEEE single */
break;
case DFmode:
*cum |= (((TARGET_FLOAT_VAX)?3:5) << ((arg * 3)+8)); /* 5 = AI$K_AR_FT, IEEE double */
break;
case TFmode:
*cum |= (7 << ((arg * 3)+8)); /* 5 = AI$K_AR_FT, IEEE double */
break;
default:
break;
case SFmode:
return TARGET_FLOAT_VAX ? FF : FS;
case DFmode:
return TARGET_FLOAT_VAX ? FD : FT;
default:
return I64;
}
return (arg < 6 && ! MUST_PASS_IN_STACK (mode, type)
? gen_rtx(REG, mode,
(*cum & 0xff) + 16 + ((TARGET_FPREGS
&& (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT
|| GET_MODE_CLASS (mode) == MODE_FLOAT))
* 32))
: 0);
}
/* Return an rtx for an integer representing the VMS Argument Information
register value. */
struct rtx_def *
alpha_arg_info_reg_val (cum)
CUMULATIVE_ARGS cum;
{
unsigned HOST_WIDE_INT regval = cum.num_args;
int i;
for (i = 0; i < 6; i++)
regval |= ((int) cum.atypes[i]) << (i * 3 + 8);
return GEN_INT (regval);
}
/* Structure to collect function names for final output
in link section. */

View File

@@ -80,7 +80,8 @@ Boston, MA 02111-1307, USA. */
enum processor_type
{PROCESSOR_EV4, /* 2106[46]{a,} */
PROCESSOR_EV5}; /* 21164{a,} */
PROCESSOR_EV5, /* 21164{a,pc,} */
PROCESSOR_EV6}; /* 21264 */
extern enum processor_type alpha_cpu;
@@ -168,14 +169,31 @@ extern enum alpha_fp_trap_mode alpha_fptm;
#define MASK_FLOAT_VAX 512
#define TARGET_FLOAT_VAX (target_flags & MASK_FLOAT_VAX)
/* This means that the processor has byte and half word loads and stores. */
/* This means that the processor has byte and half word loads and stores
(the BWX extension). */
#define MASK_BYTE_OPS 1024
#define TARGET_BYTE_OPS (target_flags & MASK_BYTE_OPS)
#define MASK_BWX 1024
#define TARGET_BWX (target_flags & MASK_BWX)
/* This means that the processor is an EV5 or EV56. This is defined only
in TARGET_CPU_DEFAULT. */
#define MASK_CPU_EV5 2048
/* This means that the processor has the CIX extension. */
#define MASK_CIX 2048
#define TARGET_CIX (target_flags & MASK_CIX)
/* This means that the processor has the MAX extension. */
#define MASK_MAX 4096
#define TARGET_MAX (target_flags & MASK_MAX)
/* This means that the processor is an EV5, EV56, or PCA56. This is defined
only in TARGET_CPU_DEFAULT. */
#define MASK_CPU_EV5 8192
/* Likewise for EV6. */
#define MASK_CPU_EV6 16384
/* This means we support the .arch directive in the assembler. Only
defined in TARGET_CPU_DEFAULT. */
#define MASK_SUPPORT_ARCH 32768
#define TARGET_SUPPORT_ARCH (target_flags & MASK_SUPPORT_ARCH)
/* Macro to define tables used to set the flags.
This is a list in braces of pairs in braces,
@@ -196,8 +214,12 @@ extern enum alpha_fp_trap_mode alpha_fptm;
{"build-constants", MASK_BUILD_CONSTANTS}, \
{"float-vax", MASK_FLOAT_VAX}, \
{"float-ieee", -MASK_FLOAT_VAX}, \
{"byte", MASK_BYTE_OPS}, \
{"no-byte", -MASK_BYTE_OPS}, \
{"bwx", MASK_BWX}, \
{"no-bwx", -MASK_BWX}, \
{"cix", MASK_CIX}, \
{"no-cix", -MASK_CIX}, \
{"max", MASK_MAX}, \
{"no-max", -MASK_MAX}, \
{"", TARGET_DEFAULT | TARGET_CPU_DEFAULT} }
#define TARGET_DEFAULT MASK_FP|MASK_FPREGS
@@ -267,6 +289,23 @@ extern void override_options ();
/* Define to enable software floating point emulation. */
#define REAL_ARITHMETIC
/* The following #defines are used when compiling the routines in
libgcc1.c. Since the Alpha calling conventions require single
precision floats to be passed in the floating-point registers
(rather than in the general registers) we have to build the
libgcc1.c routines in such a way that they know the actual types
of their formal arguments and the actual types of their return
values. Otherwise, gcc will generate calls to the libgcc1.c
routines, passing arguments in the floating-point registers,
but the libgcc1.c routines will expect their arguments on the
stack (where the Alpha calling conventions require structs &
unions to be passed). */
#define FLOAT_VALUE_TYPE double
#define INTIFY(FLOATVAL) (FLOATVAL)
#define FLOATIFY(INTVAL) (INTVAL)
#define FLOAT_ARG_TYPE double
/* Define the size of `int'. The default is the same as the word size. */
#define INT_TYPE_SIZE 32
@@ -386,7 +425,7 @@ extern void override_options ();
/* For atomic access to objects, must have at least 32-bit alignment
unless the machine has byte operations. */
#define MINIMUM_ATOMIC_ALIGNMENT (TARGET_BYTE_OPS ? 8 : 32)
#define MINIMUM_ATOMIC_ALIGNMENT (TARGET_BWX ? 8 : 32)
/* Align all constants and variables to at least a word boundary so
we can pick up pieces of them faster. */
@@ -674,7 +713,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS,
#define PREFERRED_RELOAD_CLASS(X, CLASS) \
(CONSTANT_P (X) && (X) != const0_rtx && (X) != CONST0_RTX (GET_MODE (X)) \
? ((CLASS) == FLOAT_REGS ? NO_REGS : GENERAL_REGS) \
? ((CLASS) == FLOAT_REGS || (CLASS) == NO_REGS ? NO_REGS : GENERAL_REGS)\
: (CLASS))
/* Loading and storing HImode or QImode values to and from memory
@@ -694,7 +733,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS,
&& (((CLASS) == FLOAT_REGS \
&& ((MODE) == SImode || (MODE) == HImode || (MODE) == QImode)) \
|| (((MODE) == QImode || (MODE) == HImode) \
&& ! TARGET_BYTE_OPS && unaligned_memory_operand (IN, MODE)))) \
&& ! TARGET_BWX && unaligned_memory_operand (IN, MODE)))) \
? GENERAL_REGS \
: ((CLASS) == FLOAT_REGS && GET_CODE (IN) == MEM \
&& GET_CODE (XEXP (IN, 0)) == AND) ? GENERAL_REGS \
@@ -710,8 +749,9 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS,
&& (GET_CODE (SUBREG_REG (OUT)) == MEM \
|| (GET_CODE (SUBREG_REG (OUT)) == REG \
&& REGNO (SUBREG_REG (OUT)) >= FIRST_PSEUDO_REGISTER)))) \
&& ((((MODE) == HImode || (MODE) == QImode) && ! TARGET_BYTE_OPS \
|| ((MODE) == SImode && (CLASS) == FLOAT_REGS)))) \
&& ((((MODE) == HImode || (MODE) == QImode) \
&& (! TARGET_BWX || (CLASS) == FLOAT_REGS)) \
|| ((MODE) == SImode && (CLASS) == FLOAT_REGS))) \
? GENERAL_REGS \
: ((CLASS) == FLOAT_REGS && GET_CODE (OUT) == MEM \
&& GET_CODE (XEXP (OUT, 0)) == AND) ? GENERAL_REGS \
@@ -721,9 +761,10 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS,
: NO_REGS)
/* If we are copying between general and FP registers, we need a memory
location. */
location unless the CIX extension is available. */
#define SECONDARY_MEMORY_NEEDED(CLASS1,CLASS2,MODE) ((CLASS1) != (CLASS2))
#define SECONDARY_MEMORY_NEEDED(CLASS1,CLASS2,MODE) \
(! TARGET_CIX && (CLASS1) != (CLASS2))
/* Specify the mode to be used for memory when a secondary memory
location is needed. If MODE is floating-point, use it. Otherwise,
@@ -873,8 +914,9 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS,
#define FUNCTION_VALUE(VALTYPE, FUNC) \
gen_rtx (REG, \
(INTEGRAL_MODE_P (TYPE_MODE (VALTYPE)) \
&& TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \
((INTEGRAL_TYPE_P (VALTYPE) \
&& TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \
|| POINTER_TYPE_P (VALTYPE)) \
? word_mode : TYPE_MODE (VALTYPE), \
((TARGET_FPREGS \
&& (TREE_CODE (VALTYPE) == REAL_TYPE \
@@ -1237,16 +1279,11 @@ __enable_execute_stack (addr) \
/* A C expression whose value is RTL representing the value of the return
address for the frame COUNT steps up from the current frame.
FRAMEADDR is the frame pointer of the COUNT frame, or the frame pointer of
the COUNT-1 frame if RETURN_ADDR_IN_PREVIOUS_FRAME} is defined.
This definition for Alpha is broken, but is put in at the request of
Mike Stump. */
the COUNT-1 frame if RETURN_ADDR_IN_PREVIOUS_FRAME} is defined. */
#define RETURN_ADDR_RTX(COUNT, FRAME) \
((COUNT == 0 && alpha_sa_size () == 0 && 0 /* not right. */) \
? gen_rtx (REG, Pmode, 26) \
: gen_rtx (MEM, Pmode, \
memory_address (Pmode, FRAME)))
((COUNT) == 0 ? alpha_return_addr() : const0_rtx)
extern struct rtx_def *alpha_return_addr ();
/* Addressing modes, and classification of registers for them. */
@@ -1526,7 +1563,7 @@ extern void final_prescan_insn ();
/* Define the value returned by a floating-point comparison instruction. */
#define FLOAT_STORE_FLAG_VALUE 0.5
#define FLOAT_STORE_FLAG_VALUE (TARGET_FLOAT_VAX ? 0.5 : 2.0)
/* Canonicalize a comparison from one we don't have to one we do have. */
@@ -1707,9 +1744,13 @@ extern void final_prescan_insn ();
fprintf (FILE, "\t.set noreorder\n"); \
fprintf (FILE, "\t.set volatile\n"); \
fprintf (FILE, "\t.set noat\n"); \
fprintf (FILE, "\t.arch %s\n", \
(TARGET_BYTE_OPS ? "ev56" \
: alpha_cpu == PROCESSOR_EV4 ? "ev4" : "ev5")); \
if (TARGET_SUPPORT_ARCH) \
fprintf (FILE, "\t.arch %s\n", \
alpha_cpu == PROCESSOR_EV6 ? "ev6" \
: (alpha_cpu == PROCESSOR_EV5 \
? (TARGET_MAX ? "pca56" : TARGET_BWX ? "ev56" : "ev5") \
: "ev4")); \
\
ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename); \
}
@@ -2244,11 +2285,12 @@ do { \
#else
/* In OSF/1 v3.2c, the assembler by default does not output file names which
causes mips-tfile to fail. Passing -g to the assembler fixes this problem.
??? Stricly speaking, we only need -g if the user specifies -g. Passing
??? Strictly speaking, we need -g only if the user specifies -g. Passing
it always means that we get slightly larger than necessary object files
if the user does not specify -g. If we don't pass -g, then mips-tfile
will need to be fixed to work in this case. */
#define ASM_SPEC "%{!mgas:-g} -nocpp %{pg}"
will need to be fixed to work in this case. Pass -O0 since some
optimization are broken and don't help us anyway. */
#define ASM_SPEC "%{!mgas:-g} -nocpp %{pg} -O0"
#endif
/* Specify to run a post-processor, mips-tfile after the assembler

View File

@@ -24,7 +24,7 @@
;; Processor type -- this attribute must exactly match the processor_type
;; enumeration in alpha.h.
(define_attr "cpu" "ev4,ev5"
(define_attr "cpu" "ev4,ev5,ev6"
(const (symbol_ref "alpha_cpu")))
;; Define an insn type attribute. This is used in function unit delay
@@ -37,7 +37,7 @@
(const_string "iadd"))
;; The TRAP_TYPE attribute marks instructions that may generate traps
;; (which are imprecise and may need a trapb if software complention
;; (which are imprecise and may need a trapb if software completion
;; is desired).
(define_attr "trap" "yes,no" (const_string "no"))
@@ -120,90 +120,90 @@
126 118)
;; EV5 scheduling. EV5 can issue 4 insns per clock.
;; Multiply all costs by 4.
;; Multiply all costs by 4. We consider the EV6 and EV5 for now.
;; EV5 has two integer units.
(define_function_unit "ev5_ebox" 2 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "iadd,ilog,icmp,ldsym"))
4 4)
;; Memory takes at least 2 clocks.
;; Conditional moves always take 2 ticks.
(define_function_unit "ev5_ebox" 2 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "ld,cmov"))
8 4)
;; Loads can dual issue. Store cannot; nor can loads + stores.
;; Model this with a mythical load/store unit.
(define_function_unit "ev5_ldst" 1 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "ld"))
8 4 [(eq_attr "type" "st")])
(define_function_unit "ev5_ldst" 1 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "st"))
4 4)
(define_function_unit "ev5_ebox" 2 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "imull"))
32 4)
(define_function_unit "ev5_ebox" 2 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "imulq"))
48 4)
;; Multiplies also use the integer multiplier.
(define_function_unit "ev5_imult" 1 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "imull"))
16 8)
(define_function_unit "ev5_imult" 1 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "imulq"))
48 32)
;; There is only 1 shifter/zapper.
(define_function_unit "ev5_shift" 1 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "shift"))
4 4)
;; We pretend EV5 has symmetrical 2 fpus,
;; even though cpys is the only insn that can issue on either unit.
(define_function_unit "ev5_fpu" 2 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "fadd,fmul,fcpys"))
16 4)
;; Multiplies (resp. adds) also use the fmul (resp. fadd) units.
(define_function_unit "ev5_fpmul" 1 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "fmul"))
16 4)
(define_function_unit "ev5_fpadd" 1 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "fadd"))
16 4)
(define_function_unit "ev5_fpadd" 1 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "fbr"))
4 4)
(define_function_unit "ev5_fpadd" 1 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "fdivs"))
60 4)
(define_function_unit "ev5_fpadd" 1 0
(and (eq_attr "cpu" "ev5")
(and (eq_attr "cpu" "ev5,ev6")
(eq_attr "type" "fdivt"))
88 4)
@@ -805,7 +805,7 @@
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r,r")
(zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
"TARGET_BYTE_OPS"
"TARGET_BWX"
"@
zapnot %1,1,%0
ldbu %0,%1"
@@ -814,7 +814,7 @@
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r")
(zero_extend:SI (match_operand:QI 1 "register_operand" "r")))]
"! TARGET_BYTE_OPS"
"! TARGET_BWX"
"zapnot %1,1,%0"
[(set_attr "type" "shift")])
@@ -827,7 +827,7 @@
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=r,r")
(zero_extend:DI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
"TARGET_BYTE_OPS"
"TARGET_BWX"
"@
zapnot %1,1,%0
ldbu %0,%1"
@@ -836,7 +836,7 @@
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=r")
(zero_extend:DI (match_operand:QI 1 "register_operand" "r")))]
"! TARGET_BYTE_OPS"
"! TARGET_BWX"
"zapnot %1,1,%0"
[(set_attr "type" "shift")])
@@ -849,7 +849,7 @@
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r,r")
(zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
"TARGET_BYTE_OPS"
"TARGET_BWX"
"@
zapnot %1,3,%0
ldwu %0,%1"
@@ -858,7 +858,7 @@
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r")
(zero_extend:SI (match_operand:HI 1 "register_operand" "r")))]
"! TARGET_BYTE_OPS"
"! TARGET_BWX"
"zapnot %1,3,%0"
[(set_attr "type" "shift")])
@@ -871,7 +871,7 @@
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=r,r")
(zero_extend:DI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
"TARGET_BYTE_OPS"
"TARGET_BWX"
"@
zapnot %1,3,%0
ldwu %0,%1"
@@ -948,6 +948,30 @@
"eqv %r1,%2,%0"
[(set_attr "type" "ilog")])
;; Handle the FFS insn if we support CIX.
(define_expand "ffsdi2"
[(set (match_dup 2)
(unspec [(match_operand:DI 1 "register_operand" "")] 1))
(set (match_dup 3)
(plus:DI (match_dup 2) (const_int 1)))
(set (match_operand:DI 0 "register_operand" "")
(if_then_else:DI (eq (match_dup 1) (const_int 0))
(const_int 0) (match_dup 3)))]
"TARGET_CIX"
"
{
operands[2] = gen_reg_rtx (DImode);
operands[3] = gen_reg_rtx (DImode);
}")
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=r")
(unspec [(match_operand:DI 1 "register_operand" "r")] 1))]
"TARGET_CIX"
"cttz %1,%0"
[(set_attr "type" "shift")])
;; Next come the shifts and the various extract and insert operations.
(define_insn "ashldi3"
@@ -1015,7 +1039,7 @@
""
"
{
if (TARGET_BYTE_OPS)
if (TARGET_BWX)
{
emit_insn (gen_extendqihi2x (operands[0],
force_reg (QImode, operands[1])));
@@ -1034,42 +1058,42 @@
}
operands[0] = gen_lowpart (DImode, operands[0]);
operands[1] = gen_lowpart (DImode, force_reg (HImode, operands[1]));
operands[1] = gen_lowpart (DImode, force_reg (QImode, operands[1]));
operands[2] = gen_reg_rtx (DImode);
}")
(define_insn "extendqidi2x"
[(set (match_operand:DI 0 "register_operand" "=r")
(sign_extend:DI (match_operand:QI 1 "register_operand" "r")))]
"TARGET_BYTE_OPS"
"TARGET_BWX"
"sextb %1,%0"
[(set_attr "type" "shift")])
(define_insn "extendhidi2x"
[(set (match_operand:DI 0 "register_operand" "=r")
(sign_extend:DI (match_operand:HI 1 "register_operand" "r")))]
"TARGET_BYTE_OPS"
"TARGET_BWX"
"sextw %1,%0"
[(set_attr "type" "shift")])
(define_insn "extendqisi2x"
[(set (match_operand:SI 0 "register_operand" "=r")
(sign_extend:SI (match_operand:QI 1 "register_operand" "r")))]
"TARGET_BYTE_OPS"
"TARGET_BWX"
"sextb %1,%0"
[(set_attr "type" "shift")])
(define_insn "extendhisi2x"
[(set (match_operand:SI 0 "register_operand" "=r")
(sign_extend:SI (match_operand:HI 1 "register_operand" "r")))]
"TARGET_BYTE_OPS"
"TARGET_BWX"
"sextw %1,%0"
[(set_attr "type" "shift")])
(define_insn "extendqihi2x"
[(set (match_operand:HI 0 "register_operand" "=r")
(sign_extend:HI (match_operand:QI 1 "register_operand" "r")))]
"TARGET_BYTE_OPS"
"TARGET_BWX"
"sextb %1,%0"
[(set_attr "type" "shift")])
@@ -1083,7 +1107,7 @@
""
"
{
if (TARGET_BYTE_OPS)
if (TARGET_BWX)
{
emit_insn (gen_extendqisi2x (operands[0],
force_reg (QImode, operands[1])));
@@ -1117,7 +1141,7 @@
"
{ extern rtx get_unaligned_address ();
if (TARGET_BYTE_OPS)
if (TARGET_BWX)
{
emit_insn (gen_extendqidi2x (operands[0],
force_reg (QImode, operands[1])));
@@ -1149,7 +1173,7 @@
""
"
{
if (TARGET_BYTE_OPS)
if (TARGET_BWX)
{
emit_insn (gen_extendhisi2x (operands[0],
force_reg (HImode, operands[1])));
@@ -1183,7 +1207,7 @@
"
{ extern rtx get_unaligned_address ();
if (TARGET_BYTE_OPS)
if (TARGET_BWX)
{
emit_insn (gen_extendhidi2x (operands[0],
force_reg (HImode, operands[1])));
@@ -1778,6 +1802,31 @@
"sub%-%)%& %R1,%R2,%0"
[(set_attr "type" "fadd")
(set_attr "trap" "yes")])
(define_insn "sqrtsf2"
[(set (match_operand:SF 0 "register_operand" "=f")
(sqrt:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")))]
"TARGET_FP && TARGET_CIX"
"sqrt%, %1,%0"
[(set_attr "type" "fdivs")
(set_attr "trap" "yes")])
(define_insn "sqrtdf2"
[(set (match_operand:DF 0 "register_operand" "=f")
(sqrt:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))]
"TARGET_FP && TARGET_CIX"
"sqrt%- %1,%0"
[(set_attr "type" "fdivt")
(set_attr "trap" "yes")])
(define_insn ""
[(set (match_operand:DF 0 "register_operand" "=f")
(sqrt:DF (float_extend:DF
(match_operand:SF 1 "reg_or_fp0_operand" "fG"))))]
"TARGET_FP && TARGET_CIX&& alpha_tp != ALPHA_TP_INSN"
"sqrt%- %1,%0"
[(set_attr "type" "fdivt")
(set_attr "trap" "yes")])
;; Next are all the integer comparisons, and conditional moves and branches
;; and some of the related define_expand's and define_split's.
@@ -2000,6 +2049,70 @@
(match_dup 0) (match_dup 1)))]
"")
(define_insn "sminqi3"
[(set (match_operand:QI 0 "register_operand" "=r")
(smin:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ")
(match_operand:QI 2 "reg_or_8bit_operand" "rI")))]
"TARGET_MAX"
"minsb8 %r1,%2,%0"
[(set_attr "type" "shift")])
(define_insn "uminqi3"
[(set (match_operand:QI 0 "register_operand" "=r")
(umin:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ")
(match_operand:QI 2 "reg_or_8bit_operand" "rI")))]
"TARGET_MAX"
"minub8 %r1,%2,%0"
[(set_attr "type" "shift")])
(define_insn "smaxqi3"
[(set (match_operand:QI 0 "register_operand" "=r")
(smax:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ")
(match_operand:QI 2 "reg_or_8bit_operand" "rI")))]
"TARGET_MAX"
"maxsb8 %r1,%2,%0"
[(set_attr "type" "shift")])
(define_insn "umaxqi3"
[(set (match_operand:QI 0 "register_operand" "=r")
(umax:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ")
(match_operand:QI 2 "reg_or_8bit_operand" "rI")))]
"TARGET_MAX"
"maxub8 %r1,%2,%0"
[(set_attr "type" "shift")])
(define_insn "sminhi3"
[(set (match_operand:HI 0 "register_operand" "=r")
(smin:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ")
(match_operand:HI 2 "reg_or_8bit_operand" "rI")))]
"TARGET_MAX"
"minsw4 %r1,%2,%0"
[(set_attr "type" "shift")])
(define_insn "uminhi3"
[(set (match_operand:HI 0 "register_operand" "=r")
(umin:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ")
(match_operand:HI 2 "reg_or_8bit_operand" "rI")))]
"TARGET_MAX"
"minuw4 %r1,%2,%0"
[(set_attr "type" "shift")])
(define_insn "smaxhi3"
[(set (match_operand:HI 0 "register_operand" "=r")
(smax:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ")
(match_operand:HI 2 "reg_or_8bit_operand" "rI")))]
"TARGET_MAX"
"maxsw4 %r1,%2,%0"
[(set_attr "type" "shift")])
(define_insn "umaxhi3"
[(set (match_operand:HI 0 "register_operand" "=r")
(umax:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ")
(match_operand:HI 2 "reg_or_8bit_operand" "rI")))]
"TARGET_MAX"
"maxuw4 %r1,%2,%0"
[(set_attr "type" "shift")])
(define_expand "smaxdi3"
[(set (match_dup 3)
(le:DI (match_operand:DI 1 "reg_or_0_operand" "")
@@ -2470,16 +2583,23 @@
"
{
enum machine_mode mode;
enum rtx_code compare_code, branch_code;
enum rtx_code compare_code = EQ, branch_code = NE;
if (alpha_compare_fp_p)
mode = DFmode, compare_code = EQ, branch_code = NE;
mode = DFmode;
else
{
mode = DImode, compare_code = MINUS, branch_code = EQ;
if (GET_CODE (alpha_compare_op1) == CONST_INT)
mode = DImode;
/* We want to use cmpeq/bne when we can, since there is a zero-delay
bypass between logicals and br/cmov on the 21164. But we don't
want to force valid immediate constants into registers needlessly. */
if (GET_CODE (alpha_compare_op1) == CONST_INT
&& ((INTVAL (alpha_compare_op1) >= -0x8000
&& INTVAL (alpha_compare_op1) < 0)
|| (INTVAL (alpha_compare_op1) > 0xff
&& INTVAL (alpha_compare_op1) < 0x8000)))
{
compare_code = PLUS;
compare_code = PLUS, branch_code = EQ;
alpha_compare_op1 = GEN_INT (- INTVAL (alpha_compare_op1));
}
}
@@ -2501,16 +2621,23 @@
"
{
enum machine_mode mode;
enum rtx_code compare_code, branch_code;
enum rtx_code compare_code = EQ, branch_code = EQ;
if (alpha_compare_fp_p)
mode = DFmode, compare_code = EQ, branch_code = EQ;
mode = DFmode;
else
{
mode = DImode, compare_code = MINUS, branch_code = NE;
if (GET_CODE (alpha_compare_op1) == CONST_INT)
mode = DImode;
/* We want to use cmpeq/bne when we can, since there is a zero-delay
bypass between logicals and br/cmov on the 21164. But we don't
want to force valid immediate constants into registers needlessly. */
if (GET_CODE (alpha_compare_op1) == CONST_INT
&& ((INTVAL (alpha_compare_op1) >= -0x8000
&& INTVAL (alpha_compare_op1) < 0)
|| (INTVAL (alpha_compare_op1) > 0xff
&& INTVAL (alpha_compare_op1) < 0x8000)))
{
compare_code = PLUS;
compare_code = PLUS, branch_code = NE;
alpha_compare_op1 = GEN_INT (- INTVAL (alpha_compare_op1));
}
}
@@ -3631,7 +3758,7 @@
(define_insn ""
[(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,m,f,f,f,m")
(match_operand:SI 1 "input_operand" "r,J,I,K,L,m,rJ,f,J,m,fG"))]
"! TARGET_WINDOWS_NT && ! TARGET_OPEN_VMS
"! TARGET_WINDOWS_NT && ! TARGET_OPEN_VMS && ! TARGET_CIX
&& (register_operand (operands[0], SImode)
|| reg_or_0_operand (operands[1], SImode))"
"@
@@ -3644,16 +3771,38 @@
stl %r1,%0
cpys %1,%1,%0
cpys $f31,$f31,%0
lds %0,%1
sts %R1,%0"
ld%, %0,%1
st%, %R1,%0"
[(set_attr "type" "ilog,ilog,ilog,iadd,iadd,ld,st,fcpys,fcpys,ld,st")])
(define_insn ""
[(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,m,f,f,f,m,r,f")
(match_operand:SI 1 "input_operand" "r,J,I,K,L,m,rJ,f,J,m,fG,f,r"))]
"! TARGET_WINDOWS_NT && ! TARGET_OPEN_VMS && TARGET_CIX
&& (register_operand (operands[0], SImode)
|| reg_or_0_operand (operands[1], SImode))"
"@
bis %1,%1,%0
bis $31,$31,%0
bis $31,%1,%0
lda %0,%1
ldah %0,%h1
ldl %0,%1
stl %r1,%0
cpys %1,%1,%0
cpys $f31,$f31,%0
ld%, %0,%1
st%, %R1,%0
ftois %1,%0
itof%, %1,%0"
[(set_attr "type" "ilog,ilog,ilog,iadd,iadd,ld,st,fcpys,fcpys,ld,st,ld,st")])
(define_insn ""
[(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,r,m,f,f,f,m")
(match_operand:SI 1 "input_operand" "r,J,I,K,L,s,m,rJ,f,J,m,fG"))]
"(TARGET_WINDOWS_NT || TARGET_OPEN_VMS)
&& (register_operand (operands[0], SImode)
|| reg_or_0_operand (operands[1], SImode))"
&& (register_operand (operands[0], SImode)
|| reg_or_0_operand (operands[1], SImode))"
"@
bis %1,%1,%0
bis $31,$31,%0
@@ -3665,14 +3814,14 @@
stl %r1,%0
cpys %1,%1,%0
cpys $f31,$f31,%0
lds %0,%1
sts %R1,%0"
ld%, %0,%1
st%, %R1,%0"
[(set_attr "type" "ilog,ilog,ilog,iadd,iadd,ldsym,ld,st,fcpys,fcpys,ld,st")])
(define_insn ""
[(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,r,f,f")
(match_operand:HI 1 "input_operand" "r,J,I,n,f,J"))]
"! TARGET_BYTE_OPS
"! TARGET_BWX
&& (register_operand (operands[0], HImode)
|| register_operand (operands[1], HImode))"
"@
@@ -3687,7 +3836,7 @@
(define_insn ""
[(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,r,r,m,f,f")
(match_operand:HI 1 "input_operand" "r,J,I,n,m,rJ,f,J"))]
"TARGET_BYTE_OPS
"TARGET_BWX
&& (register_operand (operands[0], HImode)
|| reg_or_0_operand (operands[1], HImode))"
"@
@@ -3704,7 +3853,7 @@
(define_insn ""
[(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,r,r,f,f")
(match_operand:QI 1 "input_operand" "r,J,I,n,f,J"))]
"! TARGET_BYTE_OPS
"! TARGET_BWX
&& (register_operand (operands[0], QImode)
|| register_operand (operands[1], QImode))"
"@
@@ -3719,7 +3868,7 @@
(define_insn ""
[(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,r,r,r,m,f,f")
(match_operand:QI 1 "input_operand" "r,J,I,n,m,rJ,f,J"))]
"TARGET_BYTE_OPS
"TARGET_BWX
&& (register_operand (operands[0], QImode)
|| reg_or_0_operand (operands[1], QImode))"
"@
@@ -3779,8 +3928,9 @@
(define_insn ""
[(set (match_operand:DI 0 "general_operand" "=r,r,r,r,r,r,r,m,f,f,f,Q")
(match_operand:DI 1 "input_operand" "r,J,I,K,L,s,m,rJ,f,J,Q,fG"))]
"register_operand (operands[0], DImode)
|| reg_or_0_operand (operands[1], DImode)"
"! TARGET_CIX
&& (register_operand (operands[0], DImode)
|| reg_or_0_operand (operands[1], DImode))"
"@
bis %1,%1,%0
bis $31,$31,%0
@@ -3796,6 +3946,29 @@
stt %R1,%0"
[(set_attr "type" "ilog,ilog,ilog,iadd,iadd,ldsym,ld,st,fcpys,fcpys,ld,st")])
(define_insn ""
[(set (match_operand:DI 0 "general_operand" "=r,r,r,r,r,r,r,m,f,f,f,Q,r,f")
(match_operand:DI 1 "input_operand" "r,J,I,K,L,s,m,rJ,f,J,Q,fG,f,r"))]
"TARGET_CIX
&& (register_operand (operands[0], DImode)
|| reg_or_0_operand (operands[1], DImode))"
"@
bis %1,%1,%0
bis $31,$31,%0
bis $31,%1,%0
lda %0,%1
ldah %0,%h1
lda %0,%1
ldq%A1 %0,%1
stq%A0 %r1,%0
cpys %1,%1,%0
cpys $f31,$f31,%0
ldt %0,%1
stt %R1,%0
ftoit %1,%0
itoft %1,%0"
[(set_attr "type" "ilog,ilog,ilog,iadd,iadd,ldsym,ld,st,fcpys,fcpys,ld,st,ld,st")])
;; We do three major things here: handle mem->mem, put 64-bit constants in
;; memory, and construct long 32-bit constants.
@@ -4011,7 +4184,7 @@
"
{ extern rtx get_unaligned_address ();
if (TARGET_BYTE_OPS)
if (TARGET_BWX)
{
if (GET_CODE (operands[0]) == MEM
&& ! reg_or_0_operand (operands[1], QImode))
@@ -4123,7 +4296,7 @@
"
{ extern rtx get_unaligned_address ();
if (TARGET_BYTE_OPS)
if (TARGET_BWX)
{
if (GET_CODE (operands[0]) == MEM
&& ! reg_or_0_operand (operands[1], HImode))
@@ -4237,7 +4410,7 @@
[(parallel [(match_operand:QI 0 "register_operand" "=r")
(match_operand:QI 1 "unaligned_memory_operand" "m")
(match_operand:TI 2 "register_operand" "=&r")])]
"! TARGET_BYTE_OPS"
"! TARGET_BWX"
"
{ extern rtx get_unaligned_address ();
rtx addr = get_unaligned_address (operands[1], 0);
@@ -4259,7 +4432,7 @@
[(parallel [(match_operand:HI 0 "register_operand" "=r")
(match_operand:HI 1 "unaligned_memory_operand" "m")
(match_operand:TI 2 "register_operand" "=&r")])]
"! TARGET_BYTE_OPS"
"! TARGET_BWX"
"
{ extern rtx get_unaligned_address ();
rtx addr = get_unaligned_address (operands[1], 0);
@@ -4281,7 +4454,7 @@
[(parallel [(match_operand:QI 0 "any_memory_operand" "=m")
(match_operand:QI 1 "register_operand" "r")
(match_operand:TI 2 "register_operand" "=&r")])]
"! TARGET_BYTE_OPS"
"! TARGET_BWX"
"
{ extern rtx get_unaligned_address ();
@@ -4320,7 +4493,7 @@
[(parallel [(match_operand:HI 0 "any_memory_operand" "=m")
(match_operand:HI 1 "register_operand" "r")
(match_operand:TI 2 "register_operand" "=&r")])]
"! TARGET_BYTE_OPS"
"! TARGET_BWX"
"
{ extern rtx get_unaligned_address ();
@@ -4377,14 +4550,16 @@
(define_expand "allocate_stack"
[(set (reg:DI 30)
(plus:DI (reg:DI 30)
(match_operand:DI 0 "reg_or_cint_operand" "")))]
(match_operand:DI 1 "reg_or_cint_operand" "")))
(set (match_operand:DI 0 "register_operand" "=r")
(match_dup 2))]
""
"
{
if (GET_CODE (operands[0]) == CONST_INT
&& INTVAL (operands[0]) < 32768)
if (GET_CODE (operands[1]) == CONST_INT
&& INTVAL (operands[1]) < 32768)
{
if (INTVAL (operands[0]) >= 4096)
if (INTVAL (operands[1]) >= 4096)
{
/* We do this the same way as in the prologue and generate explicit
probes. Then we update the stack by the constant. */
@@ -4392,14 +4567,15 @@
int probed = 4096;
emit_insn (gen_probe_stack (GEN_INT (- probed)));
while (probed + 8192 < INTVAL (operands[0]))
while (probed + 8192 < INTVAL (operands[1]))
emit_insn (gen_probe_stack (GEN_INT (- (probed += 8192))));
if (probed + 4096 < INTVAL (operands[0]))
emit_insn (gen_probe_stack (GEN_INT (- INTVAL(operands[0]))));
if (probed + 4096 < INTVAL (operands[1]))
emit_insn (gen_probe_stack (GEN_INT (- INTVAL(operands[1]))));
}
operands[0] = GEN_INT (- INTVAL (operands[0]));
operands[1] = GEN_INT (- INTVAL (operands[1]));
operands[2] = virtual_stack_dynamic_rtx;
}
else
{
@@ -4410,10 +4586,10 @@
rtx memref;
emit_insn (gen_subdi3 (want, stack_pointer_rtx,
force_reg (Pmode, operands[0])));
force_reg (Pmode, operands[1])));
emit_insn (gen_adddi3 (tmp, stack_pointer_rtx, GEN_INT (-4096)));
if (GET_CODE (operands[0]) != CONST_INT)
if (GET_CODE (operands[1]) != CONST_INT)
{
out_label = gen_label_rtx ();
emit_insn (gen_cmpdi (want, tmp));
@@ -4427,6 +4603,9 @@
emit_insn (gen_adddi3 (tmp, tmp, GEN_INT(-8192)));
emit_insn (gen_cmpdi (tmp, want));
emit_jump_insn (gen_bgtu (loop_label));
if (obey_regdecls)
gen_rtx (USE, VOIDmode, tmp);
memref = gen_rtx (MEM, DImode, want);
MEM_VOLATILE_P (memref) = 1;
emit_move_insn (memref, const0_rtx);
@@ -4435,7 +4614,7 @@
emit_label (out_label);
emit_move_insn (stack_pointer_rtx, want);
emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
DONE;
}
}")

View File

@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for DEC Alpha w/ELF.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu).
This file is part of GNU CC.
@@ -20,10 +20,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This is used on Alpha platforms that use the ELF format.
Currently only Linux uses this. */
Currently only GNU/Linux uses this. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (Alpha Linux/ELF)");
#define TARGET_VERSION fprintf (stderr, " (Alpha GNU/Linux with ELF)");
#undef OBJECT_FORMAT_COFF
#undef EXTENDED_COFF
@@ -39,6 +39,15 @@ Currently only Linux uses this. */
-Asystem(linux) -Acpu(alpha) -Amachine(alpha) -D__ELF__"
#undef LINK_SPEC
#ifdef USE_GNULIBC_1
#define LINK_SPEC "-m elf64alpha -G 8 %{O*:-O3} %{!O*:-O1} \
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
%{static:-static}}"
#else
#define LINK_SPEC "-m elf64alpha -G 8 %{O*:-O3} %{!O*:-O1} \
%{shared:-shared} \
%{!shared: \
@@ -46,6 +55,20 @@ Currently only Linux uses this. */
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}}"
#endif
#ifndef USE_GNULIBC_1
#undef DEFAULT_VTABLE_THUNKS
#define DEFAULT_VTABLE_THUNKS 1
#endif
#ifndef USE_GNULIBC_1
#undef LIB_SPEC
#define LIB_SPEC \
"%{shared: -lc} \
%{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
%{profile:-lc_p} %{!profile: -lc}}"
#endif
/* Output at beginning of assembler file. */
@@ -474,8 +497,8 @@ do { \
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
/* Provide a STARTFILE_SPEC appropriate for Linux. Here we add
the Linux magical crtbegin.o file (see crtstuff.c) which
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static
object constructed before entering `main'. */
@@ -483,14 +506,14 @@ do { \
#define STARTFILE_SPEC \
"%{!shared: \
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
crti.o%s crtbegin.o%s"
/* Provide a ENDFILE_SPEC appropriate for Linux. Here we tack on
the Linux magical crtend.o file (see crtstuff.c) which
/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on
the GNU/Linux magical crtend.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static
object constructed before entering `main', followed by a normal
Linux "finalizer" file, `crtn.o'. */
GNU/Linux "finalizer" file, `crtn.o'. */
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
"crtend.o%s crtn.o%s"

View File

@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler, for Alpha Linux,
using ECOFF.
Copyright (C) 1996 Free Software Foundation, Inc.
/* Definitions of target machine for GNU compiler, for Alpha Linux-based GNU
systems using ECOFF.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Bob Manson.
This file is part of GNU CC.
@@ -23,7 +23,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define TARGET_DEFAULT (3 | MASK_GAS)
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (Linux/Alpha)");
#define TARGET_VERSION fprintf (stderr, " (GNU/Linux/Alpha)");
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
@@ -65,6 +65,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Show that we need a GP when profiling. */
#define TARGET_PROFILING_NEEDS_GP
/* We support #pragma. */
#define HANDLE_SYSV_PRAGMA
#undef ASM_FINAL_SPEC
/* Emit RTL insns to initialize the variable parts of a trampoline.
@@ -77,8 +80,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
range and so the target is in range of something on the stack.
Omitting the hint saves a bogus branch-prediction cache line load.
Linux always has an executable stack -- no need for a system call.
*/
GNU/Linux always has an executable stack -- no need for a system call. */
#undef INITIALIZE_TRAMPOLINE
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \

View File

@@ -1,4 +1,4 @@
# Do not build libgcc1. Let gcc generate those functions. The Linux
# Do not build libgcc1. Let gcc generate those functions. The GNU/Linux
# C library can handle them.
LIBGCC1 =
CROSS_LIBGCC1 =

View File

@@ -0,0 +1,22 @@
;# New Alpha OpenVMS trampoline
;#
.set noreorder
.set volatile
.set noat
.file 1 "tramp.s"
.text
.align 3
.globl __tramp
.ent __tramp
__tramp..en:
.link
.align 3
__tramp:
.pdesc __tramp..en,null
.text
ldq $1,24($27)
ldq $27,16($27)
ldq $28,8($27)
jmp $31,($28),0
.end __tramp

View File

@@ -29,13 +29,10 @@ Boston, MA 02111-1307, USA. */
#include "alpha/alpha.h"
/* Predefine this in CPP because VMS limits the size of command options
and GNU CPP is not used on VMS except with GNU C. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-Dalpha -D__ALPHA -Dvms -DVMS -D__alpha__ -D__alpha -D__vms__ -D__VMS__\
-D__VMS_VER=70000022 \
-D__GNUC__=2 -D__GNUC_MINOR__=7 -Asystem(vms) -Acpu(alpha) -Amachine(alpha)"
-Asystem(vms) -Acpu(alpha) -Amachine(alpha)"
#undef CPP_SPEC
#define CPP_SPEC "\
@@ -89,10 +86,7 @@ Boston, MA 02111-1307, USA. */
#define POINTER_SIZE 32
#define POINTERS_EXTEND_UNSIGNED 0
/* No data type wants to be aligned rounder than this. */
#undef BIGGEST_ALIGNMENT
#define BIGGEST_ALIGNMENT 128 /* X Complex */
#define MAX_OFILE_ALIGNMENT 524288 /* 8 x 2^16 by DEC Test CD40VRA */
#define MAX_OFILE_ALIGNMENT 524288 /* 8 x 2^16 by DEC Ada Test CD40VRA */
#undef FIXED_REGISTERS
#define FIXED_REGISTERS \
@@ -127,33 +121,91 @@ Boston, MA 02111-1307, USA. */
if ((TO) == STACK_POINTER_REGNUM) \
(OFFSET) += ALPHA_ROUND (current_function_outgoing_args_size); \
}
/* Define a data type for recording info about an argument list
during the scan of that argument list. This data type should
hold all necessary information about the function itself
and about the args processed so far, enough to enable macros
such as FUNCTION_ARG to determine where the next arg should go.
On Alpha/VMS, this is a structure that contains the number of
arguments and, for each argument, the datatype of that argument.
The number of arguments is a number of words of arguments scanned so far.
Thus 6 or more means all following args should go on the stack. */
enum avms_arg_type {I64, FF, FD, FG, FS, FT};
typedef struct {char num_args; enum avms_arg_type atypes[6];} avms_arg_info;
#undef CUMULATIVE_ARGS
#define CUMULATIVE_ARGS avms_arg_info
/* Initialize a variable CUM of type CUMULATIVE_ARGS
for a call to a function whose data type is FNTYPE.
For a library call, FNTYPE is 0. */
#undef INIT_CUMULATIVE_ARGS
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \
(CUM).num_args = 0; \
(CUM).atypes[0] = (CUM).atypes[1] = (CUM).atypes[2] = I64; \
(CUM).atypes[3] = (CUM).atypes[4] = (CUM).atypes[5] = I64;
/* Update the data in CUM to advance over an argument
of mode MODE and data type TYPE.
(TYPE is null for libcalls where that information may not be available.) */
extern enum avms_arg_type alpha_arg_type ();
/* Determine where to put an argument to a function.
Value is zero to push the argument on the stack,
or a hard register in which to store the argument.
MODE is the argument's machine mode (or VOIDmode for no more args).
TYPE is the data type of the argument (as a tree).
This is null for libcalls where that information may
not be available.
CUM is a variable of type CUMULATIVE_ARGS which gives info about
the preceding args and about the function being called.
NAMED is nonzero if this argument is a named parameter
(otherwise it is an extra parameter matching an ellipsis).
On Alpha the first 6 words of args are normally in registers
and the rest are pushed. */
extern struct rtx_def *alpha_arg_info_reg_val ();
#undef FUNCTION_ARG
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
((MODE) == VOIDmode ? alpha_arg_info_reg_val (CUM) \
: ((CUM.num_args) < 6 && ! MUST_PASS_IN_STACK (MODE, TYPE) \
? gen_rtx(REG, (MODE), \
((CUM).num_args + 16 \
+ ((TARGET_FPREGS \
&& (GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT \
|| GET_MODE_CLASS (MODE) == MODE_FLOAT)) \
* 32))) \
: 0))
#undef FUNCTION_ARG_ADVANCE
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
if (MUST_PASS_IN_STACK (MODE, TYPE)) \
(CUM) = (CUM & ~0xff) + 6; \
(CUM).num_args += 6; \
else \
(CUM) += ALPHA_ARG_SIZE (MODE, TYPE, NAMED)
{ \
if ((CUM).num_args < 6) \
(CUM).atypes[(CUM).num_args] = alpha_arg_type (MODE); \
\
(CUM).num_args += ALPHA_ARG_SIZE (MODE, TYPE, NAMED); \
}
/* For an arg passed partly in registers and partly in memory,
this is the number of registers used.
For args passed entirely in registers or entirely in memory, zero. */
#undef FUNCTION_ARG_PARTIAL_NREGS
#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
((CUM & 0xff) < 6 && 6 < (CUM & 0xff) \
((CUM).num_args < 6 && 6 < (CUM).num_args \
+ ALPHA_ARG_SIZE (MODE, TYPE, NAMED) \
? 6 - (CUM & 0xff) : 0)
extern char *vmskrunch ();
#undef ENCODE_SECTION_INFO
#define ENCODE_SECTION_INFO(DECL) \
do { \
if (TREE_CODE (DECL) == FUNCTION_DECL && ! TREE_PUBLIC (DECL)) \
SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \
\
if (TREE_CODE_CLASS (TREE_CODE (DECL)) == 'd' \
&& GET_CODE (DECL_RTL (DECL)) == MEM \
&& GET_CODE (XEXP (DECL_RTL (DECL), 0)) == SYMBOL_REF) \
XSTR (XEXP (DECL_RTL (DECL), 0), 0) \
= vmskrunch (XSTR (XEXP (DECL_RTL (DECL), 0), 0)); \
} while (0)
? 6 - (CUM).num_args : 0)
/* Perform any needed actions needed for a function that is receiving a
variable number of arguments.
@@ -178,7 +230,7 @@ do { \
#undef SETUP_INCOMING_VARARGS
#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
{ if ((CUM) < 6) \
{ if ((CUM).num_args < 6) \
{ \
if (! (NO_RTL)) \
{ \
@@ -191,12 +243,6 @@ do { \
} \
}
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \
{ \
alpha_function_name = vmskrunch (NAME); \
}
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
{ \
@@ -226,11 +272,11 @@ do { \
}
#define LINK_SECTION_ASM_OP ".link"
#define READONLY_SECTION_ASM_OP ".rdata"
#define LITERALS_SECTION_ASM_OP ".literals"
#undef EXTRA_SECTIONS
#define EXTRA_SECTIONS in_link, in_rdata
#define EXTRA_SECTIONS in_link, in_rdata, in_literals
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
@@ -251,6 +297,15 @@ link_section () \
fprintf (asm_out_file, "%s\n", LINK_SECTION_ASM_OP); \
in_section = in_link; \
} \
} \
void \
literals_section () \
{ \
if (in_section != in_literals) \
{ \
fprintf (asm_out_file, "%s\n", LITERALS_SECTION_ASM_OP); \
in_section = in_literals; \
} \
}
#undef ASM_OUTPUT_ADDR_DIFF_ELT
@@ -265,10 +320,6 @@ link_section () \
#define ASM_FILE_END(FILE) alpha_write_linkage (FILE);
#undef FUNCTION_ARG
void *function_arg ();
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) function_arg (&CUM, MODE, TYPE, NAMED)
#undef CASE_VECTOR_MODE
#define CASE_VECTOR_MODE DImode
#undef CASE_VECTOR_PC_RELATIVE
@@ -293,80 +344,111 @@ void *function_arg ();
{ \
fprintf (FILE, "\t.quad 0\n"); \
fprintf (FILE, "\t.linkage __tramp\n"); \
fprintf (FILE, "\t.quad 0\n"); \
}
/* Length in units of the trampoline for entering a nested function. */
#undef TRAMPOLINE_SIZE
#define TRAMPOLINE_SIZE 24
#define TRAMPOLINE_SIZE 32
/* Emit RTL insns to initialize the variable parts of a trampoline.
FNADDR is an RTX for the address of the function's pure code.
CXT is an RTX for the static chain value for the function. */
#undef INITIALIZE_TRAMPOLINE
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
{ \
emit_move_insn (gen_rtx (MEM, Pmode, (TRAMP)), (FNADDR)); \
emit_move_insn (gen_rtx (MEM, Pmode, \
memory_address (Pmode, \
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
{ \
emit_move_insn (gen_rtx (MEM, Pmode, \
memory_address (Pmode, \
plus_constant ((TRAMP), 16))), \
(CXT)); \
(FNADDR)); \
emit_move_insn (gen_rtx (MEM, Pmode, \
memory_address (Pmode, \
plus_constant ((TRAMP), 24))), \
(CXT)); \
}
#undef TRANSFER_FROM_TRAMPOLINE
#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, NAME, ARGS) \
(vms_valid_decl_attribute_p (DECL, ATTRIBUTES, NAME, ARGS))
extern int vms_valid_decl_attribute_p ();
#undef SDB_DEBUGGING_INFO
#undef MIPS_DEBUGGING_INFO
#ifndef DBX_DEBUGGING_INFO
#define DBX_DEBUGGING_INFO
#endif
#undef DBX_DEBUGGING_INFO
#define DWARF2_DEBUGGING_INFO
#ifdef PREFERRED_DEBUGGING_TYPE
#undef PREFERRED_DEBUGGING_TYPE
#endif
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
/* This is how to output an assembler line
that says to advance the location counter
to a multiple of 2**LOG bytes. */
#undef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
fprintf (FILE, "\t.align %d\n", LOG);
#define UNALIGNED_SHORT_ASM_OP ".word"
#define UNALIGNED_INT_ASM_OP ".long"
#define UNALIGNED_DOUBLE_INT_ASM_OP ".quad"
#undef ASM_OUTPUT_ALIGNED_COMMON
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
do { \
fprintf ((FILE), "\t.comm\t"); \
assemble_name ((FILE), (NAME)); \
fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
} while (0)
#define ASM_OUTPUT_SECTION(FILE,SECTION) \
(strcmp (SECTION, ".text") == 0) \
? text_section () \
: named_section (NULL_TREE, SECTION, 0), \
ASM_OUTPUT_ALIGN (FILE, 0) \
#define ASM_OUTPUT_SECTION_NAME(FILE,DECL,NAME,RELOC) \
do \
{ \
char *flags; \
int ovr = 0; \
if (DECL && DECL_MACHINE_ATTRIBUTES (DECL) \
&& lookup_attribute \
("overlaid", DECL_MACHINE_ATTRIBUTES (DECL))) \
flags = ",OVR", ovr = 1; \
else if (strncmp (NAME,".debug", 6) == 0) \
flags = ",NOWRT"; \
else \
flags = ""; \
fputc ('\n', (FILE)); \
fprintf (FILE, ".section\t%s%s\n", NAME, flags); \
if (ovr) \
(NAME) = ""; \
} while (0)
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
do { literals_section(); \
fprintf ((FILE), "\t"); \
assemble_name (FILE, LABEL1); \
fprintf (FILE, " = "); \
assemble_name (FILE, LABEL2); \
fprintf (FILE, "\n"); \
} while (0)
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
#ifdef ASM_FORMAT_PRIVATE_NAME
#undef ASM_FORMAT_PRIVATE_NAME
#endif
#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12), \
sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO)))
#undef ASM_SPEC
#define ASM_SPEC "-nocpp %{pg}"
#undef ASM_FINAL_SPEC
#undef LIBGCC_SPEC
#define LIBGCC_SPEC "-lgcc2 -lgcclib"
#define OPTIMIZATION_OPTIONS \
{ \
write_symbols = PREFERRED_DEBUGGING_TYPE; \
debug_info_level = (enum debug_info_level) 2; \
}
#undef OVERRIDE_OPTIONS
#define OVERRIDE_OPTIONS \
{ \
if (write_symbols == NO_DEBUG) \
debug_info_level = (enum debug_info_level) 0; \
override_options (); \
}
#undef LINK_SPEC
#define LINK_SPEC "%{g3:-g3} %{g0:-g0}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC ""
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "gnu:[000000]crt0.obj"
#define ASM_SPEC "-nocpp %{pg}"
#define LINK_SPEC "%{g3:-g3} %{g0:-g0} %{shared:-shared} %{v:-v}"
/* Define the names of the division and modulus functions. */
#define DIVSI3_LIBCALL "ots$div_i"

View File

@@ -65,14 +65,6 @@ extern void *malloc (), *realloc (), *calloc ();
#include "string.h"
#endif
/* OSF/1 has vprintf. */
#define HAVE_VPRINTF
/* OSF/1 has putenv. */
#define HAVE_PUTENV
/* OSF/1 is POSIX.1 compliant. */
#define POSIX

View File

@@ -1,5 +1,5 @@
/* Configuration for GNU C-compiler for openVMS/Alpha.
Copyright (C) 1996 Free Software Foundation, Inc.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Klaus Kaempf (kkaempf@progis.de).
This file is part of GNU CC.
@@ -53,7 +53,11 @@ Boston, MA 02111-1307, USA. */
/* Define a local equivalent (sort of) for unlink */
#define unlink remove
#define NEED_ATEXIT
#define HAVE_VPRINTF
#define HAVE_PUTENV
#define HAVE_STRERROR
#define NO_SYS_PARAMS_H /* Don't have <sys/params.h> */
#define NO_STAB_H /* Don't have <stab.h> */
@@ -63,17 +67,11 @@ Boston, MA 02111-1307, USA. */
#define HAVE_STDLIB_H 1
#define HAVE_UNISTD_H 1
#define HAVE_STRING_H 1
#define HAVE_LIMITS_H 1
#define HAVE_STDDEF_H 1
#define HAVE_TIME_H 1
#define STDC_HEADERS 1
/* Use ANSI/SYSV style byte manipulation routines instead of BSD ones. */
#define bcopy(s,d,n) memcpy((d),(s),(n))
#define bzero(d,n) memset((d),0,(n))
#define bcmp(l,r,n) memcmp((l),(r),(n))
#define index strchr
#define rindex strrchr
#if __STDC__
extern void *alloca (size_t);
#else
@@ -82,5 +80,3 @@ extern char *alloca (unsigned int);
#define OBJECT_SUFFIX ".obj"
#define EXECUTABLE_SUFFIX ".exe"
#define DIR_SEPARATOR ']'
#define PATH_SEPARATOR ','

2212
gcc/config/arc/arc.c Normal file

File diff suppressed because it is too large Load Diff

1643
gcc/config/arc/arc.h Normal file

File diff suppressed because it is too large Load Diff

1630
gcc/config/arc/arc.md Normal file

File diff suppressed because it is too large Load Diff

157
gcc/config/arc/initfini.c Normal file
View File

@@ -0,0 +1,157 @@
/* .init/.fini section handling + C++ global constructor/destructor handling.
This file is based on crtstuff.c, sol2-crti.asm, sol2-crtn.asm.
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this file with files
compiled with GCC to produce an executable, this does not cause
the resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
/* Declare a pointer to void function type. */
typedef void (*func_ptr) (void);
#ifdef CRT_INIT
/* NOTE: In order to be able to support SVR4 shared libraries, we arrange
to have one set of symbols { __CTOR_LIST__, __DTOR_LIST__, __CTOR_END__,
__DTOR_END__ } per root executable and also one set of these symbols
per shared library. So in any given whole process image, we may have
multiple definitions of each of these symbols. In order to prevent
these definitions from conflicting with one another, and in order to
ensure that the proper lists are used for the initialization/finalization
of each individual shared library (respectively), we give these symbols
only internal (i.e. `static') linkage, and we also make it a point to
refer to only the __CTOR_END__ symbol in crtfini.o and the __DTOR_LIST__
symbol in crtinit.o, where they are defined. */
static func_ptr __CTOR_LIST__[1] __attribute__ ((section (".ctors")))
= { (func_ptr) (-1) };
static func_ptr __DTOR_LIST__[1] __attribute__ ((section (".dtors")))
= { (func_ptr) (-1) };
/* Run all the global destructors on exit from the program. */
/* Some systems place the number of pointers in the first word of the
table. On SVR4 however, that word is -1. In all cases, the table is
null-terminated. On SVR4, we start from the beginning of the list and
invoke each per-compilation-unit destructor routine in order
until we find that null.
Note that this function MUST be static. There will be one of these
functions in each root executable and one in each shared library, but
although they all have the same code, each one is unique in that it
refers to one particular associated `__DTOR_LIST__' which belongs to the
same particular root executable or shared library file. */
static void __do_global_dtors ()
asm ("__do_global_dtors") __attribute__ ((section (".text")));
static void
__do_global_dtors ()
{
func_ptr *p;
for (p = __DTOR_LIST__ + 1; *p; p++)
(*p) ();
}
/* .init section start.
This must appear at the start of the .init section. */
asm ("
.section .init\n
.global init\n
.word 0\n
init:\n
st blink,[sp,4]\n
st fp,[sp]\n
mov fp,sp\n
sub sp,sp,16\n
");
/* .fini section start.
This must appear at the start of the .init section. */
asm ("
.section .fini\n
.global fini\n
.word 0\n
fini:\n
st blink,[sp,4]\n
st fp,[sp]\n
mov fp,sp\n
sub sp,sp,16\n
bl.nd __do_global_dtors
");
#endif /* CRT_INIT */
#ifdef CRT_FINI
/* Put a word containing zero at the end of each of our two lists of function
addresses. Note that the words defined here go into the .ctors and .dtors
sections of the crtend.o file, and since that file is always linked in
last, these words naturally end up at the very ends of the two lists
contained in these two sections. */
static func_ptr __CTOR_END__[1] __attribute__ ((section (".ctors")))
= { (func_ptr) 0 };
static func_ptr __DTOR_END__[1] __attribute__ ((section (".dtors")))
= { (func_ptr) 0 };
/* Run all global constructors for the program.
Note that they are run in reverse order. */
static void __do_global_ctors ()
asm ("__do_global_ctors") __attribute__ ((section (".text")));
static void
__do_global_ctors ()
{
func_ptr *p;
for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
(*p) ();
}
/* .init section end.
This must live at the end of the .init section. */
asm ("
.section .init\n
bl.nd __do_global_ctors
ld blink,[fp,4]\n
j.d blink\n
ld.a fp,[sp,16]\n
");
/* .fini section end.
This must live at the end of the .fini section. */
asm ("
.section .fini\n
ld blink,[fp,4]\n
j.d blink\n
ld.a fp,[sp,16]\n
");
#endif /* CRT_FINI */

View File

@@ -0,0 +1,273 @@
; libgcc1 routines for ARC cpu.
/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file with other programs, and to distribute
those programs without any restriction coming from the use of this
file. (The General Public License restrictions do apply in other
respects; for example, they cover modification of the file, and
distribution when not linked into another program.)
This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifdef L_mulsi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___mulsi3
___mulsi3:
/* This the simple version.
while (a)
{
if (a & 1)
r += b;
a >>= 1;
b <<= 1;
}
*/
mov r2,0 ; Accumulate result here.
.Lloop:
sub.f 0,r0,0 ; while (a)
nop
beq.nd .Ldone
and.f 0,r0,1 ; if (a & 1)
add.nz r2,r2,r1 ; r += b
lsr r0,r0 ; a >>= 1
b.d .Lloop
lsl r1,r1 ; b <<= 1
.Ldone:
j.d blink
mov r0,r2
#endif
#endif /* L_mulsi3 */
#ifdef L_umulsidi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___umulsidi3
___umulsidi3:
/* This the simple version.
while (a)
{
if (a & 1)
r += b;
a >>= 1;
b <<= 1;
}
*/
mov r2,0 ; Top part of b.
mov r3,0 ; Accumulate result here.
mov r4,0
.Lloop:
sub.f 0,r0,0 ; while (a)
nop
beq.nd .Ldone
and.f 0,r0,1 ; if (a & 1)
add.nz r4,r4,r1 ; r += b
adc.nz r3,r3,r2
lsr r0,r0 ; a >>= 1
lsl.f r1,r1 ; b <<= 1
b.d .Lloop
rlc r2,r2
.Ldone:
#ifdef __big_endian__
mov r1,r4
j.d blink
mov r0,r3
#else
mov r0,r4
j.d blink
mov r1,r3
#endif
#endif
#endif /* L_umulsidi3 */
#ifdef L_divmod_tools
; Utilities used by all routines.
.section .text
.align 4
; inputs: r0 = numerator, r1 = denominator
; outputs: positive r0/r1,
; r6.bit1 = sign of numerator, r6.bit0 = sign of result
.global ___divnorm
___divnorm:
mov r6,0 ; keep sign in r6
sub.f 0,r0,0 ; is numerator -ve?
sub.lt r0,0,r0 ; negate numerator
mov.lt r6,3 ; sign is -ve
sub.f 0,r1,0 ; is denominator -ve?
sub.lt r1,0,r1 ; negate denominator
xor.lt r6,r6,1 ; toggle sign
j.nd blink
/*
unsigned long
udivmodsi4(int modwanted, unsigned long num, unsigned long den)
{
unsigned long bit = 1;
unsigned long res = 0;
while (den < num && bit && !(den & (1L<<31)))
{
den <<=1;
bit <<=1;
}
while (bit)
{
if (num >= den)
{
num -= den;
res |= bit;
}
bit >>=1;
den >>=1;
}
if (modwanted) return num;
return res;
}
*/
; inputs: r0 = numerator, r1 = denominator
; outputs: r0 = quotient, r1 = remainder, r2/r3 trashed
.global ___udivmodsi4
___udivmodsi4:
mov r2,1 ; bit = 1
mov r3,0 ; res = 0
.Lloop1:
sub.f 0,r1,r0 ; while (den < num
nop
bnc.nd .Lloop2
sub.f 0,r2,0 ; && bit
nop
bz.nd .Lloop2
lsl.f 0,r1 ; && !(den & (1<<31))
nop
bc.nd .Lloop2
lsl r1,r1 ; den <<= 1
b.d .Lloop1
lsl r2,r2 ; bit <<= 1
.Lloop2:
sub.f 0,r2,0 ; while (bit)
nop
bz.nd .Ldivmodend
sub.f 0,r0,r1 ; if (num >= den)
nop
bc.nd .Lshiftdown
sub r0,r0,r1 ; num -= den
or r3,r3,r2 ; res |= bit
.Lshiftdown:
lsr r2,r2 ; bit >>= 1
b.d .Lloop2
lsr r1,r1 ; den >>= 1
.Ldivmodend:
mov r1,r0 ; r1 = mod
j.d blink
mov r0,r3 ; r0 = res
#endif
#ifdef L_udivsi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___udivsi3
___udivsi3:
mov r7,blink
bl.nd ___udivmodsi4
j.nd r7
#endif
#endif /* L_udivsi3 */
#ifdef L_divsi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___divsi3
___divsi3:
mov r7,blink
bl.nd ___divnorm
bl.nd ___udivmodsi4
and.f 0,r6,1
sub.nz r0,0,r0 ; cannot go in delay slot, has limm value
j.nd r7
#endif
#endif /* L_divsi3 */
#ifdef L_umodsi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___umodsi3
___umodsi3:
mov r7,blink
bl.nd ___udivmodsi4
j.d r7
mov r0,r1
#endif
#endif /* L_umodsi3 */
#ifdef L_modsi3
.section .text
.align 4
#ifdef __base__
.cpu base
.global ___modsi3
___modsi3:
mov r7,blink
bl.nd ___divnorm
bl.nd ___udivmodsi4
and.f 0,r6,2
sub.nz r1,0,r1
j.d r7
mov r0,r1
#endif
#endif /* L_modsi3 */

72
gcc/config/arc/t-arc Normal file
View File

@@ -0,0 +1,72 @@
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = arc/lib1funcs.asm
LIB1ASMFUNCS = _mulsi3 _umulsidi3 _udivsi3 _divsi3 _umodsi3 _modsi3 _divmod_tools
# We need libgcc routines to be mangled according to which cpu they
# were compiled for.
# ??? -mmangle-cpu passed by default for now.
#LIBGCC2_CFLAGS = -g1 -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -mmangle-cpu
# These are really part of libgcc1, but this will cause them to be
# built correctly, so...
LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
echo '#ifndef __big_endian__' > dp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
echo '#endif' >> dp-bit.c
cat $(srcdir)/config/fp-bit.c >> dp-bit.c
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
echo '#ifndef __big_endian__' >> fp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
echo '#endif' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
# .init/.fini section routines
x-crtinit.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
-DCRT_INIT -finhibit-size-directive -fno-inline-functions \
-g0 -c $(srcdir)/config/arc/initfini.c -o $(dir)/crtinit.o
x-crtfini.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
-DCRT_FINI -finhibit-size-directive -fno-inline-functions \
-g0 -c $(srcdir)/config/arc/initfini.c -o $(dir)/crtfini.o
MULTILIB_OPTIONS = EB
MULTILIB_DIRNAMES = be
# We need our own versions to build multiple copies of crt*.o.
# ??? Use new support in Makefile.
LIBGCC = stmp-multilib-arc
INSTALL_LIBGCC = install-multilib-arc
stmp-multilib-arc: stmp-multilib
for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
dir=`echo $$i | sed -e 's/;.*$$//'`; \
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
CC="$(CC)" CFLAGS="$(CFLAGS)" \
HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
GCC_CFLAGS="$(GCC_CFLAGS) $${flags}" \
INCLUDES="$(INCLUDES)" CRTSTUFF_T_CFLAGS=$(CRTSTUFF_T_CFLAGS) \
dir="$${dir}" x-crtinit.o x-crtfini.o; \
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
done
touch stmp-multilib-arc
install-multilib-arc: install-multilib
for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
dir=`echo $$i | sed -e 's/;.*$$//'`; \
rm -f $(libsubdir)/$${dir}/crtinit.o; \
$(INSTALL_DATA) $${dir}/crtinit.o $(libsubdir)/$${dir}/crtinit.o; \
chmod a-x $(libsubdir)/$${dir}/crtinit.o; \
rm -f $(libsubdir)/$${dir}/crtfini.o; \
$(INSTALL_DATA) $${dir}/crtfini.o $(libsubdir)/$${dir}/crtfini.o; \
chmod a-x $(libsubdir)/$${dir}/crtfini.o; \
done

47
gcc/config/arc/xm-arc.h Normal file
View File

@@ -0,0 +1,47 @@
/* Configuration for GNU C-compiler for the ARC processor.
Copyright (C) 1994, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* #defines that need visibility everywhere. */
#define FALSE 0
#define TRUE 1
/* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_CHAR 8
#define HOST_BITS_PER_SHORT 16
#define HOST_BITS_PER_INT 32
#define HOST_BITS_PER_LONG 32
#define HOST_BITS_PER_LONGLONG 64
/* Doubles are stored in memory with the high order word first. This
matters when cross-compiling. */
#define HOST_WORDS_BIG_ENDIAN 1
/* target machine dependencies.
tm.h is a symbolic link to the actual target specific file. */
#include "tm.h"
/* Arguments to use with `exit'. */
#define SUCCESS_EXIT_CODE 0
#define FATAL_EXIT_CODE 33
/* If compiled with Sun CC, the use of alloca requires this #include. */
#ifndef __GNUC__
#include "alloca.h"
#endif

View File

@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler, for Advanced RISC Machines
ARM compilation, AOF Assembler.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rearnsha@armltd.co.uk)
This file is part of GNU CC.
@@ -60,12 +60,13 @@ char *aof_text_section ();
char *aof_data_section ();
#define DATA_SECTION_ASM_OP aof_data_section ()
#define EXTRA_SECTIONS in_zero_init, in_ctor, in_dtor
#define EXTRA_SECTIONS in_zero_init, in_ctor, in_dtor, in_common
#define EXTRA_SECTION_FUNCTIONS \
ZERO_INIT_SECTION \
CTOR_SECTION \
DTOR_SECTION
DTOR_SECTION \
COMMON_SECTION
#define ZERO_INIT_SECTION \
void \
@@ -118,6 +119,18 @@ dtor_section () \
} \
}
/* Used by ASM_OUTPUT_COMMON (below) to tell varasm.c that we've
changed areas. */
#define COMMON_SECTION \
void \
common_section () \
{ \
static int common_count = 1; \
if (in_section != in_common) \
{ \
in_section = in_common; \
} \
}
#define CTOR_LIST_BEGIN \
asm (CTORS_SECTION_ASM_OP); \
extern func_ptr __CTOR_END__[1]; \
@@ -194,7 +207,7 @@ do { \
/* Some systems use __main in a way incompatible with its use in gcc, in these
cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
give the same symbol without quotes for an alternative entry point. You
must define both, or niether. */
must define both, or neither. */
#define NAME__MAIN "__gccmain"
#define SYMBOL__MAIN __gccmain
@@ -277,7 +290,8 @@ do { \
/* Output of Uninitialized Variables */
#define ASM_OUTPUT_COMMON(STREAM,NAME,SIZE,ROUNDED) \
(fprintf ((STREAM), "\tAREA "), \
(common_section (), \
fprintf ((STREAM), "\tAREA "), \
assemble_name ((STREAM), (NAME)), \
fprintf ((STREAM), ", DATA, COMMON\n\t%% %d\t%s size=%d\n", \
(ROUNDED), ASM_COMMENT_START, SIZE))
@@ -302,7 +316,7 @@ do { \
arm_main_function = 1; \
} while (0)
#define ARM_OUTPUT_LABEL(STREAM,NAME) \
#define ASM_OUTPUT_LABEL(STREAM,NAME) \
do { \
assemble_name (STREAM,NAME); \
fputs ("\n", STREAM); \

View File

@@ -114,7 +114,7 @@ do { \
#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \
ASM_OUTPUT_LABEL(STREAM, NAME)
#define ARM_OUTPUT_LABEL(STREAM,NAME) \
#define ASM_OUTPUT_LABEL(STREAM,NAME) \
do { \
assemble_name (STREAM,NAME); \
fputs (":\n", STREAM); \
@@ -224,10 +224,15 @@ do { char dstr[30]; \
assemble_name ((STREAM), (NAME)), \
fprintf(STREAM, ", %d\t%s %d\n", ROUNDED, ASM_COMMENT_START, SIZE))
/* Output a local common block. /bin/as can't do this, so hack a `.space' into
the bss segment. Note that this is *bad* practice. */
#define ASM_OUTPUT_ALIGNED_LOCAL(STREAM,NAME,SIZE,ALIGN) \
output_lcomm_directive (STREAM, NAME, SIZE, ALIGN)
/* Output a local common block. /bin/as can't do this, so hack a
`.space' into the bss segment. Note that this is *bad* practice. */
#define ASM_OUTPUT_ALIGNED_LOCAL(STREAM,NAME,SIZE,ALIGN) \
do { \
bss_section (); \
ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \
ASM_OUTPUT_LABEL (STREAM, NAME); \
fprintf (STREAM, "\t.space\t%d\n", SIZE); \
} while (0)
/* Output a zero-initialized block. */
#define ASM_OUTPUT_ALIGNED_BSS(STREAM,DECL,NAME,SIZE,ALIGN) \

View File

@@ -1,7 +1,7 @@
/* Output routines for GCC for ARM/RISCiX.
Copyright (C) 1991, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Copyright (C) 1991, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
and Martin Simmons (@harleqn.co.uk).
and Martin Simmons (@harleqn.co.uk).
More major hacks by Richard Earnshaw (rwe11@cl.cam.ac.uk)
This file is part of GNU CC.
@@ -21,10 +21,9 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include <stdio.h>
#include <string.h>
#include "assert.h"
#include "config.h"
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
@@ -176,7 +175,7 @@ static struct processors all_procs[] =
{"arm600", PROCESSOR_ARM6, FL_CO_PROC | FL_MODE32 | FL_MODE26},
{"arm610", PROCESSOR_ARM6, FL_MODE32 | FL_MODE26},
{"arm7", PROCESSOR_ARM7, FL_CO_PROC | FL_MODE32 | FL_MODE26},
/* arm7m doesn't exist on its own, only in conjuction with D, (and I), but
/* arm7m doesn't exist on its own, only in conjunction with D, (and I), but
those don't alter the code, so it is sometimes known as the arm7m */
{"arm7m", PROCESSOR_ARM7, (FL_CO_PROC | FL_FAST_MULT | FL_MODE32
| FL_MODE26)},
@@ -376,7 +375,8 @@ use_return_insn ()
if (!reload_completed ||current_function_pretend_args_size
|| current_function_anonymous_args
|| (get_frame_size () && !(TARGET_APCS || frame_pointer_needed)))
|| ((get_frame_size () + current_function_outgoing_args_size != 0)
&& !(TARGET_APCS || frame_pointer_needed)))
return 0;
/* Can't be done if interworking with Thumb, and any registers have been
@@ -407,6 +407,13 @@ const_ok_for_arm (i)
{
unsigned HOST_WIDE_INT mask = ~0xFF;
/* For machines with >32 bit HOST_WIDE_INT, the bits above bit 31 must
be all zero, or all one. */
if ((i & ~(unsigned HOST_WIDE_INT) 0xffffffff) != 0
&& ((i & ~(unsigned HOST_WIDE_INT) 0xffffffff)
!= (((HOST_WIDE_INT) -1) & ~(unsigned HOST_WIDE_INT) 0xffffffff)))
return FALSE;
/* Fast return for 0 and powers of 2 */
if ((i & (i - 1)) == 0)
return TRUE;
@@ -1294,10 +1301,12 @@ arm_finalize_pic ()
l1 = gen_label_rtx ();
global_offset_table = gen_rtx (SYMBOL_REF, Pmode, "_GLOBAL_OFFSET_TABLE_");
/* The PC contains 'dot'+8, but the label L1 is on the next
instruction, so the offset is only 'dot'+4. */
pic_tmp = gen_rtx (CONST, VOIDmode,
gen_rtx (PLUS, Pmode,
gen_rtx (LABEL_REF, VOIDmode, l1),
GEN_INT (8)));
GEN_INT (4)));
pic_tmp2 = gen_rtx (CONST, VOIDmode,
gen_rtx (PLUS, Pmode,
global_offset_table,
@@ -1501,6 +1510,17 @@ arm_rtx_costs (x, code, outer_code)
+ (REG_OR_SUBREG_REG (XEXP (x, 0)) ? 0 : 4)
+ (REG_OR_SUBREG_REG (XEXP (x, 1)) ? 0 : 4));
case TRUNCATE:
if (arm_fast_multiply && mode == SImode
&& GET_CODE (XEXP (x, 0)) == LSHIFTRT
&& GET_CODE (XEXP (XEXP (x, 0), 0)) == MULT
&& (GET_CODE (XEXP (XEXP (XEXP (x, 0), 0), 0))
== GET_CODE (XEXP (XEXP (XEXP (x, 0), 0), 1)))
&& (GET_CODE (XEXP (XEXP (XEXP (x, 0), 0), 0)) == ZERO_EXTEND
|| GET_CODE (XEXP (XEXP (XEXP (x, 0), 0), 0)) == SIGN_EXTEND))
return 8;
return 99;
case NEG:
if (GET_MODE_CLASS (mode) == MODE_FLOAT)
return 4 + (REG_OR_SUBREG_REG (XEXP (x, 0)) ? 0 : 6);
@@ -2352,6 +2372,10 @@ load_multiple_sequence (operands, nops, regs, base, load_offset)
rtx reg;
rtx offset;
/* Convert a subreg of a mem into the mem itself. */
if (GET_CODE (operands[nops + i]) == SUBREG)
operands[nops + i] = alter_subreg(operands[nops + i]);
if (GET_CODE (operands[nops + i]) != MEM)
abort ();
@@ -2551,6 +2575,10 @@ store_multiple_sequence (operands, nops, regs, base, load_offset)
rtx reg;
rtx offset;
/* Convert a subreg of a mem into the mem itself. */
if (GET_CODE (operands[nops + i]) == SUBREG)
operands[nops + i] = alter_subreg(operands[nops + i]);
if (GET_CODE (operands[nops + i]) != MEM)
abort ();
@@ -2761,16 +2789,20 @@ arm_naked_function_p (func)
/* Routines for use in generating RTL */
rtx
arm_gen_load_multiple (base_regno, count, from, up, write_back)
arm_gen_load_multiple (base_regno, count, from, up, write_back, unchanging_p,
in_struct_p)
int base_regno;
int count;
rtx from;
int up;
int write_back;
int unchanging_p;
int in_struct_p;
{
int i = 0, j;
rtx result;
int sign = up ? 1 : -1;
rtx mem;
result = gen_rtx (PARALLEL, VOIDmode,
rtvec_alloc (count + (write_back ? 2 : 0)));
@@ -2785,10 +2817,13 @@ arm_gen_load_multiple (base_regno, count, from, up, write_back)
for (j = 0; i < count; i++, j++)
{
XVECEXP (result, 0, i)
= gen_rtx (SET, VOIDmode, gen_rtx (REG, SImode, base_regno + j),
gen_rtx (MEM, SImode,
plus_constant (from, j * 4 * sign)));
mem = gen_rtx (MEM, SImode, plus_constant (from, j * 4 * sign));
RTX_UNCHANGING_P (mem) = unchanging_p;
MEM_IN_STRUCT_P (mem) = in_struct_p;
XVECEXP (result, 0, i) = gen_rtx (SET, VOIDmode,
gen_rtx (REG, SImode, base_regno + j),
mem);
}
if (write_back)
@@ -2798,16 +2833,20 @@ arm_gen_load_multiple (base_regno, count, from, up, write_back)
}
rtx
arm_gen_store_multiple (base_regno, count, to, up, write_back)
arm_gen_store_multiple (base_regno, count, to, up, write_back, unchanging_p,
in_struct_p)
int base_regno;
int count;
rtx to;
int up;
int write_back;
int unchanging_p;
int in_struct_p;
{
int i = 0, j;
rtx result;
int sign = up ? 1 : -1;
rtx mem;
result = gen_rtx (PARALLEL, VOIDmode,
rtvec_alloc (count + (write_back ? 2 : 0)));
@@ -2822,10 +2861,12 @@ arm_gen_store_multiple (base_regno, count, to, up, write_back)
for (j = 0; i < count; i++, j++)
{
XVECEXP (result, 0, i)
= gen_rtx (SET, VOIDmode,
gen_rtx (MEM, SImode, plus_constant (to, j * 4 * sign)),
gen_rtx (REG, SImode, base_regno + j));
mem = gen_rtx (MEM, SImode, plus_constant (to, j * 4 * sign));
RTX_UNCHANGING_P (mem) = unchanging_p;
MEM_IN_STRUCT_P (mem) = in_struct_p;
XVECEXP (result, 0, i) = gen_rtx (SET, VOIDmode, mem,
gen_rtx (REG, SImode, base_regno + j));
}
if (write_back)
@@ -2843,6 +2884,8 @@ arm_gen_movstrqi (operands)
rtx src, dst;
rtx st_src, st_dst, end_src, end_dst, fin_src, fin_dst;
rtx part_bytes_reg = NULL;
rtx mem;
int dst_unchanging_p, dst_in_struct_p, src_unchanging_p, src_in_struct_p;
extern int optimize;
if (GET_CODE (operands[2]) != CONST_INT
@@ -2853,6 +2896,12 @@ arm_gen_movstrqi (operands)
st_dst = XEXP (operands[0], 0);
st_src = XEXP (operands[1], 0);
dst_unchanging_p = RTX_UNCHANGING_P (operands[0]);
dst_in_struct_p = MEM_IN_STRUCT_P (operands[0]);
src_unchanging_p = RTX_UNCHANGING_P (operands[1]);
src_in_struct_p = MEM_IN_STRUCT_P (operands[1]);
fin_dst = dst = copy_to_mode_reg (SImode, st_dst);
fin_src = src = copy_to_mode_reg (SImode, st_src);
@@ -2866,24 +2915,32 @@ arm_gen_movstrqi (operands)
for (i = 0; in_words_to_go >= 2; i+=4)
{
if (in_words_to_go > 4)
emit_insn (arm_gen_load_multiple (0, 4, src, TRUE, TRUE));
emit_insn (arm_gen_load_multiple (0, 4, src, TRUE, TRUE,
src_unchanging_p, src_in_struct_p));
else
emit_insn (arm_gen_load_multiple (0, in_words_to_go, src, TRUE,
FALSE));
FALSE, src_unchanging_p,
src_in_struct_p));
if (out_words_to_go)
{
if (out_words_to_go > 4)
emit_insn (arm_gen_store_multiple (0, 4, dst, TRUE, TRUE));
emit_insn (arm_gen_store_multiple (0, 4, dst, TRUE, TRUE,
dst_unchanging_p,
dst_in_struct_p));
else if (out_words_to_go != 1)
emit_insn (arm_gen_store_multiple (0, out_words_to_go,
dst, TRUE,
(last_bytes == 0
? FALSE : TRUE)));
? FALSE : TRUE),
dst_unchanging_p,
dst_in_struct_p));
else
{
emit_move_insn (gen_rtx (MEM, SImode, dst),
gen_rtx (REG, SImode, 0));
mem = gen_rtx (MEM, SImode, dst);
RTX_UNCHANGING_P (mem) = dst_unchanging_p;
MEM_IN_STRUCT_P (mem) = dst_in_struct_p;
emit_move_insn (mem, gen_rtx (REG, SImode, 0));
if (last_bytes != 0)
emit_insn (gen_addsi3 (dst, dst, GEN_INT (4)));
}
@@ -2898,9 +2955,16 @@ arm_gen_movstrqi (operands)
{
rtx sreg;
emit_move_insn (sreg = gen_reg_rtx (SImode), gen_rtx (MEM, SImode, src));
mem = gen_rtx (MEM, SImode, src);
RTX_UNCHANGING_P (mem) = src_unchanging_p;
MEM_IN_STRUCT_P (mem) = src_in_struct_p;
emit_move_insn (sreg = gen_reg_rtx (SImode), mem);
emit_move_insn (fin_src = gen_reg_rtx (SImode), plus_constant (src, 4));
emit_move_insn (gen_rtx (MEM, SImode, dst), sreg);
mem = gen_rtx (MEM, SImode, dst);
RTX_UNCHANGING_P (mem) = dst_unchanging_p;
MEM_IN_STRUCT_P (mem) = dst_in_struct_p;
emit_move_insn (mem, sreg);
emit_move_insn (fin_dst = gen_reg_rtx (SImode), plus_constant (dst, 4));
in_words_to_go--;
@@ -2913,7 +2977,10 @@ arm_gen_movstrqi (operands)
if (in_words_to_go < 0)
abort ();
part_bytes_reg = copy_to_mode_reg (SImode, gen_rtx (MEM, SImode, src));
mem = gen_rtx (MEM, SImode, src);
RTX_UNCHANGING_P (mem) = src_unchanging_p;
MEM_IN_STRUCT_P (mem) = src_in_struct_p;
part_bytes_reg = copy_to_mode_reg (SImode, mem);
}
if (BYTES_BIG_ENDIAN && last_bytes)
@@ -2930,9 +2997,10 @@ arm_gen_movstrqi (operands)
while (last_bytes)
{
emit_move_insn (gen_rtx (MEM, QImode,
plus_constant (dst, last_bytes - 1)),
gen_rtx (SUBREG, QImode, part_bytes_reg, 0));
mem = gen_rtx (MEM, QImode, plus_constant (dst, last_bytes - 1));
RTX_UNCHANGING_P (mem) = dst_unchanging_p;
MEM_IN_STRUCT_P (mem) = dst_in_struct_p;
emit_move_insn (mem, gen_rtx (SUBREG, QImode, part_bytes_reg, 0));
if (--last_bytes)
{
tmp = gen_reg_rtx (SImode);
@@ -2949,8 +3017,10 @@ arm_gen_movstrqi (operands)
if (part_bytes_reg == NULL)
abort ();
emit_move_insn (gen_rtx (MEM, QImode, dst),
gen_rtx (SUBREG, QImode, part_bytes_reg, 0));
mem = gen_rtx (MEM, QImode, dst);
RTX_UNCHANGING_P (mem) = dst_unchanging_p;
MEM_IN_STRUCT_P (mem) = dst_in_struct_p;
emit_move_insn (mem, gen_rtx (SUBREG, QImode, part_bytes_reg, 0));
if (--last_bytes)
{
rtx tmp = gen_reg_rtx (SImode);
@@ -2981,7 +3051,7 @@ gen_rotated_half_load (memref)
base = XEXP (base, 0);
}
/* If we aren't allowed to generate unalligned addresses, then fail. */
/* If we aren't allowed to generate unaligned addresses, then fail. */
if (TARGET_SHORT_BY_BYTES
&& ((BYTES_BIG_ENDIAN ? 1 : 0) ^ ((offset & 2) == 0)))
return NULL;
@@ -3006,7 +3076,7 @@ select_dominance_cc_mode (op, x, y, cond_or)
/* Currently we will probably get the wrong result if the individual
comparisons are not simple. This also ensures that it is safe to
reverse a comparions if necessary. */
reverse a comparison if necessary. */
if ((arm_select_cc_mode (cond1 = GET_CODE (x), XEXP (x, 0), XEXP (x, 1))
!= CCmode)
|| (arm_select_cc_mode (cond2 = GET_CODE (y), XEXP (y, 0), XEXP (y, 1))
@@ -3122,10 +3192,10 @@ arm_select_cc_mode (op, x, y)
|| GET_CODE (x) == ROTATERT))
return CC_SWPmode;
/* This is a special case, that is used by combine to alow a
comarison of a shifted byte load to be split into a zero-extend
/* This is a special case that is used by combine to allow a
comparison of a shifted byte load to be split into a zero-extend
followed by a comparison of the shifted integer (only valid for
equalities and unsigned inequalites. */
equalities and unsigned inequalities). */
if (GET_MODE (x) == SImode
&& GET_CODE (x) == ASHIFT
&& GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) == 24
@@ -3201,6 +3271,16 @@ arm_reload_in_hi (operands)
rtx base = find_replacement (&XEXP (operands[1], 0));
emit_insn (gen_zero_extendqisi2 (operands[2], gen_rtx (MEM, QImode, base)));
/* Handle the case where the address is too complex to be offset by 1. */
if (GET_CODE (base) == MINUS
|| (GET_CODE (base) == PLUS && GET_CODE (XEXP (base, 1)) != CONST_INT))
{
rtx base_plus = gen_rtx (REG, SImode, REGNO (operands[0]));
emit_insn (gen_rtx (SET, VOIDmode, base_plus, base));
base = base_plus;
}
emit_insn (gen_zero_extendqisi2 (gen_rtx (SUBREG, SImode, operands[0], 0),
gen_rtx (MEM, QImode,
plus_constant (base, 1))));
@@ -3454,6 +3534,7 @@ find_barrier (from, max_count)
{
int count = 0;
rtx found_barrier = 0;
rtx last = from;
while (from && count < max_count)
{
@@ -3467,11 +3548,12 @@ find_barrier (from, max_count)
&& CONSTANT_POOL_ADDRESS_P (SET_SRC (PATTERN (from))))
{
rtx src = SET_SRC (PATTERN (from));
count += 2;
count += 8;
}
else
count += get_attr_length (from);
last = from;
from = NEXT_INSN (from);
}
@@ -3482,7 +3564,7 @@ find_barrier (from, max_count)
rtx label = gen_label_rtx ();
if (from)
from = PREV_INSN (from);
from = PREV_INSN (last);
else
from = get_last_insn ();
@@ -3913,7 +3995,7 @@ output_move_double (operands)
{
enum rtx_code code0 = GET_CODE (operands[0]);
enum rtx_code code1 = GET_CODE (operands[1]);
rtx otherops[2];
rtx otherops[3];
if (code0 == REG)
{
@@ -3964,7 +4046,21 @@ output_move_double (operands)
}
else if (code1 == CONST_INT)
{
/* sign extend the intval into the high-order word */
#if HOST_BITS_PER_WIDE_INT > 32
/* If HOST_WIDE_INT is more than 32 bits, the intval tells us
what the upper word is. */
if (WORDS_BIG_ENDIAN)
{
otherops[1] = GEN_INT (ARM_SIGN_EXTEND (INTVAL (operands[1])));
operands[1] = GEN_INT (INTVAL (operands[1]) >> 32);
}
else
{
otherops[1] = GEN_INT (INTVAL (operands[1]) >> 32);
operands[1] = GEN_INT (ARM_SIGN_EXTEND (INTVAL (operands[1])));
}
#else
/* Sign extend the intval into the high-order word */
if (WORDS_BIG_ENDIAN)
{
otherops[1] = operands[1];
@@ -3973,6 +4069,7 @@ output_move_double (operands)
}
else
otherops[1] = INTVAL (operands[1]) < 0 ? constm1_rtx : const0_rtx;
#endif
output_mov_immediate (otherops);
output_mov_immediate (operands);
}
@@ -4762,10 +4859,9 @@ output_func_epilogue (f, frame_size)
if (use_return_insn() && return_used_this_function)
{
if (frame_size && !(frame_pointer_needed || TARGET_APCS))
{
abort ();
}
if ((frame_size + current_function_outgoing_args_size) != 0
&& !(frame_pointer_needed || TARGET_APCS))
abort ();
goto epilogue_done;
}
@@ -4853,10 +4949,11 @@ output_func_epilogue (f, frame_size)
else
{
/* Restore stack pointer if necessary. */
if (frame_size)
if (frame_size + current_function_outgoing_args_size != 0)
{
operands[0] = operands[1] = stack_pointer_rtx;
operands[2] = gen_rtx (CONST_INT, VOIDmode, frame_size);
operands[2] = GEN_INT (frame_size
+ current_function_outgoing_args_size);
output_add_immediate (operands);
}
@@ -5028,7 +5125,8 @@ void
arm_expand_prologue ()
{
int reg;
rtx amount = GEN_INT (- get_frame_size ());
rtx amount = GEN_INT (-(get_frame_size ()
+ current_function_outgoing_args_size));
rtx push_insn;
int num_regs;
int live_regs_mask = 0;
@@ -5295,34 +5393,6 @@ arm_print_operand (stream, x, code)
}
}
/* Output a label definition. */
void
arm_asm_output_label (stream, name)
FILE *stream;
char *name;
{
ARM_OUTPUT_LABEL (stream, name);
}
/* Output code resembling an .lcomm directive. /bin/as doesn't have this
directive hence this hack, which works by reserving some `.space' in the
bss segment directly.
XXX This is a severe hack, which is guaranteed NOT to work since it doesn't
define STATIC COMMON space but merely STATIC BSS space. */
void
output_lcomm_directive (stream, name, size, align)
FILE *stream;
char *name;
int size, align;
{
bss_section ();
ASM_OUTPUT_ALIGN (stream, floor_log2 (align / BITS_PER_UNIT));
ARM_OUTPUT_LABEL (stream, name);
fprintf (stream, "\t.space\t%d\n", size);
}
/* A finite state machine takes care of noticing whether or not instructions
can be conditionally executed, and thus decrease execution time and code
@@ -5883,7 +5953,7 @@ aof_data_section ()
/* The AOF assembler is religiously strict about declarations of
imported and exported symbols, so that it is impossible to declare
a function as imported near the begining of the file, and then to
a function as imported near the beginning of the file, and then to
export it later on. It is, however, possible to delay the decision
until all the functions in the file have been compiled. To get
around this, we maintain a list of the imports and exports, and

View File

@@ -86,7 +86,7 @@ extern int frame_pointer_needed;
#if TARGET_CPU_DEFAULT == TARGET_CPU_arm2
#define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_2__"
#else
#if TARGET_CPU_DEFAULT == TARGET_CPU_arm6 || TARGET_CPU_DEFUALT == TARGET_CPU_arm610 || TARGET_CPU_DEFAULT == TARGET_CPU_arm7500fe
#if TARGET_CPU_DEFAULT == TARGET_CPU_arm6 || TARGET_CPU_DEFAULT == TARGET_CPU_arm610 || TARGET_CPU_DEFAULT == TARGET_CPU_arm7500fe
#define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_3__"
#else
#if TARGET_CPU_DEFAULT == TARGET_CPU_arm7m
@@ -346,7 +346,7 @@ extern char *target_fp_name;
{"apcs-float", ARM_FLAG_APCS_FLOAT}, \
{"no-apcs-float", -ARM_FLAG_APCS_FLOAT}, \
{"apcs-reentrant", ARM_FLAG_APCS_REENT}, \
{"no-apcs-rentrant", -ARM_FLAG_APCS_REENT}, \
{"no-apcs-reentrant", -ARM_FLAG_APCS_REENT}, \
{"short-load-bytes", ARM_FLAG_SHORT_BYTE}, \
{"no-short-load-bytes", -ARM_FLAG_SHORT_BYTE}, \
{"short-load-words", -ARM_FLAG_SHORT_BYTE}, \
@@ -437,7 +437,7 @@ extern enum floating_point_type arm_fpu;
/* What type of floating point instructions are available */
extern enum floating_point_type arm_fpu_arch;
/* Default floating point archtitecture. Override in sub-target if
/* Default floating point architecture. Override in sub-target if
necessary. */
#define FP_DEFAULT FP_SOFT2
@@ -483,6 +483,11 @@ extern int arm_arch4;
(MODE) = SImode; \
}
/* Define this macro if the promotion described by `PROMOTE_MODE'
should also be done for outgoing function arguments. */
/* This is required to ensure that push insns always push a word. */
#define PROMOTE_FUNCTION_ARGS
/* Define for XFmode extended real floating point support.
This will automatically cause REAL_ARITHMETIC to be defined. */
/* For the ARM:
@@ -905,7 +910,13 @@ enum reg_class
/* If we generate an insn to push BYTES bytes,
this says how many the stack pointer really advances by. */
#define PUSH_ROUNDING(NPUSHED) (((NPUSHED) + 3) & ~3)
/* The push insns do not do this rounding implicitly. So don't define this. */
/* #define PUSH_ROUNDING(NPUSHED) (((NPUSHED) + 3) & ~3) */
/* Define this if the maximum size of all the outgoing args is to be
accumulated and pushed during the prologue. The amount can be
found in the variable current_function_outgoing_args_size. */
#define ACCUMULATE_OUTGOING_ARGS
/* Offset of first parameter from the argument pointer register value. */
#define FIRST_PARM_OFFSET(FNDECL) 4
@@ -1102,8 +1113,10 @@ enum reg_class
int volatile_func = arm_volatile_func (); \
if ((FROM) == ARG_POINTER_REGNUM && (TO) == HARD_FRAME_POINTER_REGNUM)\
(OFFSET) = 0; \
else if ((FROM) == FRAME_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM)\
(OFFSET) = (get_frame_size () + 3 & ~3); \
else if ((FROM) == FRAME_POINTER_REGNUM \
&& (TO) == STACK_POINTER_REGNUM) \
(OFFSET) = (current_function_outgoing_args_size \
+ (get_frame_size () + 3 & ~3)); \
else \
{ \
int regno; \
@@ -1125,8 +1138,10 @@ enum reg_class
{ \
if (! frame_pointer_needed) \
offset -= 16; \
if (! volatile_func && (regs_ever_live[14] || saved_hard_reg)) \
if (! volatile_func \
&& (regs_ever_live[14] || saved_hard_reg)) \
offset += 4; \
offset += current_function_outgoing_args_size; \
(OFFSET) = (get_frame_size () + 3 & ~3) + offset; \
} \
} \
@@ -1390,14 +1405,15 @@ do \
else if (BASE_REGISTER_RTX_P (xop1)) \
GO_IF_LEGITIMATE_INDEX (MODE, REGNO (xop1), xop0, LABEL); \
} \
else if (GET_CODE (X) == MINUS) \
/* Reload currently can't handle MINUS, so disable this for now */ \
/* else if (GET_CODE (X) == MINUS) \
{ \
rtx xop0 = XEXP (X,0); \
rtx xop1 = XEXP (X,1); \
\
if (BASE_REGISTER_RTX_P (xop0)) \
GO_IF_LEGITIMATE_INDEX (MODE, -1, xop1, LABEL); \
} \
} */ \
else if (GET_MODE_CLASS (MODE) != MODE_FLOAT \
&& GET_CODE (X) == SYMBOL_REF \
&& CONSTANT_POOL_ADDRESS_P (X)) \
@@ -1742,27 +1758,23 @@ extern int arm_compare_fp;
goto JUMPTO
/* Output an internal label definition. */
#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM) \
do \
{ \
char *s = (char *) alloca (40 + strlen (PREFIX)); \
extern int arm_target_label, arm_ccfsm_state; \
extern rtx arm_target_insn; \
\
if (arm_ccfsm_state == 3 && arm_target_label == (NUM) \
&& !strcmp (PREFIX, "L")) \
{ \
arm_ccfsm_state = 0; \
arm_target_insn = NULL; \
} \
ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM)); \
arm_asm_output_label (STREAM, s); \
#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM) \
do \
{ \
char *s = (char *) alloca (40 + strlen (PREFIX)); \
extern int arm_target_label, arm_ccfsm_state; \
extern rtx arm_target_insn; \
\
if (arm_ccfsm_state == 3 && arm_target_label == (NUM) \
&& !strcmp (PREFIX, "L")) \
{ \
arm_ccfsm_state = 0; \
arm_target_insn = NULL; \
} \
ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM)); \
ASM_OUTPUT_LABEL (STREAM, s); \
} while (0)
/* Output a label definition. */
#define ASM_OUTPUT_LABEL(STREAM,NAME) \
arm_asm_output_label ((STREAM), (NAME))
/* Output a push or a pop instruction (only used when profiling). */
#define ASM_OUTPUT_REG_PUSH(STREAM,REGNO) \
fprintf(STREAM,"\tstmfd\t%ssp!,{%s%s}\n", \
@@ -1916,9 +1928,10 @@ do { \
shift += 8; \
} \
} \
fprintf (FILE, "\tldr\t%spc, [%spc, #-4]\n", REGISTER_PREFIX, \
REGISTER_PREFIX); \
ASM_OUTPUT_INT (FILE, XEXP (DECL_RTL (FUNCTION), 0)); \
fputs ("\tb\t", FILE); \
assemble_name (FILE, \
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \
fputc ('\n', FILE); \
} while (0)
/* A C expression whose value is RTL representing the value of the return
@@ -1927,7 +1940,7 @@ do { \
#define RETURN_ADDR_RTX(COUNT, FRAME) \
((COUNT == 0) \
? gen_rtx (MEM, Pmode, plus_constant (FRAME, -4)) \
: (rtx) 0)
: NULL_RTX)
/* Used to mask out junk bits from the return address, such as
processor state, interrupt status, condition codes and the like. */
@@ -2003,9 +2016,9 @@ int arm_valid_machine_decl_attribute (/* union tree_node *, union tree_node *,
union tree_node *,
union tree_node * */);
struct rtx_def *arm_gen_load_multiple (/* int, int, struct rtx_def *,
int, int */);
int, int, int, int */);
struct rtx_def *arm_gen_store_multiple (/* int, int, struct rtx_def *,
int, int */);
int, int, int, int */);
int arm_gen_movstrqi (/* struct rtx_def ** */);
struct rtx_def *gen_rotated_half_load (/* struct rtx_def * */);
enum machine_mode arm_select_cc_mode (/* enum rtx_code, struct rtx_def *,
@@ -2024,7 +2037,7 @@ char *output_mov_long_double_arm_from_fpu (/* struct rtx_def ** */);
char *output_mov_long_double_arm_from_arm (/* struct rtx_def ** */);
char *output_mov_double_fpu_from_arm (/* struct rtx_def ** */);
char *output_mov_double_arm_from_fpu (/* struct rtx_def ** */);
char *output_mov_double (/* struct rtx_def ** */);
char *output_move_double (/* struct rtx_def ** */);
char *output_mov_immediate (/* struct rtx_def ** */);
char *output_add_immediate (/* struct rtx_def ** */);
char *arithmetic_instr (/* struct rtx_def *, int */);
@@ -2035,8 +2048,6 @@ void output_func_prologue (/* FILE *, int */);
void output_func_epilogue (/* FILE *, int */);
void arm_expand_prologue (/* void */);
void arm_print_operand (/* FILE *, struct rtx_def *, int */);
void arm_asm_output_label (/* FILE *, char * */);
void output_lcomm_directive (/* FILE *, char *, int, int */);
void final_prescan_insn (/* struct rtx_def *, struct rtx_def **, int */);
#ifdef AOF_ASSEMBLER
struct rtx_def *aof_pic_entry (/* struct rtx_def * */);

View File

@@ -1,7 +1,7 @@
;;- Machine description for Advanced RISC Machines' ARM for GNU compiler
;; Copyright (C) 1991, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
;; Copyright (C) 1991, 93-97, 1998 Free Software Foundation, Inc.
;; Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
;; and Martin Simmons (@harleqn.co.uk).
;; and Martin Simmons (@harleqn.co.uk).
;; More major hacks by Richard Earnshaw (rwe11@cl.cam.ac.uk)
;; This file is part of GNU CC.
@@ -859,6 +859,34 @@
"umull%?\\t%Q0, %R0, %1, %2"
[(set_attr "type" "mult")])
(define_insn "smulsi3_highpart"
[(set (match_operand:SI 0 "s_register_operand" "=&r,&r")
(truncate:SI
(lshiftrt:DI
(mult:DI (sign_extend:DI
(match_operand:SI 1 "s_register_operand" "%r,0"))
(sign_extend:DI
(match_operand:SI 2 "s_register_operand" "r,r")))
(const_int 32))))
(clobber (match_scratch:SI 3 "=&r,&r"))]
"arm_fast_multiply"
"smull%?\\t%3, %0, %2, %1"
[(set_attr "type" "mult")])
(define_insn "umulsi3_highpart"
[(set (match_operand:SI 0 "s_register_operand" "=&r,&r")
(truncate:SI
(lshiftrt:DI
(mult:DI (zero_extend:DI
(match_operand:SI 1 "s_register_operand" "%r,0"))
(zero_extend:DI
(match_operand:SI 2 "s_register_operand" "r,r")))
(const_int 32))))
(clobber (match_scratch:SI 3 "=&r,&r"))]
"arm_fast_multiply"
"umull%?\\t%3, %0, %2, %1"
[(set_attr "type" "mult")])
(define_insn "mulsf3"
[(set (match_operand:SF 0 "s_register_operand" "=f")
(mult:SF (match_operand:SF 1 "s_register_operand" "f")
@@ -1180,7 +1208,21 @@
"
{
HOST_WIDE_INT mask = (((HOST_WIDE_INT)1) << INTVAL (operands[1])) - 1;
rtx target, subtarget;
target = operands[0];
/* Avoid using a subreg as a subtarget, and avoid writing a paradoxical
subreg as the final target. */
if (GET_CODE (target) == SUBREG)
{
subtarget = gen_reg_rtx (SImode);
if (GET_MODE_SIZE (GET_MODE (SUBREG_REG (target)))
< GET_MODE_SIZE (SImode))
target = SUBREG_REG (target);
}
else
subtarget = target;
if (GET_CODE (operands[3]) == CONST_INT)
{
/* Since we are inserting a known constant, we may be able to
@@ -1191,7 +1233,7 @@
<< INTVAL (operands[2]));
emit_insn (gen_andsi3 (op1, operands[0], GEN_INT (~mask2)));
emit_insn (gen_iorsi3 (operands[0], op1,
emit_insn (gen_iorsi3 (subtarget, op1,
GEN_INT (INTVAL (operands[3])
<< INTVAL (operands[2]))));
}
@@ -1212,7 +1254,7 @@
emit_insn (gen_iorsi3 (op1, gen_rtx (LSHIFTRT, SImode, operands[0],
operands[1]),
op0));
emit_insn (gen_rotlsi3 (operands[0], op1, operands[1]));
emit_insn (gen_rotlsi3 (subtarget, op1, operands[1]));
}
else if ((INTVAL (operands[1]) + INTVAL (operands[2]) == 32)
&& ! (const_ok_for_arm (mask)
@@ -1226,8 +1268,9 @@
emit_insn (gen_ashlsi3 (op0, operands[3],
GEN_INT (32 - INTVAL (operands[1]))));
emit_insn (gen_ashlsi3 (op1, operands[0], operands[1]));
emit_insn (gen_iorsi3 (operands[0], gen_rtx (LSHIFTRT, SImode, op1,
operands[1]), op0));
emit_insn (gen_iorsi3 (subtarget,
gen_rtx (LSHIFTRT, SImode, op1,
operands[1]), op0));
}
else
{
@@ -1270,7 +1313,17 @@
if (INTVAL (operands[2]) != 0)
op1 = gen_rtx (ASHIFT, SImode, op1, operands[2]);
emit_insn (gen_iorsi3 (operands[0], op1, op2));
emit_insn (gen_iorsi3 (subtarget, op1, op2));
}
if (subtarget != target)
{
/* If TARGET is still a SUBREG, then it must be wider than a word,
so we must be careful only to set the subword we were asked to. */
if (GET_CODE (target) == SUBREG)
emit_move_insn (target, subtarget);
else
emit_move_insn (target, gen_lowpart (GET_MODE (target), subtarget));
}
DONE;
@@ -2551,23 +2604,24 @@
(define_expand "storehi"
[;; store the low byte
(set (mem:QI (match_operand:SI 1 "" "")) (match_dup 3))
(set (match_operand 1 "" "") (match_dup 3))
;; extract the high byte
(set (match_dup 2)
(ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
;; store the high byte
(set (mem:QI (match_dup 4))
(subreg:QI (match_dup 2) 0))] ;explicit subreg safe
(set (match_dup 4) (subreg:QI (match_dup 2) 0))] ;explicit subreg safe
""
"
{
enum rtx_code code = GET_CODE (operands[1]);
rtx addr = XEXP (operands[1], 0);
enum rtx_code code = GET_CODE (addr);
if ((code == PLUS || code == MINUS)
&& (GET_CODE (XEXP (operands[1], 1)) == REG
|| GET_CODE (XEXP (operands[1], 0)) != REG))
operands[1] = force_reg (SImode, operands[1]);
operands[4] = plus_constant (operands[1], 1);
if ((code == PLUS && GET_CODE (XEXP (addr, 1)) != CONST_INT)
|| code == MINUS)
addr = force_reg (SImode, addr);
operands[4] = change_address (operands[1], QImode, plus_constant (addr, 1));
operands[1] = change_address (operands[1], QImode, NULL_RTX);
operands[3] = gen_lowpart (QImode, operands[0]);
operands[0] = gen_lowpart (SImode, operands[0]);
operands[2] = gen_reg_rtx (SImode);
@@ -2575,21 +2629,22 @@
")
(define_expand "storehi_bigend"
[(set (mem:QI (match_dup 4)) (match_dup 3))
[(set (match_dup 4) (match_dup 3))
(set (match_dup 2)
(ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
(set (mem:QI (match_operand 1 "" ""))
(subreg:QI (match_dup 2) 0))]
(set (match_operand 1 "" "") (subreg:QI (match_dup 2) 0))]
""
"
{
enum rtx_code code = GET_CODE (operands[1]);
if ((code == PLUS || code == MINUS)
&& (GET_CODE (XEXP (operands[1], 1)) == REG
|| GET_CODE (XEXP (operands[1], 0)) != REG))
operands[1] = force_reg (SImode, operands[1]);
rtx addr = XEXP (operands[1], 0);
enum rtx_code code = GET_CODE (addr);
operands[4] = plus_constant (operands[1], 1);
if ((code == PLUS && GET_CODE (XEXP (addr, 1)) != CONST_INT)
|| code == MINUS)
addr = force_reg (SImode, addr);
operands[4] = change_address (operands[1], QImode, plus_constant (addr, 1));
operands[1] = change_address (operands[1], QImode, NULL_RTX);
operands[3] = gen_lowpart (QImode, operands[0]);
operands[0] = gen_lowpart (SImode, operands[0]);
operands[2] = gen_reg_rtx (SImode);
@@ -2598,19 +2653,19 @@
;; Subroutine to store a half word integer constant into memory.
(define_expand "storeinthi"
[(set (mem:QI (match_operand:SI 0 "" ""))
[(set (match_operand 0 "" "")
(subreg:QI (match_operand 1 "" "") 0))
(set (mem:QI (match_dup 3)) (subreg:QI (match_dup 2) 0))]
(set (match_dup 3) (subreg:QI (match_dup 2) 0))]
""
"
{
HOST_WIDE_INT value = INTVAL (operands[1]);
enum rtx_code code = GET_CODE (operands[0]);
rtx addr = XEXP (operands[0], 0);
enum rtx_code code = GET_CODE (addr);
if ((code == PLUS || code == MINUS)
&& (GET_CODE (XEXP (operands[0], 1)) == REG
|| GET_CODE (XEXP (operands[0], 0)) != REG))
operands[0] = force_reg (SImode, operands[0]);
if ((code == PLUS && GET_CODE (XEXP (addr, 1)) != CONST_INT)
|| code == MINUS)
addr = force_reg (SImode, addr);
operands[1] = gen_reg_rtx (SImode);
if (BYTES_BIG_ENDIAN)
@@ -2636,7 +2691,8 @@
}
}
operands[3] = plus_constant (operands[0], 1);
operands[3] = change_address (operands[0], QImode, plus_constant (addr, 1));
operands[0] = change_address (operands[0], QImode, NULL_RTX);
}
")
@@ -2667,16 +2723,15 @@
DONE;
}
if (GET_CODE (operands[1]) == CONST_INT)
emit_insn (gen_storeinthi (XEXP (operands[0], 0), operands[1]));
emit_insn (gen_storeinthi (operands[0], operands[1]));
else
{
if (GET_CODE (operands[1]) == MEM)
operands[1] = force_reg (HImode, operands[1]);
if (BYTES_BIG_ENDIAN)
emit_insn (gen_storehi_bigend (operands[1],
XEXP (operands[0], 0)));
emit_insn (gen_storehi_bigend (operands[1], operands[0]));
else
emit_insn (gen_storehi (operands[1], XEXP (operands[0], 0)));
emit_insn (gen_storehi (operands[1], operands[0]));
}
DONE;
}
@@ -3152,9 +3207,10 @@
FAIL;
operands[3]
= arm_gen_load_multiple (REGNO (operands[0]), INTVAL (operands[2]),
force_reg (SImode, XEXP (operands[1], 0)),
TRUE, FALSE);
= arm_gen_load_multiple (REGNO (operands[0]), INTVAL (operands[2]),
force_reg (SImode, XEXP (operands[1], 0)),
TRUE, FALSE, RTX_UNCHANGING_P(operands[1]),
MEM_IN_STRUCT_P(operands[1]));
")
;; Load multiple with write-back
@@ -3221,9 +3277,10 @@
FAIL;
operands[3]
= arm_gen_store_multiple (REGNO (operands[1]), INTVAL (operands[2]),
force_reg (SImode, XEXP (operands[0], 0)),
TRUE, FALSE);
= arm_gen_store_multiple (REGNO (operands[1]), INTVAL (operands[2]),
force_reg (SImode, XEXP (operands[0], 0)),
TRUE, FALSE, RTX_UNCHANGING_P (operands[0]),
MEM_IN_STRUCT_P(operands[0]));
")
;; Store multiple with write-back
@@ -3859,8 +3916,16 @@
"
{
enum rtx_code code = GET_CODE (operands[1]);
rtx ccreg = gen_compare_reg (code, arm_compare_op0, arm_compare_op1,
arm_compare_fp);
rtx ccreg;
/* When compiling for SOFT_FLOAT, ensure both arms are in registers.
Otherwise, ensure it is a valid FP add operand */
if ((! TARGET_HARD_FLOAT)
|| (! fpu_add_operand (operands[3], SFmode)))
operands[3] = force_reg (SFmode, operands[3]);
ccreg = gen_compare_reg (code, arm_compare_op0, arm_compare_op1,
arm_compare_fp);
operands[1] = gen_rtx (code, VOIDmode, ccreg, const0_rtx);
}")
@@ -3869,7 +3934,7 @@
[(set (match_operand:DF 0 "s_register_operand" "")
(if_then_else:DF (match_operand 1 "comparison_operator" "")
(match_operand:DF 2 "s_register_operand" "")
(match_operand:DF 3 "nonmemory_operand" "")))]
(match_operand:DF 3 "fpu_add_operand" "")))]
"TARGET_HARD_FLOAT"
"
{
@@ -3881,57 +3946,77 @@
}")
(define_insn "*movsicc_insn"
[(set (match_operand:SI 0 "s_register_operand" "=r,r,r,r,r,r")
[(set (match_operand:SI 0 "s_register_operand" "=r,r,r,r,r,r,r,r")
(if_then_else:SI
(match_operator 3 "comparison_operator"
[(match_operand 4 "cc_register" "") (const_int 0)])
(match_operand:SI 1 "arm_not_operand" "0,0,?rI,?rI,K,K")
(match_operand:SI 2 "arm_not_operand" "rI,K,rI,K,rI,K")))]
(match_operand:SI 1 "arm_not_operand" "0,0,rI,K,rI,rI,K,K")
(match_operand:SI 2 "arm_not_operand" "rI,K,0,0,rI,K,rI,K")))]
""
"@
mov%D3\\t%0, %2
mvn%D3\\t%0, #%B2
mov%d3\\t%0, %1
mvn%d3\\t%0, #%B1
mov%d3\\t%0, %1\;mov%D3\\t%0, %2
mov%d3\\t%0, %1\;mvn%D3\\t%0, #%B2
mvn%d3\\t%0, #%B1\;mov%D3\\t%0, %2
mvn%d3\\t%0, #%B1\;mvn%D3\\t%0, #%B2"
[(set_attr "length" "4,4,8,8,8,8")
[(set_attr "length" "4,4,4,4,8,8,8,8")
(set_attr "conds" "use")])
(define_insn "*movsfcc_hard_insn"
[(set (match_operand:SF 0 "s_register_operand" "=f,f")
(if_then_else:SF (match_operator 3 "comparison_operator"
[(match_operand 4 "cc_register" "") (const_int 0)])
(match_operand:SF 1 "s_register_operand" "0,0")
(match_operand:SF 2 "fpu_add_operand" "fG,H")))]
[(set (match_operand:SF 0 "s_register_operand" "=f,f,f,f,f,f,f,f")
(if_then_else:SF
(match_operator 3 "comparison_operator"
[(match_operand 4 "cc_register" "") (const_int 0)])
(match_operand:SF 1 "fpu_add_operand" "0,0,fG,H,fG,fG,H,H")
(match_operand:SF 2 "fpu_add_operand" "fG,H,0,0,fG,H,fG,H")))]
"TARGET_HARD_FLOAT"
"@
mvf%D3s\\t%0, %2
mnf%D3s\\t%0, #%N2"
[(set_attr "type" "ffarith")
mnf%D3s\\t%0, #%N2
mvf%d3s\\t%0, %1
mnf%d3s\\t%0, #%N1
mvf%d3s\\t%0, %1\;mvf%D3s\\t%0, %2
mvf%d3s\\t%0, %1\;mnf%D3s\\t%0, #%N2
mnf%d3s\\t%0, #%N1\;mvf%D3s\\t%0, %2
mnf%d3s\\t%0, #%N1\;mnf%D3s\\t%0, #%N2"
[(set_attr "length" "4,4,4,4,8,8,8,8")
(set_attr "type" "ffarith")
(set_attr "conds" "use")])
(define_insn "*movsfcc_soft_insn"
[(set (match_operand:SF 0 "s_register_operand" "=r")
[(set (match_operand:SF 0 "s_register_operand" "=r,r")
(if_then_else:SF (match_operator 3 "comparison_operator"
[(match_operand 4 "cc_register" "") (const_int 0)])
(match_operand:SF 1 "s_register_operand" "0")
(match_operand:SF 2 "s_register_operand" "r")))]
(match_operand:SF 1 "s_register_operand" "0,r")
(match_operand:SF 2 "s_register_operand" "r,0")))]
"TARGET_SOFT_FLOAT"
"mov%D3\\t%0, %2"
"@
mov%D3\\t%0, %2
mov%d3\\t%0, %1"
[(set_attr "conds" "use")])
(define_insn "*movdfcc_insn"
[(set (match_operand:DF 0 "s_register_operand" "=f,f")
(if_then_else:DF (match_operator 3 "comparison_operator"
[(match_operand 4 "cc_register" "") (const_int 0)])
(match_operand:DF 1 "s_register_operand" "0,0")
(match_operand:DF 2 "fpu_add_operand" "fG,H")))]
[(set (match_operand:DF 0 "s_register_operand" "=f,f,f,f,f,f,f,f")
(if_then_else:DF
(match_operator 3 "comparison_operator"
[(match_operand 4 "cc_register" "") (const_int 0)])
(match_operand:DF 1 "fpu_add_operand" "0,0,fG,H,fG,fG,H,H")
(match_operand:DF 2 "fpu_add_operand" "fG,H,0,0,fG,H,fG,H")))]
"TARGET_HARD_FLOAT"
"@
mvf%D3d\\t%0, %2
mnf%D3d\\t%0, #%N2"
[(set_attr "type" "ffarith")
mnf%D3d\\t%0, #%N2
mvf%d3d\\t%0, %1
mnf%d3d\\t%0, #%N1
mvf%d3d\\t%0, %1\;mvf%D3d\\t%0, %2
mvf%d3d\\t%0, %1\;mnf%D3d\\t%0, #%N2
mnf%d3d\\t%0, #%N1\;mvf%D3d\\t%0, %2
mnf%d3d\\t%0, #%N1\;mnf%D3d\\t%0, #%N2"
[(set_attr "length" "4,4,4,4,8,8,8,8")
(set_attr "type" "ffarith")
(set_attr "conds" "use")])
;; Jump and linkage insns
@@ -4158,14 +4243,17 @@
DONE;
}")
;; The USE in this pattern is needed to tell flow analysis that this is
;; a CASESI insn. It has no other purpose.
(define_insn "casesi_internal"
[(set (pc)
(if_then_else
(leu (match_operand:SI 0 "s_register_operand" "r")
(match_operand:SI 1 "arm_rhs_operand" "rI"))
(mem:SI (plus:SI (mult:SI (match_dup 0) (const_int 4))
(label_ref (match_operand 2 "" ""))))
(label_ref (match_operand 3 "" ""))))]
[(parallel [(set (pc)
(if_then_else
(leu (match_operand:SI 0 "s_register_operand" "r")
(match_operand:SI 1 "arm_rhs_operand" "rI"))
(mem:SI (plus:SI (mult:SI (match_dup 0) (const_int 4))
(label_ref (match_operand 2 "" ""))))
(label_ref (match_operand 3 "" ""))))
(use (label_ref (match_dup 2)))])]
""
"*
if (flag_pic)
@@ -5663,8 +5751,7 @@
"sub%?s\\t%0, %1, #0"
[(set_attr "conds" "set")])
; Peepholes to spot possible load- and store-multiples, if the ordering is
; reversed, check that the memory references aren't volatile.
; Peepholes to spot possible load- and store-multiples.
(define_peephole
[(set (match_operand:SI 0 "s_register_operand" "=r")

View File

@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
point the default. NOT --nfp! --with{enable?} is supposed to replace it
(right?), so let's stop using it. */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT /*+ TARGET_CPU_DEFAULT*/)
#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32)
/* ??? Is a big-endian default intended to be supported? */
#if 0 /*TARGET_CPU_DEFAULT & ARM_FLAG_BIG_END*/

View File

@@ -402,3 +402,22 @@ SYM (__div0):
RET pc, lr
#endif /* L_divmodsi_tools */
#ifdef L_dvmd_lnx
@ GNU/Linux division-by zero handler. Used in place of L_dvmd_tls
#include <asm/unistd.h>
#define SIGFPE 8 @ cant use <asm/signal.h> as it
@ contains too much C rubbish
.globl SYM (__div0)
.align 0
SYM (__div0):
stmfd sp!, {r1, lr}
swi __NR_getpid
cmn r0, #1000
ldmgefd sp!, {r1, pc}RETCOND @ not much we can do
mov r1, #SIGFPE
swi __NR_kill
ldmfd sp!, {r1, pc}RETCOND
#endif /* L_dvmd_lnx */

View File

@@ -1,4 +1,5 @@
/* Definitions of target machine for GNU compiler. ARM Linux version.
/* Definitions of target machine for GNU compiler. ARM Linux-based GNU
systems version.
Copyright (C) 1997 Free Software Foundation, Inc.
Contributed by Russell King <rmk92@ecs.soton.ac.uk>.

View File

@@ -1,6 +1,6 @@
/* Definitions for ARM running Linux
/* Definitions for ARM running Linux-based GNU systems.
Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
Adapted from ARM Linux by Russell King <rmk92@ecs.soton.ac.uk>.
Contributed by Russell King <rmk92@ecs.soton.ac.uk>.
This file is part of GNU CC.
@@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */
#undef COMMENT_BEGIN
/* We default to ARM3. */
#define TARGET_CPU_DEFAULT TARGET_CPU_arm3
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm3
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
@@ -56,8 +56,7 @@ Boston, MA 02111-1307, USA. */
#define HANDLE_SYSV_PRAGMA
/* Run-time Target Specification. */
#define TARGET_VERSION \
fputs (" (ARM Linux/a.out)", stderr);
#define TARGET_VERSION fputs (" (ARM GNU/Linux with a.out)", stderr);
/* This is used in ASM_FILE_START */
#define ARM_OS_NAME "Linux"

View File

@@ -1,6 +1,5 @@
/*
NetBSD/arm (RiscBSD) version.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
/* NetBSD/arm (RiscBSD) version.
Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
Contributed by Mark Brinicombe (amb@physig.ph.kcl.ac.uk)
This file is part of GNU CC.
@@ -50,7 +49,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
arm32 is the NetBSD port name, so we always define arm32 and __arm32__. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
-Dunix -Driscbsd -Darm32 -D__arm32__ -D__NetBSD__ \
-Dunix -Driscbsd -Darm32 -D__arm32__ -D__arm__ -D__NetBSD__ \
-Asystem(unix) -Asystem(NetBSD) -Acpu(arm) -Amachine(arm)"
/* Define _POSIX_SOURCE if necessary. */
@@ -64,6 +63,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef CPP_APCS_PC_DEFAULT_SPEC
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
/* Pass -X to the linker so that it will strip symbols starting with 'L' */
#undef LINK_SPEC
#define LINK_SPEC "\
-X %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} \
%{static:-Bstatic} %{assert*} \
"
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
@@ -97,12 +103,17 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
fprintf(STREAM, "\tbl\tmcount\n"); \
}
/* On the ARM `@' introduces a comment, so we must use something else
for .type directives. */
#undef TYPE_OPERAND_FMT
#define TYPE_OPERAND_FMT "%%%s"
/* VERY BIG NOTE : Change of structure alignment for RiscBSD.
There are consequences you should be aware of...
Normally GCC/arm uses a structure alignment of 32 for compatibility
with armcc. This means that structures are padded to a word
boundry. However this causes problems with bugged NetBSD kernel
boundary. However this causes problems with bugged NetBSD kernel
code (possibly userland code as well - I have not checked every
binary). The nature of this bugged code is to rely on sizeof()
returning the correct size of various structures rounded to the
@@ -118,7 +129,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
structures containing shorts will be half word alinged.
structures containing ints will be word aligned.
This means structures should be padded to a word boundry if
This means structures should be padded to a word boundary if
alignment of 32 is required for byte structures etc.
2. A potential performance penalty may exist if strings are no longer

View File

@@ -10,7 +10,7 @@ ENQUIRE=
CROSS_LIBGCC1 = libgcc1-asm.a
LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = arm/lib1funcs.asm
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
MULTILIB_OPTIONS = mapcs-32
MULTILIB_DIRNAMES = apcs-32

View File

@@ -5,7 +5,3 @@ LIBGCC2_CFLAGS=-O2 -fomit-frame-pointer $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g0
# Don't build enquire
ENQUIRE=
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = arm/lib1funcs.asm
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls

View File

@@ -1,6 +1,6 @@
# Just for these, we omit the frame pointer since it makes such a big
# difference. It is then pointless adding debugging.
LIBGCC2_CFLAGS=-O2 -fomit-frame-pointer $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g0
LIBGCC2_CFLAGS=-O2 -fomit-frame-pointer $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g0
# Don't build enquire
ENQUIRE=

View File

@@ -6,4 +6,3 @@ X_CFLAGS= -DPOSIX -Dopterr=gcc_opterr -Doptind=gcc_optind \
OLDCC=/usr/ucb/cc
CC=$(OLDCC)
FIXPROTO_DEFINES= -D_POSIX_SOURCE -D_XOPEN_C -D_BSD_C -D_XOPEN_SOURCE
INSTALL=$(srcdir)/install.sh -c

View File

@@ -44,12 +44,6 @@ Boston, MA 02111-1307, USA. */
#define USE_C_ALLOCA
#endif
/* Define this if the library function putenv is available on your machine */
#define HAVE_PUTENV 1
/* Define this if the library function vprintf is available on your machine */
#define HAVE_VPRINTF 1
/* Define this to be 1 if you know the host compiler supports prototypes, even
if it doesn't define __STDC__, or define it to be 0 if you do not want any
prototypes when compiling GNU CC. */

View File

@@ -19,8 +19,8 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "config.h"
#include <stdio.h>
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
@@ -440,23 +440,37 @@ clipper_builtin_saveregs (arglist)
if (flag_check_memory_usage)
{
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3, addr,
ptr_mode, GEN_INT (5 * GET_MODE_SIZE (SImode)),
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3,
addr, ptr_mode,
GEN_INT (5 * GET_MODE_SIZE (SImode)),
TYPE_MODE (sizetype),
GEN_INT (MEMORY_USE_RW), QImode);
GEN_INT (MEMORY_USE_RW),
TYPE_MODE (integer_type_node));
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3, f0_addr,
ptr_mode, GEN_INT (GET_MODE_SIZE (DFmode)),
TYPE_MODE (sizetype), GEN_INT (MEMORY_USE_RW), QImode);
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3, f1_addr,
ptr_mode, GEN_INT (GET_MODE_SIZE (DFmode)),
TYPE_MODE (sizetype), GEN_INT (MEMORY_USE_RW), QImode);
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3, r0_addr,
ptr_mode, GEN_INT (GET_MODE_SIZE (SImode)),
TYPE_MODE (sizetype), GEN_INT (MEMORY_USE_RW), QImode);
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3, r1_addr,
ptr_mode, GEN_INT (GET_MODE_SIZE (SImode)),
TYPE_MODE (sizetype), GEN_INT (MEMORY_USE_RW), QImode);
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3,
f0_addr, ptr_mode,
GEN_INT (GET_MODE_SIZE (DFmode)),
TYPE_MODE (sizetype),
GEN_INT (MEMORY_USE_RW),
TYPE_MODE (integer_type_node));
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3,
f1_addr, ptr_mode,
GEN_INT (GET_MODE_SIZE (DFmode)),
TYPE_MODE (sizetype),
GEN_INT (MEMORY_USE_RW),
TYPE_MODE (integer_type_node));
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3,
r0_addr, ptr_mode,
GEN_INT (GET_MODE_SIZE (SImode)),
TYPE_MODE (sizetype),
GEN_INT (MEMORY_USE_RW),
TYPE_MODE (integer_type_node));
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3,
r1_addr, ptr_mode,
GEN_INT (GET_MODE_SIZE (SImode)),
TYPE_MODE (sizetype),
GEN_INT (MEMORY_USE_RW),
TYPE_MODE (integer_type_node));
}
/* Return the address of the va_list constructor, but don't put it in a

View File

@@ -1,5 +1,5 @@
;;- Machine description for GNU compiler, Clipper Version
;; Copyright (C) 1987, 1988, 1991, 1993, 1994 Free Software Foundation, Inc.
;; Copyright (C) 1987, 88, 91, 93, 94, 1997 Free Software Foundation, Inc.
;; Contributed by Holger Teutsch (holger@hotbso.rhein-main.de)
;; This file is part of GNU CC.
@@ -532,8 +532,8 @@
operands[6] = addr0;
operands[7] = addr1;
operands[0] = gen_rtx (MEM, BLKmode, addr0);
operands[1] = gen_rtx (MEM, BLKmode, addr1);
operands[0] = change_address (operands[0], VOIDmode, addr0);
operands[1] = change_address (operands[1], VOIDmode, addr1);
if (GET_CODE (operands[2]) != CONST_INT)
operands[2] = force_reg (SImode, operands[2]);

View File

@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Clipper/Clix version.
Copyright (C) 1988, 1993, 1996 Free Software Foundation, Inc.
Copyright (C) 1988, 1993, 1996, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -31,6 +31,8 @@ Boston, MA 02111-1307, USA. */
#undef LIB_SPEC
#define TARGET_MEM_FUNCTIONS
#undef HAVE_ATEXIT
#define HAVE_ATEXIT

View File

@@ -27,13 +27,4 @@
/* isinf isn't there, but finite is. */
#define isinf(x) (!finite(x))
#define USG
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
#define bcmp(a,b,c) memcmp (a,b,c)
#define index strchr
#define rindex strrchr
#define TARGET_MEM_FUNCTIONS

View File

@@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for Convex.
Copyright (C) 1988, 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1988, 1993, 1994, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -19,6 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include <stdio.h>
#include "tree.h"
#include "rtl.h"
#include "regs.h"
@@ -31,9 +32,6 @@ Boston, MA 02111-1307, USA. */
#include "output.h"
#include "expr.h"
#undef NULL
#include <stdio.h>
/* Tables used in convex.h */
char regno_ok_for_index_p_base[1 + LAST_VIRTUAL_REGISTER + 1];

View File

@@ -1,5 +1,5 @@
# ld can make exe's c2-only if this lib is searched even though not loaded
CCLIBFLAGS = -tm c1
CCLIBFLAGS = -tm c1
# Use -pcc to avoid surprises.
CC = cc -pcc

View File

@@ -1,5 +1,5 @@
/* Configuration for GNU C-compiler for Convex.
Copyright (C) 1989, 1993 Free Software Foundation, Inc.
Copyright (C) 1989, 1993, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -42,11 +42,6 @@ Boston, MA 02111-1307, USA. */
#define P_tmpdir "/tmp/"
/* Use memcpy and memset -- either would work but these get inlined. */
#define bcopy(a,b,c) memcpy (b,a,c)
#define bzero(a,b) memset (a,0,b)
/* Convex uses Vax or IEEE floats.
Both formats have Vax semantics. */

View File

@@ -1,5 +1,5 @@
/* Subroutines for assembler code output on the DSP1610.
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
Contributed by Michael Collison (collison@world.std.com).
This file is part of GNU CC.
@@ -20,8 +20,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Some output-actions in dsp1600.md need these. */
#include <stdio.h>
#include "config.h"
#include <stdio.h>
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"

View File

@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. AT&T DSP1600.
Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
Contributed by Michael Collison (collison@world.std.com).
This file is part of GNU CC.
@@ -440,7 +440,7 @@ extern int target_flags;
/* 1 for registers that have pervasive standard uses
and are not available for the register allocator.
The registers are layed out as follows:
The registers are laid out as follows:
{a0,a0l,a1,a1l,x,y,yl,p,pl} - Data Arithmetic Unit
{r0,r1,r2,r3,j,k,ybase} - Y Space Address Arithmetic Unit
@@ -1652,7 +1652,7 @@ const_section () \
/* This is how to output an assembler line defining a `float' constant. */
#define ASM_OUTPUT_FLOAT(FILE,VALUE) asm_output_float (FILE, VALUE)
/* This is how to output and assembler line defininf a 'float' constant of
/* This is how to output an assembler line defining a 'float' constant of
size HFmode. */
#define ASM_OUTPUT_SHORT_FLOAT(FILE,VALUE) asm_output_float (FILE, VALUE)

View File

@@ -1,5 +1,5 @@
;;- Machine description for the AT&T DSP1600 for GNU C compiler
;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
;; Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
;; Contributed by Michael Collison (collison@world.std.com).
;; This file is part of GNU CC.
@@ -1136,8 +1136,8 @@
operands[5] = addr0;
operands[6] = addr1;
operands[0] = gen_rtx (MEM, BLKmode, addr0);
operands[1] = gen_rtx (MEM, BLKmode, addr1);
operands[0] = change_address (operands[0], VOIDmode, addr0);
operands[1] = change_address (operands[1], VOIDmode, addr1);
}")
(define_insn ""

View File

@@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for GNU compiler. Elxsi version.
Copyright (C) 1987, 1992 Free Software Foundation, Inc
Copyright (C) 1987, 1992, 1997 Free Software Foundation, Inc
This port, done by Mike Stump <mrs@cygnus.com> in 1988, and is the first
64 bit port of GNU CC.
Based upon the VAX port.
@@ -21,8 +21,8 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "config.h"
#include <stdio.h>
#include "rtl.h"
extern char *reg_names[];

96
gcc/config/float-i128.h Normal file
View File

@@ -0,0 +1,96 @@
/* float.h for target with IEEE 32, 64 and 128 bit floating point formats */
#ifndef _FLOAT_H_
#define _FLOAT_H_
/* Produced by enquire version 4.3, CWI, Amsterdam */
/* Radix of exponent representation */
#undef FLT_RADIX
#define FLT_RADIX 2
/* Number of base-FLT_RADIX digits in the significand of a float */
#undef FLT_MANT_DIG
#define FLT_MANT_DIG 24
/* Number of decimal digits of precision in a float */
#undef FLT_DIG
#define FLT_DIG 6
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
#undef FLT_ROUNDS
#define FLT_ROUNDS 1
/* Difference between 1.0 and the minimum float greater than 1.0 */
#undef FLT_EPSILON
#define FLT_EPSILON 1.19209290e-07F
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
#undef FLT_MIN_EXP
#define FLT_MIN_EXP (-125)
/* Minimum normalised float */
#undef FLT_MIN
#define FLT_MIN 1.17549435e-38F
/* Minimum int x such that 10**x is a normalised float */
#undef FLT_MIN_10_EXP
#define FLT_MIN_10_EXP (-37)
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
#undef FLT_MAX_EXP
#define FLT_MAX_EXP 128
/* Maximum float */
#undef FLT_MAX
#define FLT_MAX 3.40282347e+38F
/* Maximum int x such that 10**x is a representable float */
#undef FLT_MAX_10_EXP
#define FLT_MAX_10_EXP 38
/* Number of base-FLT_RADIX digits in the significand of a double */
#undef DBL_MANT_DIG
#define DBL_MANT_DIG 53
/* Number of decimal digits of precision in a double */
#undef DBL_DIG
#define DBL_DIG 15
/* Difference between 1.0 and the minimum double greater than 1.0 */
#undef DBL_EPSILON
#define DBL_EPSILON 2.2204460492503131e-16
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
#undef DBL_MIN_EXP
#define DBL_MIN_EXP (-1021)
/* Minimum normalised double */
#undef DBL_MIN
#define DBL_MIN 2.2250738585072014e-308
/* Minimum int x such that 10**x is a normalised double */
#undef DBL_MIN_10_EXP
#define DBL_MIN_10_EXP (-307)
/* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
#undef DBL_MAX_EXP
#define DBL_MAX_EXP 1024
/* Maximum double */
#undef DBL_MAX
#define DBL_MAX 1.7976931348623157e+308
/* Maximum int x such that 10**x is a representable double */
#undef DBL_MAX_10_EXP
#define DBL_MAX_10_EXP 308
/* Number of base-FLT_RADIX digits in the significand of a long double */
#undef LDBL_MANT_DIG
#define LDBL_MANT_DIG 113
/* Number of decimal digits of precision in a long double */
#undef LDBL_DIG
#define LDBL_DIG 33
/* Difference between 1.0 and the minimum long double greater than 1.0 */
#undef LDBL_EPSILON
#define LDBL_EPSILON 1.925929944387235853055977942584927319E-34L
/* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
#undef LDBL_MIN_EXP
#define LDBL_MIN_EXP (-16381)
/* Minimum normalised long double */
#undef LDBL_MIN
#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
/* Minimum int x such that 10**x is a normalised long double */
#undef LDBL_MIN_10_EXP
#define LDBL_MIN_10_EXP (-4931)
/* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
#undef LDBL_MAX_EXP
#define LDBL_MAX_EXP 16384
/* Maximum long double */
#undef LDBL_MAX
#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
/* Maximum int x such that 10**x is a representable long double */
#undef LDBL_MAX_10_EXP
#define LDBL_MAX_10_EXP 4932
#endif /* _FLOAT_H_ */

View File

@@ -241,7 +241,7 @@ typedef unsigned int UDItype __attribute__ ((mode (DI)));
/* numeric parameters */
/* F_D_BITOFF is the number of bits offset between the MSB of the mantissa
of a float and of a double. Assumes there are only two float types.
(double::FRAC_BITS+double::NGARGS-(float::FRAC_BITS-float::NGARDS))
(double::FRAC_BITS+double::NGARDS-(float::FRAC_BITS-float::NGARDS))
*/
#define F_D_BITOFF (52+8-(23+7))
@@ -456,7 +456,7 @@ pack_d ( fp_number_type * src)
}
/* We previously used bitfields to store the number, but this doesn't
handle little/big endian systems conviently, so use shifts and
handle little/big endian systems conveniently, so use shifts and
masks */
#ifdef FLOAT_BIT_ORDER_MISMATCH
dst.bits.fraction = fraction;
@@ -483,7 +483,7 @@ static void
unpack_d (FLO_union_type * src, fp_number_type * dst)
{
/* We previously used bitfields to store the number, but this doesn't
handle little/big endian systems conviently, so use shifts and
handle little/big endian systems conveniently, so use shifts and
masks */
fractype fraction;
int exp;

View File

@@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for Alliant FX computers.
Copyright (C) 1989,1991 Free Software Foundation, Inc.
Copyright (C) 1989, 1991, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA. */
/* Some output-actions in alliant.md need these. */
#include <stdio.h>
#include "config.h"
#include <stdio.h>
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"

View File

@@ -2,7 +2,7 @@
Ported by Masanobu Yuhara, Fujitsu Laboratories LTD.
(yuhara@flab.fujitsu.co.jp)
Copyright (C) 1990, 1991 Free Software Foundation, Inc.
Copyright (C) 1990, 1991, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -25,8 +25,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "config.h"
#include <stdio.h>
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"

Some files were not shown because too many files have changed in this diff Show More