This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[PATCH 1/2] Fix MASM errors in ffi_closure_raw_SYSV
- From: Peter Rosin <peda at lysator dot liu dot se>
- To: libffi-discuss at sourceware dot org
- Cc: Peter Rosin <peda at lysator dot liu dot se>
- Date: Thu, 29 Mar 2012 20:09:06 +0200
- Subject: [PATCH 1/2] Fix MASM errors in ffi_closure_raw_SYSV
- References: <1333044547-8348-1-git-send-email-peda@lysator.liu.se>
---
ChangeLog | 6 ++++++
src/x86/win32.S | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7b8e2e9..dcee8ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-29 Peter Rosin <peda@lysator.liu.se>
+
+ * src/x86/win32.S (ffi_closure_raw_SYSV): Make the 'stubraw' label
+ visible outside the PROC, so that ffi_closure_raw_THISCALL can see
+ it. Also instruct the assembler to add a frame to the function.
+
2012-03-21 Peter Rosin <peda@lysator.liu.se>
* testsuite/libffi.call/float_va.c (float_va_fn): Use %f when
diff --git a/src/x86/win32.S b/src/x86/win32.S
index 7eec4f3..7d8653e 100644
--- a/src/x86/win32.S
+++ b/src/x86/win32.S
@@ -276,7 +276,7 @@ ffi_closure_raw_THISCALL PROC NEAR
jmp stubraw
ffi_closure_raw_SYSV ENDP
-ffi_closure_raw_SYSV PROC NEAR USES esi
+ffi_closure_raw_SYSV PROC NEAR USES esi FORCEFRAME
;; the ffi_closure ctx is passed in eax by the trampoline.
sub esp, 40
@@ -284,7 +284,7 @@ ffi_closure_raw_SYSV PROC NEAR USES esi
mov edx, [eax + RAW_CLOSURE_USER_DATA_OFFSET] ;; closure->user_data
mov [esp + 12], edx ;; user_data
lea edx, [ebp + 8]
-stubraw:
+stubraw::
mov [esp + 8], edx ;; raw_args
lea edx, [ebp - 24]
mov [esp + 4], edx ;; &res
--
1.7.9