+2021-01-12 Mike Frysinger <vapier@gentoo.org>
+
+ * traps.c (or1k32bf_exception): Move handler_pc decl to top of scope.
+ (or1k32bf_mfspr): Move val decl to top of function body.
+
2021-01-12 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete redundant sim-cpu.o, sim-hload.o,
}
else
{
+ IADDR handler_pc;
/* Calculate the exception program counter. */
switch (exnum)
current_cpu->next_delay_slot = 0;
/* Jump program counter into handler. */
- IADDR handler_pc =
- (GET_H_SYS_SR_EPH ()? 0xf0000000 : 0x00000000) + (exnum << 8);
+ handler_pc =
+ (GET_H_SYS_SR_EPH () ? 0xf0000000 : 0x00000000) + (exnum << 8);
sim_engine_restart (sd, current_cpu, NULL, handler_pc);
}
or1k32bf_mfspr (sim_cpu *current_cpu, USI addr)
{
SIM_DESC sd = CPU_STATE (current_cpu);
+ SI val;
if (!GET_H_SYS_SR_SM () && !GET_H_SYS_SR_SUMRA ())
{
if (addr >= NUM_SPR)
goto bad_address;
- SI val = GET_H_SPR (addr);
+ val = GET_H_SPR (addr);
switch (addr)
{