yield from ALUHelpers.get_sim_int_o(sim_o, sim, dec2)
yield from ALUHelpers.get_wr_sim_cr_a(sim_o, sim, dec2)
yield from ALUHelpers.get_sim_xer_ov(sim_o, sim, dec2)
- yield from ALUHelpers.get_sim_xer_ca(sim_o, sim, dec2)
+ yield from ALUHelpers.get_wr_sim_xer_ca(sim_o, sim, dec2)
yield from ALUHelpers.get_sim_xer_so(sim_o, sim, dec2)
ALUHelpers.check_cr_a(self, res, sim_o, "CR%d %s" % (cridx, code))
* https://bugs.libre-soc.org/show_bug.cgi?id=361
"""
-from soc.decoder.power_enums import XER_bits
+from soc.decoder.power_enums import XER_bits, CryIn
from soc.regfile.util import fast_reg_to_spr # HACK!
def get_rd_sim_xer_ca(res, sim, dec2):
cry_in = yield dec2.e.input_carry
- if cry_in:
+ if cry_in == CryIn.CA.value:
expected_carry = 1 if sim.spr['XER'][XER_bits['CA']] else 0
expected_carry32 = 1 if sim.spr['XER'][XER_bits['CA32']] else 0
res['xer_ca'] = expected_carry | (expected_carry32 << 1)