mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-09-06 09:51:27 +00:00
fast-interp: Fix frame_offset pop order (#3101)
The issue was reported in #3062.
This commit is contained in:
parent
5a99866c01
commit
51e25ef01f
|
@ -8231,11 +8231,11 @@ re_scan:
|
||||||
idx--) {
|
idx--) {
|
||||||
ret_type = *(func->func_type->types
|
ret_type = *(func->func_type->types
|
||||||
+ func->func_type->param_count + idx);
|
+ func->func_type->param_count + idx);
|
||||||
POP_TYPE(ret_type);
|
|
||||||
#if WASM_ENABLE_FAST_INTERP != 0
|
#if WASM_ENABLE_FAST_INTERP != 0
|
||||||
/* emit the offset after return opcode */
|
/* emit the offset after return opcode */
|
||||||
POP_OFFSET_TYPE(ret_type);
|
POP_OFFSET_TYPE(ret_type);
|
||||||
#endif
|
#endif
|
||||||
|
POP_TYPE(ret_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
RESET_STACK();
|
RESET_STACK();
|
||||||
|
@ -8275,10 +8275,10 @@ re_scan:
|
||||||
if (func_type->param_count > 0) {
|
if (func_type->param_count > 0) {
|
||||||
for (idx = (int32)(func_type->param_count - 1); idx >= 0;
|
for (idx = (int32)(func_type->param_count - 1); idx >= 0;
|
||||||
idx--) {
|
idx--) {
|
||||||
POP_TYPE(func_type->types[idx]);
|
|
||||||
#if WASM_ENABLE_FAST_INTERP != 0
|
#if WASM_ENABLE_FAST_INTERP != 0
|
||||||
POP_OFFSET_TYPE(func_type->types[idx]);
|
POP_OFFSET_TYPE(func_type->types[idx]);
|
||||||
#endif
|
#endif
|
||||||
|
POP_TYPE(func_type->types[idx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8376,10 +8376,10 @@ re_scan:
|
||||||
if (func_type->param_count > 0) {
|
if (func_type->param_count > 0) {
|
||||||
for (idx = (int32)(func_type->param_count - 1); idx >= 0;
|
for (idx = (int32)(func_type->param_count - 1); idx >= 0;
|
||||||
idx--) {
|
idx--) {
|
||||||
POP_TYPE(func_type->types[idx]);
|
|
||||||
#if WASM_ENABLE_FAST_INTERP != 0
|
#if WASM_ENABLE_FAST_INTERP != 0
|
||||||
POP_OFFSET_TYPE(func_type->types[idx]);
|
POP_OFFSET_TYPE(func_type->types[idx]);
|
||||||
#endif
|
#endif
|
||||||
|
POP_TYPE(func_type->types[idx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6028,11 +6028,11 @@ re_scan:
|
||||||
idx--) {
|
idx--) {
|
||||||
ret_type = *(func->func_type->types
|
ret_type = *(func->func_type->types
|
||||||
+ func->func_type->param_count + idx);
|
+ func->func_type->param_count + idx);
|
||||||
POP_TYPE(ret_type);
|
|
||||||
#if WASM_ENABLE_FAST_INTERP != 0
|
#if WASM_ENABLE_FAST_INTERP != 0
|
||||||
/* emit the offset after return opcode */
|
/* emit the offset after return opcode */
|
||||||
POP_OFFSET_TYPE(ret_type);
|
POP_OFFSET_TYPE(ret_type);
|
||||||
#endif
|
#endif
|
||||||
|
POP_TYPE(ret_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
RESET_STACK();
|
RESET_STACK();
|
||||||
|
@ -6071,10 +6071,10 @@ re_scan:
|
||||||
if (func_type->param_count > 0) {
|
if (func_type->param_count > 0) {
|
||||||
for (idx = (int32)(func_type->param_count - 1); idx >= 0;
|
for (idx = (int32)(func_type->param_count - 1); idx >= 0;
|
||||||
idx--) {
|
idx--) {
|
||||||
POP_TYPE(func_type->types[idx]);
|
|
||||||
#if WASM_ENABLE_FAST_INTERP != 0
|
#if WASM_ENABLE_FAST_INTERP != 0
|
||||||
POP_OFFSET_TYPE(func_type->types[idx]);
|
POP_OFFSET_TYPE(func_type->types[idx]);
|
||||||
#endif
|
#endif
|
||||||
|
POP_TYPE(func_type->types[idx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6152,10 +6152,10 @@ re_scan:
|
||||||
if (func_type->param_count > 0) {
|
if (func_type->param_count > 0) {
|
||||||
for (idx = (int32)(func_type->param_count - 1); idx >= 0;
|
for (idx = (int32)(func_type->param_count - 1); idx >= 0;
|
||||||
idx--) {
|
idx--) {
|
||||||
POP_TYPE(func_type->types[idx]);
|
|
||||||
#if WASM_ENABLE_FAST_INTERP != 0
|
#if WASM_ENABLE_FAST_INTERP != 0
|
||||||
POP_OFFSET_TYPE(func_type->types[idx]);
|
POP_OFFSET_TYPE(func_type->types[idx]);
|
||||||
#endif
|
#endif
|
||||||
|
POP_TYPE(func_type->types[idx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user