]> git.sur5r.net Git - openocd/blobdiff - src/target/arm_simulator.c
Fix "unused variable" warnings (errors) detected with GCC 4.7.0 - leftover changes
[openocd] / src / target / arm_simulator.c
index 0f6fe3f5e1fb972ce8ffedef969dc6e923ef1ae7..0a34cfcf4967fd207e6a2a84673b85aa7b9e1af4 100644 (file)
@@ -666,15 +666,12 @@ static int arm_simulate_step_core(struct target *target,
                }
                else
                {
-                       enum arm_mode mode = sim->get_mode(sim);
                        int update_cpsr = 0;
 
                        if (instruction.info.load_store_multiple.S)
                        {
                                if (instruction.info.load_store_multiple.register_list & 0x8000)
                                        update_cpsr = 1;
-                               else
-                                       mode = ARM_MODE_USR;
                        }
 
                        for (i = 0; i < 16; i++)
@@ -722,7 +719,6 @@ static int arm_simulate_step_core(struct target *target,
                        uint32_t Rn = sim->get_reg_mode(sim,
                                        instruction.info.load_store_multiple.Rn);
                        int bits_set = 0;
-                       enum arm_mode mode = sim->get_mode(sim);
 
                        for (i = 0; i < 16; i++)
                        {
@@ -730,11 +726,6 @@ static int arm_simulate_step_core(struct target *target,
                                        bits_set++;
                        }
 
-                       if (instruction.info.load_store_multiple.S)
-                       {
-                               mode = ARM_MODE_USR;
-                       }
-
                        switch (instruction.info.load_store_multiple.addressing_mode)
                        {
                                case 0: /* Increment after */