+Mon May 5 14:11:46 1997 Mike Meissner <meissner@cygnus.com>
+
+ * gen-engine.c (engine_switch_leaf): Remove extra %s.
+ (print_engine_floating_point_unavailable): Wrap in #ifdef
+ UNUSED/#endif, until somebody uses it.
+
+ * gen-idecode.c (error_leaf_contains_multiple_insn): Remove unused
+ variable.
+ (print_jump_until_stop_body): Wrap in #ifdef UNUSED/#endif, until
+ somebody uses it.
+ (print_idecode_validate): Use long formats to print long values.
+
+ * gen-semantics.c (print_idecode_invalid): Set name to "unknown"
+ if we get an unexpected type.
+
+Fri May 2 13:28:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * igen.c (print_itrace): Pass SD as well as CPU to calls to
+ trace_printf.
+
+ * gen-support.c (gen_support_h): Always pass sim_cia cia to
+ support functions.
+ (print_support_function_name): Ditto.
+
Wed Apr 30 17:35:51 1997 Andrew Cagney <cagney@b1.cygnus.com>
* gen-support.c (support_c_function): Remove unnecessary memset of
error_leaf_contains_multiple_insn(insn_table *entry)
{
insn *i;
- insn *first;
ASSERT(entry->opcode == NULL && entry->nr_insn > 1);
for (i = entry->insns; i != NULL; i = i->next) {
fprintf(stderr, "%s:%d: %s %s\n",
{
lf_printf(file, "{\n");
lf_indent(file, +2);
- lf_printf(file, "instruction_address nia;\n");
+ lf_printf(file, "%sinstruction_address nia;\n", global_name_prefix);
if (!(code & generate_with_icache)) {
print_idecode_body(file, table, "nia =");;
}
}
}
-
static void
print_jump_internal_function(insn_table *table,
lf *file,
}
}
+#ifdef UNUSED
static void
print_jump_until_stop_body(lf *file,
insn_table *table,
lf_indent(file, -2);
lf_printf(file, "}\n");
}
-
+#endif
/****************************************************************/
instruction->file_entry->fields[insn_format]);
lf_printf(file, "if (WITH_RESERVED_BITS\n");
if (insn_bit_size > 32) {
- lf_printf(file, " && (instruction & 0x%08x%08xLL) != 0x%08x%08xLL) {\n",
+ lf_printf(file, " && (instruction & 0x%08lx%08lxLL) != 0x%08lx%08lxLL) {\n",
(unsigned long)(check_mask >> 32),
(unsigned long)(check_mask),
(unsigned long)(check_val >> 32),
(unsigned long)(check_val));
}
else {
- lf_printf(file, " && (instruction & 0x%08x) != 0x%08x) {\n",
+ lf_printf(file, " && (instruction & 0x%08lx) != 0x%08lx) {\n",
(unsigned long)(check_mask),
(unsigned long)(check_val));
}
{
lf_printf(file, "typedef unsigned%d %sinstruction_word;\n",
insn_bit_size, global_name_prefix);
+
if ((code & generate_with_semantic_delayed_branch))
{
- lf_printf (file, "typedef struct _instruction_address {\n");
+ lf_printf (file, "typedef struct _%sinstruction_address {\n",
+ global_name_prefix);
lf_printf (file, " address_word ip; /* instruction pointer */\n");
lf_printf (file, " address_word dp; /* delayed-slot pointer */\n");
- lf_printf (file, "} instruction_address;\n");
+ lf_printf (file, "} %sinstruction_address;\n", global_name_prefix);
}
else
{
- lf_printf (file, "typedef address_word instruction_address;\n");
+ lf_printf (file, "typedef address_word %sinstruction_address;\n",
+ global_name_prefix);
+
}
lf_printf(file, "\n");
print_icache_struct(table, cache_rules, file);
{
const char *name;
switch (type) {
+ default: name = "unknown"; break;
case invalid_illegal: name = "illegal"; break;
case invalid_fp_unavailable: name = "fp_unavailable"; break;
case invalid_wrong_slot: name = "wrong_slot"; break;
lf_printf(file, "nia = -1;\n");
else if ((code & generate_with_semantic_delayed_branch)) {
lf_printf(file, "nia.ip = cia.dp; /* instruction pointer */\n");
- lf_printf(file, "nia.dp = cia.dp + %d; /* delayed-slot pointer\n",
+ lf_printf(file, "nia.dp = cia.dp + %d; /* delayed-slot pointer */\n",
insn_bit_size / 8);
}
else
else {
/* abort so it is implemented now */
table_entry_print_cpp_line_nr(file, instruction->file_entry);
- lf_printf(file, "engine_error(system, \"%s:%d:0x%%08lx:%%s unimplemented\\n\",\n",
+ lf_printf(file, "engine_error (SD, CPU, cia, \"%s:%d:0x%%08lx:%%s unimplemented\\n\",\n",
filter_filename(instruction->file_entry->file_name),
instruction->file_entry->line_nr);
- lf_printf(file, " (long)cia, itable[MY_INDEX].name);\n");
+ if ((code & generate_with_semantic_delayed_branch))
+ lf_printf(file, " (long)cia.ip,\n");
+ else
+ lf_printf(file, " (long)cia,\n");
+ lf_printf(file, " itable[MY_INDEX].name);\n");
lf_print__internal_reference(file);
}
? get_values_from_icache
: do_not_use_icache));
- lf_printf(file, "instruction_address nia;\n");
+ lf_printf(file, "%sinstruction_address nia;\n", global_name_prefix);
print_semantic_body(file,
instruction,
expanded_bits,