qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH v2 4/7] target/ppc: turned SPR R/W callbacks not static


From: Bruno Piazera Larsen
Subject: Re: [PATCH v2 4/7] target/ppc: turned SPR R/W callbacks not static
Date: Fri, 30 Apr 2021 14:26:18 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1


On 30/04/2021 00:40, Richard Henderson wrote:
On 4/29/21 9:21 AM, Bruno Larsen (billionai) wrote:
@@ -234,19 +235,19 @@ static void spr_read_tbu(DisasContext *ctx, int gprn, int sprn)
  }
    ATTRIBUTE_UNUSED
-static void spr_read_atbl(DisasContext *ctx, int gprn, int sprn)
+void spr_read_atbl(DisasContext *ctx, int gprn, int sprn)
  {

You can drop the ATTRIBUTE_UNUSED at the same time.

It was only there to stop the static symbol from being signaled as unused; for a non-static symbol, the compiler obviously can't tell.
ah, that makes sense. Dropped it, thanks!
diff --git a/target/ppc/spr_tcg.h b/target/ppc/spr_tcg.h
new file mode 100644
index 0000000000..b573a23e7b
--- /dev/null
+++ b/target/ppc/spr_tcg.h
@@ -0,0 +1,121 @@
+#ifndef SPR_TCG_H
+#define SPR_TCG_H
+
+#include "qemu/osdep.h"
+#include "cpu.h"
+#include "exec/translator.h"
+#include "tcg/tcg.h"

All new files get copyright headers.  No headers include osdep.h.  It doesn't appear that you need any headers for this file; just add

typedef struct DisasContext DisasContext;

to the top of the file.

Apparently, I don't even need to do that. I'm not sure what I've changed, but now I don't need neither the cpu.h nor the typedef. I can just not include anything, so I dropped them all.



r~
--
Bruno Piazera Larsen Instituto de Pesquisas ELDORADO Departamento Computação Embarcada Analista de Software Trainee Aviso Legal - Disclaimer

reply via email to

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