qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Brian Cain <bcain@quicinc.com>, qemu-devel@nongnu.org
Cc: armbru@redhat.com, richard.henderson@linaro.org,
	peter.maydell@linaro.org, quic_mathbern@quicinc.com,
	stefanha@redhat.com, ale@rev.ng, anjo@rev.ng,
	quic_mliebel@quicinc.com, ltaylorsimpson@gmail.com
Subject: Re: [PATCH v3 1/3] target/hexagon: move GETPC() calls to top level helpers
Date: Mon, 9 Oct 2023 08:10:15 +0200	[thread overview]
Message-ID: <c4536580-6757-7cc0-170f-f20fb0ad6e6f@linaro.org> (raw)
In-Reply-To: <20231008220945.983643-2-bcain@quicinc.com>

On 9/10/23 00:09, Brian Cain wrote:
> From: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
> 
> As docs/devel/loads-stores.rst states:
> 
>    ``GETPC()`` should be used with great care: calling
>    it in other functions that are *not* the top level
>    ``HELPER(foo)`` will cause unexpected behavior. Instead, the
>    value of ``GETPC()`` should be read from the helper and passed
>    if needed to the functions that the helper calls.
> 
> Let's fix the GETPC() usage in Hexagon, making sure it's always called
> from top level helpers and passed down to the places where it's
> needed. There are a few snippets where that is not currently the case:
> 
> - probe_store(), which is only called from two helpers, so it's easy to
>    move GETPC() up.
> 
> - mem_load*() functions, which are also called directly from helpers,
>    but through the MEM_LOAD*() set of macros. Note that this are only
>    used when compiling with --disable-hexagon-idef-parser.
> 
>    In this case, we also take this opportunity to simplify the code,
>    unifying the mem_load*() functions.
> 
> - HELPER(probe_hvx_stores), when called from another helper, ends up
>    using its own GETPC() expansion instead of the top level caller.
> 
> Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
> Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
> Message-Id: <2c74c3696946edba7cc5b2942cf296a5af532052.1689070412.git.quic_mathbern@quicinc.com>-ne

Again suspicious '-ne' trailing.

> Reviewed-by: Brian Cain <bcain@quicinc.com>
> Signed-off-by: Brian Cain <bcain@quicinc.com>
> ---
>   target/hexagon/macros.h    | 19 +++++-----
>   target/hexagon/op_helper.c | 75 +++++++++++++++-----------------------
>   target/hexagon/op_helper.h |  9 -----
>   3 files changed, 38 insertions(+), 65 deletions(-)



  reply	other threads:[~2023-10-09  6:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-08 22:09 [PATCH v3 0/3] hexagon: GETPC() fixes, shadowing fixes Brian Cain
2023-10-08 22:09 ` [PATCH v3 1/3] target/hexagon: move GETPC() calls to top level helpers Brian Cain
2023-10-09  6:10   ` Philippe Mathieu-Daudé [this message]
2023-10-08 22:09 ` [PATCH v3 2/3] target/hexagon: fix some occurrences of -Wshadow=local Brian Cain
2023-10-09  6:12   ` Philippe Mathieu-Daudé
2023-10-08 22:09 ` [PATCH v3 3/3] target/hexagon: avoid shadowing globals Brian Cain
2023-10-09  6:18 ` [PATCH v3 0/3] hexagon: GETPC() fixes, shadowing fixes Markus Armbruster

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=c4536580-6757-7cc0-170f-f20fb0ad6e6f@linaro.org \
    --to=philmd@linaro.org \
    --cc=ale@rev.ng \
    --cc=anjo@rev.ng \
    --cc=armbru@redhat.com \
    --cc=bcain@quicinc.com \
    --cc=ltaylorsimpson@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quic_mathbern@quicinc.com \
    --cc=quic_mliebel@quicinc.com \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.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 NNTP newsgroup(s).