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

Add vzeroupper support for x86 #225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions sljit_src/sljitNativeX86_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,19 @@ static sljit_s32 emit_cmov_generic(struct sljit_compiler *compiler, sljit_s32 ty
sljit_s32 dst_reg,
sljit_s32 src, sljit_sw srcw);

static SLJIT_INLINE sljit_s32 emit_vzeroupper(struct sljit_compiler *compiler)
{
/* Emit vzeroupper. */
sljit_u8 *inst;
inst = (sljit_u8*)ensure_buf(compiler, 1 + 3);
FAIL_IF(!inst);
INC_SIZE(3);
inst[0] = 0xc5;
inst[1] = 0xf8;
inst[2] = 0x77;
return SLJIT_SUCCESS;
}

static SLJIT_INLINE sljit_s32 emit_endbranch(struct sljit_compiler *compiler)
{
#if (defined SLJIT_CONFIG_X86_CET && SLJIT_CONFIG_X86_CET)
Expand Down