mirror of git://gcc.gnu.org/git/gcc.git
parent
833bb7dfad
commit
7862d49629
|
@ -36,6 +36,13 @@
|
||||||
* configure.ac: Ditto.
|
* configure.ac: Ditto.
|
||||||
* configure: Rebuilt.
|
* configure: Rebuilt.
|
||||||
|
|
||||||
|
2010-04-13 Dan Witte <dwitte@mozilla.com>
|
||||||
|
|
||||||
|
* msvcc.sh: Build with -W3 instead of -Wall.
|
||||||
|
* src/powerpc/ffi_darwin.c: Remove build warnings.
|
||||||
|
* src/x86/ffi.c: Ditto.
|
||||||
|
* src/x86/ffitarget.h: Ditto.
|
||||||
|
|
||||||
2010-04-12 Dan Witte <dwitte@mozilla.com>
|
2010-04-12 Dan Witte <dwitte@mozilla.com>
|
||||||
Walter Meinl <wuno@lsvw.de>
|
Walter Meinl <wuno@lsvw.de>
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
# format and translated into something sensible for cl or ml.
|
# format and translated into something sensible for cl or ml.
|
||||||
#
|
#
|
||||||
|
|
||||||
args="-nologo -W3"
|
args="-nologo"
|
||||||
md=-MD
|
md=-MD
|
||||||
cl="cl"
|
cl="cl"
|
||||||
ml="ml"
|
ml="ml"
|
||||||
|
@ -108,7 +108,8 @@ do
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
-Wall)
|
-Wall)
|
||||||
args="$args -Wall"
|
# -Wall on MSVC is overzealous. Use -W3 instead.
|
||||||
|
args="$args -W3"
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
-Werror)
|
-Werror)
|
||||||
|
|
|
@ -344,7 +344,7 @@ ffi_status
|
||||||
ffi_prep_cif_machdep (ffi_cif *cif)
|
ffi_prep_cif_machdep (ffi_cif *cif)
|
||||||
{
|
{
|
||||||
/* All this is for the DARWIN ABI. */
|
/* All this is for the DARWIN ABI. */
|
||||||
int i;
|
unsigned i;
|
||||||
ffi_type **ptr;
|
ffi_type **ptr;
|
||||||
unsigned bytes;
|
unsigned bytes;
|
||||||
int fparg_count = 0, intarg_count = 0;
|
int fparg_count = 0, intarg_count = 0;
|
||||||
|
@ -542,11 +542,11 @@ ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
||||||
{
|
{
|
||||||
case FFI_AIX:
|
case FFI_AIX:
|
||||||
ffi_call_AIX(&ecif, -(long)cif->bytes, cif->flags, ecif.rvalue, fn,
|
ffi_call_AIX(&ecif, -(long)cif->bytes, cif->flags, ecif.rvalue, fn,
|
||||||
ffi_prep_args);
|
FFI_FN(ffi_prep_args));
|
||||||
break;
|
break;
|
||||||
case FFI_DARWIN:
|
case FFI_DARWIN:
|
||||||
ffi_call_DARWIN(&ecif, -(long)cif->bytes, cif->flags, ecif.rvalue, fn,
|
ffi_call_DARWIN(&ecif, -(long)cif->bytes, cif->flags, ecif.rvalue, fn,
|
||||||
ffi_prep_args);
|
FFI_FN(ffi_prep_args));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FFI_ASSERT(0);
|
FFI_ASSERT(0);
|
||||||
|
@ -799,9 +799,9 @@ ffi_closure_helper_DARWIN (ffi_closure *closure, void *rvalue,
|
||||||
if (arg_types[i]->elements[0]->type == FFI_TYPE_DOUBLE)
|
if (arg_types[i]->elements[0]->type == FFI_TYPE_DOUBLE)
|
||||||
size_al = ALIGN (arg_types[i]->size, 8);
|
size_al = ALIGN (arg_types[i]->size, 8);
|
||||||
if (size_al < 3 && cif->abi == FFI_DARWIN)
|
if (size_al < 3 && cif->abi == FFI_DARWIN)
|
||||||
avalue[i] = (void *) pgr + 8 - size_al;
|
avalue[i] = (char *) pgr + 8 - size_al;
|
||||||
else
|
else
|
||||||
avalue[i] = (void *) pgr;
|
avalue[i] = pgr;
|
||||||
pgr += (size_al + 7) / 8;
|
pgr += (size_al + 7) / 8;
|
||||||
#else
|
#else
|
||||||
/* Structures that match the basic modes (QI 1 byte, HI 2 bytes,
|
/* Structures that match the basic modes (QI 1 byte, HI 2 bytes,
|
||||||
|
@ -812,9 +812,9 @@ ffi_closure_helper_DARWIN (ffi_closure *closure, void *rvalue,
|
||||||
if (arg_types[i]->elements[0]->type == FFI_TYPE_DOUBLE)
|
if (arg_types[i]->elements[0]->type == FFI_TYPE_DOUBLE)
|
||||||
size_al = ALIGN(arg_types[i]->size, 8);
|
size_al = ALIGN(arg_types[i]->size, 8);
|
||||||
if (size_al < 3 && cif->abi == FFI_DARWIN)
|
if (size_al < 3 && cif->abi == FFI_DARWIN)
|
||||||
avalue[i] = (void*) pgr + 4 - size_al;
|
avalue[i] = (char*) pgr + 4 - size_al;
|
||||||
else
|
else
|
||||||
avalue[i] = (void*) pgr;
|
avalue[i] = pgr;
|
||||||
pgr += (size_al + 3) / 4;
|
pgr += (size_al + 3) / 4;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -209,7 +209,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
cif->flags = FFI_TYPE_STRUCT;
|
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);
|
cif->bytes += ALIGN(sizeof(void*), FFI_SIZEOF_ARG);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -234,7 +234,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef X86_WIN64
|
#ifdef X86_WIN64
|
||||||
// ensure space for storing four registers
|
/* ensure space for storing four registers */
|
||||||
cif->bytes += 4 * sizeof(ffi_arg);
|
cif->bytes += 4 * sizeof(ffi_arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -292,8 +292,8 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
||||||
#ifdef X86_WIN64
|
#ifdef X86_WIN64
|
||||||
case FFI_WIN64:
|
case FFI_WIN64:
|
||||||
{
|
{
|
||||||
// Make copies of all struct arguments
|
/* Make copies of all struct arguments
|
||||||
// NOTE: not sure if responsibility should be here or in caller
|
NOTE: not sure if responsibility should be here or in caller */
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i=0; i < cif->nargs;i++) {
|
for (i=0; i < cif->nargs;i++) {
|
||||||
size_t size = cif->arg_types[i]->size;
|
size_t size = cif->arg_types[i]->size;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
#ifdef X86_WIN64
|
#ifdef X86_WIN64
|
||||||
#define FFI_SIZEOF_ARG 8
|
#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
|
#endif
|
||||||
|
|
||||||
/* ---- Generic type definitions ----------------------------------------- */
|
/* ---- Generic type definitions ----------------------------------------- */
|
||||||
|
|
Loading…
Reference in New Issue