qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 09/19] target/ppc: Implement DCFFIXQQ


From: Matheus K. Ferst
Subject: Re: [PATCH v2 09/19] target/ppc: Implement DCFFIXQQ
Date: Wed, 1 Sep 2021 09:38:05 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 31/08/2021 15:18, Richard Henderson wrote:
[E-MAIL EXTERNO] Não clique em links ou abra anexos, a menos que você
 possa confirmar o remetente e saber que o conteúdo é seguro. Em caso
de e-mail suspeito entre imediatamente em contato com o DTI.

On 8/31/21 9:39 AM, Luis Pires wrote:
+DEF_HELPER_3(DCFFIXQQ, void, env, fprp, avr)

Shouldn't be upcase.  None of the others are.


The reason for this change is on patch 13 and onwards. Matching the case of the instruction name in the trans_<INSN> method and the helper makes it easier to create macros, e.g. TRANS_DFP_BF_A_DCM on patch 13. The idea was to change the helpers as we moved instructions to decodetree.

Alternatively, the macro could receive the instruction name and the gen_helper_<INSN>, or we could drop this kind of macro usage in favor of something else. The former is a bit repetitive, while the latter would require more changes in the current code structure.

diff --git a/target/ppc/translate.c b/target/ppc/translate.c index
5489b4b6e0..c3739f7370 100644 --- a/target/ppc/translate.c +++
b/target/ppc/translate.c @@ -7422,7 +7422,12 @@ static inline void
set_avr64(int regno, TCGv_i64 src, bool high) /* * Helpers for
decodetree used by !function for decoding arguments. */ -static int
times_4(DisasContext *ctx, int x) +static inline int
times_2(DisasContext *ctx, int x) +{ + return x * 2; +} + +static inline int times_4(DisasContext *ctx, int x)

Don't add the inlines. The compiler will decide for itself, and this
hides unused function errors under gcc that are diagnosed by clang.


r~



--
Matheus K. Ferst
Instituto de Pesquisas ELDORADO <http://www.eldorado.org.br/>
Analista de Software Júnior
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>



reply via email to

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