[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re: [Qemu-devel] [5283] Use the new concat_tl_i64 op for std and stda
From: |
Vince Weaver |
Subject: |
re: [Qemu-devel] [5283] Use the new concat_tl_i64 op for std and stda |
Date: |
Tue, 23 Sep 2008 17:49:13 -0400 (EDT) |
Hello
the aforementioned patch broke the spec2k crafty benchmark on
sparc32plus-linux-user (I'm running on x86_64 but I don't think it makes a
difference).
As always, the problem is when there are high bits (above 32) set when
concating.
The old code generated:
mov_i32 tmp11,tmp0
mov_i32 tmp1,loc4
movi_i64 tmp12,$0xffffffff
and_i64 tmp10,tmp1,tmp12
movi_i64 tmp12,$0x20
shl_i64 tmp10,tmp10,tmp12
movi_i64 tmp12,$0xffffffff
and_i64 tmp2,tmp11,tmp12
or_i64 tmp2,tmp2,tmp10
qemu_st64 tmp2,loc5,$0x0
The new code generates:
movi_i64 tmp12,$0x20
shl_i64 tmp10,loc4,tmp12
or_i64 tmp2,tmp0,tmp10
qemu_st64 tmp2,loc5,$0x0
which generates wrong values because the low value being concatenated
isn't masked/truncated to 32-bits first.
Vince