aboutsummaryrefslogtreecommitdiff
path: root/sim/arm/maverick.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2014-03-14 15:21:23 +0000
committerNick Clifton <nickc@redhat.com>2014-03-14 15:21:23 +0000
commit8d052926671eb0e8c83ffab6d15a98790c215a36 (patch)
treedf4ee55e4b25e7bbd7202bc15724162ac14aa219 /sim/arm/maverick.c
parentb9366cf3955d81e26537ea1932b183dbdf237361 (diff)
downloadgdb-8d052926671eb0e8c83ffab6d15a98790c215a36.zip
gdb-8d052926671eb0e8c83ffab6d15a98790c215a36.tar.gz
gdb-8d052926671eb0e8c83ffab6d15a98790c215a36.tar.bz2
Add support for instruction level tracing to the ARM simulator.
* wrapper.c (op_print): New function. (sim_dis_read): New function. (print_insn): New function - disassembles the given instruction. (sim_trace): Note that tracing is now allowed. (sim_create_inferior): Default to emulating v6. Initialise the disassembler machinery. (sim_target_parse_command_line): Add support for -t -d and -z options. (sim_target_display_usage): Note existence of -d and -z options. (sim_open): Parse -t -d and -z options. * armemu.h: Add exports of trace, disas and trace_funcs. Add prototype for print_insn. * armemu.c (ARMul_Emulate26): Add tracing code. Delete unused variables. * thumbemu (handle_v6_thumb_insn): Delete unused variable Rd. Move Rm variable into switch cases. Add tracing code. * armcopro.c (XScale_cp15_init): Add a return value. (XScale_cp13_init): Likewise. (XScale_cp14_init): Likewise. (XScale_cp15_LDC): Delete unused function. (XScale_cp15_STC): Likewise. * maverick.c: Delete comment inside comment. (DSPInit): Delete unused function. (DSPMCR4): Fix compile time warning about missing parenthesis. (DSPMCR5): Likewise. (DSPCDP6): Delete unused variable opcode2.
Diffstat (limited to 'sim/arm/maverick.c')
-rw-r--r--sim/arm/maverick.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/sim/arm/maverick.c b/sim/arm/maverick.c
index 2acf2b6..b9a6517 100644
--- a/sim/arm/maverick.c
+++ b/sim/arm/maverick.c
@@ -20,7 +20,7 @@
#include "ansidecl.h"
#include "armemu.h"
-/*#define CIRRUS_DEBUG 1 /**/
+/*#define CIRRUS_DEBUG 1 */
#if CIRRUS_DEBUG
# define printfdbg printf
#else
@@ -97,13 +97,6 @@ cirrus_not_implemented (char * insn)
exit (1);
}
-static unsigned
-DSPInit (ARMul_State * state)
-{
- ARMul_ConsolePrint (state, ", DSP present");
- return TRUE;
-}
-
unsigned
DSPMRC4 (ARMul_State * state ATTRIBUTE_UNUSED,
unsigned type ATTRIBUTE_UNUSED,
@@ -270,8 +263,9 @@ DSPMRC5 (ARMul_State * state ATTRIBUTE_UNUSED,
v = SubOverflow (DSPregs[SRC1_REG].lower.i, DSPregs[SRC2_REG].lower.i,
res);
/* carry */
- c = (NEG (a) && POS (b) ||
- (NEG (a) && POS (res)) || (POS (b) && POS (res)));
+ c = (NEG (a) && POS (b))
+ || (NEG (a) && POS (res))
+ || (POS (b) && POS (res));
*value = (n << 31) | (z << 30) | (c << 29) | (v << 28);
break;
@@ -301,8 +295,9 @@ DSPMRC5 (ARMul_State * state ATTRIBUTE_UNUSED,
v = ((NEG64 (a) && POS64 (b) && POS64 (res))
|| (POS64 (a) && NEG64 (b) && NEG64 (res)));
/* carry */
- c = (NEG64 (a) && POS64 (b) ||
- (NEG64 (a) && POS64 (res)) || (POS64 (b) && POS64 (res)));
+ c = (NEG64 (a) && POS64 (b))
+ || (NEG64 (a) && POS64 (res))
+ || (POS64 (b) && POS64 (res));
*value = (n << 31) | (z << 30) | (c << 29) | (v << 28);
break;
@@ -1167,10 +1162,6 @@ DSPCDP6 (ARMul_State * state,
unsigned type,
ARMword instr)
{
- int opcode2;
-
- opcode2 = BITS (5,7);
-
switch (BITS (20,21))
{
case 0: