From: "H.J. Lu" <hjl.tools@gmail.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: PATCH [5/n] X32: Supprot 32bit address
Date: Sat, 16 Jul 2011 17:21:00 -0000 [thread overview]
Message-ID: <CAMe9rOqCDYfuC-4QiCYyFe7--wkhSO_jVPO5PgRP_BvuXb+BTA@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOoKT9UjsNUOJc18q40-gj-H7kJ4is1eAEDuTvi3EOpsMg@mail.gmail.com>
On Fri, Jul 15, 2011 at 10:18 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Jul 15, 2011 at 9:09 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> On Fri, Jul 15, 2011 at 6:07 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>>>>>> If the first form of the address is not OK (it does not represent the
>>>>>> hardware operation), then it should not enter into the insn stream.
>>>>>> This means, that it should be fixed ("legitimized") to second form by
>>>>>> appropriate function (it looks that LEGITIMIZE_RELOAD_ADDRESS should
>>>>>> fix it, since the incorrect address is generated by IRA/reload). After
>>>>>> this operation, various predicates, based on ix86_decompose_address
>>>>>> will start to work, since they will decompose valid memory addresses.
>>>>>>
>>>>>
>>>>> IRA/.RELOAD isn't prepared to deal with it and it just ICEs. I opened
>>>>> a few GCC bugs on this.
>>>>>
>>>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744
>>>>>
>>>>> is one of them. That is why I went this route.
>>>>
>>>> Hm, but it crashed in postreload pass since the address was not in the
>>>> legitimate form. This is exactly what LEGITIMIZE_RELOAD_ADDRESS
>>>> fixes. Did you try to go this route?
>>>>
>>>
>>> It ran into various ICEs like:
>>>
>>> /export/build/gnu/gcc-x32/build-x86_64-linux/gcc/xgcc
>>> -B/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/ -S -o m.s -mx32 -std=gnu99
>>> -O2 -fPIC m.i
>>> m.i: In function \u2018__kernel_rem_pio2\u2019:
>>> m.i:18:1: error: insn does not satisfy its constraints:
>>> (insn 108 106 186 3 (set (reg:SI 40 r11 [207])
>>> (plus:SI (plus:SI (mult:SI (reg:SI 1 dx [205])
>>> (const_int 8 [0x8]))
>>> (subreg:SI (plus:DI (reg/f:DI 7 sp)
>>> (const_int 208 [0xd0])) 0))
>>> (const_int -160 [0xffffffffffffff60]))) m.i:3 251 {*lea_1_x32}
>>> (nil))
>>> m.i:18:1: internal compiler error: in reload_cse_simplify_operands, at
>>> postreload.c:403
>>> Please submit a full bug report,
>>> with preprocessed source if appropriate.
>>> See <http://gcc.gnu.org/bugs.html> for instructions.
>>> make: *** [m.s] Error 1
>>
>> Yes, this is an example from PR I am referring to. Did you try to
>> define LEGITIMIZE_RELOAD_ADDRESS? It is supposed to fix this.
>>
>
> They make things even more complex. ix86_simplify_base_index_disp
> is called after reload is done since we can do this translation safely
> only on hard registers, not on pseudo registers.
>
Hi Uros,
The current implementation has been tested extensively. I'd like to keep
it ASIS so that we can have a working x32 support. We will revisit it later:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49765
after we have a working x32 GCC.
Thanks.
--
H.J.
next prev parent reply other threads:[~2011-07-16 16:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-09 22:46 H.J. Lu
2011-07-15 13:04 ` Uros Bizjak
2011-07-15 13:36 ` H.J. Lu
2011-07-15 15:45 ` Uros Bizjak
2011-07-15 15:54 ` H.J. Lu
2011-07-15 16:13 ` Uros Bizjak
2011-07-15 16:13 ` H.J. Lu
2011-07-15 16:17 ` Uros Bizjak
2011-07-15 16:22 ` H.J. Lu
2011-07-15 17:25 ` H.J. Lu
2011-07-16 17:21 ` H.J. Lu [this message]
2011-07-16 22:58 ` Uros Bizjak
2011-07-19 12:03 ` Richard Sandiford
2011-07-19 12:11 ` Uros Bizjak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMe9rOqCDYfuC-4QiCYyFe7--wkhSO_jVPO5PgRP_BvuXb+BTA@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).