diff options
author | Anthony Green <green@gmachine.(none)> | 2010-04-13 10:19:28 -0400 |
---|---|---|
committer | Anthony Green <green@gmachine.(none)> | 2010-04-13 10:19:28 -0400 |
commit | f2c2a4fce9b3eca9f39b4f3545118bc256da4a73 (patch) | |
tree | f170fd9df8d3fb1ad4061675a6289b7246d765ba /src/x86 | |
parent | c0b69e57d529e33d18b658cc5572a21e3663247c (diff) | |
download | libffi-f2c2a4fce9b3eca9f39b4f3545118bc256da4a73.tar.gz |
Remove warnings and add OS/2 support
Diffstat (limited to 'src/x86')
-rw-r--r-- | src/x86/ffi.c | 8 | ||||
-rw-r--r-- | src/x86/ffitarget.h | 2 | ||||
-rw-r--r-- | src/x86/win32.S | 10 |
3 files changed, 15 insertions, 5 deletions
diff --git a/src/x86/ffi.c b/src/x86/ffi.c index 8049653..69a4dcd 100644 --- a/src/x86/ffi.c +++ b/src/x86/ffi.c @@ -209,7 +209,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) #endif { cif->flags = FFI_TYPE_STRUCT; - // allocate space for return value pointer + /* allocate space for return value pointer */ cif->bytes += ALIGN(sizeof(void*), FFI_SIZEOF_ARG); } break; @@ -234,7 +234,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) } #ifdef X86_WIN64 - // ensure space for storing four registers + /* ensure space for storing four registers */ cif->bytes += 4 * sizeof(ffi_arg); #endif @@ -292,8 +292,8 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) #ifdef X86_WIN64 case FFI_WIN64: { - // Make copies of all struct arguments - // NOTE: not sure if responsibility should be here or in caller + /* Make copies of all struct arguments + NOTE: not sure if responsibility should be here or in caller */ unsigned int i; for (i=0; i < cif->nargs;i++) { size_t size = cif->arg_types[i]->size; diff --git a/src/x86/ffitarget.h b/src/x86/ffitarget.h index 89a8983..b85016c 100644 --- a/src/x86/ffitarget.h +++ b/src/x86/ffitarget.h @@ -38,7 +38,7 @@ #ifdef X86_WIN64 #define FFI_SIZEOF_ARG 8 -#define USE_BUILTIN_FFS 0 // not yet implemented in mingw-64 +#define USE_BUILTIN_FFS 0 /* not yet implemented in mingw-64 */ #endif /* ---- Generic type definitions ----------------------------------------- */ diff --git a/src/x86/win32.S b/src/x86/win32.S index ac1ed6f..34ec0fd 100644 --- a/src/x86/win32.S +++ b/src/x86/win32.S @@ -395,7 +395,9 @@ END # This assumes we are using gas. .balign 16 .globl _ffi_call_win32 +#ifndef __OS2__ .def _ffi_call_win32; .scl 2; .type 32; .endef +#endif _ffi_call_win32: .LFB1: pushl %ebp @@ -547,7 +549,9 @@ _ffi_call_win32: # This assumes we are using gas. .balign 16 .globl _ffi_closure_SYSV +#ifndef __OS2__ .def _ffi_closure_SYSV; .scl 2; .type 32; .endef +#endif _ffi_closure_SYSV: .LFB3: pushl %ebp @@ -668,7 +672,9 @@ _ffi_closure_SYSV: # This assumes we are using gas. .balign 16 .globl _ffi_closure_raw_SYSV +#ifndef __OS2__ .def _ffi_closure_raw_SYSV; .scl 2; .type 32; .endef +#endif _ffi_closure_raw_SYSV: .LFB4: pushl %ebp @@ -784,7 +790,9 @@ _ffi_closure_raw_SYSV: # This assumes we are using gas. .balign 16 .globl _ffi_closure_STDCALL +#ifndef __OS2__ .def _ffi_closure_STDCALL; .scl 2; .type 32; .endef +#endif _ffi_closure_STDCALL: .LFB5: pushl %ebp @@ -890,7 +898,9 @@ _ffi_closure_STDCALL: .ffi_closure_STDCALL_end: .LFE5: +#ifndef __OS2__ .section .eh_frame,"w" +#endif .Lframe1: .LSCIE1: .long .LECIE1-.LASCIE1 /* Length of Common Information Entry */ |