aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-bsp/recipes-microblaze/gcc/gcc-8/0040-Added-load-store-pattern-movdi-and-also-adding-missi.patch
blob: 1157a82fc324d1746aa5fe2e8b870eb3211f9e70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
From 5526d87787d61990be3187b230fae4d0591d0651 Mon Sep 17 00:00:00 2001
From: Nagaraju Mekala <nmekala@xilix.com>
Date: Wed, 4 Apr 2018 16:41:41 +0530
Subject: [PATCH 40/54] Added load store pattern movdi and also adding missing
 files

---
 gcc/config/microblaze/constraints.md |  5 +++++
 gcc/config/microblaze/microblaze.md  | 26 ++++++++++++++++++++++++++
 gcc/config/microblaze/t-microblaze   |  4 ++--
 3 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md
index ae14944..a06b4d8 100644
--- a/gcc/config/microblaze/constraints.md
+++ b/gcc/config/microblaze/constraints.md
@@ -52,6 +52,11 @@
   (and (match_code "const_int")
        (match_test "ival > 0 && ival < 0x10000")))
 
+(define_constraint "K"
+  "A constant in the range 0xffffff8000000000L  to 0x0000007fffffffffL (inclusive)."
+  (and (match_code "const_int")
+       (match_test "ival > (long)0xffffff8000000000L && ival < (long)0x0000007fffffffffL")))
+
 ;; Define floating point constraints
 
 (define_constraint "G"
diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
index 6976b37..0cd0441 100644
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -1120,6 +1120,32 @@
 )
 
 
+(define_insn "*movdi_internal_64"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,o")
+	(match_operand:DI 1 "general_operand"      " d,K,J,R,o,d,d"))]
+  "TARGET_MB_64 && (INTVAL(operands[1]) < 0x7fffffffff) && (INTVAL(operands[1]) > 0xffffff8000000000)"
+  { 
+    switch (which_alternative)
+    {
+      case 0:
+        return "addlk\t%0,%1";
+      case 1:
+	return "addlik\t%0,r0,%1";
+      case 2:
+	  return "addlk\t%0,r0,r0";
+      case 3:
+      case 4:
+	  return "lli\t%0,%1";
+      case 5:
+      case 6:
+        return "sli\t%1,%0";
+    }
+    return "unreachable";
+  }
+  [(set_attr "type"	"no_delay_move,no_delay_arith,no_delay_arith,no_delay_load,no_delay_load,no_delay_store,no_delay_store")
+  (set_attr "mode"	"DI")
+  (set_attr "length"   "8,8,8,8,12,8,12")])
+
 (define_insn "*movdi_internal"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,R,o")
 	(match_operand:DI 1 "general_operand"      " d,i,J,R,o,d,d"))]
diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze
index e9a1921..7671f63 100644
--- a/gcc/config/microblaze/t-microblaze
+++ b/gcc/config/microblaze/t-microblaze
@@ -4,8 +4,8 @@ MULTILIB_EXCEPTIONS = *mxl-barrel-shift/mxl-multiply-high mxl-multiply-high
 MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high/mlittle-endian
 MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high/m64
 MULTILIB_EXCEPTIONS += mxl-multiply-high/mlittle-endian
-MULTILIB_EXCEPTIONS += mxl-multiply-high/m64
-MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64
+#MULTILIB_EXCEPTIONS += mxl-multiply-high/m64
+#MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64
 
 # Extra files
 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \
-- 
2.7.4