Add SSE3 CPU feature detection.

This commit is contained in:
Mike Pall
2011-02-01 19:28:03 +01:00
parent 992bc2caa3
commit c539c0cac8
2 changed files with 10 additions and 8 deletions

View File

@@ -530,6 +530,7 @@ static uint32_t jit_cpudetect(lua_State *L)
flags |= ((features[3] >> 15)&1) * JIT_F_CMOV;
flags |= ((features[3] >> 26)&1) * JIT_F_SSE2;
#if LJ_HASJIT
flags |= ((features[2] >> 0)&1) * JIT_F_SSE3;
flags |= ((features[2] >> 19)&1) * JIT_F_SSE4_1;
if (vendor[2] == 0x6c65746e) { /* Intel. */
if ((features[0] & 0x0ff00f00) == 0x00000f00) /* P4. */