From 1708a71e5b9234b6d391e8c5084f23bf9579a3dc Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 27 Mar 2020 01:46:11 -0700 Subject: [PATCH] util: Add a helpful macro for merging two tokens to m5ops.h. I've needed this type of macro often when writing code which uses the M5OP_FOREACH macro, and so rather than re-write it each time, lets just put a version here. This is such a common type of macro to need that you'd think it would be part of a standard header somewhere, but to my knowledge it isn't. Change-Id: I0df0d9d2fd7ce1b9e6c355d6e4db197ccfff7c35 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27239 Maintainer: Gabe Black Tested-by: kokoro Reviewed-by: Bobby R. Bruce --- include/gem5/asm/generic/m5ops.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/gem5/asm/generic/m5ops.h b/include/gem5/asm/generic/m5ops.h index fc56e5959..f1755961f 100644 --- a/include/gem5/asm/generic/m5ops.h +++ b/include/gem5/asm/generic/m5ops.h @@ -108,4 +108,7 @@ M5OP(m5_se_page_fault, M5OP_SE_PAGE_FAULT) \ M5OP(m5_dist_toggle_sync, M5OP_DIST_TOGGLE_SYNC) +#define M5OP_MERGE_TOKENS_I(a, b) a##b +#define M5OP_MERGE_TOKENS(a, b) M5OP_MERGE_TOKENS_I(a, b) + #endif // __GEM5_ASM_GENERIC_M5OPS_H__ -- 2.30.2