From 056b824ac46bf4c70e2b1a7abb624389f28d2244 Mon Sep 17 00:00:00 2001 From: Wenyong Huang Date: Tue, 28 Jul 2020 13:46:37 +0800 Subject: [PATCH] Fix fast interpreter i64 shift issue for non-x86 arch (#319) --- core/iwasm/interpreter/wasm_interp_fast.c | 6 +++--- .../libraries/template/lib_export_template.c | 17 ----------------- 2 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 core/iwasm/libraries/template/lib_export_template.c diff --git a/core/iwasm/interpreter/wasm_interp_fast.c b/core/iwasm/interpreter/wasm_interp_fast.c index 2307ead8..2e31552a 100644 --- a/core/iwasm/interpreter/wasm_interp_fast.c +++ b/core/iwasm/interpreter/wasm_interp_fast.c @@ -495,7 +495,7 @@ read_leb(const uint8 *buf, uint32 *p_offset, uint32 maxbits, bool sign) #define DEF_OP_NUMERIC(src_type1, src_type2, src_op_type, operation) do { \ SET_OPERAND(src_type1, 4, (GET_OPERAND(src_type1, 2) \ - operation GET_OPERAND(src_type1, 0))); \ + operation GET_OPERAND(src_type2, 0))); \ frame_ip += 6; \ } while (0) @@ -530,13 +530,13 @@ read_leb(const uint8 *buf, uint32 *p_offset, uint32 maxbits, bool sign) #define DEF_OP_NUMERIC2(src_type1, src_type2, src_op_type, operation) do { \ SET_OPERAND(src_type1, 4, (GET_OPERAND(src_type1, 2) \ - operation (GET_OPERAND(src_type1, 0) % 32))); \ + operation (GET_OPERAND(src_type2, 0) % 32))); \ frame_ip += 6; \ } while (0) #define DEF_OP_NUMERIC2_64(src_type1, src_type2, src_op_type, operation) do { \ SET_OPERAND(src_type1, 4, (GET_OPERAND(src_type1, 2) \ - operation (GET_OPERAND(src_type1, 0) % 64))); \ + operation (GET_OPERAND(src_type2, 0) % 64))); \ frame_ip += 6; \ } while (0) diff --git a/core/iwasm/libraries/template/lib_export_template.c b/core/iwasm/libraries/template/lib_export_template.c deleted file mode 100644 index 35159728..00000000 --- a/core/iwasm/libraries/template/lib_export_template.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#include -#include -#include -#include "lib-export.h" - -/* TODO: use macro EXPORT_WASM_API() or EXPORT_WASM_API2() to add functions to register. */ - -NativeSymbol extended_native_symbol_defs[] = { - -/*EXPORT_WASM_API(publish_event)*/ - -};