This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/2] Fix MASM errors in ffi_closure_raw_SYSV


---
 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]