@@ -404,6 +404,7 @@ bgeu: a_src => imm, b_src => pc, latch_a => 1, latch_b => 1, CMP_GEU, \
404
404
405
405
origin 0x98 ;
406
406
jalr: b_src => imm , latch_b => 1 ;
407
+ jalr_shared:
407
408
// Bring in PC and prepare to construct PC + 4 . Calculate jmp target.
408
409
latch_a => 1 , latch_b => 1 , a_src => four , b_src => pc , alu_op => add , \
409
410
alu_o_mod => clear_lsb_o ;
@@ -442,18 +443,8 @@ sw_wait: mem_req => 1, invert_test => 1, cond_test => mem_valid, \
442
443
STOP_MEMREQ_THEN_JUMP_TO_ZERO ;
443
444
444
445
origin 0xB0 ;
445
- jal: a_src => imm , b_src => pc , latch_a => 1 , latch_b => 1 ;
446
- // Prepare to construct PC + 4 . Calculate jmp target.
447
- latch_a => 1 , a_src => four , alu_op => add , alu_o_mod => clear_lsb_o ;
448
- // PC + 4 available on next cycle , just in time to be stored in RD.
449
- // Preemptively load target PC. If there's an exception , make sure the old
450
- // PC is still available on ALU output so we can reload.
451
- a_src => zero , latch_a => 1 , pc_action => load_alu_o , alu_op => add , \
452
- except_ctl => latch_jal , jmp_type => direct , cond_test => exception , \
453
- invert_test => 1 , target => fast_epilog ;
454
- // Exception detected. Pass the old PC through , and then reload.
455
- alu_op => add , jmp_type => direct , cond_test => true , \
456
- target => branch_exception_detected ;
446
+ jal: a_src => imm , b_src => pc , latch_a => 1 , latch_b => 1 , \
447
+ jmp_type => direct , target => jalr_shared ;
457
448
458
449
fast_epilog: INSN_FETCH_EAGER_READ_RS1 , WRITE_RD , SKIP_WAIT_IF_ACK ;
459
450
fast_epilog_csr: INSN_FETCH_EAGER_READ_RS1 , WRITE_RD_CSR , SKIP_WAIT_IF_ACK ;
0 commit comments