(force_to_mode, case PLUS): Sign extend masks that are negative in OP_MODE.
(simplify_and_const_int): Sign-extend constants when they have the
most significant bit set for the target.
(merge_outer_ops): Likewise.
(simplify_shift_const): Likewise.
Richard Kenner [Mon, 3 Apr 1995 22:12:50 +0000 (18:12 -0400)]
(clear_storage, expand_assignment, store_{expr,constructor}): Use ptr_mode instead of Pmode in some places.
(clear_storage, expand_assignment, store_{expr,constructor}): Use ptr_mode
instead of Pmode in some places.
(expand_expr, expand_builtin): Likewise.
(push_block, store_expr): Convert size to Pmode.
(expand_expr, case ADDR_EXPR): Convert from Pmode to ptr_mode.
Richard Kenner [Mon, 3 Apr 1995 22:12:15 +0000 (18:12 -0400)]
(convert_memory_address): New function.
(memory_address): Call if it needed.
(promote_mode, case POINTER_TYPE): Use Pmode and pointer extension.
(allocate_dynamic_stack_space): Convert size from ptr_mode.
Richard Kenner [Sat, 1 Apr 1995 12:02:06 +0000 (07:02 -0500)]
General code cleanup.
Add prototypes for static functions.
Remove unnecessary casts to (char *); add casts to (U_CHAR *).
Add parentheses suggested by `gcc -Wparentheses'.
Rename local variables as suggested by `gcc -Wshadow'.
<fcntl.h>, <stdlib.h>, <string.h>, <unistd.h>: New includes.
<sys/time.h>, <sys/resource.h>: Include only if defined(RLIMIT_STACK).
<time.h>: Include, unless <sys/time.h> already does.
(HAVE_FCNTL_H, HAVE_STDLIB_H, HAVE_SYS_TIME_H): New symbols.
(HAVE_UNISTD_H, STDC_HEADERS, TIME_WITH_SYS_TIME): Likewise.
(__attribute__, PROTO, VA_START, PRINTF_ALIST, PRINTF_DCL): New macros.
(PRINTF_PROTO{,_1,_2,_3}, DO_PROTO): Likewise.
(bcopy, bzero, bcmp): If #defined by configuration file, use that.
If STDC_HEADERS is defined, use standard C functions.
If BSTRING is defined, or USG and VMS are not defined, use
the C library. Otherwise, use my_bcopy, my_bzero, my_bcmp.
(localtime): Remove no-longer-necessary explicit declaration.
(getenv, index, rindex): Don't declare explicitly if the appropriate system
eader should declare it.
(fdopen): Remove no-longer-used declaration.
(vprintf): Define a subsitute macro if !defined(HAVE_VPRINTF).
(main): Replace `fdopen (dup (fileno (stdout)), "w"))' with `stdout'.
(get_lintcmd, rescan, create_definition): Use bcmp instead of strncmp when both
operands are known to be free of null bytes.
(check_macro_name, compare_defs, collect_expansion): Likewise.
(do_assert, compare_token_lists, assertion_lookup, do_line): Likewise.
(skip_if_group, lookup): Likewise.
(rescan): Remove unused label `startagain'.
Abort instead of printing nonsense if the stack is corrupted when there was an
unterminated successful conditional.
(pcfinclude): Include explicit double-cast through GENERICPTR to identify
particularly egregious type puns.
(create_definition, do_define, check_macro_name): Use %.*s printf format to
avoid painful copying-and-casting.
(do_once): Return void, not (unused) int.
(do_ident, do_pragma, do_sccs): Accept extra arguments so that all
directive-handler's types match.
(do_sccs): Define only if SCCS_DIRECTIVE is defined.
(skip_if_group, dump_single_macro): Add `default: break;' to keep -Wswitch
happy.
(error, warning, error_with_line, vwarning_with_line, pedwarn): Use
stdarg/vararg/vfprintf instead of passing bogus char * args around.
(pedwarn_with_line, pedwarn_with_file_and_line, fatal): Likewise.
(verror, vwarning, verror_with_line, vwarning_with_line): New fcns.
(dump_single_macro): Abort if ap points to garbage.
(make_definition, make_undef, make_assertion): Parameter now char *.
(xmalloc, xrealloc, xcalloc, savestring, index0): Make sizes size_t
instead of unsigned; make pointer parameters GENERICPTR, not char *.
(xcalloc): Use bzero to clear memory instead of using own loop.
Jim Wilson [Thu, 30 Mar 1995 23:14:37 +0000 (15:14 -0800)]
(allocate_dynamic_stack_space): Test STACK_BOUNDARY against BIGGEST_ALIGNMENT at run time instead of at compile time.
(allocate_dynamic_stack_space): Test STACK_BOUNDARY against
BIGGEST_ALIGNMENT at run time instead of at compile time. Give
MUST_ALIGN macro a value, and test this value in if statements.
Richard Kenner [Thu, 30 Mar 1995 13:58:33 +0000 (08:58 -0500)]
Now have 27 shift/reduce conflicts.
(attribute_list): Just make chain of all attributes.
(attrib): Consistently put name as PURPOSE, args, if any, as VALUE.
(structsp): Allow attributes on any struct or union.
Richard Kenner [Thu, 30 Mar 1995 12:27:50 +0000 (07:27 -0500)]
(handle_directive, do_line, skip_if_group): Use the phrase `preprocessing directive' consistently.
(handle_directive, do_line, skip_if_group): Use the phrase `preprocessing
directive' consistently.
(output_line_directive): Renamed from output_line_command.
(no_line_directives): Renamed from no_line_commands.
(main): Put it here after last use of gcc_exec_prefix. For cross
compiler, set startfile_prefixes if gcc_exec_prefix is set and
standard_startfile_prefix is a relative path.
Jim Wilson [Wed, 29 Mar 1995 22:44:35 +0000 (14:44 -0800)]
(function_prologue): Put SDB_DEBUGGING_INFO ifdef around code for SDB_DEBUG support.
(function_prologue): Put SDB_DEBUGGING_INFO ifdef around
code for SDB_DEBUG support.
(mips_select_rtx_section, mips_select_section): Change rdata_section
to READONLY_DATA_SECTION and sdata_section to SMALL_DATA_SECTION.
Doug Evans [Thu, 23 Mar 1995 02:41:36 +0000 (02:41 +0000)]
i960.c (i960_function_arg_advance): Ensure all regs marked as used if stack is also used (for va_start).
* i960/i960.c (i960_function_arg_advance): Ensure all regs marked
as used if stack is also used (for va_start).
(i960_setup_incoming_varargs): Rewrite to be similar to Intel's
version, but don't allocate reg block unless necessary.
Jim Wilson [Wed, 22 Mar 1995 22:57:33 +0000 (14:57 -0800)]
(udivsi3): Don't clobber register 6.
(udivsi3, divsi3, mulsi3_call): Use a pseudo-reg with regclass 'z'
for output rather than hard register 0.
(block_move_real): Don't clobber registers 4 and 5.
Per Bothner [Tue, 21 Mar 1995 02:44:26 +0000 (18:44 -0800)]
(print_error_function): New function hook.
(default_print_error_function): New function. Default value
of print_error_function. Code moved here from report_error_function.
(report_error_function): Use print_error_function hook.