target-alpha: Fix cvtlq.

We were missing the 0xc0000000 mask, leading to incorrect results.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Richard Henderson 2009-12-13 17:48:55 -08:00 committed by Aurelien Jarno
parent 06445248d2
commit 68bd052ee1
1 changed files with 3 additions and 1 deletions

View File

@ -954,7 +954,9 @@ uint64_t helper_cvtqg (uint64_t a)
uint64_t helper_cvtlq (uint64_t a)
{
return (int64_t)((int32_t)((a >> 32) | ((a >> 29) & 0x3FFFFFFF)));
int32_t lo = a >> 29;
int32_t hi = a >> 32;
return (lo & 0x3FFFFFFF) | (hi & 0xc0000000);
}
static inline uint64_t __helper_cvtql(uint64_t a, int s, int v)