From: Fabiano Rosas <farosas@linux.ibm.com>
To: "Víctor Colombo" <victor.colombo@eldorado.org.br>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: clg@kaod.org, danielhb413@gmail.com, david@gibson.dropbear.id.au,
groug@kaod.org, richard.henderson@linaro.org,
victor.colombo@eldorado.org.br, 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: Thu, 23 Jun 2022 11:06:36 -0300 [thread overview]
Message-ID: <87bkuja2z7.fsf@linux.ibm.com> (raw)
In-Reply-To: <20220622193203.127698-1-victor.colombo@eldorado.org.br>
Víctor Colombo <victor.colombo@eldorado.org.br> writes:
> 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>
Apart form the typo below.
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
> ---
> 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 {
<snip>
> +#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 */
exception
> +#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) | \
next prev parent reply other threads:[~2022-06-23 14:09 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 [this message]
2022-06-27 21:40 ` Daniel Henrique Barboza
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=87bkuja2z7.fsf@linux.ibm.com \
--to=farosas@linux.ibm.com \
--cc=clg@kaod.org \
--cc=danielhb413@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.