mirror of https://github.com/xemu-project/xemu.git
Fix assert in set_jmp_reset_offset
Revert cross-branch optimization in tcg/optimize.c. -----BEGIN PGP SIGNATURE----- iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAl+jRxcdHHJpY2hhcmQu aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+B1wf/d6r7cHs/W9XhZQn1 5bPrWhg5ixXPR+gryYF0VSZqZJRmjSLpqh+nBPuVnHnIWcsOpfG2n7RC5+0+1GSo KNH8v7XZjaSLzEkE4O3jh7aCkcVBw+eNUGQ4aSmII0YaBQorPggThZlsx8m/SH0M AOlP/Xd9AujmdJmYxDkJx7/mZG134k2vlfZOtgpqT3TEWWDw/heXKrCnO/E+YVAt KIN/iLVQKCLhYvNpSrO5XE7JNyuXRVxNJM7F24GlCAZ8TeLT049X6L48F5jcUOwo yfu45u8HeyzOiMn+meyrHTRVkK+wEEFY1pgfnSFoIVG/PUsSi5lERb4d7b02yCtN RmOpAw== =RVTJ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20201104' into staging Fix assert in set_jmp_reset_offset Revert cross-branch optimization in tcg/optimize.c. # gpg: Signature made Thu 05 Nov 2020 00:28:07 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/tags/pull-tcg-20201104: tcg: Revert "tcg/optimize: Flush data at labels not TCG_OPF_BB_END" tcg: Remove assert from set_jmp_reset_offset Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
fbd9cc20ad
|
@ -1484,30 +1484,29 @@ void tcg_optimize(TCGContext *s)
|
|||
}
|
||||
}
|
||||
}
|
||||
/* fall through */
|
||||
goto do_reset_output;
|
||||
|
||||
default:
|
||||
do_default:
|
||||
/*
|
||||
* Default case: we know nothing about operation (or were unable
|
||||
* to compute the operation result) so no propagation is done.
|
||||
*/
|
||||
for (i = 0; i < nb_oargs; i++) {
|
||||
reset_temp(op->args[i]);
|
||||
/*
|
||||
* Save the corresponding known-zero bits mask for the
|
||||
* first output argument (only one supported so far).
|
||||
*/
|
||||
if (i == 0) {
|
||||
arg_info(op->args[i])->mask = mask;
|
||||
/* Default case: we know nothing about operation (or were unable
|
||||
to compute the operation result) so no propagation is done.
|
||||
We trash everything if the operation is the end of a basic
|
||||
block, otherwise we only trash the output args. "mask" is
|
||||
the non-zero bits mask for the first output arg. */
|
||||
if (def->flags & TCG_OPF_BB_END) {
|
||||
bitmap_zero(temps_used.l, nb_temps);
|
||||
} else {
|
||||
do_reset_output:
|
||||
for (i = 0; i < nb_oargs; i++) {
|
||||
reset_temp(op->args[i]);
|
||||
/* Save the corresponding known-zero bits mask for the
|
||||
first output argument (only one supported so far). */
|
||||
if (i == 0) {
|
||||
arg_info(op->args[i])->mask = mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case INDEX_op_set_label:
|
||||
/* Trash everything at the start of a new extended bb. */
|
||||
bitmap_zero(temps_used.l, nb_temps);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Eliminate duplicate and redundant fence instructions. */
|
||||
|
|
|
@ -335,10 +335,11 @@ static bool tcg_resolve_relocs(TCGContext *s)
|
|||
|
||||
static void set_jmp_reset_offset(TCGContext *s, int which)
|
||||
{
|
||||
size_t off = tcg_current_code_size(s);
|
||||
s->tb_jmp_reset_offset[which] = off;
|
||||
/* Make sure that we didn't overflow the stored offset. */
|
||||
assert(s->tb_jmp_reset_offset[which] == off);
|
||||
/*
|
||||
* We will check for overflow at the end of the opcode loop in
|
||||
* tcg_gen_code, where we bound tcg_current_code_size to UINT16_MAX.
|
||||
*/
|
||||
s->tb_jmp_reset_offset[which] = tcg_current_code_size(s);
|
||||
}
|
||||
|
||||
#include "tcg-target.c.inc"
|
||||
|
|
Loading…
Reference in New Issue