Skip to content

Calculation Error in line 601 #39

@jyhsia5174

Description

@jyhsia5174

libmf/mf.cpp

Line 601 in e70b9a3

XMM = _mm_add_ps(XMM, _mm_shuffle_ps(XMMtmp, XMMtmp, 1));

Line 600 and 601 are trying to add 4 floats to a single float. That is, they try to do
XMM[31:0] = XMM[31:0] + XMM[63:32] + XMM[95:64] + XMM[127:96].

Line 600 first add two pairs of floats. It does the following operation:
XMMtmp[63:0] = XMM[63:0] + XMM[127:64].

The current line 601 has the following operation:
XMM[31:0] = XMM[31:0] + XMMtmp[63:32].
But, I think the correct operation should be
XMM[31:0] = XMMtmp[31:0] + XMMtmp[63:32].

Therefore, line 601 should change to
"XMM = _mm_add_ps(XMMtmp, _mm_shuffle_ps(XMMtmp, XMMtmp, 1));".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions