Skip to content

Commit

Permalink
Merge branch 'osx-variadic-issue'
Browse files Browse the repository at this point in the history
  • Loading branch information
dockimbel committed Mar 11, 2012
2 parents 7541b85 + 43596a7 commit 29c6527
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions red-system/targets/IA-32.r
Original file line number Diff line number Diff line change
Expand Up @@ -1456,11 +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
]
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 29c6527

Please sign in to comment.