qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] cab86d: Hexagon (target/hexagon) fix store w/


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] cab86d: Hexagon (target/hexagon) fix store w/mem_noshuf & ...
Date: Wed, 20 Jul 2022 06:08:16 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: cab86dea1d205f5224770de294cc718be467ccf8
      
https://github.com/qemu/qemu/commit/cab86dea1d205f5224770de294cc718be467ccf8
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-07-19 (Tue, 19 Jul 2022)

  Changed paths:
    M target/hexagon/gen_tcg.h
    M tests/tcg/hexagon/mem_noshuf.c

  Log Message:
  -----------
  Hexagon (target/hexagon) fix store w/mem_noshuf & predicated load

Call the CHECK_NOSHUF macro multiple times: once in the
fGEN_TCG_PRED_LOAD() and again in fLOAD().

Before this commit, a packet with a store and a predicated
load with mem_noshuf that gets encoded like this:

    { P0 = cmp.eq(R17,#0x0)
      memw(R18+#0x0) = R2
      if (!P0.new) R3 = memw(R17+#0x4) }

... would end up generating a branch over both the load
and the store like so:

    ...
    brcond_i32 loc17,$0x0,eq,$L1
    mov_i32 loc18,store_addr_1
    qemu_st_i32 store_val32_1,store_addr_1,leul,0
    qemu_ld_i32 loc16,loc7,leul,0
    set_label $L1
    ...

Test cases added to tests/tcg/hexagon/mem_noshuf.c

Co-authored-by: Taylor Simpson <tsimpson@quicinc.com>
Signed-off-by: Brian Cain <bcain@quicinc.com>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220707210546.15985-2-tsimpson@quicinc.com>


  Commit: 15fc6badbd28a126346f84c1acae48e273b66b67
      
https://github.com/qemu/qemu/commit/15fc6badbd28a126346f84c1acae48e273b66b67
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-07-19 (Tue, 19 Jul 2022)

  Changed paths:
    M target/hexagon/gen_tcg.h
    M target/hexagon/genptr.c
    M target/hexagon/helper.h
    M target/hexagon/macros.h
    M target/hexagon/op_helper.c
    M tests/tcg/hexagon/Makefile.target
    A tests/tcg/hexagon/mem_noshuf_exception.c

  Log Message:
  -----------
  Hexagon (target/hexagon) fix bug in mem_noshuf load exception

The semantics of a mem_noshuf packet are that the store effectively
happens before the load.  However, in cases where the load raises an
exception, we cannot simply execute the store first.

This change adds a probe to check that the load will not raise an
exception before executing the store.

If the load is predicated, this requires special handling.  We check
the condition before performing the probe.  Since, we need the EA to
perform the check, we move the GET_EA portion inside CHECK_NOSHUF_PRED.

Test case added in tests/tcg/hexagon/mem_noshuf_exception.c

Suggested-by: Alessandro Di Federico <ale@rev.ng>
Suggested-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220707210546.15985-3-tsimpson@quicinc.com>


  Commit: 1f64dd76a1bdf50ec8ab66da0ee7dcfd48ea31e4
      
https://github.com/qemu/qemu/commit/1f64dd76a1bdf50ec8ab66da0ee7dcfd48ea31e4
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-07-20 (Wed, 20 Jul 2022)

  Changed paths:
    M target/hexagon/gen_tcg.h
    M target/hexagon/genptr.c
    M target/hexagon/helper.h
    M target/hexagon/macros.h
    M target/hexagon/op_helper.c
    M tests/tcg/hexagon/Makefile.target
    M tests/tcg/hexagon/mem_noshuf.c
    A tests/tcg/hexagon/mem_noshuf_exception.c

  Log Message:
  -----------
  Merge tag 'pull-hex-20220719-1' of https://github.com/quic/qemu into staging

Recall that the semantics of a Hexagon mem_noshuf packet are that the
store effectively happens before the load.  There are two bug fixes
in this series.

# gpg: Signature made Tue 19 Jul 2022 22:25:19 BST
# gpg:                using RSA key 3635C788CE62B91FD4C59AB47B0244FB12DE4422
# gpg: Good signature from "Taylor Simpson (Rock on) <tsimpson@quicinc.com>" 
[undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 3635 C788 CE62 B91F D4C5  9AB4 7B02 44FB 12DE 4422

* tag 'pull-hex-20220719-1' of https://github.com/quic/qemu:
  Hexagon (target/hexagon) fix bug in mem_noshuf load exception
  Hexagon (target/hexagon) fix store w/mem_noshuf & predicated load

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/68e26e1e812c...1f64dd76a1bd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]