45 lines
1.6 KiB
Diff
45 lines
1.6 KiB
Diff
From fcb3b532e59bef94af09047b0199a1c32caeaa27 Mon Sep 17 00:00:00 2001
|
|
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
|
|
Date: Thu, 10 Nov 2016 14:12:53 +0100
|
|
Subject: [PATCH 7/7] Try fix for andi/ori/xori immediates (#1)
|
|
|
|
(cherry picked from commit 4e01c71358c8f7571914c09369a402e6e290f6c9)
|
|
---
|
|
asmcomp/riscv/selection.ml | 13 -------------
|
|
1 file changed, 13 deletions(-)
|
|
|
|
diff --git a/asmcomp/riscv/selection.ml b/asmcomp/riscv/selection.ml
|
|
index da69f09..a1cbb82 100644
|
|
--- a/asmcomp/riscv/selection.ml
|
|
+++ b/asmcomp/riscv/selection.ml
|
|
@@ -36,11 +36,6 @@ method! select_operation op args =
|
|
match (op, args) with
|
|
(* RISC-V does not support immediate operands for multiply high *)
|
|
| (Cmulhi, _) -> (Iintop Imulh, args)
|
|
- (* The and, or and xor instructions have a different range of immediate
|
|
- operands than the other instructions *)
|
|
- | (Cand, _) -> self#select_logical Iand args
|
|
- | (Cor, _) -> self#select_logical Ior args
|
|
- | (Cxor, _) -> self#select_logical Ixor args
|
|
(* Recognize (neg-)mult-add and (neg-)mult-sub instructions *)
|
|
| (Caddf, [Cop(Cmulf, [arg1; arg2]); arg3])
|
|
| (Caddf, [arg3; Cop(Cmulf, [arg1; arg2])]) ->
|
|
@@ -58,14 +53,6 @@ method! select_operation op args =
|
|
| _ ->
|
|
super#select_operation op args
|
|
|
|
-method select_logical op = function
|
|
- | [arg; Cconst_int n] when n >= 0 && n <= 0xFFF ->
|
|
- (Iintop_imm(op, n), [arg])
|
|
- | [Cconst_int n; arg] when n >= 0 && n <= 0xFFF ->
|
|
- (Iintop_imm(op, n), [arg])
|
|
- | args ->
|
|
- (Iintop op, args)
|
|
-
|
|
(* Instruction selection for conditionals *)
|
|
|
|
method! select_condition = function
|
|
--
|
|
2.9.3
|
|
|