URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 1669 to Rev 1670
- ↔ Reverse comparison
Rev 1669 → Rev 1670
/trunk/or1ksim/cpu/or32/dyn_rec.c
578,22 → 578,6
} |
} |
|
/* FIXME: Do this in a more elegent way */ |
if(!strncmp(or32_opcodes[opq->insn_index].name, "l.jal", 5)) { |
/* In the case of a l.jal instruction, make sure that LINK_REGNO is not in |
* a temporary. The problem is that the l.jal(r) instruction stores the |
* `return address' in LINK_REGNO. The temporaries are shiped out only |
* after the delay slot instruction has executed and so it overwrittes the |
* `return address'. */ |
for(k = 0; k < NUM_T_REGS; k++) { |
if(opq->reg_t_d[k] == LINK_REGNO) { |
gen_op_move_gpr_t[k][LINK_REGNO](opq, 1); |
opq->reg_t_d[k] = 32; |
break; |
} |
} |
} |
|
/* Jump instructions don't have a disposition */ |
or32_opcodes[opq->insn_index].exec(opq, param_t, delay_insn); |
|
1389,6 → 1373,22
|
void gen_l_jal(struct op_queue *opq, int param_t[3], int delay_slot) |
{ |
int i; |
|
/* In the case of a l.jal instruction, make sure that LINK_REGNO is not in |
* a temporary. The problem is that the l.jal(r) instruction stores the |
* `return address' in LINK_REGNO. The temporaries are shiped out only |
* after the delay slot instruction has executed and so it overwrittes the |
* `return address'. */ |
for(i = 0; i < NUM_T_REGS; i++) { |
if(opq->reg_t_d[i] == LINK_REGNO) { |
/* Don't bother storeing the register, it is going to get clobered in this |
* instruction anyway */ |
opq->reg_t_d[i] = 32; |
break; |
} |
} |
|
/* Store the return address */ |
gen_op_store_link_addr_gpr(opq, 1); |
|
1405,6 → 1405,22
|
void gen_l_jalr(struct op_queue *opq, int param_t[3], int delay_slot) |
{ |
int i; |
|
/* In the case of a l.jal instruction, make sure that LINK_REGNO is not in |
* a temporary. The problem is that the l.jal(r) instruction stores the |
* `return address' in LINK_REGNO. The temporaries are shiped out only |
* after the delay slot instruction has executed and so it overwrittes the |
* `return address'. */ |
for(i = 0; i < NUM_T_REGS; i++) { |
if(opq->reg_t_d[i] == LINK_REGNO) { |
/* Don't bother storeing the register, it is going to get clobered in this |
* instruction anyway */ |
opq->reg_t_d[i] = 32; |
break; |
} |
} |
|
/* Store the return address */ |
gen_op_store_link_addr_gpr(opq, 1); |
|