peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0098-tcg-Fix-MAX_OPC_PARAM_IARGS.patch

5544c1
From 86aeba1e72542270a2ae2570cdfcfa6b9e59eeb8 Mon Sep 17 00:00:00 2001
5544c1
From: Stefan Weil <sw@weilnetz.de>
5544c1
Date: Wed, 12 Sep 2012 19:18:55 +0200
5544c1
Subject: [PATCH] tcg: Fix MAX_OPC_PARAM_IARGS
5544c1
5544c1
DEF_HELPER_FLAGS_5 was added some time ago without adjusting
5544c1
MAX_OPC_PARAM_IARGS.
5544c1
5544c1
Fixing the definition becomes more important as QEMU is using
5544c1
an increasing number of helper functions called with 5 arguments.
5544c1
5544c1
Add also a comment to avoid future problems when DEF_HELPER_FLAGS_6
5544c1
will be added.
5544c1
5544c1
Signed-off-by: Stefan Weil <sw@weilnetz.de>
5544c1
Reviewed-by: Richard Henderson <rth@twiddle.net>
5544c1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
5544c1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1
---
5544c1
 def-helper.h | 2 ++
5544c1
 exec-all.h   | 2 +-
5544c1
 2 files changed, 3 insertions(+), 1 deletion(-)
5544c1
5544c1
diff --git a/def-helper.h b/def-helper.h
5544c1
index b98ff69..022a9ce 100644
5544c1
--- a/def-helper.h
5544c1
+++ b/def-helper.h
5544c1
@@ -128,6 +128,8 @@
5544c1
 #define DEF_HELPER_5(name, ret, t1, t2, t3, t4, t5) \
5544c1
     DEF_HELPER_FLAGS_5(name, 0, ret, t1, t2, t3, t4, t5)
5544c1
 
5544c1
+/* MAX_OPC_PARAM_IARGS must be set to n if last entry is DEF_HELPER_FLAGS_n. */
5544c1
+
5544c1
 #endif /* DEF_HELPER_H */
5544c1
 
5544c1
 #ifndef GEN_HELPER
5544c1
diff --git a/exec-all.h b/exec-all.h
5544c1
index 1f81da7..6516da0 100644
5544c1
--- a/exec-all.h
5544c1
+++ b/exec-all.h
5544c1
@@ -51,7 +51,7 @@ typedef struct TranslationBlock TranslationBlock;
5544c1
 #else
5544c1
 #define MAX_OPC_PARAM_PER_ARG 1
5544c1
 #endif
5544c1
-#define MAX_OPC_PARAM_IARGS 4
5544c1
+#define MAX_OPC_PARAM_IARGS 5
5544c1
 #define MAX_OPC_PARAM_OARGS 1
5544c1
 #define MAX_OPC_PARAM_ARGS (MAX_OPC_PARAM_IARGS + MAX_OPC_PARAM_OARGS)
5544c1
 
5544c1
-- 
5544c1
1.7.12.1
5544c1