[PATCH/committed,6/8] sim: igen: extend error to take arguments

Message ID 20240101232219.3003-6-vapier@gentoo.org
State New
Headers
Series [PATCH/committed,1/8] sim: ppc: hoist igen compilation into top-level |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Mike Frysinger Jan. 1, 2024, 11:22 p.m. UTC
  The ppc igen error helper allows arbitrary printf calls, so extend
the common one to do the same.
---
 sim/igen/misc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/sim/igen/misc.h b/sim/igen/misc.h
index eff8a203cabf..45610558a262 100644
--- a/sim/igen/misc.h
+++ b/sim/igen/misc.h
@@ -56,12 +56,12 @@  extern error_func warning;
 extern error_func notify;
 
 
-#define ERROR(EXPRESSION) \
+#define ERROR(EXPRESSION, args...) \
 do { \
   line_ref line; \
   line.file_name = filter_filename (__FILE__); \
   line.line_nr = __LINE__; \
-  error (&line, EXPRESSION "\n"); \
+  error (&line, EXPRESSION "\n", ## args); \
 } while (0)
 
 #define ASSERT(EXPRESSION) \