aboutsummaryrefslogtreecommitdiff
path: root/sim/igen/igen.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-04-22 17:46:07 +0000
committerAndrew Cagney <cagney@redhat.com>1997-04-22 17:46:07 +0000
commit15c1649391b66df7e721377daa248721ab3e58eb (patch)
treecbc9fca2a3287bf2882499101225fd5213f44ad4 /sim/igen/igen.c
parent81f464815db9a9fc4209c7eb6eb7ea341b78b76e (diff)
downloadgdb-15c1649391b66df7e721377daa248721ab3e58eb.zip
gdb-15c1649391b66df7e721377daa248721ab3e58eb.tar.gz
gdb-15c1649391b66df7e721377daa248721ab3e58eb.tar.bz2
TIc80 simulator checkpoint - runs 3 instructions - trap, addu, br.a.
Diffstat (limited to 'sim/igen/igen.c')
-rw-r--r--sim/igen/igen.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sim/igen/igen.c b/sim/igen/igen.c
index d7a0b94..2590dc5 100644
--- a/sim/igen/igen.c
+++ b/sim/igen/igen.c
@@ -64,13 +64,13 @@ print_semantic_function_formal(lf *file)
{
int nr;
if ((code & generate_with_icache))
- nr = lf_printf(file, "SIM_DESC sd,\n %sidecode_cache *cache_entry,\n address_word cia",
+ nr = lf_printf(file, "SIM_DESC sd,\n %sidecode_cache *cache_entry,\n instruction_address cia",
global_name_prefix);
else if (generate_smp)
- nr = lf_printf(file, "sim_cpu *cpu,\n %sinstruction_word instruction,\n address_word cia",
+ nr = lf_printf(file, "sim_cpu *cpu,\n %sinstruction_word instruction,\n instruction_address cia",
global_name_prefix);
else
- nr = lf_printf(file, "SIM_DESC sd,\n %sinstruction_word instruction,\n address_word cia",
+ nr = lf_printf(file, "SIM_DESC sd,\n %sinstruction_word instruction,\n instruction_address cia",
global_name_prefix);
return nr;
}
@@ -92,7 +92,7 @@ int
print_semantic_function_type(lf *file)
{
int nr;
- nr = lf_printf(file, "address_word");
+ nr = lf_printf(file, "instruction_address");
return nr;
}
@@ -108,7 +108,7 @@ print_icache_function_formal(lf *file)
else
nr += lf_printf(file, "SIM_DESC sd,\n");
nr += lf_printf(file, " %sinstruction_word instruction,\n", global_name_prefix);
- nr += lf_printf(file, " address_word cia,\n");
+ nr += lf_printf(file, " instruction_address cia,\n");
nr += lf_printf(file, " %sidecode_cache *cache_entry", global_name_prefix);
return nr;
}
@@ -257,7 +257,7 @@ print_itrace(lf *file,
lf_printf(file, " \"%s:%d:0x%%08lx:%%s\\n\", %s, %s);\n",
filter_filename(file_entry->file_name),
file_entry->line_nr,
- "(long)cia",
+ ((code & generate_with_semantic_delayed_branch) ? "(long)cia.ip" : "(long)cia"),
"itable[MY_INDEX].name");
lf_printf(file, "}\n");
lf_indent_suppress(file);
@@ -450,6 +450,7 @@ main(int argc,
printf(" semantic-icache - include semantic code in cracking functions\n");
printf(" insn-in-icache - save original instruction when cracking\n");
printf(" default-nia-minus-one - instead of cia + insn-size\n");
+ printf(" delayed-branch - instead of cia + insn-size\n");
printf(" conditional-issue - conditionally issue each instruction\n");
printf(" validate-slot - perform slot verification as part of decode\n");
printf("\n");
@@ -548,6 +549,11 @@ main(int argc,
}
else if (strcmp(optarg, "default-nia-minus-one") == 0) {
code |= generate_with_semantic_returning_modified_nia_only;
+ code &= ~generate_with_semantic_delayed_branch;
+ }
+ else if (strcmp(optarg, "delayed-branch") == 0) {
+ code |= generate_with_semantic_delayed_branch;
+ code &= ~generate_with_semantic_returning_modified_nia_only;
}
else if (strcmp(optarg, "conditional-issue") == 0) {
code |= generate_with_semantic_conditional_issue;