From: Ilya Enkovich <enkovich.gnu@gmail.com>
To: Hans-Peter Nilsson <hp@bitrange.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
Evgeny Stupachenko <evstupac@gmail.com>
Subject: Re: Enable EBX for x86 in 32bits PIC code
Date: Mon, 25 Aug 2014 11:43:00 -0000 [thread overview]
Message-ID: <CAMbmDYb4PZemV0UXSA1bmxau5KqW8FtpTa_-Vh2cC3Z3_u=A+A@mail.gmail.com> (raw)
In-Reply-To: <alpine.BSF.2.02.1408250718550.86259@arjuna.pair.com>
2014-08-25 15:24 GMT+04:00 Hans-Peter Nilsson <hp@bitrange.com>:
> On Mon, 25 Aug 2014, Ilya Enkovich wrote:
>> 2014-08-23 5:47 GMT+04:00 Hans-Peter Nilsson <hp@bitrange.com>:
>> > ...did you send the right version of the patch?
>> > This one uses the RTX-returning hook only in boolean tests,
>> > unless I misread.
>
> (I did, but not by much.)
>
>> NULL returned by hook means we do not have implicit pic arg to
>> pass/receive and there are pieces of code which should be executed
>> only when implicit pic arg exists. This causes these boolean tests.
>
> Well, obviously, but...
>
>> There are also non boolean usages. E.g.:
>
> I thing singular ("usage") is more correct?
> I saw only one such use. :)
There is another one in i386.c :)
>
>> + rtx old_reg = targetm.calls.implicit_pic_arg (fndecl);
>> + rtx new_reg = gen_reg_rtx (GET_MODE (old_reg));
>> + emit_move_insn (new_reg, old_reg);
>> + pic_offset_table_rtx = new_reg;
>
> And before that, it's called as a boolean test, throwing away
> the result!
>
> I suggest you change the hook to return a boolean, with a
> pointer argument to a variable to set, passed as NULL from
> callers not interested in the actual value.
>
> I.e. instead of:
>
>> >> +@deftypefn {Target Hook} rtx TARGET_IMPLICIT_PIC_ARG (const_tree @var{fntype_or_decl})
>
> make it a:
>
> @deftypefn {Target Hook} bool TARGET_IMPLICIT_PIC_ARG
> (const_tree @var{fntype_or_decl}, rtx *@var{addr})
OK. I'll change this hook if it goes to a product quality patch.
Current patch is posted to demonstrate an approach and show narrow
points I have to deal with in reload. There is no reason in cleaning
it until a decision about next steps is made.
Thanks,
Ilya
>
> brgds, H-P
next prev parent reply other threads:[~2014-08-25 11:43 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAOvf_xxsQ_oYGqNAVQ1+BW+CuD3mzebZ2xma0jpF=WfyZMCRCA@mail.gmail.com>
[not found] ` <CAFiYyc1mFtTezkTJORmJJq+yht=qPSwiN7KDn19+bSuSdaqvMQ@mail.gmail.com>
[not found] ` <CAOvf_xyeVeg2oB9Xxz8RMEQ6gyfJY5whd9s4ygoAAEaMU9efnA@mail.gmail.com>
[not found] ` <20140707114750.GB31640@tucnak.redhat.com>
[not found] ` <CAMbmDYZV_fx0jxmKHhLsC2pJ7pDzuu6toEAH72izOdpq6KGyfg@mail.gmail.com>
2014-08-22 12:21 ` Ilya Enkovich
2014-08-23 1:47 ` Hans-Peter Nilsson
2014-08-25 9:25 ` Ilya Enkovich
2014-08-25 11:24 ` Hans-Peter Nilsson
2014-08-25 11:43 ` Ilya Enkovich [this message]
2014-08-25 15:09 ` Vladimir Makarov
2014-08-26 7:49 ` Ilya Enkovich
2014-08-26 8:57 ` Ilya Enkovich
2014-08-26 15:25 ` Vladimir Makarov
2014-08-26 21:42 ` Ilya Enkovich
2014-08-27 20:19 ` Vladimir Makarov
2014-08-28 8:28 ` Ilya Enkovich
2014-08-29 6:47 ` Ilya Enkovich
2014-09-02 14:29 ` Vladimir Makarov
2014-09-03 20:19 ` Vladimir Makarov
[not found] ` <0EFAB2BDD0F67E4FB6CCC8B9F87D756969B3A89D@IRSMSX101.ger.corp.intel.com>
2014-09-09 16:43 ` Vladimir Makarov
2014-09-11 19:57 ` Jeff Law
2014-09-23 13:54 ` Ilya Enkovich
2014-09-23 14:23 ` Uros Bizjak
2014-09-23 15:59 ` Jeff Law
2014-09-23 14:34 ` Jakub Jelinek
2014-09-23 15:59 ` Petr Machata
2014-09-23 16:00 ` Jeff Law
2014-09-23 16:03 ` Jakub Jelinek
2014-09-23 16:10 ` Jeff Law
2014-09-24 6:56 ` Ilya Enkovich
2014-09-24 15:27 ` Jeff Law
2014-09-24 20:32 ` Ilya Enkovich
2014-09-24 21:20 ` Jeff Law
2014-09-29 11:09 ` Jakub Jelinek
2014-10-21 16:05 ` [PATCH] Improve i?86 address delegitimization after 32-bit pic changes (PR target/63542) Jakub Jelinek
2014-10-22 2:02 ` Jeff Law
2014-11-24 15:57 ` H.J. Lu
2014-08-27 21:39 ` Enable EBX for x86 in 32bits PIC code Jeff Law
2014-08-28 8:37 ` Ilya Enkovich
2014-08-28 12:43 ` Uros Bizjak
2014-08-28 12:54 ` Ilya Enkovich
2014-08-28 13:08 ` Uros Bizjak
2014-08-28 13:29 ` Ilya Enkovich
2014-08-28 16:25 ` Uros Bizjak
2014-08-29 18:56 ` Jeff Law
2014-08-25 17:30 ` Jeff Law
2014-08-28 13:01 ` Uros Bizjak
2014-08-28 13:13 ` Ilya Enkovich
2014-08-28 18:30 ` Florian Weimer
2014-08-29 18:48 ` Jeff Law
2014-08-28 18:58 ` Uros Bizjak
2014-08-29 6:51 ` Ilya Enkovich
2014-08-29 18:45 ` Jeff Law
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='CAMbmDYb4PZemV0UXSA1bmxau5KqW8FtpTa_-Vh2cC3Z3_u=A+A@mail.gmail.com' \
--to=enkovich.gnu@gmail.com \
--cc=evstupac@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hp@bitrange.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).