summaryrefslogtreecommitdiff
path: root/sim/frv/decode.c
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2003-09-12 22:05:22 +0000
committerDave Brolley <brolley@redhat.com>2003-09-12 22:05:22 +0000
commit9d3602fded5d6afb5a925d1e5b1835527f759077 (patch)
tree3bd170f6b50c662c29d4b6f4b8a09d262592b9ac /sim/frv/decode.c
parent5b2aee4c1bdf66e2b2c2f3ae524cae839a0802d8 (diff)
downloadgdb-9d3602fded5d6afb5a925d1e5b1835527f759077.tar.gz
2003-09-12 Dave Brolley <brolley@redhat.com>
* registers.c (frv_check_spr_read_access): Check for access to ACC4-ACC63 and ACCG4-ACCG63. * profile.h (frv-desc.h): #include it. (spr_busy): New member of FRV_PROFILE_STATE. (spr_latency): Ditto. (GNER_FOR_GR): New macro. (FNER_FOR_FR): New maccro. (update_SPR_latency): New function. (vliw_wait_for_SPR): New function. * profile.c (profile-fr550.h): #include it. (update_latencies): Update SPR latencies. (update_target_latencies): Ditto. (update_SPR_latency): New function. (vliw_wait_for_SPR): New function. * profile-fr500.c (frvbf_model_fr500_u_idiv): Record GNER latency. (frvbf_model_fr500_u_trap): Removed unused variable, ps. (frvbf_model_fr500_u_check): Ditto. (frvbf_model_fr500_u_clrgr): New unit modeller for fr500. (frvbf_model_fr500_u_clrfr): Ditto. (frvbf_model_fr500_u_spr2gr): Wait for SPR. (frvbf_model_fr500_u_gr2spr): Ditto. * frv-sim.h (H_SPR_ACC4): New macro. (H_SPR_ACCG4): New macro; (H_SPR_ACC0): Removed. (H_SPR_ACCG0): Removed. * arch.h,model.c,sem[ch],decode.[ch]: Regenerated.
Diffstat (limited to 'sim/frv/decode.c')
-rw-r--r--sim/frv/decode.c60
1 files changed, 54 insertions, 6 deletions
diff --git a/sim/frv/decode.c b/sim/frv/decode.c
index c8db5d91e57..e018efc6afc 100644
--- a/sim/frv/decode.c
+++ b/sim/frv/decode.c
@@ -578,8 +578,8 @@ static const struct insn_sem frvbf_insn_sem[] =
{ FRV_INSN_CLRFR, FRVBF_INSN_CLRFR, FRVBF_SFMT_CLRFR },
{ FRV_INSN_CLRGA, FRVBF_INSN_CLRGA, FRVBF_SFMT_REI },
{ FRV_INSN_CLRFA, FRVBF_INSN_CLRFA, FRVBF_SFMT_REI },
- { FRV_INSN_COMMITGR, FRVBF_INSN_COMMITGR, FRVBF_SFMT_CLRGR },
- { FRV_INSN_COMMITFR, FRVBF_INSN_COMMITFR, FRVBF_SFMT_CLRFR },
+ { FRV_INSN_COMMITGR, FRVBF_INSN_COMMITGR, FRVBF_SFMT_COMMITGR },
+ { FRV_INSN_COMMITFR, FRVBF_INSN_COMMITFR, FRVBF_SFMT_COMMITFR },
{ FRV_INSN_COMMITGA, FRVBF_INSN_COMMITGA, FRVBF_SFMT_REI },
{ FRV_INSN_COMMITFA, FRVBF_INSN_COMMITFA, FRVBF_SFMT_REI },
{ FRV_INSN_FITOS, FRVBF_INSN_FITOS, FRVBF_SFMT_FITOS },
@@ -1191,9 +1191,9 @@ frvbf_decode (SIM_CPU *current_cpu, IADDR pc,
case 1 : itype = FRVBF_INSN_CLRGA; goto extract_sfmt_rei;
case 2 : itype = FRVBF_INSN_CLRFR; goto extract_sfmt_clrfr;
case 3 : itype = FRVBF_INSN_CLRFA; goto extract_sfmt_rei;
- case 4 : itype = FRVBF_INSN_COMMITGR; goto extract_sfmt_clrgr;
+ case 4 : itype = FRVBF_INSN_COMMITGR; goto extract_sfmt_commitgr;
case 5 : itype = FRVBF_INSN_COMMITGA; goto extract_sfmt_rei;
- case 6 : itype = FRVBF_INSN_COMMITFR; goto extract_sfmt_clrfr;
+ case 6 : itype = FRVBF_INSN_COMMITFR; goto extract_sfmt_commitfr;
case 7 : itype = FRVBF_INSN_COMMITFA; goto extract_sfmt_rei;
case 8 : itype = FRVBF_INSN_ANDCR; goto extract_sfmt_andcr;
case 9 : itype = FRVBF_INSN_ORCR; goto extract_sfmt_andcr;
@@ -7496,7 +7496,7 @@ frvbf_decode (SIM_CPU *current_cpu, IADDR pc,
{
const IDESC *idesc = &frvbf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_setlos.f
+#define FLD(f) abuf->fields.sfmt_swapi.f
UINT f_GRk;
f_GRk = EXTRACT_LSB0_UINT (insn, 32, 30, 6);
@@ -7505,6 +7505,13 @@ frvbf_decode (SIM_CPU *current_cpu, IADDR pc,
FLD (f_GRk) = f_GRk;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_clrgr", "f_GRk 0x%x", 'x', f_GRk, (char *) 0));
+#if WITH_PROFILE_MODEL_P
+ /* Record the fields for profiling. */
+ if (PROFILE_MODEL_P (current_cpu))
+ {
+ FLD (in_GRk) = f_GRk;
+ }
+#endif
#undef FLD
return idesc;
}
@@ -7513,7 +7520,7 @@ frvbf_decode (SIM_CPU *current_cpu, IADDR pc,
{
const IDESC *idesc = &frvbf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_mhsethis.f
+#define FLD(f) abuf->fields.sfmt_cfmadds.f
UINT f_FRk;
f_FRk = EXTRACT_LSB0_UINT (insn, 32, 30, 6);
@@ -7522,6 +7529,47 @@ frvbf_decode (SIM_CPU *current_cpu, IADDR pc,
FLD (f_FRk) = f_FRk;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_clrfr", "f_FRk 0x%x", 'x', f_FRk, (char *) 0));
+#if WITH_PROFILE_MODEL_P
+ /* Record the fields for profiling. */
+ if (PROFILE_MODEL_P (current_cpu))
+ {
+ FLD (in_FRk) = f_FRk;
+ }
+#endif
+#undef FLD
+ return idesc;
+ }
+
+ extract_sfmt_commitgr:
+ {
+ const IDESC *idesc = &frvbf_insn_data[itype];
+ CGEN_INSN_INT insn = entire_insn;
+#define FLD(f) abuf->fields.sfmt_setlos.f
+ UINT f_GRk;
+
+ f_GRk = EXTRACT_LSB0_UINT (insn, 32, 30, 6);
+
+ /* Record the fields for the semantic handler. */
+ FLD (f_GRk) = f_GRk;
+ TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_commitgr", "f_GRk 0x%x", 'x', f_GRk, (char *) 0));
+
+#undef FLD
+ return idesc;
+ }
+
+ extract_sfmt_commitfr:
+ {
+ const IDESC *idesc = &frvbf_insn_data[itype];
+ CGEN_INSN_INT insn = entire_insn;
+#define FLD(f) abuf->fields.sfmt_mhsethis.f
+ UINT f_FRk;
+
+ f_FRk = EXTRACT_LSB0_UINT (insn, 32, 30, 6);
+
+ /* Record the fields for the semantic handler. */
+ FLD (f_FRk) = f_FRk;
+ TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_commitfr", "f_FRk 0x%x", 'x', f_FRk, (char *) 0));
+
#undef FLD
return idesc;
}