Skip to content

Commit

Permalink
Maintenance: more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
uxmal committed Oct 17, 2024
1 parent e96bc1a commit a4424b2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Arch/X86/Rewriter/X86Rewriter.Alu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1011,11 +1011,17 @@ private void RewritePop()
// pop <reg> ; Pop the near return address
// push cs ; push the CS selector
// push <reg> ; push the return address
// <rest of procedure>
// which "converts" a near call to a far call.
// The code replaces the sequence with a far call
// to the instruction following the second push.

// Ideally it should only be triggered at the start
// The code below replaces the sequence with a far call
// to the instruction following the second push. The
// resulting IR instructions generated are equivalent
// to:
// call <rest of procedure>
// ret ; near return
// <rest of procedure>
//
// Ideally this check should only be triggered at the start
// of a procedure. Maybe a future version of Reko
// will have a "hint" to the rewriter telling it
// that the current instruction is at the start of a procedure
Expand Down

0 comments on commit a4424b2

Please sign in to comment.