diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-07 21:03:49 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-07 21:03:49 -0600 |
| commit | 19c860221fb2fc129e6d2c1a41a77a8e8010f6c3 (patch) | |
| tree | 849d03150399751d409d5e5ab5fd07e1a638a8ac /rtl/core/decode/data.sv | |
| parent | 4ccb96c1aaf348f677954171751b58ad8f4dccf1 (diff) | |
Fix flags hazard in ADC, SBC, RSC
Diffstat (limited to '')
| -rw-r--r-- | rtl/core/decode/data.sv | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rtl/core/decode/data.sv b/rtl/core/decode/data.sv index 1bd7ef9..f744972 100644 --- a/rtl/core/decode/data.sv +++ b/rtl/core/decode/data.sv @@ -9,6 +9,7 @@ module core_decode_data output logic snd_is_imm, snd_shift_by_reg_if_reg, writeback, + conditional, update_flags, restore_spsr ); @@ -31,6 +32,14 @@ module core_decode_data always_comb begin unique case(op) + `ALU_ADC, `ALU_SBC, `ALU_RSC: + conditional = 1; + + default: + conditional = 0; + endcase + + unique case(op) `ALU_CMP, `ALU_CMN, `ALU_TST, `ALU_TEQ: writeback = 0; |
