Andrew Geissler | 10fa149 | 2020-12-11 16:25:29 -0600 | [diff] [blame^] | 1 | From ad3d0a29a4895351008ce959138c13b8f5924464 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
| 3 | Date: Wed, 18 Jan 2017 12:03:39 +0530 |
Andrew Geissler | 10fa149 | 2020-12-11 16:25:29 -0600 | [diff] [blame^] | 4 | Subject: [PATCH 23/54] [patch,microblaze]: Fix the calculation of high word in |
| 5 | a long long 6. .4-bit |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 6 | |
| 7 | This patch will change the calculation of high word in a long long 64-bit. |
| 8 | Earlier to this patch the high word of long long word (0xF0000000ULL) is |
| 9 | coming to be 0xFFFFFFFF and low word is 0xF0000000. Instead the high word |
| 10 | should be 0x00000000 and the low word should be 0xF0000000. This patch |
| 11 | removes the condition of checking high word = 0 & low word < 0. |
| 12 | This check is not required for the correctness of calculating 32-bit high |
| 13 | and low words in a 64-bit long long. |
| 14 | |
| 15 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
| 16 | Ajit Agarwal <ajitkum@xilinx.com> |
| 17 | |
| 18 | ChangeLog: |
| 19 | 2016-03-01 Nagaraju Mekala <nmekala@xilix.com> |
| 20 | Ajit Agarwal <ajitkum@xilinx.com> |
| 21 | |
| 22 | *config/microblaze/microblaze.c (print_operand): Remove the condition of checking |
| 23 | high word = 0 & low word < 0. |
| 24 | *testsuite/gcc.target/microblaze/others/long.c: Add -O0 option. |
| 25 | --- |
| 26 | gcc/config/microblaze/microblaze.c | 3 --- |
| 27 | 1 file changed, 3 deletions(-) |
| 28 | |
| 29 | diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c |
Andrew Geissler | 10fa149 | 2020-12-11 16:25:29 -0600 | [diff] [blame^] | 30 | index 29b2f6b016b..4710def18cf 100644 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 31 | --- a/gcc/config/microblaze/microblaze.c |
| 32 | +++ b/gcc/config/microblaze/microblaze.c |
Andrew Geissler | 10fa149 | 2020-12-11 16:25:29 -0600 | [diff] [blame^] | 33 | @@ -2468,9 +2468,6 @@ print_operand (FILE * file, rtx op, int letter) |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 34 | { |
| 35 | val[0] = (INTVAL (op) & 0xffffffff00000000LL) >> 32; |
| 36 | val[1] = INTVAL (op) & 0x00000000ffffffffLL; |
| 37 | - if (val[0] == 0 && val[1] < 0) |
| 38 | - val[0] = -1; |
| 39 | - |
| 40 | } |
| 41 | fprintf (file, "0x%8.8lx", (letter == 'h') ? val[0] : val[1]); |
| 42 | } |
| 43 | -- |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 44 | 2.17.1 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 45 | |