* [Qemu-devel] [7076] target-mips: optimize a few tcg_temp_free()
@ 2009-04-10 21:41 Aurelien Jarno
2009-04-10 21:48 ` Andreas Färber
0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2009-04-10 21:41 UTC (permalink / raw)
To: qemu-devel
Revision: 7076
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7076
Author: aurel32
Date: 2009-04-10 21:41:53 +0000 (Fri, 10 Apr 2009)
Log Message:
-----------
target-mips: optimize a few tcg_temp_free()
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Modified Paths:
--------------
trunk/target-mips/translate.c
Modified: trunk/target-mips/translate.c
===================================================================
--- trunk/target-mips/translate.c 2009-04-10 21:27:48 UTC (rev 7075)
+++ trunk/target-mips/translate.c 2009-04-10 21:41:53 UTC (rev 7076)
@@ -5790,13 +5790,13 @@
t0 = tcg_temp_new_i32();
tcg_gen_andi_i32(t0, fpu_fcr31, get_fp_bit(cc));
tcg_gen_brcondi_i32(cond, t0, 0, l1);
+ tcg_temp_free_i32(t0);
if (rs == 0) {
tcg_gen_movi_tl(cpu_gpr[rd], 0);
} else {
tcg_gen_mov_tl(cpu_gpr[rd], cpu_gpr[rs]);
}
gen_set_label(l1);
- tcg_temp_free_i32(t0);
}
static inline void gen_movcf_s (int fs, int fd, int cc, int tf)
@@ -5832,12 +5832,12 @@
tcg_gen_andi_i32(t0, fpu_fcr31, get_fp_bit(cc));
tcg_gen_brcondi_i32(cond, t0, 0, l1);
+ tcg_temp_free_i32(t0);
fp0 = tcg_temp_local_new_i64();
gen_load_fpr64(ctx, fp0, fs);
gen_store_fpr64(ctx, fp0, fd);
tcg_temp_free_i64(fp0);
gen_set_label(l1);
- tcg_temp_free_i32(t0);
}
static inline void gen_movcf_ps (int fs, int fd, int cc, int tf)
@@ -5860,11 +5860,11 @@
tcg_gen_andi_i32(t0, fpu_fcr31, get_fp_bit(cc+1));
tcg_gen_brcondi_i32(cond, t0, 0, l2);
+ tcg_temp_free_i32(t0);
gen_load_fpr32h(t0, fs);
gen_store_fpr32h(t0, fd);
gen_set_label(l2);
- tcg_temp_free_i32(t0);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [7076] target-mips: optimize a few tcg_temp_free()
2009-04-10 21:41 [Qemu-devel] [7076] target-mips: optimize a few tcg_temp_free() Aurelien Jarno
@ 2009-04-10 21:48 ` Andreas Färber
2009-04-10 21:55 ` Aurélien Jarno
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2009-04-10 21:48 UTC (permalink / raw)
To: qemu-devel; +Cc: Aurélien Jarno
Am 10.04.2009 um 23:41 schrieb Aurelien Jarno:
> @@ -5860,11 +5860,11 @@
>
> tcg_gen_andi_i32(t0, fpu_fcr31, get_fp_bit(cc+1));
> tcg_gen_brcondi_i32(cond, t0, 0, l2);
> + tcg_temp_free_i32(t0);
> gen_load_fpr32h(t0, fs);
> gen_store_fpr32h(t0, fd);
Use after free?
Andreas
>
> gen_set_label(l2);
>
> - tcg_temp_free_i32(t0);
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [7076] target-mips: optimize a few tcg_temp_free()
2009-04-10 21:48 ` Andreas Färber
@ 2009-04-10 21:55 ` Aurélien Jarno
0 siblings, 0 replies; 3+ messages in thread
From: Aurélien Jarno @ 2009-04-10 21:55 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-devel
On Fri, Apr 10, 2009 at 11:48:57PM +0200, Andreas Färber wrote:
>
> Am 10.04.2009 um 23:41 schrieb Aurelien Jarno:
>
>> @@ -5860,11 +5860,11 @@
>>
>> tcg_gen_andi_i32(t0, fpu_fcr31, get_fp_bit(cc+1));
>> tcg_gen_brcondi_i32(cond, t0, 0, l2);
>> + tcg_temp_free_i32(t0);
>> gen_load_fpr32h(t0, fs);
>> gen_store_fpr32h(t0, fd);
>
> Use after free?
Oops, I think I should stop writing code now and go to sleep instead.
Thanks for the notice.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-10 22:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-10 21:41 [Qemu-devel] [7076] target-mips: optimize a few tcg_temp_free() Aurelien Jarno
2009-04-10 21:48 ` Andreas Färber
2009-04-10 21:55 ` Aurélien Jarno
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).