Blame SOURCES/0009-Try-fix-for-andi-ori-xori-immediates-1.patch

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