about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2024-08-17 21:15:13 +0800
committerptitSeb <sebastien.chev@gmail.com>2024-08-17 15:57:48 +0200
commit243a4deae7390dd3720fee54beabae5a83c3ebb5 (patch)
treef0d5f9280efbfd767e384428b0e1aa04922ef6e3 /src
parentfe80d6305c4f171c780f08c56a5014ac1e736eb1 (diff)
downloadbox64-243a4deae7390dd3720fee54beabae5a83c3ebb5.tar.gz
box64-243a4deae7390dd3720fee54beabae5a83c3ebb5.zip
warn only once
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_f0.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_f0.c b/src/dynarec/rv64/dynarec_rv64_f0.c
index 98220915..30533be4 100644
--- a/src/dynarec/rv64/dynarec_rv64_f0.c
+++ b/src/dynarec/rv64/dynarec_rv64_f0.c
@@ -287,7 +287,9 @@ uintptr_t dynarec64_F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                         case 0:
                             if (rex.w) {
                                 INST_NAME("LOCK CMPXCHG16B Gq, Eq");
-                                PASS3(dynarec_log(LOG_NONE, "Warning, LOCK CMPXCHG16B is not well supported on RISC-V and issues are expected.\n"));
+                                static int warned = 0;
+                                PASS3(if (!warned) dynarec_log(LOG_NONE, "Warning, LOCK CMPXCHG16B is not well supported on RISC-V and issues are expected.\n"));
+                                warned = 1;
                             } else {
                                 INST_NAME("LOCK CMPXCHG8B Gq, Eq");
                             }