* [Qemu-devel] [PULL for-2.4 0/2] tcg fixes
@ 2015-07-27 14:33 Richard Henderson
2015-07-27 14:33 ` [Qemu-devel] [PULL for-2.4 1/2] tcg: correctly mark dead inputs for mov with a constant Richard Henderson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Richard Henderson @ 2015-07-27 14:33 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
Two buglets that Aurelien has found in the last week.
We don't have test cases that fail without additional
patches, but better to fix them anyway.
r~
The following changes since commit e40db4c6d391419c0039fe274c74df32a6ca1a28:
Merge remote-tracking branch 'remotes/jnsnow/tags/cve-2015-5154-pull-request' into staging (2015-07-27 13:10:00 +0100)
are available in the git repository at:
git://github.com/rth7680/qemu.git tags/pull-tcg-20150727
for you to fetch changes up to bbeb82395eaca0e3c38b433b2d2a5bad4a5fbd81:
tcg: mark temps as mem_coherent = 0 for mov with a constant (2015-07-27 07:25:40 -0700)
----------------------------------------------------------------
Fix buglets for 2.4
----------------------------------------------------------------
Aurelien Jarno (2):
tcg: correctly mark dead inputs for mov with a constant
tcg: mark temps as mem_coherent = 0 for mov with a constant
tcg/tcg.c | 4 ++++
1 file changed, 4 insertions(+)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL for-2.4 1/2] tcg: correctly mark dead inputs for mov with a constant
2015-07-27 14:33 [Qemu-devel] [PULL for-2.4 0/2] tcg fixes Richard Henderson
@ 2015-07-27 14:33 ` Richard Henderson
2015-07-27 14:33 ` [Qemu-devel] [PULL for-2.4 2/2] tcg: mark temps as mem_coherent = 0 " Richard Henderson
2015-07-27 21:09 ` [Qemu-devel] [PULL for-2.4 0/2] tcg fixes Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2015-07-27 14:33 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, Aurelien Jarno
From: Aurelien Jarno <aurelien@aurel32.net>
When tcg_reg_alloc_mov propagate a constant, we failed to correctly mark
a temp as dead if the liveness analysis hints so. This fixes the
following assert when configure with --enable-debug-tcg:
qemu-x86_64: tcg/tcg.c:1827: tcg_reg_alloc_bb_end: Assertion `ts->val_type == TEMP_VAL_DEAD' failed.
Cc: Richard Henderson <rth@twiddle.net>
Reported-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-Id: <1437994568-7825-2-git-send-email-aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
tcg/tcg.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 7e088b1..9a2508b 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1920,6 +1920,9 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def,
}
ots->val_type = TEMP_VAL_CONST;
ots->val = ts->val;
+ if (IS_DEAD_ARG(1)) {
+ temp_dead(s, args[1]);
+ }
} else {
/* The code in the first if block should have moved the
temp to a register. */
--
2.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL for-2.4 2/2] tcg: mark temps as mem_coherent = 0 for mov with a constant
2015-07-27 14:33 [Qemu-devel] [PULL for-2.4 0/2] tcg fixes Richard Henderson
2015-07-27 14:33 ` [Qemu-devel] [PULL for-2.4 1/2] tcg: correctly mark dead inputs for mov with a constant Richard Henderson
@ 2015-07-27 14:33 ` Richard Henderson
2015-07-27 21:09 ` [Qemu-devel] [PULL for-2.4 0/2] tcg fixes Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2015-07-27 14:33 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, Aurelien Jarno
From: Aurelien Jarno <aurelien@aurel32.net>
When a constant has to be loaded in a mov op, we fail to set
mem_coherent = 0. This patch fixes that.
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-Id: <1437994568-7825-3-git-send-email-aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
tcg/tcg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 9a2508b..0892a9b 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1894,6 +1894,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def,
ts->mem_coherent = 1;
} else if (ts->val_type == TEMP_VAL_CONST) {
tcg_out_movi(s, itype, ts->reg, ts->val);
+ ts->mem_coherent = 0;
}
s->reg_to_temp[ts->reg] = args[1];
ts->val_type = TEMP_VAL_REG;
--
2.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL for-2.4 0/2] tcg fixes
2015-07-27 14:33 [Qemu-devel] [PULL for-2.4 0/2] tcg fixes Richard Henderson
2015-07-27 14:33 ` [Qemu-devel] [PULL for-2.4 1/2] tcg: correctly mark dead inputs for mov with a constant Richard Henderson
2015-07-27 14:33 ` [Qemu-devel] [PULL for-2.4 2/2] tcg: mark temps as mem_coherent = 0 " Richard Henderson
@ 2015-07-27 21:09 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-07-27 21:09 UTC (permalink / raw)
To: Richard Henderson; +Cc: QEMU Developers
On 27 July 2015 at 15:33, Richard Henderson <rth@twiddle.net> wrote:
> Two buglets that Aurelien has found in the last week.
> We don't have test cases that fail without additional
> patches, but better to fix them anyway.
>
>
> r~
>
>
> The following changes since commit e40db4c6d391419c0039fe274c74df32a6ca1a28:
>
> Merge remote-tracking branch 'remotes/jnsnow/tags/cve-2015-5154-pull-request' into staging (2015-07-27 13:10:00 +0100)
>
> are available in the git repository at:
>
> git://github.com/rth7680/qemu.git tags/pull-tcg-20150727
>
> for you to fetch changes up to bbeb82395eaca0e3c38b433b2d2a5bad4a5fbd81:
>
> tcg: mark temps as mem_coherent = 0 for mov with a constant (2015-07-27 07:25:40 -0700)
>
> ----------------------------------------------------------------
> Fix buglets for 2.4
>
> ----------------------------------------------------------------
> Aurelien Jarno (2):
> tcg: correctly mark dead inputs for mov with a constant
> tcg: mark temps as mem_coherent = 0 for mov with a constant
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-27 21:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 14:33 [Qemu-devel] [PULL for-2.4 0/2] tcg fixes Richard Henderson
2015-07-27 14:33 ` [Qemu-devel] [PULL for-2.4 1/2] tcg: correctly mark dead inputs for mov with a constant Richard Henderson
2015-07-27 14:33 ` [Qemu-devel] [PULL for-2.4 2/2] tcg: mark temps as mem_coherent = 0 " Richard Henderson
2015-07-27 21:09 ` [Qemu-devel] [PULL for-2.4 0/2] tcg fixes 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).