ocaml/0007-Try-fix-for-andi-ori-xori-immediates-1.patch
Richard W.M. Jones 725d4a96c7 Revert "New upstream version 4.05.0."
It's been decided to allow the Fedora 27 Mass Rebuild to take place
before OCaml 4.05.0 is added to Fedora.  To avoid this package
accidentally getting included in the mass rebuild, this commit reverts
the new upstream version, and then it will be un-re-verted after the
Mass Rebuild.

This reverts commit 40c060b8ec.
2017-07-21 11:00:11 +01:00

44 lines
1.5 KiB
Diff

From 80e5cd3dc503319490761a705e14f3fa421ff760 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/9] Try fix for andi/ori/xori immediates (#1)
---
asmcomp/riscv/selection.ml | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/asmcomp/riscv/selection.ml b/asmcomp/riscv/selection.ml
index 60ec5cb4e..ad2b26e9b 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.13.1