qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC] TCG new op: setcond


From: Laurent Desnogues
Subject: [Qemu-devel] [RFC] TCG new op: setcond
Date: Tue, 4 Nov 2008 11:15:08 +0100

Hello,

this patch implements a new TCG op, setcond, that sets a temp
to 1 if the condition is true, else to 0.  The benefit is the potential
removal of brcond instructions, and helpers size reduction which
can lead to using TCG instead of helpers.

This patch is only posted here to get comments before I dig
further into that and propose a proper update.

One of the ARM helpers (sub with flag settings) has been
converted to TCG and uses setcond to compute carry.

setcond has been implemented only for x86_64 TCG back-end.

On my TODO list:

  - document setcond in tcg/README
  - implement it in all backends
      * arm
      * hppa (not applicable according to Stuart Brady)
      * i386
      * ppc
      * ppc64
      * sparc
      * x86_64 (done and partly tested)
  - use it at least once in every frontend
  - setcondi
  - 64 bit setcond's
  - a variant that sets -1 instead of 1 for masking
  - provide a test

Please feel free to comment :-)


Laurent

Attachment: setcond-1.patch
Description: Text Data


reply via email to

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