diff options
author | Peter Maydell | 2021-03-09 12:22:18 +0100 |
---|---|---|
committer | Peter Maydell | 2021-03-09 12:22:18 +0100 |
commit | bb5643ff61291deb1d198f343a03828c5ead993f (patch) | |
tree | 6cfb82e21113b7a7f6a3b9a03a0c0789ade903b2 | |
parent | Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210306' into... (diff) | |
parent | target/hexagon/opcodes: Add missing varargs cleanup (diff) | |
download | qemu-bb5643ff61291deb1d198f343a03828c5ead993f.tar.gz qemu-bb5643ff61291deb1d198f343a03828c5ead993f.tar.xz qemu-bb5643ff61291deb1d198f343a03828c5ead993f.zip |
Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-hex-20210306' into staging
Add hexagon to include/exec/poison.h
Two Coverity fixes for target/hexagon/
# gpg: Signature made Sun 07 Mar 2021 01:37:05 GMT
# gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg: issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F
* remotes/rth-gitlab/tags/pull-hex-20210306:
target/hexagon/opcodes: Add missing varargs cleanup
target/hexagon: Fix shift amount check in fASHIFTL/fLSHIFTR
exec: Poison Hexagon target-specific definitions
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | include/exec/poison.h | 2 | ||||
-rw-r--r-- | target/hexagon/macros.h | 4 | ||||
-rw-r--r-- | target/hexagon/opcodes.c | 1 |
3 files changed, 5 insertions, 2 deletions
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 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) 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[] = { |