All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Christopher Li <sparse@chrisli.org>,
	Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: [RFC] rationale for systematic elimination of OP_SYMADDR instructions
Date: Wed, 26 Apr 2017 09:15:27 -0700	[thread overview]
Message-ID: <CA+55aFxY_yMJxF2rLpBVYHPwNaWnvvXH-P0Ud1tYi8rE1g7tqg@mail.gmail.com> (raw)
In-Reply-To: <CAMHZB6EE93YSm0gVUr=dhNpsTZ1vU8acJ9msyh3VSdTOTVUq-w@mail.gmail.com>

On Tue, Apr 25, 2017 at 7:49 PM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
>
> Roughly, once you begin to play with code generation, something like
> OP_SYMADDR is an operation that you will really do.
> Depending on the relocation, it can even be something relatively costly:
> I'm thinking static code on a 64bit machine where you can only generate
> 16bit constants, others cases may be not at all cheaper.
> So it's something that soon or later will need to be exposed and
> doing CSE on the address is good.

Ack. I think the OP_SYMADDR elimination was wrong, and your patch is
the right thing to do.

It was done to roughly approximate the 32-bit x86 code, making the
pseudo-asm that the linearizer outputs look more like x86 address
generation, but you're right, it's bogus.

                 Linus

  parent reply	other threads:[~2017-04-26 16:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09 14:20 [RFC] rationale for systematic elimination of OP_SYMADDR instructions Luc Van Oostenryck
2017-04-25 19:20 ` Christopher Li
2017-04-26  2:49   ` Luc Van Oostenryck
2017-04-26 11:33     ` Christopher Li
2017-04-26 12:17       ` Luc Van Oostenryck
2017-04-26 21:02         ` Christopher Li
2017-04-26 23:02           ` Luc Van Oostenryck
2017-08-10 15:01             ` Christopher Li
2017-08-10 22:16               ` Luc Van Oostenryck
2017-08-11  1:17                 ` Christopher Li
2017-08-11 12:25                   ` Luc Van Oostenryck
2017-04-26 16:15     ` Linus Torvalds [this message]
2017-04-26 23:04       ` Luc Van Oostenryck

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=CA+55aFxY_yMJxF2rLpBVYHPwNaWnvvXH-P0Ud1tYi8rE1g7tqg@mail.gmail.com \
    --to=torvalds@linux-foundation.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=sparse@chrisli.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.