public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/30474] New: Bad 16bit constant code generation on 64bit host
@ 2007-01-15 18:59 hjl at lucon dot org
2007-05-10 7:21 ` [Bug target/30474] " liqin at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: hjl at lucon dot org @ 2007-01-15 18:59 UTC (permalink / raw)
To: gcc-bugs
score_print_operand has
'U' print hi part of a CONST_INT rtx
else if (c == 'U')
{
gcc_assert (code == CONST_INT);
fprintf (file, HOST_WIDE_INT_PRINT_HEX,
(unsigned HOST_WIDE_INT) INTVAL (op) >> 16);
}
On 64bit host, for (const_int -2147483648 [0xffffffff80000000]), it
will generate 0xffffffff8000.
--
Summary: Bad 16bit constant code generation on 64bit host
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl at lucon dot org
GCC target triplet: score-unknown-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30474
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/30474] Bad 16bit constant code generation on 64bit host
2007-01-15 18:59 [Bug target/30474] New: Bad 16bit constant code generation on 64bit host hjl at lucon dot org
@ 2007-05-10 7:21 ` liqin at gcc dot gnu dot org
2007-05-23 5:50 ` liqin at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: liqin at gcc dot gnu dot org @ 2007-05-10 7:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from liqin at gcc dot gnu dot org 2007-05-10 08:21 -------
Index: gcc/config/score/score.c
===================================================================
--- gcc/config/score/score.c (revision 124567)
+++ gcc/config/score/score.c (working copy)
@@ -1167,7 +1167,7 @@ score_print_operand (FILE *file, rtx op,
{
gcc_assert (code == CONST_INT);
fprintf (file, HOST_WIDE_INT_PRINT_HEX,
- (unsigned HOST_WIDE_INT) INTVAL (op) >> 16);
+ (INTVAL (op) >> 16) & 0xffff);
}
else if (c == 'D')
{
@@ -1175,7 +1175,7 @@ score_print_operand (FILE *file, rtx op,
{
rtx temp = gen_lowpart (SImode, op);
gcc_assert (GET_MODE (op) == SFmode);
- fprintf (file, HOST_WIDE_INT_PRINT_HEX, INTVAL (temp));
+ fprintf (file, HOST_WIDE_INT_PRINT_HEX, INTVAL (temp) & 0xffff);
}
else
output_addr_const (file, op);
--
liqin at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-05-10 08:21:37
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30474
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/30474] Bad 16bit constant code generation on 64bit host
2007-01-15 18:59 [Bug target/30474] New: Bad 16bit constant code generation on 64bit host hjl at lucon dot org
2007-05-10 7:21 ` [Bug target/30474] " liqin at gcc dot gnu dot org
@ 2007-05-23 5:50 ` liqin at gcc dot gnu dot org
2007-05-23 6:10 ` liqin at gcc dot gnu dot org
2007-05-23 6:35 ` liqin at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: liqin at gcc dot gnu dot org @ 2007-05-23 5:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from liqin at gcc dot gnu dot org 2007-05-23 06:50 -------
Subject: Bug 30474
Author: liqin
Date: Wed May 23 05:49:50 2007
New Revision: 124980
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124980
Log:
2007-05-23 Chen Liqin <liqin@sunnorth.com.cn>
PR target/30987
* config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove.
* config/score/predicate.md (const_pow2, const_npow2): remove.
* config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL
undef.
PR target/30474
* config/score/score.c (score_print_operand): makes sure that only
lower
bits are used.
Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/score/misc.md
branches/gcc-4_2-branch/gcc/config/score/predicates.md
branches/gcc-4_2-branch/gcc/config/score/score.c
branches/gcc-4_2-branch/gcc/config/score/score.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30474
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/30474] Bad 16bit constant code generation on 64bit host
2007-01-15 18:59 [Bug target/30474] New: Bad 16bit constant code generation on 64bit host hjl at lucon dot org
2007-05-10 7:21 ` [Bug target/30474] " liqin at gcc dot gnu dot org
2007-05-23 5:50 ` liqin at gcc dot gnu dot org
@ 2007-05-23 6:10 ` liqin at gcc dot gnu dot org
2007-05-23 6:35 ` liqin at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: liqin at gcc dot gnu dot org @ 2007-05-23 6:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from liqin at gcc dot gnu dot org 2007-05-23 07:09 -------
Subject: Bug 30474
Author: liqin
Date: Wed May 23 06:09:20 2007
New Revision: 124983
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124983
Log:
2007-05-23 Chen Liqin <liqin@sunnorth.com.cn>
PR target/30987
* config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove.
* config/score/predicate.md (const_pow2, const_npow2): remove.
* config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL
undef.
PR target/30474
* config/score/score.c (score_print_operand): makes sure that only
lower
bits are used.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/score/misc.md
trunk/gcc/config/score/predicates.md
trunk/gcc/config/score/score.c
trunk/gcc/config/score/score.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30474
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/30474] Bad 16bit constant code generation on 64bit host
2007-01-15 18:59 [Bug target/30474] New: Bad 16bit constant code generation on 64bit host hjl at lucon dot org
` (2 preceding siblings ...)
2007-05-23 6:10 ` liqin at gcc dot gnu dot org
@ 2007-05-23 6:35 ` liqin at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: liqin at gcc dot gnu dot org @ 2007-05-23 6:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from liqin at gcc dot gnu dot org 2007-05-23 07:35 -------
* config/score/score.c (score_print_operand): makes sure that only
lower bits are used.
--
liqin at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30474
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-23 6:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-15 18:59 [Bug target/30474] New: Bad 16bit constant code generation on 64bit host hjl at lucon dot org
2007-05-10 7:21 ` [Bug target/30474] " liqin at gcc dot gnu dot org
2007-05-23 5:50 ` liqin at gcc dot gnu dot org
2007-05-23 6:10 ` liqin at gcc dot gnu dot org
2007-05-23 6:35 ` liqin at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).