qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH 02/21] target-s390x: split FPU ops
Date: Tue, 04 Sep 2012 15:03:08 -0700	[thread overview]
Message-ID: <50467A9C.9040104@twiddle.net> (raw)
In-Reply-To: <CAAu8pHuLBpWpQedKM2OvO1w0oro+VwrUBCr_BoQfvTyYZ3CTzg@mail.gmail.com>

On 09/04/2012 12:40 PM, Blue Swirl wrote:
> On Tue, Sep 4, 2012 at 6:42 PM, Richard Henderson <rth@twiddle.net> wrote:
>> On 09/02/2012 10:33 AM, Blue Swirl wrote:
>>> +/* fpu_helper.c */
>>> +uint32_t set_cc_f32(float32 v1, float32 v2);
>>> +uint32_t set_cc_f64(float64 v1, float64 v2);
>>> +uint32_t set_cc_nz_f32(float32 v);
>>> +uint32_t set_cc_nz_f64(float64 v);
>>> +
>>
>> I think that the CC handling should stay together, regardless of FPU-ness.
>> These functions are quite small and can be usefully inlined by the compiler.
>>
>> OTOH, this is much easier to do with my translate.c rewrite, so maybe I'll
>> just take responsibility for moving them back...
> 
> The problem is that these are used by some FPU ops as well as
> condition code ops. Maybe it's better to move them to cpu.h as inline
> functions?

Maybe...

> It could be also possible to upgrade condition code functions to full
> helpers, that could help implementing lazy condition code evaluation.

Done and ...

> I noticed that the helpers don't use TCGv registers for register
> access but instead the helpers access env->regs[] and env->fregs[]
> directly, this probably would need to be changed too.

done, in my rewrite.

Except for float128, where we can't return such by value inside TCG.
And, annoyingly, s390 float128 values are held in %fN/%fN+2, so the
values are not contiguous in memory.  I momentarily considered passing
a pointer to %fN, letting the helper access f[0]/f[2], but in the end
I didn't consider that any better than just passing the integer N.

So after the rewrite, set_cc_nz_f32/64 are not referenced from the fp
helpers directly.  We still reference set_cc_nz_f128 from ADXBR and SDXBR.


r~

  reply	other threads:[~2012-09-04 22:03 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-02 17:33 [Qemu-devel] [PATCH 00/21] AREG0 patches, final round Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 01/21] target-s390x: fix style Blue Swirl
2012-09-03  4:31   ` Alexander Graf
2012-09-03 19:10     ` Blue Swirl
2012-09-03 23:33       ` Alexander Graf
2012-09-04 14:54       ` Richard Henderson
2012-09-06 18:33   ` Alexander Graf
2012-09-08  8:09     ` Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 02/21] target-s390x: split FPU ops Blue Swirl
2012-09-04 18:42   ` Richard Henderson
2012-09-04 19:40     ` Blue Swirl
2012-09-04 22:03       ` Richard Henderson [this message]
2012-09-05  3:46         ` Alexander Graf
2012-09-05 15:34           ` Richard Henderson
2012-09-06  3:38             ` Alexander Graf
2012-09-06 18:42             ` Alexander Graf
2012-09-06 20:29               ` Richard Henderson
2012-09-07  4:26                 ` Alexander Graf
2012-09-07 14:30                   ` Andreas Färber
2012-09-07 14:42                     ` Aurelien Jarno
2012-09-02 17:33 ` [Qemu-devel] [PATCH 03/21] target-s390x: split condition code helpers Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 04/21] target-s390x: split integer helpers Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 05/21] target-s390x: split memory access helpers Blue Swirl
2012-09-06 18:14   ` Alexander Graf
2012-09-02 17:33 ` [Qemu-devel] [PATCH 06/21] target-s390x: rename op_helper.c to misc_helper.c Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 07/21] target-s390x: avoid AREG0 for FPU helpers Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 08/21] target-s390x: avoid AREG0 for integer helpers Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 09/21] target-s390x: avoid AREG0 for condition code helpers Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 10/21] target-s390x: avoid AREG0 for misc helpers Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 11/21] target-s390x: switch to AREG0 free mode Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 12/21] target-s390x: split helper.c Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 13/21] target-lm32: switch to AREG0 free mode Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 14/21] target-m68k: " Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 15/21] target-unicore32: " Blue Swirl
     [not found]   ` <6a5ae511448ffcecf03ce0a0a03f95af2f7c4eb9.1346606813.git.blauwirbel@gm ail.com>
2012-09-06  2:40     ` guanxuetao
2012-09-02 17:33 ` [Qemu-devel] [PATCH 16/21] target-arm: " Blue Swirl
2012-09-03  0:01   ` Peter Maydell
2012-09-03  0:03     ` Peter Maydell
2012-09-03 18:58       ` Blue Swirl
2012-09-03 19:54         ` Peter Maydell
2012-09-03 20:10           ` Blue Swirl
2012-09-03 20:15             ` Peter Maydell
2012-09-03 13:33   ` Peter Maydell
2012-09-02 17:33 ` [Qemu-devel] [PATCH 17/21] target-microblaze: " Blue Swirl
2012-09-06 15:38   ` Aurelien Jarno
2012-09-08  7:36     ` Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 18/21] target-cris: " Blue Swirl
2012-09-07 14:18   ` Aurelien Jarno
2012-09-07 14:40     ` Edgar E. Iglesias
2012-09-07 14:46       ` Aurelien Jarno
2012-09-08  3:34         ` Edgar E. Iglesias
2012-09-08  8:35     ` Blue Swirl
2012-09-08  9:02       ` Aurelien Jarno
2012-09-02 17:33 ` [Qemu-devel] [PATCH 19/21] target-sh4: " Blue Swirl
2012-09-02 23:42   ` Aurelien Jarno
2012-09-03 18:43     ` Blue Swirl
2012-09-02 17:33 ` [Qemu-devel] [PATCH 20/21] target-mips: " Blue Swirl
2012-09-03 15:50   ` Aurelien Jarno
2012-09-03 19:15     ` Blue Swirl
2012-09-03 19:49       ` Aurelien Jarno
2012-09-02 17:33 ` [Qemu-devel] [PATCH 21/21] Remove unused CONFIG_TCG_PASS_AREG0 and dead code Blue Swirl
2012-09-06 15:30   ` Aurelien Jarno
2012-09-08  7:21     ` Blue Swirl
2012-09-04 18:52 ` [Qemu-devel] [PATCH 00/21] AREG0 patches, final round Richard Henderson

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=50467A9C.9040104@twiddle.net \
    --to=rth@twiddle.net \
    --cc=agraf@suse.de \
    --cc=blauwirbel@gmail.com \
    --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).