qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/3] Hexagon patch queue
@ 2021-03-07  1:39 Richard Henderson
  2021-03-07  1:39 ` [PULL 1/3] exec: Poison Hexagon target-specific definitions Richard Henderson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Richard Henderson @ 2021-03-07  1:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

The following changes since commit 91e92cad67caca3bc4b8e920ddb5c8ca64aac9e1:

  Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210305' into staging (2021-03-05 19:04:47 +0000)

are available in the Git repository at:

  https://gitlab.com/rth7680/qemu.git tags/pull-hex-20210306

for you to fetch changes up to 2526e69efd8e386573212bf3ea05171a727a598b:

  target/hexagon/opcodes: Add missing varargs cleanup (2021-03-06 17:35:43 -0800)

----------------------------------------------------------------
Add hexagon to include/exec/poison.h
Two Coverity fixes for target/hexagon/

----------------------------------------------------------------
Philippe Mathieu-Daudé (2):
      exec: Poison Hexagon target-specific definitions
      target/hexagon/opcodes: Add missing varargs cleanup

Taylor Simpson (1):
      target/hexagon: Fix shift amount check in fASHIFTL/fLSHIFTR

 include/exec/poison.h    | 2 ++
 target/hexagon/macros.h  | 4 ++--
 target/hexagon/opcodes.c | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PULL 1/3] exec: Poison Hexagon target-specific definitions
  2021-03-07  1:39 [PULL 0/3] Hexagon patch queue Richard Henderson
@ 2021-03-07  1:39 ` Richard Henderson
  2021-03-07  1:39 ` [PULL 2/3] target/hexagon: Fix shift amount check in fASHIFTL/fLSHIFTR Richard Henderson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2021-03-07  1:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Taylor Simpson, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Commit 3e7a84eeccc ("Hexagon build infrastructure") added Hexagon
definitions that should be poisoned on target independent device
code, but forgot to update "exec/poison.h". Do it now.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20210219135754.1968100-1-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 include/exec/poison.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/exec/poison.h b/include/exec/poison.h
index d7ae1f23e7..6bb86f6c2f 100644
--- a/include/exec/poison.h
+++ b/include/exec/poison.h
@@ -10,6 +10,7 @@
 #pragma GCC poison TARGET_ALPHA
 #pragma GCC poison TARGET_ARM
 #pragma GCC poison TARGET_CRIS
+#pragma GCC poison TARGET_HEXAGON
 #pragma GCC poison TARGET_HPPA
 #pragma GCC poison TARGET_LM32
 #pragma GCC poison TARGET_M68K
@@ -73,6 +74,7 @@
 #pragma GCC poison CONFIG_CRIS_DIS
 #pragma GCC poison CONFIG_HPPA_DIS
 #pragma GCC poison CONFIG_I386_DIS
+#pragma GCC poison CONFIG_HEXAGON_DIS
 #pragma GCC poison CONFIG_LM32_DIS
 #pragma GCC poison CONFIG_M68K_DIS
 #pragma GCC poison CONFIG_MICROBLAZE_DIS
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PULL 2/3] target/hexagon: Fix shift amount check in fASHIFTL/fLSHIFTR
  2021-03-07  1:39 [PULL 0/3] Hexagon patch queue Richard Henderson
  2021-03-07  1:39 ` [PULL 1/3] exec: Poison Hexagon target-specific definitions Richard Henderson
