From: Luke Kenneth Casson Leighton Date: Tue, 9 Oct 2018 16:01:12 +0000 (+0100) Subject: save branch address and predication merged result, and test after branch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=afb0d1559e23486533313d8b0d4b458dd8aa1d3f;p=riscv-isa-sim.git save branch address and predication merged result, and test after branch if the predication was all good, go ahead with the branch still not tested for predicated / vectorised branch yet however at least scalar branches work --- diff --git a/riscv/insn_template_sv.cc b/riscv/insn_template_sv.cc index f96f117..7a67f6c 100644 --- a/riscv/insn_template_sv.cc +++ b/riscv/insn_template_sv.cc @@ -27,7 +27,7 @@ determined by id_regs.py. in case you're wondering: yes, really, id_regs.py actually parses - the actual riscv/insns/*.h implementations (all of them), looking + the actual riscv/insns/impl.h implementations (all of them), looking for uses of "RVC_RS1" and "WRITE_RD" and so on, as an indicator of the register usage for that specific opcode. whilst it was hypothetically possible to use this repo, kindly written by michael clark: @@ -238,6 +238,17 @@ reg_t FN(processor_t* p, insn_t s_insn, reg_t pc) #endif *dest_offs += 1; } +#ifdef INSN_TYPE_BRANCH + // ok, at the end of the loop, if the predicates are equal, + // we're good to branch. use the saved address (to avoid + // calculating the BRANCH_TARGET macro again) + uint64_t mask = (1<