Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
787b0d19
Commit
787b0d19
authored
Aug 24, 2007
by
David Daney
Committed by
David Daney
Aug 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* testsuite/libffi.call/return_sl.c: New test.
From-SVN: r127787
parent
ef7e861a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
libffi/ChangeLog
+4
-0
libffi/testsuite/libffi.call/return_sl.c
+38
-0
No files found.
libffi/ChangeLog
View file @
787b0d19
2007-08-24 David Daney <ddaney@avtrex.com>
* testsuite/libffi.call/return_sl.c: New test.
2007-08-10 David Daney <ddaney@avtrex.com>
* testsuite/libffi.call/cls_multi_ushort.c,
...
...
libffi/testsuite/libffi.call/return_sl.c
0 → 100644
View file @
787b0d19
/* Area: ffi_call
Purpose: Check if long as return type is handled correctly.
Limitations: none.
PR: none.
*/
/* { dg-do run } */
#include "ffitest.h"
static
long
return_sl
(
long
l1
,
long
l2
)
{
return
l1
-
l2
;
}
int
main
(
void
)
{
ffi_cif
cif
;
ffi_type
*
args
[
MAX_ARGS
];
void
*
values
[
MAX_ARGS
];
ffi_arg
res
;
unsigned
long
l1
,
l2
;
args
[
0
]
=
&
ffi_type_slong
;
args
[
1
]
=
&
ffi_type_slong
;
values
[
0
]
=
&
l1
;
values
[
1
]
=
&
l2
;
CHECK
(
ffi_prep_cif
(
&
cif
,
FFI_DEFAULT_ABI
,
2
,
&
ffi_type_slong
,
args
)
==
FFI_OK
);
l1
=
1073741823L
;
l2
=
1073741824L
;
ffi_call
(
&
cif
,
FFI_FN
(
return_sl
),
&
res
,
values
);
printf
(
"res: %ld, %ld
\n
"
,
(
long
)
res
,
l1
-
l2
);
/* { dg-output "res: -1, -1" } */
exit
(
0
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment