Skip to content

I want to add sse4 opcode but need some help.Thank you! #248

Description

@Mr-HappyLI

Since many programs need to use SSE4, I want to add some operations.
Like this:

                case 0x15://Tony SSE4 2020-11-12
                    INST_NAME("BLENDVPD xmm1, xmm2/m128, XMM_ZERO"); //Variable Blend Packed Double-FP Values
                    /**********************************************************************
                    MASK ← XMM0
                    IF (MASK[63] = 0) THEN DEST[63:0] ← DEST[63:0]
                            ELSE DEST [63:0] ← SRC[63:0] FI
                    IF (MASK[127] = 0) THEN DEST[127:64] ← DEST[127:64]
                            ELSE DEST [127:64] ← SRC[127:64] FI
                    DEST[MAXVL-1:128] (Unmodified)
                    **************************************************************************/

                    v0 = sse_get_reg(dyn, ninst, x1, 0);//XMM0(MASK)

                    //ModRM:reg (r, w)
                    nextop = F8;
                    v1 = sse_get_reg(dyn, ninst, x2, nextop&7);

                    // op2 ModRM:r/m (r)
                    nextop = F8;
                    if((nextop&0xC0)==0xC0) {
                        v2 = sse_get_reg(dyn, ninst, x3, nextop&7);
                        VMOVQ(v1, v2);
                    } else {
                        addr = geted(dyn, addr, ninst, nextop, &ed, x3, &fixedaddress, 4095, 0); //???
                        //LDRD also have alignment requirements
                        LDR_IMM9(x2, ed, fixedaddress+0);
                        LDR_IMM9(x3, ed, fixedaddress+4);
                        VMOVtoV_D(v1, x2, x3);
                        LDR_IMM9(x2, ed, fixedaddress+8);
                        LDR_IMM9(x3, ed, fixedaddress+12);
                        VMOVtoV_D(v1+1, x2, x3);
                    }
                    break;

How do I judge the value of V0?And how to write a self constructed immediate value or other ways to assign value to V1 .
Thank you!

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