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

Widening vector instructions vd and vs constraint related bug #30

Open
KKKHHHLLL opened this issue Feb 23, 2023 · 1 comment
Open

Widening vector instructions vd and vs constraint related bug #30

KKKHHHLLL opened this issue Feb 23, 2023 · 1 comment

Comments

@KKKHHHLLL
Copy link

KKKHHHLLL commented Feb 23, 2023

In the execution function of Vwaddu_vxMicro, the vd and vs overlap constraint check is conducted as follows:
const uint32_t num_microops = 1 << std::max<int64_t>(0, vtype_vlmul(machInst.vtype8) + 1);

if ((machInst.vs2 <= machInst.vd) && (machInst.vd < (machInst.vs2 + num_microops - 1))) {
    // A destination vector register group can overlap a source vector
    // register group if The destination EEW is greater than the source
    // EEW, the source EMUL is at least 1, and the overlap is in the
    // highest- numbered part of the destination register group.
    std::string error =
        csprintf("Unsupported overlap in Vs2 and Vd for Widening op");
    return std::make_shared<IllegalInstFault>(error, machInst);
}

But the num_microops calculated here actually is the EMUL of destination vector register group, and it's added up with source vector index vs2 to check overlap. The add by 1 operation in calculating num_microops should be cancled.

@ksco
Copy link
Collaborator

ksco commented Feb 23, 2023

@jerinjoy Hi, can you take a look at this?

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

No branches or pull requests

2 participants