## SSE

SSE — code generation for SSE

## Synopsis

    enum                OrcSSERegister;
    enum                OrcTargetSSEFlags;
    #define             ORC_SSE_SHUF                        (a,
                                                             b,
                                                             c,
                                                             d)
    void                orc_sse_emit_0f                     (OrcCompiler *p,
                                                             const char *insn_name,
                                                             int code,
                                                             int src,
                                                             int dest);
    void                orc_sse_emit_660f                   (OrcCompiler *p,
                                                             const char *insn_name,
                                                             int code,
                                                             int src,
                                                             int dest);
    void                orc_sse_emit_f20f                   (OrcCompiler *p,
                                                             const char *insn_name,
                                                             int code,
                                                             int src,
                                                             int dest);
    void                orc_sse_emit_f30f                   (OrcCompiler *p,
                                                             const char *insn_name,
                                                             int code,
                                                             int src,
                                                             int dest);
    void                orc_sse_emit_loadib                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);
    void                orc_sse_emit_loadil                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);
    void                orc_sse_emit_loadiw                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);
    void                orc_sse_emit_loadpb                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);
    void                orc_sse_emit_loadpl                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);
    void                orc_sse_emit_loadpq                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);
    void                orc_sse_emit_loadpw                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);
    void                orc_sse_emit_pshufd                 (OrcCompiler *p,
                                                             int shuf,
                                                             int src,
                                                             int dest);
    void                orc_sse_emit_pshuflw                (OrcCompiler *p,
                                                             int shuf,
                                                             int src,
                                                             int dest);
    void                orc_sse_emit_shiftimm               (OrcCompiler *p,
                                                             const char *insn_name,
                                                             int code,
                                                             int modrm_code,
                                                             int shift,
                                                             int reg);
    unsigned int        orc_sse_get_cpu_flags               (void);
    void                orc_sse_init                        (void);

## Description

## Details

### enum OrcSSERegister

    typedef enum {
      X86_XMM0 = ORC_VEC_REG_BASE,
      X86_XMM1,
      X86_XMM2,
      X86_XMM3,
      X86_XMM4,
      X86_XMM5,
      X86_XMM6,
      X86_XMM7,
      X86_XMM8,
      X86_XMM9,
      X86_XMM10,
      X86_XMM11,
      X86_XMM12,
      X86_XMM13,
      X86_XMM14,
      X86_XMM15
    }OrcSSERegister;

### enum OrcTargetSSEFlags

    typedef enum {
      ORC_TARGET_SSE_SSE2 = (1<<0),
      ORC_TARGET_SSE_SSE3 = (1<<1),
      ORC_TARGET_SSE_SSSE3 = (1<<2),
      ORC_TARGET_SSE_SSE4_1 = (1<<3),
      ORC_TARGET_SSE_SSE4_2 = (1<<4),
      ORC_TARGET_SSE_SSE4A = (1<<5),
      ORC_TARGET_SSE_SSE5 = (1<<6),
      ORC_TARGET_SSE_FRAME_POINTER = (1<<7),
      ORC_TARGET_SSE_SHORT_JUMPS = (1<<8),
      ORC_TARGET_SSE_64BIT = (1<<9)
    }OrcTargetSSEFlags;

### ORC_SSE_SHUF()

    #define ORC_SSE_SHUF(a,b,c,d) ((((a)&3)<<6)|(((b)&3)<<4)|(((c)&3)<<2)|(((d)&3)<<0))

`a` : |
`b` : |
`c` : |
`d` : |

### orc_sse_emit_0f ()

    void                orc_sse_emit_0f                     (OrcCompiler *p,
                                                             const char *insn_name,
                                                             int code,
                                                             int src,
                                                             int dest);

`p` : |
`insn_name` : |
`code` : |
`src` : |
`dest` : |

### orc_sse_emit_660f ()

    void                orc_sse_emit_660f                   (OrcCompiler *p,
                                                             const char *insn_name,
                                                             int code,
                                                             int src,
                                                             int dest);

`p` : |
`insn_name` : |
`code` : |
`src` : |
`dest` : |

### orc_sse_emit_f20f ()

    void                orc_sse_emit_f20f                   (OrcCompiler *p,
                                                             const char *insn_name,
                                                             int code,
                                                             int src,
                                                             int dest);

`p` : |
`insn_name` : |
`code` : |
`src` : |
`dest` : |

### orc_sse_emit_f30f ()

    void                orc_sse_emit_f30f                   (OrcCompiler *p,
                                                             const char *insn_name,
                                                             int code,
                                                             int src,
                                                             int dest);

`p` : |
`insn_name` : |
`code` : |
`src` : |
`dest` : |

### orc_sse_emit_loadib ()

    void                orc_sse_emit_loadib                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);

`p` : |
`reg` : |
`value` : |

### orc_sse_emit_loadil ()

    void                orc_sse_emit_loadil                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);

`p` : |
`reg` : |
`value` : |

### orc_sse_emit_loadiw ()

    void                orc_sse_emit_loadiw                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);

`p` : |
`reg` : |
`value` : |

### orc_sse_emit_loadpb ()

    void                orc_sse_emit_loadpb                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);

`p` : |
`reg` : |
`value` : |

### orc_sse_emit_loadpl ()

    void                orc_sse_emit_loadpl                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);

`p` : |
`reg` : |
`value` : |

### orc_sse_emit_loadpq ()

    void                orc_sse_emit_loadpq                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);

`p` : |
`reg` : |
`value` : |

### orc_sse_emit_loadpw ()

    void                orc_sse_emit_loadpw                 (OrcCompiler *p,
                                                             int reg,
                                                             int value);

`p` : |
`reg` : |
`value` : |

### orc_sse_emit_pshufd ()

    void                orc_sse_emit_pshufd                 (OrcCompiler *p,
                                                             int shuf,
                                                             int src,
                                                             int dest);

`p` : |
`shuf` : |
`src` : |
`dest` : |

### orc_sse_emit_pshuflw ()

    void                orc_sse_emit_pshuflw                (OrcCompiler *p,
                                                             int shuf,
                                                             int src,
                                                             int dest);

`p` : |
`shuf` : |
`src` : |
`dest` : |

### orc_sse_emit_shiftimm ()

    void                orc_sse_emit_shiftimm               (OrcCompiler *p,
                                                             const char *insn_name,
                                                             int code,
                                                             int modrm_code,
                                                             int shift,
                                                             int reg);

`p` : |
`insn_name` : |
`code` : |
`modrm_code` : |
`shift` : |
`reg` : |

### orc_sse_get_cpu_flags ()

    unsigned int        orc_sse_get_cpu_flags               (void);

Returns : |

### orc_sse_init ()

    void                orc_sse_init                        (void);