* [Qemu-devel] [PATCH] [ARM] Fix C-flag for ASR <reg> when shift==0
@ 2007-02-11 16:21 Matthew Howkins
2007-04-02 10:04 ` Aurelien Jarno
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Howkins @ 2007-02-11 16:21 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 231 bytes --]
There is a bug in the ARM emulation of data-processing instructions with
ASR <reg> when the shift==0. The current QEMU CVS incorrectly modifies
the C-flag, when it should be preserved.
The attached patch corrects this.
Matthew
[-- Attachment #2: qemu_arm_asr_reg.patch --]
[-- Type: text/x-patch, Size: 525 bytes --]
Index: target-arm/op.c
===================================================================
RCS file: /sources/qemu/qemu/target-arm/op.c,v
retrieving revision 1.21
diff -u -r1.21 op.c
--- target-arm/op.c 26 Jun 2006 19:55:19 -0000 1.21
+++ target-arm/op.c 11 Feb 2007 16:08:22 -0000
@@ -667,7 +667,7 @@
if (shift >= 32) {
env->CF = (T1 >> 31) & 1;
T1 = (int32_t)T1 >> 31;
- } else {
+ } else if (shift != 0) {
env->CF = (T1 >> (shift - 1)) & 1;
T1 = (int32_t)T1 >> shift;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] [ARM] Fix C-flag for ASR <reg> when shift==0
2007-02-11 16:21 [Qemu-devel] [PATCH] [ARM] Fix C-flag for ASR <reg> when shift==0 Matthew Howkins
@ 2007-04-02 10:04 ` Aurelien Jarno
2007-05-19 21:55 ` Aurelien Jarno
0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2007-04-02 10:04 UTC (permalink / raw)
To: qemu-devel
Matthew Howkins a écrit :
> There is a bug in the ARM emulation of data-processing instructions with
> ASR <reg> when the shift==0. The current QEMU CVS incorrectly modifies
> the C-flag, when it should be preserved.
>
> The attached patch corrects this.
>
This patch is consistent with the reference manual, I think it should be
applied. Has it been lost?
> ------------------------------------------------------------------------
>
> Index: target-arm/op.c
> ===================================================================
> RCS file: /sources/qemu/qemu/target-arm/op.c,v
> retrieving revision 1.21
> diff -u -r1.21 op.c
> --- target-arm/op.c 26 Jun 2006 19:55:19 -0000 1.21
> +++ target-arm/op.c 11 Feb 2007 16:08:22 -0000
> @@ -667,7 +667,7 @@
> if (shift >= 32) {
> env->CF = (T1 >> 31) & 1;
> T1 = (int32_t)T1 >> 31;
> - } else {
> + } else if (shift != 0) {
> env->CF = (T1 >> (shift - 1)) & 1;
> T1 = (int32_t)T1 >> shift;
> }
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] [ARM] Fix C-flag for ASR <reg> when shift==0
2007-04-02 10:04 ` Aurelien Jarno
@ 2007-05-19 21:55 ` Aurelien Jarno
0 siblings, 0 replies; 3+ messages in thread
From: Aurelien Jarno @ 2007-05-19 21:55 UTC (permalink / raw)
To: qemu-devel
Aurelien Jarno a écrit :
> Matthew Howkins a écrit :
>> There is a bug in the ARM emulation of data-processing instructions with
>> ASR <reg> when the shift==0. The current QEMU CVS incorrectly modifies
>> the C-flag, when it should be preserved.
>>
>> The attached patch corrects this.
>>
>
> This patch is consistent with the reference manual, I think it should be
> applied. Has it been lost?
Still no news about this patch...
>> ------------------------------------------------------------------------
>>
>> Index: target-arm/op.c
>> ===================================================================
>> RCS file: /sources/qemu/qemu/target-arm/op.c,v
>> retrieving revision 1.21
>> diff -u -r1.21 op.c
>> --- target-arm/op.c 26 Jun 2006 19:55:19 -0000 1.21
>> +++ target-arm/op.c 11 Feb 2007 16:08:22 -0000
>> @@ -667,7 +667,7 @@
>> if (shift >= 32) {
>> env->CF = (T1 >> 31) & 1;
>> T1 = (int32_t)T1 >> 31;
>> - } else {
>> + } else if (shift != 0) {
>> env->CF = (T1 >> (shift - 1)) & 1;
>> T1 = (int32_t)T1 >> shift;
>> }
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Qemu-devel mailing list
>> Qemu-devel@nongnu.org
>> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-19 21:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-11 16:21 [Qemu-devel] [PATCH] [ARM] Fix C-flag for ASR <reg> when shift==0 Matthew Howkins
2007-04-02 10:04 ` Aurelien Jarno
2007-05-19 21:55 ` Aurelien Jarno
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.