qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: "Víctor Colombo" <victor.colombo@eldorado.org.br>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: clg@kaod.org, david@gibson.dropbear.id.au, groug@kaod.org,
	richard.henderson@linaro.org, matheus.ferst@eldorado.org.br,
	lucas.araujo@eldorado.org.br, lucas.coutinho@eldorado.org.br,
	leandro.lupori@eldorado.org.br
Subject: Re: [PATCH] target/ppc: Change FPSCR_* to follow POWER ISA numbering convention
Date: Mon, 27 Jun 2022 18:40:02 -0300	[thread overview]
Message-ID: <29790153-d0d9-2256-41b5-82a1b38d1046@gmail.com> (raw)
In-Reply-To: <20220622193203.127698-1-victor.colombo@eldorado.org.br>



On 6/22/22 16:32, Víctor Colombo wrote:
> FPSCR_* bit values in QEMU are in the 'inverted' order from what Power
> ISA defines (e.g. FPSCR.FI is bit 46 but is defined as 17 in cpu.h).
> Now that PPC_BIT_NR macro was introduced to fix this situation for the
> MSR bits, we can use it for the FPSCR bits too.
> 
> Also, adjust the comments to make then fit in 80 columns
> 
> Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
> ---

Queued in gitlab.com/danielhb/qemu/tree/ppc-next with the typo fixed.


Thanks,


Daniel

