Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix replacement value not being correct #3919

Open
wants to merge 1 commit into
base: dev/simd_for_interp
Choose a base branch
from

Conversation

Zzzabiyaka
Copy link
Contributor

@Zzzabiyaka Zzzabiyaka commented Nov 20, 2024

Changing this call allows to correctly implement replace opcode

with existing call the following wat was failing

    v128.const i32x4 10 11 12 13
    i32.const 15
    i32x4.replace_lane 3
    i32x4.extract_lane 3
    call $assert_true_i32

with replace on my branch looking like that

                    case SIMD_i32x4_replace_lane:
                    {
                        uint8_t lane = *frame_ip++;
                        int rep = POP_I32();
                        V128 v = POP_V128();

                        v.i32x4[lane] = rep;
                        addr_ret = GET_OFFSET();
                        PUT_V128_TO_ADDR(frame_lp + addr_ret, v);
                        break;
                    }

@Zzzabiyaka
Copy link
Contributor Author

@wenyongh @loganek Could you please take a look at this PR as I am not sure I have the full range of context about this to confidently say this is the right fix

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant