ffi64.c (ffi_prep_args): Check for void retval.
2003-01-14 Andrew Haley <aph@redhat.com> * src/x86/ffi64.c (ffi_prep_args): Check for void retval. (ffi_prep_cif_machdep): Likewise. * src/x86/unix64.S: Add unwind info. From-SVN: r61291
This commit is contained in:
parent
474113419b
commit
45ba15f410
|
@ -1,3 +1,9 @@
|
||||||
|
2003-01-14 Andrew Haley <aph@redhat.com>
|
||||||
|
|
||||||
|
* src/x86/ffi64.c (ffi_prep_args): Check for void retval.
|
||||||
|
(ffi_prep_cif_machdep): Likewise.
|
||||||
|
* src/x86/unix64.S: Add unwind info.
|
||||||
|
|
||||||
2003-01-14 Andreas Jaeger <aj@suse.de>
|
2003-01-14 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
* src/ffitest.c (main): Only use ffi_closures if those are
|
* src/ffitest.c (main): Only use ffi_closures if those are
|
||||||
|
|
|
@ -285,7 +285,8 @@ ffi_prep_args (stackLayout *stack, extended_cif *ecif)
|
||||||
/* First check if the return value should be passed in memory. If so,
|
/* First check if the return value should be passed in memory. If so,
|
||||||
pass the pointer as the first argument. */
|
pass the pointer as the first argument. */
|
||||||
gprcount = ssecount = 0;
|
gprcount = ssecount = 0;
|
||||||
if (examine_argument (ecif->cif->rtype, 1, &g, &s) == 0)
|
if (ecif->cif->rtype->type != FFI_TYPE_VOID
|
||||||
|
&& examine_argument (ecif->cif->rtype, 1, &g, &s) == 0)
|
||||||
(void *)stack->gpr[gprcount++] = ecif->rvalue;
|
(void *)stack->gpr[gprcount++] = ecif->rvalue;
|
||||||
|
|
||||||
for (i=ecif->cif->nargs, p_arg=ecif->cif->arg_types, p_argv = ecif->avalue;
|
for (i=ecif->cif->nargs, p_arg=ecif->cif->arg_types, p_argv = ecif->avalue;
|
||||||
|
@ -389,8 +390,8 @@ ffi_prep_cif_machdep (ffi_cif *cif)
|
||||||
|
|
||||||
/* If the return value should be passed in memory, pass the pointer
|
/* If the return value should be passed in memory, pass the pointer
|
||||||
as the first argument. The actual memory isn't allocated here. */
|
as the first argument. The actual memory isn't allocated here. */
|
||||||
|
if (cif->rtype->type != FFI_TYPE_VOID
|
||||||
if (examine_argument (cif->rtype, 1, &g, &s) == 0)
|
&& examine_argument (cif->rtype, 1, &g, &s) == 0)
|
||||||
gprcount = 1;
|
gprcount = 1;
|
||||||
|
|
||||||
/* Go over all arguments and determine the way they should be passed.
|
/* Go over all arguments and determine the way they should be passed.
|
||||||
|
|
|
@ -163,4 +163,46 @@ sse2floatfloat:
|
||||||
movq %xmm0, (%rsi)
|
movq %xmm0, (%rsi)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
.section .eh_frame,"a",@progbits
|
||||||
|
.Lframe0:
|
||||||
|
.long .LECIE1-.LSCIE1
|
||||||
|
.LSCIE1:
|
||||||
|
.long 0x0
|
||||||
|
.byte 0x1
|
||||||
|
.string "zR"
|
||||||
|
.uleb128 0x1
|
||||||
|
.sleb128 -8
|
||||||
|
.byte 0x10
|
||||||
|
.uleb128 0x1
|
||||||
|
.byte 0x1b
|
||||||
|
.byte 0xc
|
||||||
|
.uleb128 0x7
|
||||||
|
.uleb128 0x8
|
||||||
|
.byte 0x90
|
||||||
|
.uleb128 0x1
|
||||||
|
.align 8
|
||||||
|
.LECIE1:
|
||||||
|
.LSFDE1:
|
||||||
|
.long .LEFDE1-.LASFDE1
|
||||||
|
.LASFDE1:
|
||||||
|
.long .LASFDE1-.Lframe0
|
||||||
|
|
||||||
|
.long .LFB1-.
|
||||||
|
.long .LFE1-.LFB1
|
||||||
|
.uleb128 0x0
|
||||||
|
.byte 0x4 # DW_CFA_advance_loc4
|
||||||
|
.long .LCFI0-.LFB1
|
||||||
|
.byte 0xe # DW_CFA_def_cfa_offset
|
||||||
|
.uleb128 0x10
|
||||||
|
.byte 0x86 # DW_CFA_offset: r6 at cfa-16
|
||||||
|
.uleb128 0x2
|
||||||
|
.byte 0x4 # DW_CFA_advance_loc4
|
||||||
|
.long .LCFI1-.LCFI0
|
||||||
|
.byte 0x86 # DW_CFA_offset: r6 at cfa-16
|
||||||
|
.uleb128 0x2
|
||||||
|
.byte 0xd # DW_CFA_def_cfa_reg: r6
|
||||||
|
.uleb128 0x6
|
||||||
|
.align 8
|
||||||
|
.LEFDE1:
|
||||||
|
|
||||||
#endif /* __x86_64__ */
|
#endif /* __x86_64__ */
|
||||||
|
|
Loading…
Reference in New Issue