qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 02/11] target-arm: Extend NZCF to 64 bits
Date: Tue, 10 Mar 2015 11:18:23 -0700	[thread overview]
Message-ID: <54FF356F.4060805@twiddle.net> (raw)
In-Reply-To: <CAFEAcA9zgY+aNUukrY5aPP7OBKLZ7uQd=89BHRpQ5csMXgi1WQ@mail.gmail.com>

On 03/10/2015 09:08 AM, Peter Maydell wrote:
> On 19 February 2015 at 21:14, Richard Henderson <rth@twiddle.net> wrote:
>> The resulting aarch64 translation is a bit cleaner.
>> Sign-extending from 32-bits is simpler than having
>> to use setcond to narrow from 64-bits.
>>
>> Signed-off-by: Richard Henderson <rth@twiddle.net>
> 
> 
>> @@ -4545,6 +4548,9 @@ void aarch64_sync_64_to_32(CPUARMState *env)
>>          env->regs[i] = env->xregs[i];
>>      }
>>
>> +    /* Need to compress Z into the low bits.  */
>> +    env->ZF = (env->ZF != 0);
>> +
> 
> I really don't like this. Having state with a different format
> in 32-bit and 64-bit modes is asking for trouble -- the bits
> we already have to convert are already awkward enough.
> 
> I'd much rather we stuck with a format where env->ZF is
> the same regardless of register width, as we have now.

Err.. it is the same format, from the viewpoint of outside TCG generated code.

>From the viewpoint inside TCG generated code, for AArch32, ZF is only 32-bits
wide.  For AArch64, ZF is 64-bits wide.  So when we transition from AArch64 to
AArch32, we must make sure that if ZF != 0, then ZF <= 0xffffffff.

It's a similar concept for NF and VF, except there I can arrange for the sign
bit of the 32-bit AArch32 NF/VF to line up with the 64-bit AArch64 NF/VF in memory.

If that's not what you mean... then I don't know what you mean.


r~

  reply	other threads:[~2015-03-10 18:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 21:14 [Qemu-devel] [PATCH 00/11] target-aarch64 fix and improvments Richard Henderson
2015-02-19 21:14 ` [Qemu-devel] [PATCH 01/11] target-arm: Introduce DisasCompare Richard Henderson
2015-02-19 21:14 ` [Qemu-devel] [PATCH 02/11] target-arm: Extend NZCF to 64 bits Richard Henderson
2015-03-10 16:08   ` Peter Maydell
2015-03-10 18:18     ` Richard Henderson [this message]
2015-02-19 21:14 ` [Qemu-devel] [PATCH 03/11] target-arm: Handle always condition codes within arm_test_cc Richard Henderson
2015-02-19 21:14 ` [Qemu-devel] [PATCH 04/11] target-arm: Recognize SXTB, SXTH, SXTW, ASR Richard Henderson
2015-02-19 21:14 ` [Qemu-devel] [PATCH 05/11] target-arm: Recognize UXTB, UXTH, LSR, LSL Richard Henderson
2015-02-19 21:14 ` [Qemu-devel] [PATCH 06/11] target-arm: Eliminate unnecessary zero-extend in disas_bitfield Richard Henderson
2015-02-19 21:14 ` [Qemu-devel] [PATCH 07/11] target-arm: Recognize ROR Richard Henderson
2015-02-19 21:14 ` [Qemu-devel] [PATCH 08/11] target-arm: Use setcond and movcond for csel Richard Henderson
2015-02-19 21:14 ` [Qemu-devel] [PATCH 09/11] target-arm: Implement ccmp branchless Richard Henderson
2015-02-19 21:14 ` [Qemu-devel] [PATCH 10/11] target-arm: Implement fccmp branchless Richard Henderson
2015-02-20 13:57   ` Laurent Desnogues
2015-02-20 15:53     ` Richard Henderson
2015-02-23  7:43       ` Laurent Desnogues
2015-02-19 21:14 ` [Qemu-devel] [PATCH 11/11] target-arm: Implement fcsel with movcond Richard Henderson
2015-02-19 23:52 ` [Qemu-devel] [PATCH 00/11] target-aarch64 fix and improvments Peter Maydell
2015-02-20 16:50   ` Alex Bennée
2015-02-20 17:50     ` Alex Bennée
2015-02-20 10:00 ` Laurent Desnogues
2015-02-20 10:54   ` Laurent Desnogues
2015-02-23  7:49 ` Laurent Desnogues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54FF356F.4060805@twiddle.net \
    --to=rth@twiddle.net \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).