summaryrefslogtreecommitdiffstats
path: root/meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-Correct-the-const-high-double-immed.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-Correct-the-const-high-double-immed.patch')
-rw-r--r--meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-Correct-the-const-high-double-immed.patch69
1 files changed, 0 insertions, 69 deletions
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-Correct-the-const-high-double-immed.patch b/meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-Correct-the-const-high-double-immed.patch
deleted file mode 100644
index cbc1b7b8..00000000
--- a/meta-microblaze/recipes-devtools/gcc/gcc-10/0026-Patch-microblaze-Correct-the-const-high-double-immed.patch
+++ /dev/null
@@ -1,69 +0,0 @@
1From 711652dd187e5b8d7aa12ecc9f569f10b1521bd1 Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Wed, 18 Jan 2017 11:25:48 +0530
4Subject: [PATCH 26/58] [Patch, microblaze]: Correct the const high double
5 immediate value
6
7With this patch the loading of the DI mode immediate values will be
8using REAL_VALUE_FROM_CONST_DOUBLE and REAL_VALUE_TO_TARGET_DOUBLE
9functions, as CONST_DOUBLE_HIGH was returning the sign extension value
10even of the unsigned long long constants also
11
12Signed-off-by :Nagaraju Mekala <nmekala@xilix.com>
13 Ajit Agarwal <ajitkum@xilinx.com>
14
15ChangeLog:
162016-02-03 Nagaraju Mekala <nmekala@xilix.com>
17 Ajit Agarwal <ajitkum@xilinx.com>
18
19 *microblaze.c (print_operand): Use REAL_VALUE_FROM_CONST_DOUBLE &
20 REAL_VALUE_TO_TARGET_DOUBLE
21 *long.c (new): Added new testcase
22---
23 gcc/config/microblaze/microblaze.c | 6 ++++--
24 gcc/testsuite/gcc.target/microblaze/long.c | 10 ++++++++++
25 2 files changed, 14 insertions(+), 2 deletions(-)
26 create mode 100644 gcc/testsuite/gcc.target/microblaze/long.c
27
28diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
29index a3996119bd7..73d0e010cda 100644
30--- a/gcc/config/microblaze/microblaze.c
31+++ b/gcc/config/microblaze/microblaze.c
32@@ -2587,14 +2587,16 @@ print_operand (FILE * file, rtx op, int letter)
33 else if (letter == 'h' || letter == 'j')
34 {
35 long val[2];
36+ long l[2];
37 if (code == CONST_DOUBLE)
38 {
39 if (GET_MODE (op) == DFmode)
40 REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), val);
41 else
42 {
43- val[0] = CONST_DOUBLE_HIGH (op);
44- val[1] = CONST_DOUBLE_LOW (op);
45+ REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l);
46+ val[1] = l[WORDS_BIG_ENDIAN == 0];
47+ val[0] = l[WORDS_BIG_ENDIAN != 0];
48 }
49 }
50 else if (code == CONST_INT)
51diff --git a/gcc/testsuite/gcc.target/microblaze/long.c b/gcc/testsuite/gcc.target/microblaze/long.c
52new file mode 100644
53index 00000000000..4d4518619d1
54--- /dev/null
55+++ b/gcc/testsuite/gcc.target/microblaze/long.c
56@@ -0,0 +1,10 @@
57+/* { dg-options "-O0" } */
58+#define BASEADDR 0xF0000000ULL
59+int main ()
60+{
61+ unsigned long long start;
62+ start = (unsigned long long) BASEADDR;
63+ return 0;
64+}
65+/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0x00000000" } } */
66+/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0xf0000000" } } */
67--
682.17.1
69