We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c4a2c9 commit c47d482Copy full SHA for c47d482
src/instructions/segmentation.rs
@@ -128,10 +128,10 @@ pub struct CS;
128
impl Segment for CS {
129
get_reg_impl!("cs", x86_64_asm_get_cs);
130
131
+ /// Note this is special since we cannot directly move to [`CS`]. Instead we
132
+ /// push the new segment selector and return value on the stack and use
133
+ /// `retfq` to reload [`CS`] and continue at the end of our function.
134
unsafe fn set_reg(sel: SegmentSelector) {
- // Note this is special since we cannot directly move to cs. Instead we
- // push the new segment selector and return value on the stack and use
- // retfq to reload cs and continue at 1:.
135
#[cfg(feature = "inline_asm")]
136
asm!(
137
"push {sel}",
0 commit comments