From 13f0b10dbe42cabd8340b8f9563f2cdd5a4ccd84 Mon Sep 17 00:00:00 2001 From: Michalis Pardalos Date: Fri, 9 Apr 2021 13:44:13 +0100 Subject: Fix merge error in oshrximm --- src/hls/HTLgen.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/hls/HTLgen.v') diff --git a/src/hls/HTLgen.v b/src/hls/HTLgen.v index 052aaad..7d891c3 100644 --- a/src/hls/HTLgen.v +++ b/src/hls/HTLgen.v @@ -432,7 +432,9 @@ Definition translate_instr (op : Op.operation) (args : list reg) : mon expr := | Op.Oshlimm n, r::nil => ret (boplit Vshl r n) | Op.Oshr, r1::r2::nil => ret (bop Vshr r1 r2) | Op.Oshrimm n, r::nil => ret (boplit Vshr r n) - | Op.Oshrximm n, r::nil => error (Errors.msg "Htlgen: Instruction not implemented: Oshrximm") + | Op.Oshrximm n, r::nil => ret (Vternary (Vbinop Vlt (Vvar r) (Vlit (ZToValue 0))) + (Vunop Vneg (Vbinop Vshru (Vunop Vneg (Vvar r)) (Vlit n))) + (Vbinop Vshru (Vvar r) (Vlit n))) (*ret (Vbinop Vdiv (Vvar r) (Vbinop Vshl (Vlit (ZToValue 1)) (Vlit (intToValue n))))*) -- cgit