Skip to content

Commit

Permalink
FIX: cleaned up the fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
dockimbel committed Mar 6, 2012
1 parent 7b1d958 commit 43596a7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions red-system/targets/IA-32.r
Original file line number Diff line number Diff line change
Expand Up @@ -1456,12 +1456,9 @@ make target-class [
emit #{89E7} ;-- MOV edi, esp
emit #{83E4F0} ;-- AND esp, -16
offset: 4 ;-- account for saved edi
offset: offset + either issue? args/1 [
;8 ; @@ test if this works for all variadic cases
call-arguments-size? args/2
][
call-arguments-size? args
]
if issue? args/1 [args: args/2]
offset: offset + call-arguments-size? args

unless zero? offset: offset // 16 [
emit #{83EC} ;-- SUB esp, offset ; ensure call will be 16-bytes aligned
emit to-bin8 16 - offset
Expand Down

0 comments on commit 43596a7

Please sign in to comment.