On 3/24/21 8:49 PM, Taylor Simpson wrote:
Address feedback from Richard Henderson <richard.hender...@linaro.org>

Signed-off-by: Taylor Simpson <tsimp...@quicinc.com>
---
  linux-user/hexagon/cpu_loop.c |  2 +-
  target/hexagon/cpu.c          |  9 ++++-----
  target/hexagon/cpu.h          |  6 ++----
  target/hexagon/decode.c       |  6 +++---
  target/hexagon/fma_emu.c      | 39 ++++++++++++++++++++-------------------
  target/hexagon/op_helper.c    | 39 +++++++++++++++++++--------------------
  target/hexagon/translate.c    |  2 +-
  7 files changed, 50 insertions(+), 53 deletions(-)

diff --git a/linux-user/hexagon/cpu_loop.c b/linux-user/hexagon/cpu_loop.c
index 9a68ca0..a752a0a 100644
--- a/linux-user/hexagon/cpu_loop.c
+++ b/linux-user/hexagon/cpu_loop.c
@@ -25,7 +25,7 @@
void cpu_loop(CPUHexagonState *env)
  {
-    CPUState *cs = CPU(hexagon_env_get_cpu(env));
+    CPUState *cs = CPUSTATE_FROM_ENV(env);

This is not removing inlines from functions in c files, so this patch should be split.

-static inline HexagonCPU *hexagon_env_get_cpu(CPUHexagonState *env)
-{
-    return container_of(env, HexagonCPU, env);
-}
+#define HEXAGONCPU_FROM_ENV(env)    container_of((env), HexagonCPU, env)
+#define CPUSTATE_FROM_ENV(env)      CPU(HEXAGONCPU_FROM_ENV(env))

Since a578cdfbdd8f, these should be replaced by env_archcpu and env_cpu respectively.


r~

Reply via email to