On 6/7/23 09:47, Yeqi Fu wrote:
+    /* One unknown opcode for native call */
+#if defined(CONFIG_USER_ONLY)  && defined(CONFIG_USER_NATIVE_CALL)
+    case 0x1ff:
+        uint16_t sig = x86_lduw_code(env, s);
+        switch (sig) {
+        case NATIVE_MEMCPY:
+            gen_helper_native_memcpy(cpu_env);
+            break;
+        case NATIVE_MEMSET:
+            gen_helper_native_memset(cpu_env);
+            break;
+        case NATIVE_MEMCMP:
+            gen_helper_native_memcmp(cpu_env);
+            break;
+        default:
+            goto unknown_op;
+        }
+        break;
+#endif

This bit of code must be protected by native_calls_enabled() or some such, as we do with semihosting_enabled().

Which means that patch 6 should come before this, so that native_calls_enabled() can be true if and only if "-native-bypass" is given.


r~

Reply via email to