[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] Fix extlh instruction on Alpha
From: |
Andreas Schwab |
Subject: |
[Qemu-devel] Re: [PATCH] Fix extlh instruction on Alpha |
Date: |
Wed, 16 Sep 2009 23:14:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Vince Weaver <address@hidden> writes:
> The code is attempting the following:
>
> tmp1=rb&0x7;
> tmp1=temp1<<3;
>
> if (tmp1!=0) {
> tmp1=64-tmp1;
> rc=ra<<tmp1;
> }
> else {
> rc=ra;
> }
>
> The problem with the original code is that in the case of tmp1 being 0,
> the shift left by 64 would result in 0, instead of the identity.
>
> I tried to avoid the jump but couldn't. Am I missing something?
Instead of tmp1 = 64 - tmp1 use tmp1 = -tmp1 & 0x3f.
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- [Qemu-devel] [PATCH] Fix extlh instruction on Alpha, Vince Weaver, 2009/09/09
- Re: [Qemu-devel] [PATCH] Fix extlh instruction on Alpha, Aurelien Jarno, 2009/09/16
- Re: [Qemu-devel] [PATCH] Fix extlh instruction on Alpha, Vince Weaver, 2009/09/16
- Re: [Qemu-devel] [PATCH] Fix extlh instruction on Alpha, Aurelien Jarno, 2009/09/16
- Re: [Qemu-devel] [PATCH] Fix extlh instruction on Alpha, Vince Weaver, 2009/09/17
- Re: [Qemu-devel] [PATCH] Fix extlh instruction on Alpha, Laurent Desnogues, 2009/09/17
- [Qemu-devel] Re: [PATCH] Fix extlh instruction on Alpha, Andreas Schwab, 2009/09/17
- Re: [Qemu-devel] [PATCH] Fix extlh instruction on Alpha, Aurelien Jarno, 2009/09/17
- [Qemu-devel] Re: [PATCH] Fix extlh instruction on Alpha,
Andreas Schwab <=