03.03.2013 Views

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ADDITIONAL NEW INSTRUCTIONS<br />

STAC—<strong>Set</strong> AC Flag in EFLAGS Register<br />

Opcode/<br />

<strong>Instruction</strong><br />

0F 01 CB<br />

STAC<br />

Description<br />

<strong>Instruction</strong> Operand Encoding<br />

STAC sets the AC flag bit in EFLAGS/RFLAGS without affecting other bits. Attempt to execute STAC when CPL > 0<br />

will cause #UD.<br />

This instruction's operation is the same in non-64-bit modes and 64-bit mode.<br />

Operation<br />

EFLAGS.AC ← 1;<br />

Flags Affected<br />

AC set, All other flags are unchanged<br />

C/C++ Compiler Intrinsic Equivalent<br />

Protected Mode Exceptions<br />

#UD If the LOCK prefix is used.<br />

If the CPL > 0.<br />

If CPUID.(EAX=07H, ECX=0H):EBX.SMAP[bit 20] = 0<br />

Real-Address Mode Exceptions<br />

#UD If the LOCK prefix is used.<br />

If CPUID.(EAX=07H, ECX=0H):EBX.SMAP[bit 20] = 0<br />

Virtual-8086 Mode Exceptions<br />

#UD The STAC instruction is not recognized in virtual-8086 mode.<br />

Compatibility Mode Exceptions<br />

#UD If the LOCK prefix is used.<br />

If the CPL > 0.<br />

If CPUID.(EAX=07H, ECX=0H):EBX.SMAP[bit 20] = 0<br />

64-Bit Mode Exceptions<br />

Op/<br />

En<br />

64/32 bit<br />

Mode<br />

Support<br />

CPUID<br />

Feature<br />

Flag<br />

Description<br />

A V/V SMAP <strong>Set</strong> only the AC flag in the EFLAGS register.<br />

Op/En Operand 1 Operand 2 Operand 3 Operand 4<br />

A NA NA NA NA<br />

#UD If the LOCK prefix is used.<br />

If the CPL > 0.<br />

If CPUID.(EAX=07H, ECX=0H):EBX.SMAP[bit 20] = 0<br />

9-14 Ref. # 319433-014

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!