#
f2457577 |
| 25-Oct-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg/optimize: Canonicalize sub2 with constants to add2
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <2023102601
tcg/optimize: Canonicalize sub2 with constants to add2
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231026013945.1152174-4-richard.henderson@linaro.org>
show more ...
|
#
6334a968 |
| 25-Oct-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg/optimize: Canonicalize subi to addi during optimization
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231
tcg/optimize: Canonicalize subi to addi during optimization
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231026013945.1152174-3-richard.henderson@linaro.org>
show more ...
|
#
26aac97c |
| 23-Oct-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg/optimize: Split out arg_new_constant
Fixes a bug wherein raw uses of tcg_constant_internal do not have their TempOptInfo initialized.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Sig
tcg/optimize: Split out arg_new_constant
Fixes a bug wherein raw uses of tcg_constant_internal do not have their TempOptInfo initialized.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
3eaadaeb |
| 24-Aug-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Eliminate duplicate env store operations
Notice when a constant is stored to the same location twice.
Reviewed-by: Song Gao <gaosong@loongson.cn> Signed-off-by: Richard Henderson <richard.hend
tcg: Eliminate duplicate env store operations
Notice when a constant is stored to the same location twice.
Reviewed-by: Song Gao <gaosong@loongson.cn> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
ab84dc39 |
| 24-Aug-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg/optimize: Optimize env memory operations
Propagate stores to loads, loads to loads.
Reviewed-by: Song Gao <gaosong@loongson.cn> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
|
#
9f75e528 |
| 02-Nov-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg/optimize: Split out cmp_better_copy
Compare two temps for "better", split out from finding the best from a whole list. Use TCGKind, which already gives the proper priority.
Signed-off-by: Rich
tcg/optimize: Split out cmp_better_copy
Compare two temps for "better", split out from finding the best from a whole list. Use TCGKind, which already gives the proper priority.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
Revision tags: v8.0.0 |
|
#
986cac1d |
| 09-Jan-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg/optimize: Pipe OptContext into reset_ts
Will be needed in the next patch.
Reviewed-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Rich
tcg/optimize: Pipe OptContext into reset_ts
Will be needed in the next patch.
Reviewed-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
b701f195 |
| 25-Oct-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Remove TCG_TARGET_HAS_neg_{i32,i64}
The movcond opcode is now mandatory for backends to implement.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231026041404.1
tcg: Remove TCG_TARGET_HAS_neg_{i32,i64}
The movcond opcode is now mandatory for backends to implement.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231026041404.1229328-7-richard.henderson@linaro.org>
show more ...
|
#
d97f8f39 |
| 16-Oct-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Optimize past conditional branches
We already register allocate through extended basic blocks, optimize through extended basic blocks as well.
Signed-off-by: Richard Henderson <richard.henders
tcg: Optimize past conditional branches
We already register allocate through extended basic blocks, optimize through extended basic blocks as well.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
3635502d |
| 04-Aug-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Introduce negsetcond opcodes
Introduce a new opcode for negative setcond.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
|
#
8f7a840d |
| 13-Aug-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Fold deposit with zero to and
Inserting a zero into a value, or inserting a value into zero at offset 0 may be implemented with AND.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Rev
tcg: Fold deposit with zero to and
Inserting a zero into a value, or inserting a value into zero at offset 0 may be implemented with AND.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
ad3d0e4d |
| 28-Mar-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Split tcg/tcg-op-common.h from tcg/tcg-op.h
Create tcg/tcg-op-common.h, moving everything that does not concern TARGET_LONG_BITS or TCGv. Adjust tcg/*.c to use the new header instead of tcg-op
tcg: Split tcg/tcg-op-common.h from tcg/tcg-op.h
Create tcg/tcg-op-common.h, moving everything that does not concern TARGET_LONG_BITS or TCGv. Adjust tcg/*.c to use the new header instead of tcg-op.h, in preparation for compiling tcg/ only once.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
fecccfcc |
| 16-May-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Split INDEX_op_qemu_{ld,st}* for guest address size
For 32-bit hosts, we cannot simply rely on TCGContext.addr_bits, as we need one or two host registers to represent the guest address.
Create
tcg: Split INDEX_op_qemu_{ld,st}* for guest address size
For 32-bit hosts, we cannot simply rely on TCGContext.addr_bits, as we need one or two host registers to represent the guest address.
Create the new opcodes and update all users. Since we have not yet eliminated TARGET_LONG_BITS, only one of the two opcodes will ever be used, so we can get away with treating them the same in the backends.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
Revision tags: v7.2.0 |
|
#
12fde9bc |
| 06-Nov-2022 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Add INDEX_op_qemu_{ld,st}_i128
Add opcodes for backend support for 128-bit memory operations.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@
tcg: Add INDEX_op_qemu_{ld,st}_i128
Add opcodes for backend support for 128-bit memory operations.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
732e89f4 |
| 05-Apr-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Replace tcg_abort with g_assert_not_reached
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
|
#
f57c6915 |
| 29-Jan-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Rename TEMP_LOCAL to TEMP_TB
Use TEMP_TB as that is more explicit about the default lifetime of the data. While "global" and "local" used to be contrasting, we have more lifetimes than that no
tcg: Rename TEMP_LOCAL to TEMP_TB
Use TEMP_TB as that is more explicit about the default lifetime of the data. While "global" and "local" used to be contrasting, we have more lifetimes than that now.
Do not yet rename tcg_temp_local_new_*, just the enum.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
39004a71 |
| 10-Nov-2022 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Reorg function calls
Pre-compute the function call layout for each helper at startup. Drop TCG_CALL_DUMMY_ARG, as we no longer need to leave gaps in the op->args[] array. This allows several p
tcg: Reorg function calls
Pre-compute the function call layout for each helper at startup. Drop TCG_CALL_DUMMY_ARG, as we no longer need to leave gaps in the op->args[] array. This allows several places to stop checking for NULL TCGTemp, to which TCG_CALL_DUMMY_ARG mapped.
For tcg_gen_callN, loop over the arguments once. Allocate the TCGOp for the call early but delay emitting it, collecting arguments first. This allows the argument processing loop to emit code for extensions and have them sequenced before the call.
For tcg_reg_alloc_call, loop over the arguments in reverse order, which allows stack slots to be filled first naturally.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
d4478943 |
| 18-Dec-2022 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
tcg: Pass number of arguments to tcg_emit_op() / tcg_op_insert_*()
In order to have variable size allocated TCGOp, pass the number of arguments we use (and would allocate) up to tcg_op_alloc().
Thi
tcg: Pass number of arguments to tcg_emit_op() / tcg_op_insert_*()
In order to have variable size allocated TCGOp, pass the number of arguments we use (and would allocate) up to tcg_op_alloc().
This alters tcg_emit_op(), tcg_op_insert_before() and tcg_op_insert_after() prototypes.
In tcg_op_alloc() ensure the number of arguments is in range.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> [PMD: Extracted from bigger patch] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221218211832.73312-2-philmd@linaro.org>
show more ...
|
Revision tags: v7.0.0 |
|
#
ed523473 |
| 16-Dec-2021 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Add opcodes for vector nand, nor, eqv
We've had placeholders for these opcodes for a while, and should have support on ppc, s390x and avx512 hosts.
Tested-by: Alex Bennée <alex.bennee@linaro.o
tcg: Add opcodes for vector nand, nor, eqv
We've had placeholders for these opcodes for a while, and should have support on ppc, s390x and avx512 hosts.
Tested-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
9becc36f |
| 09-Feb-2022 |
Alex Bennée <alex.bennee@linaro.org> |
tcg/optimize: only read val after const check
valgrind pointed out that arg_info()->val can be undefined which will be the case if the arguments are not constant. The ordering of the checks will hav
tcg/optimize: only read val after const check
valgrind pointed out that arg_info()->val can be undefined which will be the case if the arguments are not constant. The ordering of the checks will have ensured we never relied on an undefined value but for the sake of completeness re-order the code to be clear.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220209112142.3367525-1-alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
c578ff18 |
| 16-Dec-2021 |
Richard Henderson <richard.henderson@linaro.org> |
tcg/optimize: Fix folding of vector ops
Bitwise operations are easy to fold, because the operation is identical regardless of element size. But add and sub need extra element size info that is not
tcg/optimize: Fix folding of vector ops
Bitwise operations are easy to fold, because the operation is identical regardless of element size. But add and sub need extra element size info that is not currently propagated.
Fixes: 2f9f08ba43d Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/799 Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
Revision tags: v6.2.0 |
|
#
225bec0c |
| 09-Nov-2021 |
Richard Henderson <richard.henderson@linaro.org> |
tcg/optimize: Add an extra cast to fold_extract2
There is no bug, but silence a warning about computation in int32_t being assigned to a uint64_t.
Reported-by: Coverity CID 1465220 Reviewed-by: Phi
tcg/optimize: Add an extra cast to fold_extract2
There is no bug, but silence a warning about computation in int32_t being assigned to a uint64_t.
Reported-by: Coverity CID 1465220 Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
93a967fb |
| 26-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
tcg/optimize: Propagate sign info for shifting
For constant shifts, we can simply shift the s_mask.
For variable shifts, we know that sar does not reduce the s_mask, which helps for sequences like
tcg/optimize: Propagate sign info for shifting
For constant shifts, we can simply shift the s_mask.
For variable shifts, we know that sar does not reduce the s_mask, which helps for sequences like
ext32s_i64 t, in sar_i64 t, t, v ext32s_i64 out, t
allowing the final extend to be eliminated.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Luis Pires <luis.pires@eldorado.org.br> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
2b9d0c59 |
| 26-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
tcg/optimize: Propagate sign info for bit counting
The results are generally 6 bit unsigned values, though the count leading and trailing bits may produce any value for a zero input.
Reviewed-by: A
tcg/optimize: Propagate sign info for bit counting
The results are generally 6 bit unsigned values, though the count leading and trailing bits may produce any value for a zero input.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Luis Pires <luis.pires@eldorado.org.br> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
275d7d8e |
| 26-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
tcg/optimize: Propagate sign info for setcond
The result is either 0 or 1, which means that we have a 2 bit signed result, and thus 62 bits of sign. For clarity, use the smask_from_zmask function.
tcg/optimize: Propagate sign info for setcond
The result is either 0 or 1, which means that we have a 2 bit signed result, and thus 62 bits of sign. For clarity, use the smask_from_zmask function.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Luis Pires <luis.pires@eldorado.org.br> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|