Skip to content

Commit 219ad21

Browse files
CS Bug
1 parent e0faf84 commit 219ad21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/instructions/segmentation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ pub unsafe fn set_cs(sel: SegmentSelector) {
2424
}
2525

2626
// Pushes the new CS and the address of the "ret" function
27-
asm!("push {cs:x}; lea [{ret_sym}]; retf",
28-
cs = in(reg) u64::from(sel.0), ret_sym = sym ret_sym);
27+
asm!("push {cs}; lea {out_reg}, [{ret_sym}]; push {out_reg}, retf",
28+
cs = in(reg) u64::from(sel.0), ret_sym = sym ret_sym, out_reg = out(reg) _);
2929
}
3030

3131
#[cfg(not(feature = "inline_asm"))]

0 commit comments

Comments
 (0)