- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are there any other documents that talk about this sort of thing in great detail?
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We will forward your question to our engineering contacts and let you know how they respond.
Regards,
Lexi S.
IntelSoftware NetworkSupport
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CLI sets the IF bit in the EFLAGS register to 0. There is no memory operation, so it is not a memory barrier of any sort. Is there any chance you meant to ask about the CLFLUSH instruction instead (which is ordered only by MFENCE)? CLI is definitely a slower instruction.
Regards,
Lexi S.
IntelSoftware NetworkSupport
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
cli
cmp $0, some_variable
je end
movl $0xFF, some_other_variable
end:
sti
Does the processor speculatively execute the instructions between the cli and the sti, or does it wait until the cli is retired (architecturally visible) before executing those instructions, especially the load and store? And is it even necessary (for correctness) that the cli instruction be retired before performing the load and store?
In summary: is CLI a "slow" instruction, in that it causes basically a pipeline flush before executing any subsequent instructions? If it is not, how does the processor ensure correctness, especially for memory operations?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim A.
IntelSoftware NetworkSupport
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
CLI is not necessarily a serializing instruction.If aninstruction *after* CLI needs the value of EFLAGS.IF (there are only a few of these) then while the CLI is still in flight,the above instructionwill stall until theCLI has retired.
The code below does not look likeit will run into this problem (sterilization).
cmp $0, some_variable
je end
movl $0xFF, some_other_variable
end:
sti
Message Edited by intel.software.network.support on 01-31-2006 11:26 AM

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page