From: Luke Kenneth Casson Leighton Date: Mon, 29 Aug 2022 11:36:33 +0000 (+0100) Subject: add setvl and other sv* management instructions to the list X-Git-Tag: sv_maxu_works-initial~68 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e498d63a77f30366c0b47167afff105d2c6f0e2b;p=openpower-isa.git add setvl and other sv* management instructions to the list for which OE is ignored. https://bugs.libre-soc.org/show_bug.cgi?id=914 really the solution here is to add a new CSV column, OE --- diff --git a/src/openpower/decoder/isa/caller.py b/src/openpower/decoder/isa/caller.py index 03db3ff7..5ab5a06a 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -1439,7 +1439,7 @@ class ISACaller(ISACallerHelper, ISAFPHelpers): else: ov_en = False ov_ok = False - log("internal overflow", overflow, ov_en, ov_ok) + log("internal overflow", ins_name, overflow, "en?", ov_en, ov_ok) if ov_en & ov_ok: yield from self.handle_overflow(inputs, results, overflow) diff --git a/src/openpower/decoder/power_decoder2.py b/src/openpower/decoder/power_decoder2.py index fc1d35b0..70258d78 100644 --- a/src/openpower/decoder/power_decoder2.py +++ b/src/openpower/decoder/power_decoder2.py @@ -576,10 +576,18 @@ class DecodeOE(Elaboratable): comb = m.d.comb op = self.op + # default: clear OE. + comb += self.oe_out.data.eq(0) + comb += self.oe_out.ok.eq(0) + with m.Switch(op.internal_op): # mulhw, mulhwu, mulhd, mulhdu - these *ignore* OE - # also rotate + # also rotate. and setvl and all other sv* management + # basically the HDL below bypasses normal decode and + # goes directly and explicitly to bit 30 (self.dec.OE). + # on the list of instructions below (really this should + # be in the CSV files) they must be told *not* to do that. # XXX ARGH! ignoring OE causes incompatibility with microwatt # http://lists.libre-soc.org/pipermail/libre-soc-dev/2020-August/000302.html with m.Case(MicrOp.OP_MUL_H64, MicrOp.OP_MUL_H32, @@ -587,6 +595,9 @@ class DecodeOE(Elaboratable): MicrOp.OP_SHL, MicrOp.OP_SHR, MicrOp.OP_RLC, MicrOp.OP_LOAD, MicrOp.OP_STORE, MicrOp.OP_RLCL, MicrOp.OP_RLCR, + MicrOp.OP_SETVL, MicrOp.OP_SVSHAPE, + MicrOp.OP_SVINDEX, MicrOp.OP_SVREMAP, + MicrOp.OP_SVSTEP, MicrOp.OP_EXTSWSLI, MicrOp.OP_GREV, MicrOp.OP_TERNLOG): pass