tcg: Fix regression in tcg_gen_deposit_i64.
PATCH 1/2 tcg: Fix regression in tcg_gen_deposit_i64.
The error being caused by the failure to copy the other half of the input to the output after having narrowed the deposit operation.
Signed-off-by Richard Henderson <[email protected]>
--- tcg/tcg-op.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
tcg/tcg-op.h +2 -0
@@ -2090,6 +2090,7 @@ static inline void tcg_gen_deposit_i64(TCGv_i64 ret, TCGv_i64 arg1,#if TCG_TARGET_REG_BITS ==32 if (ofs >=32 ) { +tcg_gen_mov_i32 (TCGV_LOW (ret),TCGV_LOW (arg1));tcg_gen_deposit_i32 (TCGV_HIGH (ret),TCGV_HIGH (arg1),TCGV_LOW (arg2), ofs -32 , len);return ;
@@ -2097,6 +2098,7 @@ static inline void tcg_gen_deposit_i64(TCGv_i64 ret, TCGv_i64 arg1,if (ofs + len <=32 ) {tcg_gen_deposit_i32 (TCGV_LOW (ret),TCGV_LOW (arg1),TCGV_LOW (arg2), ofs, len); +tcg_gen_mov_i32 (TCGV_HIGH (ret),TCGV_HIGH (arg1));return ; }#endif
Signature · 1 line
1.7.6.4
PATCH 2/2 tcg: Fix whitespace in tcg-op.h.
Removing the only tabs in the file.
Signed-off-by Richard Henderson <[email protected]>
--- tcg/tcg-op.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
tcg/tcg-op.h +4 -4
@@ -2042,8 +2042,8 @@ static inline void tcg_gen_rotri_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2) }static inline void tcg_gen_deposit_i32 (TCGv_i32 ret,TCGv_i32 arg1, -TCGv_i32 arg2,unsigned int ofs, -unsigned int len) +TCGv_i32 arg2,unsigned int ofs, +unsigned int len) {uint32_t mask;TCGv_i32 t1;
@@ -2073,8 +2073,8 @@ static inline void tcg_gen_deposit_i32(TCGv_i32 ret, TCGv_i32 arg1, }static inline void tcg_gen_deposit_i64 (TCGv_i64 ret,TCGv_i64 arg1, -TCGv_i64 arg2,unsigned int ofs, -unsigned int len) +TCGv_i64 arg2,unsigned int ofs, +unsigned int len) {uint64_t mask;TCGv_i64 t1;
Signature · 1 line
1.7.6.4
malc
AppliedQuoted 2 lines · Richard Henderson
The error being caused by the failure to copy the other half of the input to the output after having narrowed the deposit operation.
Thanks, applied.
Quoted 27 lines
Signed-off-by Richard Henderson <[email protected]>--- tcg/tcg-op.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)tcg/tcg-op.h +2
-0@@ -2090,6 +2090,7 @@ static inline void tcg_gen_deposit_i64(TCGv_i64 ret, TCGv_i64 arg1,#if TCG_TARGET_REG_BITS ==32 if (ofs >=32 ) { +tcg_gen_mov_i32 (TCGV_LOW (ret),TCGV_LOW (arg1));tcg_gen_deposit_i32 (TCGV_HIGH (ret),TCGV_HIGH (arg1),TCGV_LOW (arg2), ofs -32 , len);return ;@@ -2097,6 +2098,7 @@ static inline void tcg_gen_deposit_i64(TCGv_i64 ret, TCGv_i64 arg1,if (ofs + len <=32 ) {tcg_gen_deposit_i32 (TCGV_LOW (ret),TCGV_LOW (arg1),TCGV_LOW (arg2), ofs, len); +tcg_gen_mov_i32 (TCGV_HIGH (ret),TCGV_HIGH (arg1));return ; }#endif
Signature · 1 line
mailto:[email protected]
Quoted 3 lines · Richard Henderson
The error being caused by the failure to copy the other half of the input to the output after having narrowed the deposit operation.
Thanks, this makes my ppc32 host work again :)
Alex