aboutsummaryrefslogtreecommitdiffstats
path: root/src/hls/HTLgen.v
diff options
context:
space:
mode:
Diffstat (limited to 'src/hls/HTLgen.v')
-rw-r--r--src/hls/HTLgen.v4
1 files changed, 3 insertions, 1 deletions
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))))*)