@ 2021-03-07  1:39 ` Richard Henderson
  2021-03-07  1:39 ` [PULL 3/3] target/hexagon/opcodes: Add missing varargs cleanup Richard Henderson
  2021-03-09 13:50 ` [PULL 0/3] Hexagon patch queue Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2021-03-07  1:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Taylor Simpson

From: Taylor Simpson <tsimpson@quicinc.com>

Fixes: a646e99cb90 ("Hexagon (target/hexagon) macros")
Eliminate the following Coverity CIDs (Bad bit shift operation)
    325227
    325292
    325425
    325526
    325561
    325564
    325578
    325637
    325736
    325748
    325786
    325815
    325837

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <1614879425-9259-1-git-send-email-tsimpson@quicinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/hexagon/macros.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h
index 78c4efb5cb..cfcb8173ba 100644
--- a/target/hexagon/macros.h
+++ b/target/hexagon/macros.h
@@ -459,7 +459,7 @@ static inline void gen_logical_not(TCGv dest, TCGv src)
                    : (fCAST##REGSTYPE##s(SRC) >> (SHAMT)))
 #define fASHIFTR(SRC, SHAMT, REGSTYPE) (fCAST##REGSTYPE##s(SRC) >> (SHAMT))
 #define fLSHIFTR(SRC, SHAMT, REGSTYPE) \
-    (((SHAMT) >= 64) ? 0 : (fCAST##REGSTYPE##u(SRC) >> (SHAMT)))
+    (((SHAMT) >= (sizeof(SRC) * 8)) ? 0 : (fCAST##REGSTYPE##u(SRC) >> (SHAMT)))
 #define fROTL(SRC, SHAMT, REGSTYPE) \
     (((SHAMT) == 0) ? (SRC) : ((fCAST##REGSTYPE##u(SRC) << (SHAMT)) | \
                               ((fCAST##REGSTYPE##u(SRC) >> \
@@ -469,7 +469,7 @@ static inline void gen_logical_not(TCGv dest, TCGv src)
                               ((fCAST##REGSTYPE##u(SRC) << \
                                  ((sizeof(SRC) * 8) - (SHAMT))))))
 #define fASHIFTL(SRC, SHAMT, REGSTYPE) \
-    (((SHAMT) >= 64) ? 0 : (fCAST##REGSTYPE##s(SRC) << (SHAMT)))
+    (((SHAMT) >= (sizeof(SRC) * 8)) ? 0 : (fCAST##REGSTYPE##s(SRC) << (SHAMT)))
 
 #ifdef QEMU_GENERATE
 #define fLOAD(NUM, SIZE, SIGN, EA, DST) MEM_LOAD##SIZE##SIGN(DST, EA)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PULL 3/3] target/hexagon/opcodes: Add missing varargs cleanup
  2021-03-07  1:39 [PULL 0/3] Hexagon patch queue Richard Henderson
  2021-03-07  1:39 ` [PULL 1/3] exec: Poison Hexagon target-specific definitions Richard Henderson
  2021-03-07  1:39 ` [PULL 2/3] target/hexagon: Fix shift amount check in fASHIFTL/fLSHIFTR Richard Henderson
@ 2021-03-07  1:39 ` Richard Henderson
  2021-03-09 13:50 ` [PULL 0/3] Hexagon patch queue Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2021-03-07  1:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Taylor Simpson, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Fix a trivial incorrect usage of variable argument macros detected
by Coverity (missing_va_end: va_end was not called for ap).

Fixes: Coverity CID 1446720 (VARARGS)
Fixes: e3c00c2ed75 ("Hexagon (target/hexagon) opcode data structures")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20210223111253.2831285-1-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/hexagon/opcodes.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/hexagon/opcodes.c b/target/hexagon/opcodes.c
index 4eef5fc40f..35d790cdd5 100644
--- a/target/hexagon/opcodes.c
+++ b/target/hexagon/opcodes.c
@@ -82,6 +82,7 @@ static void init_attribs(int tag, ...)
     while ((attr = va_arg(ap, int)) != 0) {
         set_bit(attr, opcode_attribs[tag]);
     }
+    va_end(ap);
 }
 
 const OpcodeEncoding opcode_encodings[] = {
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PULL 0/3] Hexagon patch queue
  2021-03-07  1:39 [PULL 0/3] Hexagon patch queue Richard Henderson
                   ` (2 preceding siblings ...)
  2021-03-07  1:39 ` [PULL 3/3] target/hexagon/opcodes: Add missing varargs cleanup Richard Henderson
@ 2021-03-09 13:50 ` Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2021-03-09 13:50 UTC (permalink / raw)
  To: Richard Henderson; +Cc: QEMU Developers

On Sun, 7 Mar 2021 at 01:39, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The following changes since commit 91e92cad67caca3bc4b8e920ddb5c8ca64aac9e1:
>
>   Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210305' into staging (2021-03-05 19:04:47 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/rth7680/qemu.git tags/pull-hex-20210306
>
> for you to fetch changes up to 2526e69efd8e386573212bf3ea05171a727a598b:
>
>   target/hexagon/opcodes: Add missing varargs cleanup (2021-03-06 17:35:43 -0800)
>
> ----------------------------------------------------------------
> Add hexagon to include/exec/poison.h
> Two Coverity fixes for target/hexagon/
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/6.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-09 13:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-07  1:39 [PULL 0/3] Hexagon patch queue Richard Henderson
2021-03-07  1:39 ` [PULL 1/3] exec: Poison Hexagon target-specific definitions Richard Henderson
2021-03-07  1:39 ` [PULL 2/3] target/hexagon: Fix shift amount check in fASHIFTL/fLSHIFTR Richard Henderson
2021-03-07  1:39 ` [PULL 3/3] target/hexagon/opcodes: Add missing varargs cleanup Richard Henderson
2021-03-09 13:50 ` [PULL 0/3] Hexagon patch queue Peter Maydell

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).