aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-bsp/recipes-microblaze/gcc/gcc-8/0055-fixing-the-long-long-long-mingw-toolchain-issue.patch
blob: 4c694723d983e40a46fa5b4efc3832756b13e442 (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
From 76e231f92afd8fda13d6ae18ef3aef0ea6096489 Mon Sep 17 00:00:00 2001
From: Nagaraju Mekala <nmekala@xilix.com>
Date: Thu, 29 Nov 2018 17:55:08 +0530
Subject: [PATCH 55/57] fixing the long & long long mingw toolchain issue

---
 gcc/config/microblaze/constraints.md | 2 +-
 gcc/config/microblaze/microblaze.md  | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md
index 867a7b5..27c6bfc 100644
--- a/gcc/config/microblaze/constraints.md
+++ b/gcc/config/microblaze/constraints.md
@@ -55,7 +55,7 @@
 (define_constraint "K"
   "A constant in the range 0xffffff8000000000L  to 0x0000007fffffffffL (inclusive)."
   (and (match_code "const_int")
-       (match_test "ival > (long)-549755813888 && ival < (long)549755813887")))
+       (match_test "ival > (long long)-549755813888 && ival < (long long)549755813887")))
 
 ;; Define floating point constraints
 
diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
index cbd7e77..e03b835 100644
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -646,8 +646,8 @@
   if (TARGET_MB_64) 
    {
      if (GET_CODE (operands[2]) == CONST_INT &&
-       INTVAL(operands[2]) < (long)-549755813888 &&
-	INTVAL(operands[2]) > (long)549755813887)
+       INTVAL(operands[2]) < (long long)-549755813888 &&
+	INTVAL(operands[2]) > (long long)549755813887)
       FAIL;
    }
 })
@@ -1264,7 +1264,7 @@
 	(match_operand:DI 1 "immediate_operand" "J,I,Mnis"))]
   "TARGET_MB_64 && (register_operand (operands[0], DImode) && 
            (GET_CODE (operands[1]) == CONST_INT && 
-                 (INTVAL (operands[1]) <= (long)549755813887 && INTVAL (operands[1]) >= (long)-549755813888)))"  
+                 (INTVAL (operands[1]) <= (long long)549755813887 && INTVAL (operands[1]) >= (long long)-549755813888)))"  
   "@
    addlk\t%0,r0,r0\t
    addlik\t%0,r0,%1\t #N1 %X1
@@ -1298,7 +1298,7 @@
      case 1:
      case 2:
         if (GET_CODE (operands[1]) == CONST_INT && 
-	    (INTVAL (operands[1]) > (long)549755813887 || INTVAL (operands[1]) < (long)-549755813888))
+	    (INTVAL (operands[1]) > (long long)549755813887 || INTVAL (operands[1]) < (long long)-549755813888))
  	  return "addlik\t%0,r0,%h1\n\tbsllli\t%0,%0,32\n\taddlik\t%0,%0,%j1 #li => la";
         else	
 	  return "addlik\t%0,r0,%1";
-- 
2.7.4