qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Qemu arm emulation


From: Paul Brook
Subject: Re: [Qemu-devel] Qemu arm emulation
Date: Fri, 4 Feb 2005 14:19:23 +0000
User-agent: KMail/1.7.2

On Friday 04 February 2005 12:30, Ulrich Hecht wrote:
> Hi!
>
> On Friday 03 December 2004 22:07, Charlie Baylis wrote:
> > 2. Shifter carry out for immediates
> > When an immediate value is generated the shifter carry out is set to
> > bit31 of the resulting immediate if the shift value is non zero. If
> > the shift value is zero, then the shifter carry out has the value of
> > the C flag.
> >
> > Therefore, the following instructions should alter the carry flag when
> > used with an immediate which has a non-zero shift.
> > ANDS BICS EORS MOVS MVNS ORRS TEQS and TSTS
> > (The remaining data processing instructions generate the C flag from
> > the calculation performed by the instruction)
>
> Here's a patch that fixes the testcase. I made it for 0.6.1, but it still
> applies and works for CVS.

> +void OPPROTO op_movl_T1_im_cc(void)
> +{
> +    T1 = PARAM1;
> +    env->CF = PARAM1 >> 31;
> +}

This should be "((uint32_t) PARAM1) >> 31".
The comments say CF is 0 or 1. PARAM1 is signed, so your code will result in 0 
or -1 on 32-bit hosts.

>              /* XXX: is CF modified ? */

Probably want to remove this comment now.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]