aboutsummaryrefslogtreecommitdiffstats
path: root/riscV/Asmexpand.ml
diff options
context:
space:
mode:
Diffstat (limited to 'riscV/Asmexpand.ml')
-rw-r--r--riscV/Asmexpand.ml9
1 files changed, 7 insertions, 2 deletions
diff --git a/riscV/Asmexpand.ml b/riscV/Asmexpand.ml
index 14407bba..c5cd6817 100644
--- a/riscV/Asmexpand.ml
+++ b/riscV/Asmexpand.ml
@@ -591,8 +591,13 @@ let expand_instruction instr =
else
if ireg0_eq rt rf then
begin
- if not (ireg0_eq (X rd) rt) then
- emit (Paddil(rd, rt, Int64.zero))
+ if ireg0_eq (X rd) rt then
+ begin
+ end
+ else
+ begin
+ emit (Paddl(rd, X0, rt))
+ end
end
else
if (ireg0_eq (X rd) rt) then