public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/55259] New: plus_constant doesn't handle zero-extended address properly
@ 2012-11-10  2:54 hjl.tools at gmail dot com
  2012-11-10  4:13 ` [Bug middle-end/55259] " hjl.tools at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-10  2:54 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55259

             Bug #: 55259
           Summary: plus_constant doesn't handle zero-extended address
                    properly
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com


For address,

#0  plus_constant (mode=SImode, x=0x7ffff0fadf40, c=8)
    at /export/gnu/import/git/gcc/gcc/explow.c:211
#1  0x00000000006f9b04 in adjust_address_1 (memref=0x7ffff0fff2e8, 
    mode=DImode, offset=8, validate=1, adjust_address=1, adjust_object=0)
    at /export/gnu/import/git/gcc/gcc/emit-rtl.c:2113
#2  0x0000000000cdd259 in split_double_mode (mode=TImode, 
    operands=0x7fffffffd828, num=0, lo_half=0x7fffffffd8f0, 
    hi_half=0x7fffffffd8f8)
    at /export/gnu/import/git/gcc/gcc/config/i386/i386.c:14721
#3  0x0000000000ceafe7 in ix86_split_to_parts (operand=0x7ffff0fff2e8, 
    parts=0x7fffffffd8f0, mode=TImode)
    at /export/gnu/import/git/gcc/gcc/config/i386/i386.c:20695
#4  0x0000000000ceb4ad in ix86_split_long_move (
    operands=0x17a5fa0 <recog_data>)
    at /export/gnu/import/git/gcc/gcc/config/i386/i386.c:20794

Breakpoint 2, plus_constant (mode=DImode, x=0x7ffff0fadf30, c=8)
    at /export/gnu/import/git/gcc/gcc/explow.c:96
96          zero_extend_mode = GET_MODE (x);
(gdb) call debug_rtx (x)
(zero_extend:DI (reg:SI 0 ax [82]))
(gdb) 

it should generate

(gdb) call debug_rtx (x)
(zero_extend:DI (plus:SI (reg:SI 0 ax [82])
        (const_int 8 [0x8])))
(gdb)

Instead, plus_constant generates

(gdb) call debug_rtx (addr)
(plus:DI (zero_extend:DI (reg:SI 0 ax [82]))
    (const_int 8 [0x8]))


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-11 23:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-10  2:54 [Bug middle-end/55259] New: plus_constant doesn't handle zero-extended address properly hjl.tools at gmail dot com
2012-11-10  4:13 ` [Bug middle-end/55259] " hjl.tools at gmail dot com
2012-11-11 21:53 ` ebotcazou at gcc dot gnu.org
2012-11-11 23:55 ` hjl.tools at gmail dot com

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).