+Fri Feb 18 20:08:57 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * bitmap.c (bitmap_operation): Avoid using -1 for index since unsigned.
+ * cppinit.c (new_pending_define): Add cast to avoid warning.
+ * expmed.c (extract_bit_field): Likewise.
+ * flow.c (enum reorder_skip_type): New type.
+ (skip_insns_between_blcok): New it.
+ Rework to avoid warning about possibly undefined variable.
+ * function.c (assign_parms): Make thisparm_boundary unsigned.
+ * genrecog.c (write_switch): Cast XWINT result to int.
+ * lcm.c: Many static fcns and vars now #ifdef OPTIMIZE_MODE_SWITCHING.
+ * mips-tfile.c (init_file): Make two versions of FDR intializer:
+ one for MIPS and one for Alpha.
+ (get_tag, copy_object): Add casts to avoid warnings.
+ * optabs.c (init_one_libfunc): Cast NAME to (char *).
+ * reload.c (find_reloads): Make TYPE enum reload_type.
+ * sbitmap.c (dump_sbitmap): J is unsigned; don't use "1L".
+ * unroll.c (unroll_loop): Initialize UNROLL_NUMBER.
+ * varasm.c (compare_constant_1): Add cast to avoid warning.
+ * config/alpha/alpha.c (alpha_emit_xfloating_libcall): Cast FUNC
+ to (char *).
+ (alpha_expand_unaligned_load, alpha_expand_unaligned_store):
+ Cast switch operand of size to int.
+ (alpha_expand_epilogue): Always initialize fp_offset and sa_reg.
+ * config/alpha/alpha.h (INITIAL_ELIMINATION_OFFSET): Add abort
+ in unhandled case.
+
2000-02-18 Nick Clifton <nickc@cygnus.com>
* config/arm/elf.h (ASM_OUTPUT_ALIGN): Do not generate
bitmap from2;
enum bitmap_bits operation;
{
+#define HIGHEST_INDEX (unsigned int) ~0
+
bitmap_element *from1_ptr = from1->first;
bitmap_element *from2_ptr = from2->first;
- unsigned int indx1 = (from1_ptr) ? from1_ptr->indx : -1;
- unsigned int indx2 = (from2_ptr) ? from2_ptr->indx : -1;
+ unsigned int indx1 = (from1_ptr) ? from1_ptr->indx : HIGHEST_INDEX;
+ unsigned int indx2 = (from2_ptr) ? from2_ptr->indx : HIGHEST_INDEX;
bitmap_element *to_ptr = to->first;
bitmap_element *from1_tmp;
bitmap_element *from2_tmp;
from1_tmp = from1_ptr;
from2_tmp = from2_ptr;
from1_ptr = from1_ptr->next;
- indx1 = (from1_ptr) ? from1_ptr->indx : -1;
+ indx1 = (from1_ptr) ? from1_ptr->indx : HIGHEST_INDEX;
from2_ptr = from2_ptr->next;
- indx2 = (from2_ptr) ? from2_ptr->indx : -1;
+ indx2 = (from2_ptr) ? from2_ptr->indx : HIGHEST_INDEX;
}
else if (indx1 < indx2)
{
from1_tmp = from1_ptr;
from2_tmp = &bitmap_zero;
from1_ptr = from1_ptr->next;
- indx1 = (from1_ptr) ? from1_ptr->indx : -1;
+ indx1 = (from1_ptr) ? from1_ptr->indx : HIGHEST_INDEX;
}
else
{
from1_tmp = &bitmap_zero;
from2_tmp = from2_ptr;
from2_ptr = from2_ptr->next;
- indx2 = (from2_ptr) ? from2_ptr->indx : -1;
+ indx2 = (from2_ptr) ? from2_ptr->indx : HIGHEST_INDEX;
}
/* Find the appropriate element from TO. Begin by discarding
abort ();
}
- tmp = gen_rtx_MEM (QImode, gen_rtx_SYMBOL_REF (Pmode, func));
+ tmp = gen_rtx_MEM (QImode, gen_rtx_SYMBOL_REF (Pmode, (char *) func));
tmp = emit_call_insn (gen_call_value (reg, tmp, const0_rtx,
const0_rtx, const0_rtx));
CALL_INSN_FUNCTION_USAGE (tmp) = usage;
{
emit_move_insn (addr, plus_constant (XEXP (mem, 0), ofs));
emit_insn (gen_extxl (extl, meml, GEN_INT (size*8), addr));
- switch (size)
+ switch ((int) size)
{
case 2:
emit_insn (gen_extwh (exth, memh, addr));
emit_insn (gen_insxh (insh, gen_lowpart (DImode, src),
GEN_INT (size*8), addr));
- switch (size)
+ switch ((int) size)
{
case 2:
emit_insn (gen_inswl (insl, gen_lowpart (HImode, src), addr));
emit_insn (gen_mskxh (dsth, dsth, GEN_INT (size*8), addr));
- switch (size)
+ switch ((int) size)
{
case 2:
emit_insn (gen_mskxl (dstl, dstl, GEN_INT (0xffff), addr));
fp_is_frame_pointer = ((TARGET_OPEN_VMS && vms_is_stack_procedure)
|| (!TARGET_OPEN_VMS && frame_pointer_needed));
+ fp_offset = 0;
+ sa_reg = stack_pointer_rtx;
eh_ofs = cfun->machine->eh_epilogue_sp_ofs;
if (sa_size)
}
/* Cope with very large offsets to the register save area. */
- sa_reg = stack_pointer_rtx;
if (reg_offset + sa_size > 0x8000)
{
int low = ((reg_offset & 0xffff) ^ 0x8000) - 0x8000;
+ (ALPHA_ROUND (get_frame_size () \
+ current_function_pretend_args_size) \
- current_function_pretend_args_size)); \
+ else \
+ abort (); \
}
/* Define this if stack space is still allocated for a parameter passed
struct pending_option *o = (struct pending_option *)
xmalloc (sizeof (struct pending_option));
- o->arg = text;
+ o->arg = (char *) text;
o->next = NULL;
o->undef = 0;
APPEND (opts->pending, define, o);
/* Handle one command-line option in (argc, argv).
Can be called multiple times, to handle multiple sets of options.
Returns number of strings consumed. */
+
int
cpp_handle_option (pfile, argc, argv)
cpp_reader *pfile;
if (bestmode == VOIDmode
|| (SLOW_UNALIGNED_ACCESS (bestmode, align)
- && GET_MODE_SIZE (bestmode) > align))
+ && GET_MODE_SIZE (bestmode) > (int) align))
goto extzv_loses;
/* Compute offset as multiple of this unit,
static int reorder_index;
static basic_block reorder_last_visited;
-#define REORDER_SKIP_BEFORE 0x1
-#define REORDER_SKIP_AFTER 0x2
-#define REORDER_SKIP_BLOCK_END 0x3
+enum reorder_skip_type {REORDER_SKIP_BEFORE, REORDER_SKIP_AFTER,
+ REORDER_SKIP_BLOCK_END};
/* Skip over insns BEFORE or AFTER BB which are typically associated with
basic block BB. */
static rtx
skip_insns_between_block (bb, skip_type)
basic_block bb;
- int skip_type;
+ enum reorder_skip_type skip_type;
{
rtx insn, last_insn;
{
if (bb == ENTRY_BLOCK_PTR)
return 0;
+
last_insn = bb->head;
for (insn = PREV_INSN (bb->head);
insn && insn != BASIC_BLOCK (bb->index - 1)->end;
{
if (NEXT_INSN (insn) != last_insn)
break;
+
if (GET_CODE (insn) == NOTE
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_END
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK
break;
}
}
- else if (skip_type == REORDER_SKIP_AFTER
- || skip_type == REORDER_SKIP_BLOCK_END)
+
+ else
{
last_insn = bb->end;
&& (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)))
continue;
+
if (GET_CODE (insn) == CODE_LABEL
&& GET_CODE (NEXT_INSN (insn)) == JUMP_INSN
&& (GET_CODE (PATTERN (NEXT_INSN (insn))) == ADDR_VEC
}
break;
}
- }
- if (skip_type == REORDER_SKIP_BLOCK_END)
- {
- int found_block_end = 0;
- for (; insn; last_insn = insn, insn = NEXT_INSN (insn))
+ if (skip_type == REORDER_SKIP_BLOCK_END)
{
- if (bb->index + 1 != n_basic_blocks
- && insn == BASIC_BLOCK (bb->index + 1)->head)
- break;
+ int found_block_end = 0;
- if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)
+ for (; insn; last_insn = insn, insn = NEXT_INSN (insn))
{
- found_block_end = 1;
- continue;
+ if (bb->index + 1 != n_basic_blocks
+ && insn == BASIC_BLOCK (bb->index + 1)->head)
+ break;
+
+ if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)
+ {
+ found_block_end = 1;
+ continue;
+ }
+
+ if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED)
+ continue;
+
+ if (GET_CODE (insn) == NOTE
+ && NOTE_LINE_NUMBER (insn) >= 0
+ && NEXT_INSN (insn)
+ && (NOTE_LINE_NUMBER (NEXT_INSN (insn))
+ == NOTE_INSN_BLOCK_END))
+ continue;
+ break;
}
- if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED)
- continue;
- if (GET_CODE (insn) == NOTE
- && NOTE_LINE_NUMBER (insn) >= 0
- && NEXT_INSN (insn)
- && NOTE_LINE_NUMBER (NEXT_INSN (insn)) == NOTE_INSN_BLOCK_END)
- continue;
- break;
+
+ if (! found_block_end)
+ last_insn = 0;
}
- if (! found_block_end)
- last_insn = 0;
}
+
return last_insn;
}
for its ultimate type, don't use that slot after entry.
We'll make another stack slot, if we need one. */
{
- int thisparm_boundary
+ unsigned int thisparm_boundary
= FUNCTION_ARG_BOUNDARY (promoted_mode, passed_type);
if (GET_MODE_ALIGNMENT (nominal_mode) > thisparm_boundary)
switch (type)
{
case DT_mode:
- printf("GET_MODE (x%d)", depth);
+ printf ("GET_MODE (x%d)", depth);
break;
case DT_veclen:
- printf("XVECLEN (x%d, 0)", depth);
+ printf ("XVECLEN (x%d, 0)", depth);
break;
case DT_elt_zero_int:
- printf("XINT (x%d, 0)", depth);
+ printf ("XINT (x%d, 0)", depth);
break;
case DT_elt_one_int:
- printf("XINT (x%d, 1)", depth);
+ printf ("XINT (x%d, 1)", depth);
break;
case DT_elt_zero_wide:
- printf("XWINT (x%d, 0)", depth);
+ /* Convert result of XWINT to int for portability since some C
+ compilers won't do it and some will. */
+ printf ("(int) XWINT (x%d, 0)", depth);
break;
default:
abort ();
/* These bitmaps are used for the LCM algorithm. */
+#ifdef OPTIMIZE_MODE_SWITCHING
static sbitmap *antic;
static sbitmap *transp;
static sbitmap *comp;
static struct seginfo * new_seginfo PARAMS ((int, rtx, int, HARD_REG_SET));;
static void add_seginfo PARAMS ((struct bb_info *, struct seginfo *));
-static void make_preds_opaque PARAMS ((basic_block, int));
static void reg_dies PARAMS ((rtx, HARD_REG_SET));
static void reg_becomes_live PARAMS ((rtx, rtx, void *));
+static void make_preds_opaque PARAMS ((basic_block, int));
+#endif
+\f
+#ifdef OPTIMIZE_MODE_SWITCHING
/* This function will allocate a new BBINFO structure, initialized
with the FP_MODE, INSN, and basic block BB parameters. */
+
static struct seginfo *
new_seginfo (mode, insn, bb, regs_live)
int mode;
/* Add a seginfo element to the end of a list.
HEAD is a pointer to the list beginning.
INFO is the structure to be linked in. */
+
static void
add_seginfo (head, info)
struct bb_info *head;
denotes that a mode set is to be done on that edge.
J is the bit number in the bitmaps that corresponds to the entity that
we are currently handling mode-switching for. */
+
static void
make_preds_opaque (b, j)
basic_block b;
}
/* Record in LIVE that register REG died. */
+
static void
reg_dies (reg, live)
rtx reg;
/* Record in LIVE that register REG became live.
This is called via note_stores. */
+
static void
reg_becomes_live (reg, setter, live)
rtx reg;
SET_HARD_REG_BIT (* (HARD_REG_SET *) live, regno);
}
}
+#endif
/* Find all insns that need a particular mode
setting, and insert the necessary mode switches. */
static efdr_t init_file =
{
{ /* FDR structure */
+#ifdef __alpha
+ 0, /* adr: memory address of beginning of file */
+ 0, /* cbLineOffset: byte offset from header for this file ln's */
+ 0, /* cbLine: size of lines for this file */
+ 0, /* cbSs: number of bytes in the ss */
+ 0, /* rss: file name (of source, if known) */
+ 0, /* issBase: file's string space */
+ 0, /* isymBase: beginning of symbols */
+ 0, /* csym: count file's of symbols */
+ 0, /* ilineBase: file's line symbols */
+ 0, /* cline: count of file's line symbols */
+ 0, /* ioptBase: file's optimization entries */
+ 0, /* copt: count of file's optimization entries */
+ 0, /* ipdFirst: start of procedures for this file */
+ 0, /* cpd: count of procedures for this file */
+ 0, /* iauxBase: file's auxiliary entries */
+ 0, /* caux: count of file's auxiliary entries */
+ 0, /* rfdBase: index into the file indirect table */
+ 0, /* crfd: count file indirect entries */
+ langC, /* lang: language for this file */
+ 1, /* fMerge: whether this file can be merged */
+ 0, /* fReadin: true if read in (not just created) */
+#ifdef HOST_WORDS_BIG_ENDIAN
+ 1, /* fBigendian: if 1, compiled on big endian machine */
+#else
+ 0, /* fBigendian: if 1, compiled on big endian machine */
+#endif
+ 0, /* fTrim: whether the symbol table was trimmed */
+ GLEVEL_2, /* glevel: level this file was compiled with */
+ 0, /* reserved: reserved for future use */
+#else
0, /* adr: memory address of beginning of file */
0, /* rss: file name (of source, if known) */
0, /* issBase: file's string space */
0, /* reserved: reserved for future use */
0, /* cbLineOffset: byte offset from header for this file ln's */
0, /* cbLine: size of lines for this file */
+#endif
},
(FDR *) 0, /* orig_fdr: original file header pointer */
tag_ptr->same_name = hash_ptr->tag_ptr;
tag_ptr->basic_type = basic_type;
tag_ptr->indx = indx;
- tag_ptr->ifd = (indx == indexNil) ? -1 : cur_file_ptr->file_index;
+ tag_ptr->ifd = (indx == indexNil
+ ? (symint_t) -1 : cur_file_ptr->file_index);
tag_ptr->same_block = cur_tag_head->first_tag;
cur_tag_head->first_tag = tag_ptr;
(st_t) eptr->asym.st,
(sc_t) eptr->asym.sc,
eptr->asym.value,
- (symint_t) ((eptr->asym.index == indexNil) ? indexNil : 0),
- ((long) ifd < orig_sym_hdr.ifdMax) ? remap_file_number[ ifd ] : ifd);
+ (eptr->asym.index == indexNil
+ ? (symint_t) indexNil : 0),
+ ((long) ifd < orig_sym_hdr.ifdMax
+ ? remap_file_number[ifd] : (int) ifd));
}
remaining > 0;
remaining -= num_write)
{
- num_write =
- (remaining <= (int) sizeof (buffer)) ? remaining : sizeof (buffer);
+ num_write
+ = (remaining <= (int) sizeof (buffer))
+ ? remaining : (int) sizeof (buffer);
sys_read = fread ((PTR_T) buffer, 1, num_write, obj_in_stream);
if (sys_read <= 0)
pfatal_with_name (obj_in_name);
{
if (ggc_p)
name = ggc_alloc_string (name, -1);
- return gen_rtx_SYMBOL_REF (Pmode, name);
+
+ return gen_rtx_SYMBOL_REF (Pmode, (char *) name);
}
/* Mark ARG (which is really an OPTAB *) for GC. */
{
for (i = 0; i < n_reloads; i++)
{
- int first_num, type;
+ int first_num;
+ enum reload_type type;
switch (rld[i].when_needed)
{
last call to set_initial_elim_offsets. This is used to catch cases
where something illegal happened during reload_as_needed that could
cause incorrect code to be generated if we did not check for it. */
+
static void
verify_initial_elim_offsets ()
{
FILE *file;
sbitmap bmap;
{
- int i,j,n;
+ int i, n;
+ unsigned int j;
int set_size = bmap->size;
int total_bits = bmap->n_bits;
{
if (n != 0 && n % 10 == 0)
fprintf (file, " ");
- fprintf (file, "%d", (bmap->elms[i] & (1L << j)) != 0);
+ fprintf (file, "%d",
+ (bmap->elms[i] & ((SBITMAP_ELT_TYPE) 1 << j)) != 0);
}
}
fprintf (file, "\n");
{
int i, j;
unsigned HOST_WIDE_INT temp;
- int unroll_number;
+ int unroll_number = 1;
rtx copy_start, copy_end;
rtx insn, sequence, pattern, tem;
int max_labelno, max_insnno;
if (flag_writable_strings)
return 0;
- if (*p++ != TYPE_MODE (TREE_TYPE (exp)))
+ if ((enum machine_mode) *p++ != TYPE_MODE (TREE_TYPE (exp)))
return 0;
strp = TREE_STRING_POINTER (exp);