>   target/ppc/cpu.h | 72 ++++++++++++++++++++++++------------------------
>   1 file changed, 36 insertions(+), 36 deletions(-)
> 
> diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
> index 6d78078f37..c78f64cced 100644
> --- a/target/ppc/cpu.h
> +++ b/target/ppc/cpu.h
> @@ -694,42 +694,42 @@ enum {
>   
>   /*****************************************************************************/
>   /* Floating point status and control register                                */
> -#define FPSCR_DRN2   34 /* Decimal Floating-Point rounding control           */
> -#define FPSCR_DRN1   33 /* Decimal Floating-Point rounding control           */
> -#define FPSCR_DRN0   32 /* Decimal Floating-Point rounding control           */
> -#define FPSCR_FX     31 /* Floating-point exception summary                  */
> -#define FPSCR_FEX    30 /* Floating-point enabled exception summary          */
> -#define FPSCR_VX     29 /* Floating-point invalid operation exception summ.  */
> -#define FPSCR_OX     28 /* Floating-point overflow exception                 */
> -#define FPSCR_UX     27 /* Floating-point underflow exception                */
> -#define FPSCR_ZX     26 /* Floating-point zero divide exception              */
> -#define FPSCR_XX     25 /* Floating-point inexact exception                  */
> -#define FPSCR_VXSNAN 24 /* Floating-point invalid operation exception (sNan) */
> -#define FPSCR_VXISI  23 /* Floating-point invalid operation exception (inf)  */
> -#define FPSCR_VXIDI  22 /* Floating-point invalid operation exception (inf)  */
> -#define FPSCR_VXZDZ  21 /* Floating-point invalid operation exception (zero) */
> -#define FPSCR_VXIMZ  20 /* Floating-point invalid operation exception (inf)  */
> -#define FPSCR_VXVC   19 /* Floating-point invalid operation exception (comp) */
> -#define FPSCR_FR     18 /* Floating-point fraction rounded                   */
> -#define FPSCR_FI     17 /* Floating-point fraction inexact                   */
> -#define FPSCR_C      16 /* Floating-point result class descriptor            */
> -#define FPSCR_FL     15 /* Floating-point less than or negative              */
> -#define FPSCR_FG     14 /* Floating-point greater than or negative           */
> -#define FPSCR_FE     13 /* Floating-point equal or zero                      */
> -#define FPSCR_FU     12 /* Floating-point unordered or NaN                   */
> -#define FPSCR_FPCC   12 /* Floating-point condition code                     */
> -#define FPSCR_FPRF   12 /* Floating-point result flags                       */
> -#define FPSCR_VXSOFT 10 /* Floating-point invalid operation exception (soft) */
> -#define FPSCR_VXSQRT 9  /* Floating-point invalid operation exception (sqrt) */
> -#define FPSCR_VXCVI  8  /* Floating-point invalid operation exception (int)  */
> -#define FPSCR_VE     7  /* Floating-point invalid operation exception enable */
> -#define FPSCR_OE     6  /* Floating-point overflow exception enable          */
> -#define FPSCR_UE     5  /* Floating-point underflow exception enable          */
> -#define FPSCR_ZE     4  /* Floating-point zero divide exception enable       */
> -#define FPSCR_XE     3  /* Floating-point inexact exception enable           */
> -#define FPSCR_NI     2  /* Floating-point non-IEEE mode                      */
> -#define FPSCR_RN1    1
> -#define FPSCR_RN0    0  /* Floating-point rounding control                   */
> +#define FPSCR_DRN2   PPC_BIT_NR(29) /* Decimal Floating-Point rounding ctrl. */
> +#define FPSCR_DRN1   PPC_BIT_NR(30) /* Decimal Floating-Point rounding ctrl. */
> +#define FPSCR_DRN0   PPC_BIT_NR(31) /* Decimal Floating-Point rounding ctrl. */
> +#define FPSCR_FX     PPC_BIT_NR(32) /* Floating-point exception summary      */
> +#define FPSCR_FEX    PPC_BIT_NR(33) /* Floating-point enabled exception summ.*/
> +#define FPSCR_VX     PPC_BIT_NR(34) /* Floating-point invalid op. excp. summ.*/
> +#define FPSCR_OX     PPC_BIT_NR(35) /* Floating-point overflow exception     */
> +#define FPSCR_UX     PPC_BIT_NR(36) /* Floating-point underflow exceptio     */
> +#define FPSCR_ZX     PPC_BIT_NR(37) /* Floating-point zero divide exception  */
> +#define FPSCR_XX     PPC_BIT_NR(38) /* Floating-point inexact exception      */
> +#define FPSCR_VXSNAN PPC_BIT_NR(39) /* Floating-point invalid op. excp (sNan)*/
> +#define FPSCR_VXISI  PPC_BIT_NR(40) /* Floating-point invalid op. excp (inf) */
> +#define FPSCR_VXIDI  PPC_BIT_NR(41) /* Floating-point invalid op. excp (inf) */
> +#define FPSCR_VXZDZ  PPC_BIT_NR(42) /* Floating-point invalid op. excp (zero)*/
> +#define FPSCR_VXIMZ  PPC_BIT_NR(43) /* Floating-point invalid op. excp (inf) */
> +#define FPSCR_VXVC   PPC_BIT_NR(44) /* Floating-point invalid op. excp (comp)*/
> +#define FPSCR_FR     PPC_BIT_NR(45) /* Floating-point fraction rounded       */
> +#define FPSCR_FI     PPC_BIT_NR(46) /* Floating-point fraction inexact       */
> +#define FPSCR_C      PPC_BIT_NR(47) /* Floating-point result class descriptor*/
> +#define FPSCR_FL     PPC_BIT_NR(48) /* Floating-point less than or negative  */
> +#define FPSCR_FG     PPC_BIT_NR(49) /* Floating-point greater than or neg.   */
> +#define FPSCR_FE     PPC_BIT_NR(50) /* Floating-point equal or zero          */
> +#define FPSCR_FU     PPC_BIT_NR(51) /* Floating-point unordered or NaN       */
> +#define FPSCR_FPCC   PPC_BIT_NR(51) /* Floating-point condition code         */
> +#define FPSCR_FPRF   PPC_BIT_NR(51) /* Floating-point result flags           */
> +#define FPSCR_VXSOFT PPC_BIT_NR(53) /* Floating-point invalid op. excp (soft)*/
> +#define FPSCR_VXSQRT PPC_BIT_NR(54) /* Floating-point invalid op. excp (sqrt)*/
> +#define FPSCR_VXCVI  PPC_BIT_NR(55) /* Floating-point invalid op. excp (int) */
> +#define FPSCR_VE     PPC_BIT_NR(56) /* Floating-point invalid op. excp enable*/
> +#define FPSCR_OE     PPC_BIT_NR(57) /* Floating-point overflow excp. enable  */
> +#define FPSCR_UE     PPC_BIT_NR(58) /* Floating-point underflow excp. enable */
> +#define FPSCR_ZE     PPC_BIT_NR(59) /* Floating-point zero divide excp enable*/
> +#define FPSCR_XE     PPC_BIT_NR(60) /* Floating-point inexact excp. enable   */
> +#define FPSCR_NI     PPC_BIT_NR(61) /* Floating-point non-IEEE mode          */
> +#define FPSCR_RN1    PPC_BIT_NR(62)
> +#define FPSCR_RN0    PPC_BIT_NR(63) /* Floating-point rounding control       */
>   /* Invalid operation exception summary */
>   #define FPSCR_IX     ((1 << FPSCR_VXSNAN) | (1 << FPSCR_VXISI)  | \
>                         (1 << FPSCR_VXIDI)  | (1 << FPSCR_VXZDZ)  | \


      parent reply	other threads:[~2022-06-27 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22 19:32 [PATCH] target/ppc: Change FPSCR_* to follow POWER ISA numbering convention Víctor Colombo
2022-06-23 14:06 ` Fabiano Rosas
2022-06-27 21:40 ` Daniel Henrique Barboza [this message]

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=29790153-d0d9-2256-41b5-82a1b38d1046@gmail.com \
    --to=danielhb413@gmail.com \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=leandro.lupori@eldorado.org.br \
    --cc=lucas.araujo@eldorado.org.br \
    --cc=lucas.coutinho@eldorado.org.br \
    --cc=matheus.ferst@eldorado.org.br \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=victor.colombo@eldorado.org.br \
    /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).