mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Change intrinsic REX opcode mode X to be silently ignored in 32 builds to allow pointer based intrinsics to work in both 64 bit and 32 bit with the same definion.
This commit is contained in:
parent
1e9a1bb8cf
commit
26808edf50
@ -780,6 +780,8 @@ int lj_intrinsic_fromcdef(lua_State *L, CTypeID fid, GCstr *opstr, uint32_t imm)
|
|||||||
/* Use opcode unmodified in its SSE form */
|
/* Use opcode unmodified in its SSE form */
|
||||||
intrins->flags &= ~INTRINSFLAG_VEX;
|
intrins->flags &= ~INTRINSFLAG_VEX;
|
||||||
}
|
}
|
||||||
|
} else if(!LJ_64 && (intrins->flags & INTRINSFLAG_REXW)) {
|
||||||
|
intrins->flags &= ~INTRINSFLAG_REXW;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -429,7 +429,7 @@ context("__mcode", function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it("output pointers", function()
|
it("output pointers", function()
|
||||||
assert_cdef([[const char* addptr(const char* nptr, int32_t n) __mcode("03rM");]], "addptr")
|
assert_cdef([[const char* addptr(const char* nptr, int32_t n) __mcode("03rMX");]], "addptr")
|
||||||
local s = "0123456789abcdefghijklmnopqrstvwxyz"
|
local s = "0123456789abcdefghijklmnopqrstvwxyz"
|
||||||
|
|
||||||
local ptr = ffi.C.addptr(s, 0)
|
local ptr = ffi.C.addptr(s, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user