Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/include/ffitarget.h +164 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/about.json +133 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/files +15 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/git +0 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/has_prefix +1 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/hash_input.json +8 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/index.json +16 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/licenses/LICENSE +21 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/paths.json +97 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/0001-arm64-changes-from-v3.3-patch.patch +213 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/0002-Don-t-define-FFI_COMPLEX_TYPEDEF-ifndef-FFI_TARGET_H.patch +33 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/0004-LIBFFI_CLOSURE.patch +84 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/bld.bat +34 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/build.sh +70 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/conda_build_config.yaml +101 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/fix_w3264_masm.patch +37 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/meta.yaml +96 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/meta.yaml.template +72 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/run_test.bat +9 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/run_test.sh +14 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/win_cmake.patch +706 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/repodata_record.json +23 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/run_exports.json +1 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/run_test.sh +14 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/test_time_dependencies.json +1 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/Makefile.am +133 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/Makefile.in +662 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/config/default.exp +1 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/lib/libffi.exp +666 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/lib/target-libpath.exp +283 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/lib/wrapper.exp +45 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/Makefile +28 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/README +78 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/alignof.h +50 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/bhaible.exp +63 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/test-call.c +1746 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/test-callback.c +0 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/testcases.c +747 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/align_mixed.c +46 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/align_stdcall.c +46 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/bpo-38748.c +41 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/call.exp +54 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/err_bad_typedef.c +26 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/ffitest.h +163 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float.c +59 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float1.c +60 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float2.c +61 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float3.c +74 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float4.c +62 -0
- miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float_va.c +110 -0
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/include/ffitarget.h
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* -----------------------------------------------------------------*-C-*-
|
| 2 |
+
ffitarget.h - Copyright (c) 2012, 2014, 2018 Anthony Green
|
| 3 |
+
Copyright (c) 1996-2003, 2010 Red Hat, Inc.
|
| 4 |
+
Copyright (C) 2008 Free Software Foundation, Inc.
|
| 5 |
+
|
| 6 |
+
Target configuration macros for x86 and x86-64.
|
| 7 |
+
|
| 8 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 9 |
+
a copy of this software and associated documentation files (the
|
| 10 |
+
``Software''), to deal in the Software without restriction, including
|
| 11 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 12 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 13 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 14 |
+
the following conditions:
|
| 15 |
+
|
| 16 |
+
The above copyright notice and this permission notice shall be included
|
| 17 |
+
in all copies or substantial portions of the Software.
|
| 18 |
+
|
| 19 |
+
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
|
| 20 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 21 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 22 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
| 23 |
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
| 24 |
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 25 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
| 26 |
+
DEALINGS IN THE SOFTWARE.
|
| 27 |
+
|
| 28 |
+
----------------------------------------------------------------------- */
|
| 29 |
+
|
| 30 |
+
#ifndef LIBFFI_TARGET_H
|
| 31 |
+
#define LIBFFI_TARGET_H
|
| 32 |
+
|
| 33 |
+
#ifndef LIBFFI_H
|
| 34 |
+
#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
|
| 35 |
+
#endif
|
| 36 |
+
|
| 37 |
+
/* ---- System specific configurations ----------------------------------- */
|
| 38 |
+
|
| 39 |
+
/* For code common to all platforms on x86 and x86_64. */
|
| 40 |
+
#define X86_ANY
|
| 41 |
+
|
| 42 |
+
#if defined (X86_64) && defined (__i386__)
|
| 43 |
+
#undef X86_64
|
| 44 |
+
#warning ******************************************************
|
| 45 |
+
#warning ********** X86 IS DEFINED ****************************
|
| 46 |
+
#warning ******************************************************
|
| 47 |
+
#define X86
|
| 48 |
+
#endif
|
| 49 |
+
|
| 50 |
+
#ifdef X86_WIN64
|
| 51 |
+
#define FFI_SIZEOF_ARG 8
|
| 52 |
+
#define USE_BUILTIN_FFS 0 /* not yet implemented in mingw-64 */
|
| 53 |
+
#endif
|
| 54 |
+
|
| 55 |
+
#define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION
|
| 56 |
+
#ifndef _MSC_VER
|
| 57 |
+
#define FFI_TARGET_HAS_COMPLEX_TYPE
|
| 58 |
+
#endif
|
| 59 |
+
|
| 60 |
+
/* ---- Generic type definitions ----------------------------------------- */
|
| 61 |
+
|
| 62 |
+
#ifndef LIBFFI_ASM
|
| 63 |
+
#ifdef X86_WIN64
|
| 64 |
+
#ifdef _MSC_VER
|
| 65 |
+
typedef unsigned __int64 ffi_arg;
|
| 66 |
+
typedef __int64 ffi_sarg;
|
| 67 |
+
#else
|
| 68 |
+
typedef unsigned long long ffi_arg;
|
| 69 |
+
typedef long long ffi_sarg;
|
| 70 |
+
#endif
|
| 71 |
+
#else
|
| 72 |
+
#if defined __x86_64__ && defined __ILP32__
|
| 73 |
+
#define FFI_SIZEOF_ARG 8
|
| 74 |
+
#define FFI_SIZEOF_JAVA_RAW 4
|
| 75 |
+
typedef unsigned long long ffi_arg;
|
| 76 |
+
typedef long long ffi_sarg;
|
| 77 |
+
#else
|
| 78 |
+
typedef unsigned long ffi_arg;
|
| 79 |
+
typedef signed long ffi_sarg;
|
| 80 |
+
#endif
|
| 81 |
+
#endif
|
| 82 |
+
|
| 83 |
+
typedef enum ffi_abi {
|
| 84 |
+
#if defined(X86_WIN64)
|
| 85 |
+
FFI_FIRST_ABI = 0,
|
| 86 |
+
FFI_WIN64, /* sizeof(long double) == 8 - microsoft compilers */
|
| 87 |
+
FFI_GNUW64, /* sizeof(long double) == 16 - GNU compilers */
|
| 88 |
+
FFI_LAST_ABI,
|
| 89 |
+
#ifdef __GNUC__
|
| 90 |
+
FFI_DEFAULT_ABI = FFI_GNUW64
|
| 91 |
+
#else
|
| 92 |
+
FFI_DEFAULT_ABI = FFI_WIN64
|
| 93 |
+
#endif
|
| 94 |
+
|
| 95 |
+
#elif defined(X86_64) || (defined (__x86_64__) && defined (X86_DARWIN))
|
| 96 |
+
FFI_FIRST_ABI = 1,
|
| 97 |
+
FFI_UNIX64,
|
| 98 |
+
FFI_WIN64,
|
| 99 |
+
FFI_EFI64 = FFI_WIN64,
|
| 100 |
+
FFI_GNUW64,
|
| 101 |
+
FFI_LAST_ABI,
|
| 102 |
+
FFI_DEFAULT_ABI = FFI_UNIX64
|
| 103 |
+
|
| 104 |
+
#elif defined(X86_WIN32)
|
| 105 |
+
FFI_FIRST_ABI = 0,
|
| 106 |
+
FFI_SYSV = 1,
|
| 107 |
+
FFI_STDCALL = 2,
|
| 108 |
+
FFI_THISCALL = 3,
|
| 109 |
+
FFI_FASTCALL = 4,
|
| 110 |
+
FFI_MS_CDECL = 5,
|
| 111 |
+
FFI_PASCAL = 6,
|
| 112 |
+
FFI_REGISTER = 7,
|
| 113 |
+
FFI_LAST_ABI,
|
| 114 |
+
FFI_DEFAULT_ABI = FFI_MS_CDECL
|
| 115 |
+
#else
|
| 116 |
+
FFI_FIRST_ABI = 0,
|
| 117 |
+
FFI_SYSV = 1,
|
| 118 |
+
FFI_THISCALL = 3,
|
| 119 |
+
FFI_FASTCALL = 4,
|
| 120 |
+
FFI_STDCALL = 5,
|
| 121 |
+
FFI_PASCAL = 6,
|
| 122 |
+
FFI_REGISTER = 7,
|
| 123 |
+
FFI_MS_CDECL = 8,
|
| 124 |
+
FFI_LAST_ABI,
|
| 125 |
+
FFI_DEFAULT_ABI = FFI_SYSV
|
| 126 |
+
#endif
|
| 127 |
+
} ffi_abi;
|
| 128 |
+
#endif
|
| 129 |
+
|
| 130 |
+
/* ---- Definitions for closures ----------------------------------------- */
|
| 131 |
+
|
| 132 |
+
#define FFI_CLOSURES 1
|
| 133 |
+
#define FFI_GO_CLOSURES 1
|
| 134 |
+
|
| 135 |
+
#define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1)
|
| 136 |
+
#define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2)
|
| 137 |
+
#define FFI_TYPE_SMALL_STRUCT_4B (FFI_TYPE_LAST + 3)
|
| 138 |
+
#define FFI_TYPE_MS_STRUCT (FFI_TYPE_LAST + 4)
|
| 139 |
+
|
| 140 |
+
#if defined (X86_64) || defined(X86_WIN64) \
|
| 141 |
+
|| (defined (__x86_64__) && defined (X86_DARWIN))
|
| 142 |
+
/* 4 bytes of ENDBR64 + 7 bytes of LEA + 6 bytes of JMP + 7 bytes of NOP
|
| 143 |
+
+ 8 bytes of pointer. */
|
| 144 |
+
# define FFI_TRAMPOLINE_SIZE 32
|
| 145 |
+
# define FFI_NATIVE_RAW_API 0
|
| 146 |
+
#else
|
| 147 |
+
/* 4 bytes of ENDBR32 + 5 bytes of MOV + 5 bytes of JMP + 2 unused
|
| 148 |
+
bytes. */
|
| 149 |
+
# define FFI_TRAMPOLINE_SIZE 16
|
| 150 |
+
# define FFI_NATIVE_RAW_API 1 /* x86 has native raw api support */
|
| 151 |
+
#endif
|
| 152 |
+
|
| 153 |
+
#if !defined(GENERATE_LIBFFI_MAP) && defined(__CET__)
|
| 154 |
+
# include <cet.h>
|
| 155 |
+
# if (__CET__ & 1) != 0
|
| 156 |
+
# define ENDBR_PRESENT
|
| 157 |
+
# endif
|
| 158 |
+
# define _CET_NOTRACK notrack
|
| 159 |
+
#else
|
| 160 |
+
# define _CET_ENDBR
|
| 161 |
+
# define _CET_NOTRACK
|
| 162 |
+
#endif
|
| 163 |
+
|
| 164 |
+
#endif
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/about.json
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"channels": [
|
| 3 |
+
"https://repo.anaconda.com/pkgs/main"
|
| 4 |
+
],
|
| 5 |
+
"conda_build_version": "24.1.2",
|
| 6 |
+
"conda_version": "24.1.2",
|
| 7 |
+
"description": "The libffi library provides a portable, high level programming interface\nto various calling conventions. This allows a programmer to call any\nfunction specified by a call interface description at run-time.\n",
|
| 8 |
+
"dev_url": "https://github.com/libffi/libffi",
|
| 9 |
+
"doc_url": "https://sourceware.org/libffi/",
|
| 10 |
+
"env_vars": {
|
| 11 |
+
"CIO_TEST": "<not set>"
|
| 12 |
+
},
|
| 13 |
+
"extra": {
|
| 14 |
+
"copy_test_source_files": true,
|
| 15 |
+
"final": true,
|
| 16 |
+
"flow_run_id": "9d85cb11-b977-4c5d-afe8-1f4416fc0019",
|
| 17 |
+
"recipe-maintainers": [
|
| 18 |
+
"stefan-balke",
|
| 19 |
+
"scopatz",
|
| 20 |
+
"isuruf"
|
| 21 |
+
],
|
| 22 |
+
"remote_url": "git@github.com:AnacondaRecipes/libffi-feedstock.git",
|
| 23 |
+
"sha": "d17938611be89ed8fc328d1fd8701795d5b7ad9d"
|
| 24 |
+
},
|
| 25 |
+
"home": "https://sourceware.org/libffi/",
|
| 26 |
+
"identifiers": [],
|
| 27 |
+
"keywords": [],
|
| 28 |
+
"license": "MIT",
|
| 29 |
+
"license_family": "MIT",
|
| 30 |
+
"license_file": "LICENSE",
|
| 31 |
+
"root_pkgs": [
|
| 32 |
+
"_libgcc_mutex 0.1 main",
|
| 33 |
+
"_openmp_mutex 5.1 1_gnu",
|
| 34 |
+
"archspec 0.2.1 pyhd3eb1b0_0",
|
| 35 |
+
"boltons 23.0.0 py39h06a4308_0",
|
| 36 |
+
"brotli-python 1.0.9 py39h6a678d5_7",
|
| 37 |
+
"bzip2 1.0.8 h7b6447c_0",
|
| 38 |
+
"c-ares 1.19.1 h5eee18b_0",
|
| 39 |
+
"charset-normalizer 2.0.4 pyhd3eb1b0_0",
|
| 40 |
+
"conda-content-trust 0.2.0 py39h06a4308_0",
|
| 41 |
+
"conda-package-handling 2.2.0 py39h06a4308_0",
|
| 42 |
+
"conda-package-streaming 0.9.0 py39h06a4308_0",
|
| 43 |
+
"fmt 9.1.0 hdb19cb5_0",
|
| 44 |
+
"icu 73.1 h6a678d5_0",
|
| 45 |
+
"idna 3.4 py39h06a4308_0",
|
| 46 |
+
"jsonpatch 1.32 pyhd3eb1b0_0",
|
| 47 |
+
"jsonpointer 2.1 pyhd3eb1b0_0",
|
| 48 |
+
"krb5 1.20.1 h143b758_1",
|
| 49 |
+
"ld_impl_linux-64 2.38 h1181459_1",
|
| 50 |
+
"libarchive 3.6.2 h6ac8c49_2",
|
| 51 |
+
"libev 4.33 h7f8727e_1",
|
| 52 |
+
"libffi 3.4.4 h6a678d5_0",
|
| 53 |
+
"libgcc-ng 11.2.0 h1234567_1",
|
| 54 |
+
"libgomp 11.2.0 h1234567_1",
|
| 55 |
+
"libnghttp2 1.57.0 h2d74bed_0",
|
| 56 |
+
"libsolv 0.7.24 he621ea3_0",
|
| 57 |
+
"libssh2 1.10.0 hdbd6064_2",
|
| 58 |
+
"libstdcxx-ng 11.2.0 h1234567_1",
|
| 59 |
+
"libxml2 2.10.4 hf1b16e4_1",
|
| 60 |
+
"lz4-c 1.9.4 h6a678d5_0",
|
| 61 |
+
"ncurses 6.4 h6a678d5_0",
|
| 62 |
+
"packaging 23.1 py39h06a4308_0",
|
| 63 |
+
"pcre2 10.42 hebb0a14_0",
|
| 64 |
+
"pluggy 1.0.0 py39h06a4308_1",
|
| 65 |
+
"pybind11-abi 4 hd3eb1b0_1",
|
| 66 |
+
"pycosat 0.6.6 py39h5eee18b_0",
|
| 67 |
+
"pycparser 2.21 pyhd3eb1b0_0",
|
| 68 |
+
"pysocks 1.7.1 py39h06a4308_0",
|
| 69 |
+
"python 3.9.18 h955ad1f_0",
|
| 70 |
+
"readline 8.2 h5eee18b_0",
|
| 71 |
+
"reproc 14.2.4 h295c915_1",
|
| 72 |
+
"reproc-cpp 14.2.4 h295c915_1",
|
| 73 |
+
"ruamel.yaml 0.17.21 py39h5eee18b_0",
|
| 74 |
+
"ruamel.yaml.clib 0.2.6 py39h5eee18b_1",
|
| 75 |
+
"sqlite 3.41.2 h5eee18b_0",
|
| 76 |
+
"tk 8.6.12 h1ccaba5_0",
|
| 77 |
+
"tqdm 4.65.0 py39hb070fc8_0",
|
| 78 |
+
"wheel 0.41.2 py39h06a4308_0",
|
| 79 |
+
"yaml-cpp 0.8.0 h6a678d5_0",
|
| 80 |
+
"zlib 1.2.13 h5eee18b_0",
|
| 81 |
+
"zstandard 0.19.0 py39h5eee18b_0",
|
| 82 |
+
"zstd 1.5.5 hc292b87_0",
|
| 83 |
+
"attrs 23.1.0 py39h06a4308_0",
|
| 84 |
+
"beautifulsoup4 4.12.2 py39h06a4308_0",
|
| 85 |
+
"ca-certificates 2023.12.12 h06a4308_0",
|
| 86 |
+
"certifi 2024.2.2 py39h06a4308_0",
|
| 87 |
+
"cffi 1.16.0 py39h5eee18b_0",
|
| 88 |
+
"chardet 4.0.0 py39h06a4308_1003",
|
| 89 |
+
"click 8.1.7 py39h06a4308_0",
|
| 90 |
+
"conda 24.1.2 py39h06a4308_0",
|
| 91 |
+
"conda-build 24.1.2 py39h06a4308_0",
|
| 92 |
+
"conda-index 0.4.0 pyhd3eb1b0_0",
|
| 93 |
+
"conda-libmamba-solver 24.1.0 pyhd3eb1b0_0",
|
| 94 |
+
"cryptography 42.0.2 py39hdda0065_0",
|
| 95 |
+
"distro 1.8.0 py39h06a4308_0",
|
| 96 |
+
"filelock 3.13.1 py39h06a4308_0",
|
| 97 |
+
"jinja2 3.1.3 py39h06a4308_0",
|
| 98 |
+
"jsonschema 4.19.2 py39h06a4308_0",
|
| 99 |
+
"jsonschema-specifications 2023.7.1 py39h06a4308_0",
|
| 100 |
+
"libcurl 8.5.0 h251f7ec_0",
|
| 101 |
+
"libedit 3.1.20230828 h5eee18b_0",
|
| 102 |
+
"liblief 0.12.3 h6a678d5_0",
|
| 103 |
+
"libmamba 1.5.6 haf1ee3a_0",
|
| 104 |
+
"libmambapy 1.5.6 py39h2dafd23_0",
|
| 105 |
+
"markupsafe 2.1.3 py39h5eee18b_0",
|
| 106 |
+
"menuinst 2.0.2 py39h06a4308_0",
|
| 107 |
+
"more-itertools 10.1.0 py39h06a4308_0",
|
| 108 |
+
"openssl 3.0.13 h7f8727e_0",
|
| 109 |
+
"patch 2.7.6 h7b6447c_1001",
|
| 110 |
+
"patchelf 0.17.2 h6a678d5_0",
|
| 111 |
+
"pip 23.3.1 py39h06a4308_0",
|
| 112 |
+
"pkginfo 1.9.6 py39h06a4308_0",
|
| 113 |
+
"platformdirs 3.10.0 py39h06a4308_0",
|
| 114 |
+
"psutil 5.9.0 py39h5eee18b_0",
|
| 115 |
+
"py-lief 0.12.3 py39h6a678d5_0",
|
| 116 |
+
"pyopenssl 24.0.0 py39h06a4308_0",
|
| 117 |
+
"python-libarchive-c 2.9 pyhd3eb1b0_1",
|
| 118 |
+
"pytz 2023.3.post1 py39h06a4308_0",
|
| 119 |
+
"pyyaml 6.0.1 py39h5eee18b_0",
|
| 120 |
+
"referencing 0.30.2 py39h06a4308_0",
|
| 121 |
+
"requests 2.31.0 py39h06a4308_1",
|
| 122 |
+
"rpds-py 0.10.6 py39hb02cf49_0",
|
| 123 |
+
"setuptools 68.2.2 py39h06a4308_0",
|
| 124 |
+
"soupsieve 2.5 py39h06a4308_0",
|
| 125 |
+
"tomli 2.0.1 py39h06a4308_0",
|
| 126 |
+
"tzdata 2023d h04d1e81_0",
|
| 127 |
+
"urllib3 2.1.0 py39h06a4308_1",
|
| 128 |
+
"xz 5.4.5 h5eee18b_0",
|
| 129 |
+
"yaml 0.2.5 h7b6447c_0"
|
| 130 |
+
],
|
| 131 |
+
"summary": "A Portable Foreign Function Interface Library",
|
| 132 |
+
"tags": []
|
| 133 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/files
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include/ffi.h
|
| 2 |
+
include/ffitarget.h
|
| 3 |
+
lib/libffi.7.so
|
| 4 |
+
lib/libffi.8.so
|
| 5 |
+
lib/libffi.a
|
| 6 |
+
lib/libffi.so
|
| 7 |
+
lib/libffi.so.7
|
| 8 |
+
lib/libffi.so.8
|
| 9 |
+
lib/libffi.so.8.1.2
|
| 10 |
+
lib/pkgconfig/libffi.pc
|
| 11 |
+
share/info/libffi.info
|
| 12 |
+
share/man/man3/ffi.3
|
| 13 |
+
share/man/man3/ffi_call.3
|
| 14 |
+
share/man/man3/ffi_prep_cif.3
|
| 15 |
+
share/man/man3/ffi_prep_cif_var.3
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/git
ADDED
|
File without changes
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/has_prefix
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
/croot/libffi_1714483243560/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/libffi.pc
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/hash_input.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"c_compiler_version": "11.2.0",
|
| 3 |
+
"cxx_compiler_version": "11.2.0",
|
| 4 |
+
"cxx_compiler": "gxx",
|
| 5 |
+
"c_compiler": "gcc",
|
| 6 |
+
"target_platform": "linux-64",
|
| 7 |
+
"channel_targets": "defaults"
|
| 8 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/index.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"arch": "x86_64",
|
| 3 |
+
"build": "h6a678d5_1",
|
| 4 |
+
"build_number": 1,
|
| 5 |
+
"depends": [
|
| 6 |
+
"libgcc-ng >=11.2.0",
|
| 7 |
+
"libstdcxx-ng >=11.2.0"
|
| 8 |
+
],
|
| 9 |
+
"license": "MIT",
|
| 10 |
+
"license_family": "MIT",
|
| 11 |
+
"name": "libffi",
|
| 12 |
+
"platform": "linux",
|
| 13 |
+
"subdir": "linux-64",
|
| 14 |
+
"timestamp": 1714483282916,
|
| 15 |
+
"version": "3.4.4"
|
| 16 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/licenses/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
libffi - Copyright (c) 1996-2022 Anthony Green, Red Hat, Inc and others.
|
| 2 |
+
See source files for details.
|
| 3 |
+
|
| 4 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 5 |
+
a copy of this software and associated documentation files (the
|
| 6 |
+
``Software''), to deal in the Software without restriction, including
|
| 7 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 8 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 9 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 10 |
+
the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be
|
| 13 |
+
included in all copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
|
| 16 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 17 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
| 18 |
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
| 19 |
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
| 20 |
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
| 21 |
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/paths.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"paths": [
|
| 3 |
+
{
|
| 4 |
+
"_path": "include/ffi.h",
|
| 5 |
+
"path_type": "hardlink",
|
| 6 |
+
"sha256": "f49fc7045d930af653d73aa480b645b296399a6205002215894d90de4de8355a",
|
| 7 |
+
"size_in_bytes": 14287
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"_path": "include/ffitarget.h",
|
| 11 |
+
"path_type": "hardlink",
|
| 12 |
+
"sha256": "45e4fd2585aaed711e4fa3d1377b70c8e54dcdc56bdf402fa23a8816d19cc58a",
|
| 13 |
+
"size_in_bytes": 4928
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"_path": "lib/libffi.7.so",
|
| 17 |
+
"path_type": "softlink",
|
| 18 |
+
"sha256": "a5d54aeb8ed2fd5e0ccf9d38b28cad6dec76517f69224a5d9687c1970b57b194",
|
| 19 |
+
"size_in_bytes": 72144
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"_path": "lib/libffi.8.so",
|
| 23 |
+
"path_type": "softlink",
|
| 24 |
+
"sha256": "a5d54aeb8ed2fd5e0ccf9d38b28cad6dec76517f69224a5d9687c1970b57b194",
|
| 25 |
+
"size_in_bytes": 72144
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"_path": "lib/libffi.a",
|
| 29 |
+
"path_type": "hardlink",
|
| 30 |
+
"sha256": "66e22d52480d4a11234ee038fe8929c1fdeea490a344260ed10711dd900059d7",
|
| 31 |
+
"size_in_bytes": 97758
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"_path": "lib/libffi.so",
|
| 35 |
+
"path_type": "softlink",
|
| 36 |
+
"sha256": "a5d54aeb8ed2fd5e0ccf9d38b28cad6dec76517f69224a5d9687c1970b57b194",
|
| 37 |
+
"size_in_bytes": 72144
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"_path": "lib/libffi.so.7",
|
| 41 |
+
"path_type": "softlink",
|
| 42 |
+
"sha256": "a5d54aeb8ed2fd5e0ccf9d38b28cad6dec76517f69224a5d9687c1970b57b194",
|
| 43 |
+
"size_in_bytes": 72144
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
"_path": "lib/libffi.so.8",
|
| 47 |
+
"path_type": "softlink",
|
| 48 |
+
"sha256": "a5d54aeb8ed2fd5e0ccf9d38b28cad6dec76517f69224a5d9687c1970b57b194",
|
| 49 |
+
"size_in_bytes": 72144
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"_path": "lib/libffi.so.8.1.2",
|
| 53 |
+
"path_type": "hardlink",
|
| 54 |
+
"sha256": "a5d54aeb8ed2fd5e0ccf9d38b28cad6dec76517f69224a5d9687c1970b57b194",
|
| 55 |
+
"size_in_bytes": 72144
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"_path": "lib/pkgconfig/libffi.pc",
|
| 59 |
+
"file_mode": "text",
|
| 60 |
+
"path_type": "hardlink",
|
| 61 |
+
"prefix_placeholder": "/croot/libffi_1714483243560/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_",
|
| 62 |
+
"sha256": "d42c74b8e17b72244a609b67b6f23d18da75e961f35ae11a8be0f205daee22b4",
|
| 63 |
+
"size_in_bytes": 756
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"_path": "share/info/libffi.info",
|
| 67 |
+
"path_type": "hardlink",
|
| 68 |
+
"sha256": "f7481e5e3817a91d6c746b69f0b2708470b802bb2a6834b9a82e9f71b661fb62",
|
| 69 |
+
"size_in_bytes": 38202
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"_path": "share/man/man3/ffi.3",
|
| 73 |
+
"path_type": "hardlink",
|
| 74 |
+
"sha256": "aa4730e114c305943a2226a524ed8447dc6b66a184523999868e5433c2c9de74",
|
| 75 |
+
"size_in_bytes": 850
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"_path": "share/man/man3/ffi_call.3",
|
| 79 |
+
"path_type": "hardlink",
|
| 80 |
+
"sha256": "2817ce7b78cb737d7b85b18b45899470f5f565f990d056d3d8cfabf6d779477f",
|
| 81 |
+
"size_in_bytes": 2333
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"_path": "share/man/man3/ffi_prep_cif.3",
|
| 85 |
+
"path_type": "hardlink",
|
| 86 |
+
"sha256": "f60c5bb9d04b55988da13511a2c3edfa0f39fb6f51abfb8ac24d0b161c4169c0",
|
| 87 |
+
"size_in_bytes": 1158
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"_path": "share/man/man3/ffi_prep_cif_var.3",
|
| 91 |
+
"path_type": "hardlink",
|
| 92 |
+
"sha256": "9365685252f33f13627c9303bc01883b764227132069260c19e94100ff442a51",
|
| 93 |
+
"size_in_bytes": 1321
|
| 94 |
+
}
|
| 95 |
+
],
|
| 96 |
+
"paths_version": 1
|
| 97 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/0001-arm64-changes-from-v3.3-patch.patch
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
From a6ef415fa95661b67017f1bdc32d8f98db7d9c44 Mon Sep 17 00:00:00 2001
|
| 2 |
+
From: Daniel Holth <dholth@anaconda.com>
|
| 3 |
+
Date: Fri, 27 Aug 2021 15:55:36 -0400
|
| 4 |
+
Subject: [PATCH] arm64 changes merged from v3.3 arm64-changes patch
|
| 5 |
+
|
| 6 |
+
---
|
| 7 |
+
src/aarch64/ffi.c | 29 +++++++++++++++++---
|
| 8 |
+
src/closures.c | 67 ++++++++++++++++++++++++++++++++++++++++-------
|
| 9 |
+
src/x86/ffi64.c | 6 +++++
|
| 10 |
+
3 files changed, 89 insertions(+), 13 deletions(-)
|
| 11 |
+
|
| 12 |
+
diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c
|
| 13 |
+
index 6544ac0..3f936d3 100644
|
| 14 |
+
--- a/src/aarch64/ffi.c
|
| 15 |
+
+++ b/src/aarch64/ffi.c
|
| 16 |
+
@@ -715,12 +715,13 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue,
|
| 17 |
+
state.ngrn = N_X_ARG_REG;
|
| 18 |
+
/* Note that the default abi extends each argument
|
| 19 |
+
to a full 64-bit slot, while the iOS abi allocates
|
| 20 |
+
- only enough space. */
|
| 21 |
+
+ only enough space, except for variadic arguments. */
|
| 22 |
+
#ifdef __APPLE__
|
| 23 |
+
- memcpy(d, a, s);
|
| 24 |
+
-#else
|
| 25 |
+
- *(ffi_arg *)d = ext;
|
| 26 |
+
+ if (!state.allocating_variadic)
|
| 27 |
+
+ memcpy(d, a, s);
|
| 28 |
+
+ else
|
| 29 |
+
#endif
|
| 30 |
+
+ *(ffi_arg *)d = ext;
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
break;
|
| 34 |
+
@@ -867,7 +868,11 @@ ffi_prep_closure_loc (ffi_closure *closure,
|
| 35 |
+
# ifdef HAVE_PTRAUTH
|
| 36 |
+
codeloc = ptrauth_auth_data(codeloc, ptrauth_key_function_pointer, 0);
|
| 37 |
+
# endif
|
| 38 |
+
+# ifdef FFI_TRAMPOLINE_WHOLE_DYLIB
|
| 39 |
+
+ void **config = (void **)((uint8_t *)codeloc - 2*PAGE_MAX_SIZE);
|
| 40 |
+
+# else
|
| 41 |
+
void **config = (void **)((uint8_t *)codeloc - PAGE_MAX_SIZE);
|
| 42 |
+
+# endif
|
| 43 |
+
config[0] = closure;
|
| 44 |
+
config[1] = start;
|
| 45 |
+
# endif
|
| 46 |
+
@@ -920,6 +925,22 @@ out:
|
| 47 |
+
return FFI_OK;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
+ffi_closure *
|
| 51 |
+
+ffi_find_closure_for_code(void *codeloc)
|
| 52 |
+
+{
|
| 53 |
+
+#if FFI_EXEC_TRAMPOLINE_TABLE
|
| 54 |
+
+# ifdef FFI_TRAMPOLINE_WHOLE_DYLIB
|
| 55 |
+
+ void **config = (void **)((uint8_t *)codeloc - 2*PAGE_MAX_SIZE);
|
| 56 |
+
+# else
|
| 57 |
+
+ void **config = (void **)((uint8_t *)codeloc - PAGE_MAX_SIZE);
|
| 58 |
+
+# endif
|
| 59 |
+
+ return config[0];
|
| 60 |
+
+#else
|
| 61 |
+
+ return (ffi_closure*)codeloc;
|
| 62 |
+
+#endif
|
| 63 |
+
+}
|
| 64 |
+
+ffi_closure *ffi_find_closure_for_code_np(void *codeloc) { return ffi_find_closure_for_code(codeloc); } /* Apple renamed this entry ... */
|
| 65 |
+
+
|
| 66 |
+
#ifdef FFI_GO_CLOSURES
|
| 67 |
+
extern void ffi_go_closure_SYSV (void) FFI_HIDDEN;
|
| 68 |
+
extern void ffi_go_closure_SYSV_V (void) FFI_HIDDEN;
|
| 69 |
+
diff --git a/src/closures.c b/src/closures.c
|
| 70 |
+
index 9aafbec..af1c3b8 100644
|
| 71 |
+
--- a/src/closures.c
|
| 72 |
+
+++ b/src/closures.c
|
| 73 |
+
@@ -168,7 +168,13 @@ ffi_tramp_is_present (__attribute__((unused)) void *ptr)
|
| 74 |
+
#include <stdio.h>
|
| 75 |
+
#include <stdlib.h>
|
| 76 |
+
|
| 77 |
+
+#ifdef FFI_TRAMPOLINE_WHOLE_DYLIB
|
| 78 |
+
+#include <assert.h>
|
| 79 |
+
+#include <dispatch/dispatch.h>
|
| 80 |
+
+#include <dlfcn.h>
|
| 81 |
+
+#else
|
| 82 |
+
extern void *ffi_closure_trampoline_table_page;
|
| 83 |
+
+#endif
|
| 84 |
+
|
| 85 |
+
typedef struct ffi_trampoline_table ffi_trampoline_table;
|
| 86 |
+
typedef struct ffi_trampoline_table_entry ffi_trampoline_table_entry;
|
| 87 |
+
@@ -196,6 +202,21 @@ struct ffi_trampoline_table_entry
|
| 88 |
+
/* Total number of trampolines that fit in one trampoline table */
|
| 89 |
+
#define FFI_TRAMPOLINE_COUNT (PAGE_MAX_SIZE / FFI_TRAMPOLINE_SIZE)
|
| 90 |
+
|
| 91 |
+
+/* The trampoline dylib has one page for the MACHO_HEADER and one page for the
|
| 92 |
+
+ * trampolines. iOS 12.0 and later, and macOS on Apple Silicon require that
|
| 93 |
+
+ * the entire dylib needs to be remapped as a unit.
|
| 94 |
+
+ *
|
| 95 |
+
+ * arm (legacy): Allocate two pages -- a config page and a placeholder for the trampolines
|
| 96 |
+
+ * arm64 (modern): Allocate three pages -- a config page and two placeholders for the trampoline dylib
|
| 97 |
+
+ */
|
| 98 |
+
+#ifdef FFI_TRAMPOLINE_WHOLE_DYLIB
|
| 99 |
+
+#define FFI_TRAMPOLINE_ALLOCATION_PAGE_COUNT 3
|
| 100 |
+
+#define FFI_TRAMPOLINE_PAGE_SEGMENT_OFFSET PAGE_MAX_SIZE
|
| 101 |
+
+#else
|
| 102 |
+
+#define FFI_TRAMPOLINE_ALLOCATION_PAGE_COUNT 2
|
| 103 |
+
+#define FFI_TRAMPOLINE_PAGE_SEGMENT_OFFSET 0
|
| 104 |
+
+#endif
|
| 105 |
+
+
|
| 106 |
+
static pthread_mutex_t ffi_trampoline_lock = PTHREAD_MUTEX_INITIALIZER;
|
| 107 |
+
static ffi_trampoline_table *ffi_trampoline_tables = NULL;
|
| 108 |
+
|
| 109 |
+
@@ -211,35 +232,63 @@ ffi_trampoline_table_alloc (void)
|
| 110 |
+
kern_return_t kt;
|
| 111 |
+
uint16_t i;
|
| 112 |
+
|
| 113 |
+
- /* Allocate two pages -- a config page and a placeholder page */
|
| 114 |
+
config_page = 0x0;
|
| 115 |
+
- kt = vm_allocate (mach_task_self (), &config_page, PAGE_MAX_SIZE * 2,
|
| 116 |
+
+ /* The entire allocation is:
|
| 117 |
+
+ * config_page
|
| 118 |
+
+ * trampoline_segment
|
| 119 |
+
+ *
|
| 120 |
+
+ * trampoline_segment is:
|
| 121 |
+
+ * trampoline dylib mach-o header (if FFI_TRAMPOLINE_WHOLE_DYLIB)
|
| 122 |
+
+ * trampoline page
|
| 123 |
+
+ */
|
| 124 |
+
+ kt = vm_allocate (mach_task_self (), &config_page, FFI_TRAMPOLINE_ALLOCATION_PAGE_COUNT * PAGE_MAX_SIZE,
|
| 125 |
+
VM_FLAGS_ANYWHERE);
|
| 126 |
+
if (kt != KERN_SUCCESS)
|
| 127 |
+
return NULL;
|
| 128 |
+
|
| 129 |
+
- /* Remap the trampoline table on top of the placeholder page */
|
| 130 |
+
- trampoline_page = config_page + PAGE_MAX_SIZE;
|
| 131 |
+
+ static void *trampoline_table_page;
|
| 132 |
+
+
|
| 133 |
+
+#ifdef FFI_TRAMPOLINE_WHOLE_DYLIB
|
| 134 |
+
+ static dispatch_once_t trampoline_template_init_once;
|
| 135 |
+
+
|
| 136 |
+
+ dispatch_once(&trampoline_template_init_once, ^{
|
| 137 |
+
+ void * const trampoline_handle = dlopen("/usr/lib/libffi-trampolines.dylib", RTLD_NOW | RTLD_LOCAL | RTLD_FIRST);
|
| 138 |
+
+ assert(trampoline_handle);
|
| 139 |
+
+
|
| 140 |
+
+ trampoline_table_page = dlsym(trampoline_handle, "ffi_closure_trampoline_table_page");
|
| 141 |
+
+ assert(trampoline_table_page);
|
| 142 |
+
+ });
|
| 143 |
+
+#else
|
| 144 |
+
+ trampoline_table_page = &ffi_closure_trampoline_table_page;
|
| 145 |
+
+#endif
|
| 146 |
+
|
| 147 |
+
#ifdef HAVE_PTRAUTH
|
| 148 |
+
- trampoline_page_template = (vm_address_t)(uintptr_t)ptrauth_auth_data((void *)&ffi_closure_trampoline_table_page, ptrauth_key_function_pointer, 0);
|
| 149 |
+
+ trampoline_page_template = (uintptr_t)ptrauth_auth_data(trampoline_table_page, ptrauth_key_function_pointer, 0);
|
| 150 |
+
#else
|
| 151 |
+
- trampoline_page_template = (vm_address_t)&ffi_closure_trampoline_table_page;
|
| 152 |
+
+ trampoline_page_template = (uintptr_t)trampoline_table_page;
|
| 153 |
+
#endif
|
| 154 |
+
|
| 155 |
+
#ifdef __arm__
|
| 156 |
+
/* ffi_closure_trampoline_table_page can be thumb-biased on some ARM archs */
|
| 157 |
+
trampoline_page_template &= ~1UL;
|
| 158 |
+
#endif
|
| 159 |
+
- kt = vm_remap (mach_task_self (), &trampoline_page, PAGE_MAX_SIZE, 0x0,
|
| 160 |
+
- VM_FLAGS_OVERWRITE, mach_task_self (), trampoline_page_template,
|
| 161 |
+
+
|
| 162 |
+
+ vm_address_t trampoline_segment_template = trampoline_page_template - FFI_TRAMPOLINE_PAGE_SEGMENT_OFFSET;
|
| 163 |
+
+ vm_size_t trampoline_segment_size = (FFI_TRAMPOLINE_ALLOCATION_PAGE_COUNT - 1) * PAGE_MAX_SIZE;
|
| 164 |
+
+
|
| 165 |
+
+ /* Remap the trampoline table on top of the placeholder page */
|
| 166 |
+
+ vm_address_t trampoline_segment = config_page + PAGE_MAX_SIZE;
|
| 167 |
+
+ kt = vm_remap (mach_task_self(), &trampoline_segment, trampoline_segment_size, 0x0,
|
| 168 |
+
+ VM_FLAGS_FIXED | VM_FLAGS_OVERWRITE, mach_task_self(), trampoline_segment_template,
|
| 169 |
+
FALSE, &cur_prot, &max_prot, VM_INHERIT_SHARE);
|
| 170 |
+
if (kt != KERN_SUCCESS)
|
| 171 |
+
{
|
| 172 |
+
- vm_deallocate (mach_task_self (), config_page, PAGE_MAX_SIZE * 2);
|
| 173 |
+
+ vm_deallocate (mach_task_self (), config_page, FFI_TRAMPOLINE_ALLOCATION_PAGE_COUNT * PAGE_MAX_SIZE);
|
| 174 |
+
return NULL;
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
+ trampoline_page = trampoline_segment + FFI_TRAMPOLINE_PAGE_SEGMENT_OFFSET;
|
| 178 |
+
+
|
| 179 |
+
if (!(cur_prot & VM_PROT_EXECUTE))
|
| 180 |
+
{
|
| 181 |
+
/* If VM_PROT_EXECUTE isn't set on the remapped trampoline page, set it */
|
| 182 |
+
kt = vm_protect (mach_task_self (), trampoline_page, PAGE_MAX_SIZE,
|
| 183 |
+
FALSE, cur_prot | VM_PROT_EXECUTE);
|
| 184 |
+
if (kt != KERN_SUCCESS)
|
| 185 |
+
{
|
| 186 |
+
vm_deallocate (mach_task_self (), config_page, PAGE_MAX_SIZE * 2);
|
| 187 |
+
return NULL;
|
| 188 |
+
}
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
/* We have valid trampoline and config pages */
|
| 192 |
+
table = calloc (1, sizeof (ffi_trampoline_table));
|
| 193 |
+
table->free_count = FFI_TRAMPOLINE_COUNT;
|
| 194 |
+
diff --git a/src/x86/ffi64.c b/src/x86/ffi64.c
|
| 195 |
+
index 6a8e37f..a3d51bc 100644
|
| 196 |
+
--- a/src/x86/ffi64.c
|
| 197 |
+
+++ b/src/x86/ffi64.c
|
| 198 |
+
@@ -809,6 +809,12 @@ out:
|
| 199 |
+
return FFI_OK;
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
+ffi_closure *
|
| 203 |
+
+ffi_find_closure_for_code(void *code)
|
| 204 |
+
+{
|
| 205 |
+
+ return (ffi_closure *) code;
|
| 206 |
+
+}
|
| 207 |
+
+ ffi_closure *ffi_find_closure_for_code_np(void *code) { return ffi_find_closure_for_code(code); } /* Apple renamed ... */
|
| 208 |
+
int FFI_HIDDEN
|
| 209 |
+
ffi_closure_unix64_inner(ffi_cif *cif,
|
| 210 |
+
void (*fun)(ffi_cif*, void*, void**, void*),
|
| 211 |
+
--
|
| 212 |
+
2.32.0
|
| 213 |
+
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/0002-Don-t-define-FFI_COMPLEX_TYPEDEF-ifndef-FFI_TARGET_H.patch
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
From 77a2d361b38c957700a79b79dd4002eb9b638877 Mon Sep 17 00:00:00 2001
|
| 2 |
+
From: Ray Donnelly <mingw.android@gmail.com>
|
| 3 |
+
Date: Fri, 3 Jun 2016 14:26:07 +0100
|
| 4 |
+
Subject: [PATCH 2/3] Don't define FFI_COMPLEX_TYPEDEF ifndef
|
| 5 |
+
FFI_TARGET_HAS_COMPLEX_TYPE
|
| 6 |
+
|
| 7 |
+
---
|
| 8 |
+
src/types.c | 2 ++
|
| 9 |
+
1 file changed, 2 insertions(+)
|
| 10 |
+
|
| 11 |
+
diff --git a/src/types.c b/src/types.c
|
| 12 |
+
index 7e80aec..e4b024c 100644
|
| 13 |
+
--- a/src/types.c
|
| 14 |
+
+++ b/src/types.c
|
| 15 |
+
@@ -45,6 +45,7 @@ maybe_const ffi_type ffi_type_##name = { \
|
| 16 |
+
id, NULL \
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
+#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
| 20 |
+
#define FFI_COMPLEX_TYPEDEF(name, type, maybe_const) \
|
| 21 |
+
static ffi_type *ffi_elements_complex_##name [2] = { \
|
| 22 |
+
(ffi_type *)(&ffi_type_##name), NULL \
|
| 23 |
+
@@ -60,6 +61,7 @@ maybe_const ffi_type ffi_type_complex_##name = { \
|
| 24 |
+
FFI_TYPE_COMPLEX, \
|
| 25 |
+
(ffi_type **)ffi_elements_complex_##name \
|
| 26 |
+
}
|
| 27 |
+
+#endif
|
| 28 |
+
|
| 29 |
+
/* Size and alignment are fake here. They must not be 0. */
|
| 30 |
+
FFI_EXTERN const ffi_type ffi_type_void = {
|
| 31 |
+
--
|
| 32 |
+
2.8.2
|
| 33 |
+
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/0004-LIBFFI_CLOSURE.patch
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Index: libffi-3.4.4/libffi.map.in
|
| 2 |
+
===================================================================
|
| 3 |
+
--- libffi-3.4.4.orig/libffi.map.in
|
| 4 |
+
+++ libffi-3.4.4/libffi.map.in
|
| 5 |
+
@@ -74,3 +74,79 @@ LIBFFI_GO_CLOSURE_8.0 {
|
| 6 |
+
ffi_prep_go_closure;
|
| 7 |
+
} LIBFFI_CLOSURE_8.0;
|
| 8 |
+
#endif
|
| 9 |
+
+
|
| 10 |
+
+/* These version numbers correspond to the libtool-version abi numbers,
|
| 11 |
+
+ not to the libffi release numbers. */
|
| 12 |
+
+
|
| 13 |
+
+LIBFFI_BASE_7.0 {
|
| 14 |
+
+ global:
|
| 15 |
+
+ /* Exported data variables. */
|
| 16 |
+
+ ffi_type_void;
|
| 17 |
+
+ ffi_type_uint8;
|
| 18 |
+
+ ffi_type_sint8;
|
| 19 |
+
+ ffi_type_uint16;
|
| 20 |
+
+ ffi_type_sint16;
|
| 21 |
+
+ ffi_type_uint32;
|
| 22 |
+
+ ffi_type_sint32;
|
| 23 |
+
+ ffi_type_uint64;
|
| 24 |
+
+ ffi_type_sint64;
|
| 25 |
+
+ ffi_type_float;
|
| 26 |
+
+ ffi_type_double;
|
| 27 |
+
+ ffi_type_longdouble;
|
| 28 |
+
+ ffi_type_pointer;
|
| 29 |
+
+
|
| 30 |
+
+ /* Exported functions. */
|
| 31 |
+
+ ffi_call;
|
| 32 |
+
+ ffi_prep_cif;
|
| 33 |
+
+ ffi_prep_cif_var;
|
| 34 |
+
+
|
| 35 |
+
+ ffi_raw_call;
|
| 36 |
+
+ ffi_ptrarray_to_raw;
|
| 37 |
+
+ ffi_raw_to_ptrarray;
|
| 38 |
+
+ ffi_raw_size;
|
| 39 |
+
+
|
| 40 |
+
+ ffi_java_raw_call;
|
| 41 |
+
+ ffi_java_ptrarray_to_raw;
|
| 42 |
+
+ ffi_java_raw_to_ptrarray;
|
| 43 |
+
+ ffi_java_raw_size;
|
| 44 |
+
+
|
| 45 |
+
+ local:
|
| 46 |
+
+ *;
|
| 47 |
+
+};
|
| 48 |
+
+
|
| 49 |
+
+LIBFFI_BASE_7.1 {
|
| 50 |
+
+ global:
|
| 51 |
+
+ ffi_get_struct_offsets;
|
| 52 |
+
+} LIBFFI_BASE_7.0;
|
| 53 |
+
+
|
| 54 |
+
+#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
| 55 |
+
+LIBFFI_COMPLEX_7.0 {
|
| 56 |
+
+ global:
|
| 57 |
+
+ /* Exported data variables. */
|
| 58 |
+
+ ffi_type_complex_float;
|
| 59 |
+
+ ffi_type_complex_double;
|
| 60 |
+
+ ffi_type_complex_longdouble;
|
| 61 |
+
+} LIBFFI_BASE_7.0;
|
| 62 |
+
+#endif
|
| 63 |
+
+
|
| 64 |
+
+#if FFI_CLOSURES
|
| 65 |
+
+LIBFFI_CLOSURE_7.0 {
|
| 66 |
+
+ global:
|
| 67 |
+
+ ffi_closure_alloc;
|
| 68 |
+
+ ffi_closure_free;
|
| 69 |
+
+ ffi_prep_closure;
|
| 70 |
+
+ ffi_prep_closure_loc;
|
| 71 |
+
+ ffi_prep_raw_closure;
|
| 72 |
+
+ ffi_prep_raw_closure_loc;
|
| 73 |
+
+ ffi_prep_java_raw_closure;
|
| 74 |
+
+ ffi_prep_java_raw_closure_loc;
|
| 75 |
+
+} LIBFFI_BASE_7.0;
|
| 76 |
+
+#endif
|
| 77 |
+
+
|
| 78 |
+
+#if FFI_GO_CLOSURES
|
| 79 |
+
+LIBFFI_GO_CLOSURE_7.0 {
|
| 80 |
+
+ global:
|
| 81 |
+
+ ffi_call_go;
|
| 82 |
+
+ ffi_prep_go_closure;
|
| 83 |
+
+} LIBFFI_CLOSURE_7.0;
|
| 84 |
+
+#endif
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/bld.bat
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
if "%ARCH%" == "64" (
|
| 2 |
+
set ARCH="x64"
|
| 3 |
+
) else (
|
| 4 |
+
set ARCH="Win32"
|
| 5 |
+
)
|
| 6 |
+
|
| 7 |
+
mkdir buildd
|
| 8 |
+
cd buildd
|
| 9 |
+
cmake -G "NMake Makefiles" ^
|
| 10 |
+
-D CMAKE_BUILD_TYPE=Release ^
|
| 11 |
+
-D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
|
| 12 |
+
-D CMAKE_INSTALL_PREFIX:PATH=%LIBRARY_PREFIX% ^
|
| 13 |
+
-D BUILD_SHARED_LIBS:BOOL=ON ^
|
| 14 |
+
-D VERSION=%PKG_VERSION% ^
|
| 15 |
+
..
|
| 16 |
+
|
| 17 |
+
echo "configured ..."
|
| 18 |
+
|
| 19 |
+
cmake --build . --config Release
|
| 20 |
+
|
| 21 |
+
echo "built ..."
|
| 22 |
+
|
| 23 |
+
cmake --build . --target install --config Release
|
| 24 |
+
|
| 25 |
+
if errorlevel 1 exit 1
|
| 26 |
+
|
| 27 |
+
copy %LIBRARY_LIB%\ffi.lib %LIBRARY_LIB%\libffi.lib
|
| 28 |
+
copy %LIBRARY_LIB%\ffi.lib %LIBRARY_LIB%\libffi.dll.lib
|
| 29 |
+
copy %LIBRARY_PREFIX%\bin\ffi.dll %LIBRARY_PREFIX%\bin\ffi-8.dll
|
| 30 |
+
:: ffi-8 is backward compatible to ffi-7
|
| 31 |
+
copy %LIBRARY_PREFIX%\bin\ffi.dll %LIBRARY_PREFIX%\bin\ffi-7.dll
|
| 32 |
+
|
| 33 |
+
exit 0
|
| 34 |
+
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/build.sh
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
set -ex
|
| 4 |
+
|
| 5 |
+
cd $SRC_DIR
|
| 6 |
+
|
| 7 |
+
# work-a-round for cyclic dependencies on OSX
|
| 8 |
+
if [[ $target_platform == osx-* ]]; then
|
| 9 |
+
conda create -p $SRC_DIR/compilers clang_${target_platform} clangxx_${target_platform} --yes --quiet
|
| 10 |
+
cp -fr compilers/* $BUILD_PREFIX/. 2>/dev/null || true
|
| 11 |
+
# do manual activation ...
|
| 12 |
+
. $BUILD_PREFIX/etc/conda/activate.d/activate_clang_${target_platform}.sh
|
| 13 |
+
. $BUILD_PREFIX/etc/conda/activate.d/activate_clangxx_${target_platform}.sh
|
| 14 |
+
fi
|
| 15 |
+
|
| 16 |
+
export CFLAGS="${CFLAGS//-fvisibility=+([! ])/}"
|
| 17 |
+
export CXXFLAGS="${CXXFLAGS//-fvisibility=+([! ])/}"
|
| 18 |
+
|
| 19 |
+
configure_args=(
|
| 20 |
+
--disable-debug
|
| 21 |
+
--disable-dependency-tracking
|
| 22 |
+
--prefix="${PREFIX}"
|
| 23 |
+
--includedir="${PREFIX}/include"
|
| 24 |
+
)
|
| 25 |
+
|
| 26 |
+
configure_args+=(--build=$BUILD --host=$HOST)
|
| 27 |
+
|
| 28 |
+
if [[ "$target_platform" == osx-* ]]; then
|
| 29 |
+
export CFLAGS="${CFLAGS} -Wno-deprecated-declarations"
|
| 30 |
+
export CXXFLAGS="${CXXFLAGS} -Wno-deprecated-declarations"
|
| 31 |
+
export CPP="${CC} -E"
|
| 32 |
+
export CXXCPP="${CXX} -E"
|
| 33 |
+
else
|
| 34 |
+
autoreconf -vfi
|
| 35 |
+
fi
|
| 36 |
+
|
| 37 |
+
if [[ "$target_platform" == linux* ]]; then
|
| 38 |
+
# this changes the install dir from ${PREFIX}/lib64 to ${PREFIX}/lib
|
| 39 |
+
sed -i 's:@toolexeclibdir@:$(libdir):g' Makefile.in */Makefile.in
|
| 40 |
+
sed -i 's:@toolexeclibdir@:${libdir}:g' libffi.pc.in
|
| 41 |
+
fi
|
| 42 |
+
|
| 43 |
+
./configure "${configure_args[@]}" || { cat config.log; exit 1;}
|
| 44 |
+
|
| 45 |
+
make -j${CPU_COUNT} ${VERBOSE_AT}
|
| 46 |
+
make check
|
| 47 |
+
make install
|
| 48 |
+
|
| 49 |
+
if [[ $target_platform == osx-* ]]; then
|
| 50 |
+
# do manual deactivation ...
|
| 51 |
+
. $BUILD_PREFIX/etc/conda/deactivate.d/deactivate_clang_${target_platform}.sh
|
| 52 |
+
. $BUILD_PREFIX/etc/conda/deactivate.d/deactivate_clangxx_${target_platform}.sh
|
| 53 |
+
fi
|
| 54 |
+
|
| 55 |
+
# This overlaps with libgcc-ng:
|
| 56 |
+
rm -rf ${PREFIX}/share/info/dir
|
| 57 |
+
|
| 58 |
+
# Make sure we provide old variant. As in 3.4 no API change was introduced in coparison to 3.3
|
| 59 |
+
# we will go with the assumption of being backward compatible.
|
| 60 |
+
pushd $PREFIX/lib
|
| 61 |
+
# make sure we address also <lib>.so<.number>, and don't produce dead links
|
| 62 |
+
if [[ -f libffi${SHLIB_EXT}.8 ]]; then
|
| 63 |
+
ln -s libffi${SHLIB_EXT}.8 libffi${SHLIB_EXT}.7
|
| 64 |
+
if [[ ! -f libffi.8{SHLIB_EXT} ]]; then
|
| 65 |
+
ln -s libffi${SHLIB_EXT}.8 libffi.8${SHLIB_EXT}
|
| 66 |
+
fi
|
| 67 |
+
fi
|
| 68 |
+
ln -s -f libffi.8${SHLIB_EXT} libffi.7${SHLIB_EXT}
|
| 69 |
+
popd
|
| 70 |
+
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/conda_build_config.yaml
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
VERBOSE_AT: V=1
|
| 2 |
+
VERBOSE_CM: VERBOSE=1
|
| 3 |
+
apr: 1.6.3
|
| 4 |
+
blas_impl: openblas
|
| 5 |
+
boost: '1.82'
|
| 6 |
+
boost_cpp: '1.82'
|
| 7 |
+
bzip2: '1.0'
|
| 8 |
+
c_compiler: gcc
|
| 9 |
+
c_compiler_version: 11.2.0
|
| 10 |
+
cairo: '1.16'
|
| 11 |
+
channel_targets: defaults
|
| 12 |
+
clang_variant: clang
|
| 13 |
+
cpu_optimization_target: nocona
|
| 14 |
+
cran_mirror: https://mran.microsoft.com/snapshot/2018-01-01
|
| 15 |
+
cxx_compiler: gxx
|
| 16 |
+
cxx_compiler_version: 11.2.0
|
| 17 |
+
cyrus_sasl: 2.1.28
|
| 18 |
+
dbus: '1'
|
| 19 |
+
expat: '2'
|
| 20 |
+
extend_keys:
|
| 21 |
+
- extend_keys
|
| 22 |
+
- ignore_build_only_deps
|
| 23 |
+
- pin_run_as_build
|
| 24 |
+
- ignore_version
|
| 25 |
+
fontconfig: '2.14'
|
| 26 |
+
fortran_compiler: gfortran
|
| 27 |
+
fortran_compiler_version: 11.2.0
|
| 28 |
+
freetype: '2.10'
|
| 29 |
+
g2clib: '1.6'
|
| 30 |
+
geos: 3.8.0
|
| 31 |
+
giflib: '5'
|
| 32 |
+
glib: '2'
|
| 33 |
+
gmp: '6.1'
|
| 34 |
+
gnu: 2.12.2
|
| 35 |
+
gst_plugins_base: '1.14'
|
| 36 |
+
gstreamer: '1.14'
|
| 37 |
+
harfbuzz: 4.3.0
|
| 38 |
+
hdf4: '4.2'
|
| 39 |
+
hdf5: 1.12.1
|
| 40 |
+
hdfeos2: '2.20'
|
| 41 |
+
hdfeos5: '5.1'
|
| 42 |
+
icu: '73'
|
| 43 |
+
ignore_build_only_deps:
|
| 44 |
+
- numpy
|
| 45 |
+
- python
|
| 46 |
+
jpeg: '9'
|
| 47 |
+
libcurl: 8.1.1
|
| 48 |
+
libdap4: '3.19'
|
| 49 |
+
libffi: '3.4'
|
| 50 |
+
libgd: 2.3.3
|
| 51 |
+
libgdal: 3.6.2
|
| 52 |
+
libgsasl: '1.10'
|
| 53 |
+
libkml: '1.3'
|
| 54 |
+
libnetcdf: '4.8'
|
| 55 |
+
libpng: '1.6'
|
| 56 |
+
libprotobuf: 3.20.3
|
| 57 |
+
libtiff: '4.2'
|
| 58 |
+
libwebp: 1.3.2
|
| 59 |
+
libxml2: '2.10'
|
| 60 |
+
libxslt: '1.1'
|
| 61 |
+
llvm_variant: llvm
|
| 62 |
+
lua: '5'
|
| 63 |
+
lzo: '2'
|
| 64 |
+
mkl: 2023.*
|
| 65 |
+
mpfr: '4'
|
| 66 |
+
numpy: '1.21'
|
| 67 |
+
openblas: 0.3.21
|
| 68 |
+
openjpeg: '2.3'
|
| 69 |
+
openssl: '3.0'
|
| 70 |
+
perl: '5.34'
|
| 71 |
+
pin_run_as_build:
|
| 72 |
+
python:
|
| 73 |
+
max_pin: x.x
|
| 74 |
+
min_pin: x.x
|
| 75 |
+
r-base:
|
| 76 |
+
max_pin: x.x
|
| 77 |
+
min_pin: x.x
|
| 78 |
+
libboost:
|
| 79 |
+
max_pin: x.x.x
|
| 80 |
+
pixman: '0.40'
|
| 81 |
+
proj: 9.3.1
|
| 82 |
+
proj4: 5.2.0
|
| 83 |
+
python: '3.8'
|
| 84 |
+
python_impl: cpython
|
| 85 |
+
python_implementation: cpython
|
| 86 |
+
r_base: '3.5'
|
| 87 |
+
r_implementation: r-base
|
| 88 |
+
r_version: 3.5.0
|
| 89 |
+
readline: '8.0'
|
| 90 |
+
rust_compiler: rust
|
| 91 |
+
rust_compiler_version: 1.71.1
|
| 92 |
+
serf: 1.3.9
|
| 93 |
+
sqlite: '3'
|
| 94 |
+
target_platform: linux-64
|
| 95 |
+
tk: '8.6'
|
| 96 |
+
xz: '5'
|
| 97 |
+
zip_keys:
|
| 98 |
+
- - python
|
| 99 |
+
- numpy
|
| 100 |
+
zlib: '1.2'
|
| 101 |
+
zstd: 1.5.2
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/fix_w3264_masm.patch
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
diff --git a/configure_options.cmake b/configure_options.cmake
|
| 2 |
+
index 849231c..ceb6539 100644
|
| 3 |
+
--- a/configure_options.cmake
|
| 4 |
+
+++ b/configure_options.cmake
|
| 5 |
+
@@ -79,6 +79,7 @@ elseif(TARGET_PLATFORM STREQUAL X86_64)
|
| 6 |
+
elseif(TARGET_PLATFORM MATCHES X86.*)
|
| 7 |
+
if(MSVC)
|
| 8 |
+
list(APPEND WIN_ASSEMBLY_LIST src/x86/sysv_intel.S)
|
| 9 |
+
+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
|
| 10 |
+
enable_language(ASM_MASM)
|
| 11 |
+
else()
|
| 12 |
+
list(APPEND SOURCES_LIST src/x86/sysv.S)
|
| 13 |
+
@@ -329,13 +330,17 @@ foreach(ASM_PATH IN LISTS WIN_ASSEMBLY_LIST)
|
| 14 |
+
|
| 15 |
+
set_source_files_properties("${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm" PROPERTIES GENERATED TRUE)
|
| 16 |
+
|
| 17 |
+
- add_custom_command(
|
| 18 |
+
- COMMAND "${CMAKE_ASM_MASM_COMPILER}" /Fo "${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj" "${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm"
|
| 19 |
+
- DEPENDS ${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm
|
| 20 |
+
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj
|
| 21 |
+
- COMMENT "Assembling ${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm")
|
| 22 |
+
+ if(TARGET_PLATFORM MATCHES X86.*)
|
| 23 |
+
+ list(APPEND SOURCES_LIST ${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm)
|
| 24 |
+
+ else()
|
| 25 |
+
+ add_custom_command(
|
| 26 |
+
+ COMMAND "${CMAKE_ASM_MASM_COMPILER}" /Fo "${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj" "${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm"
|
| 27 |
+
+ DEPENDS ${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm
|
| 28 |
+
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj
|
| 29 |
+
+ COMMENT "Assembling ${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm")
|
| 30 |
+
|
| 31 |
+
- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj PROPERTIES EXTERNAL_OBJECT TRUE)
|
| 32 |
+
+ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj PROPERTIES EXTERNAL_OBJECT TRUE)
|
| 33 |
+
|
| 34 |
+
- list(APPEND OBJECTS_LIST ${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj)
|
| 35 |
+
+ list(APPEND OBJECTS_LIST ${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj)
|
| 36 |
+
+ endif()
|
| 37 |
+
endforeach()
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/meta.yaml
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file created by conda-build 24.1.2
|
| 2 |
+
# meta.yaml template originally from:
|
| 3 |
+
# /feedstock/recipe, last modified Tue Apr 30 13:20:34 2024
|
| 4 |
+
# ------------------------------------------------
|
| 5 |
+
|
| 6 |
+
package:
|
| 7 |
+
name: libffi
|
| 8 |
+
version: 3.4.4
|
| 9 |
+
source:
|
| 10 |
+
patches:
|
| 11 |
+
- 0004-LIBFFI_CLOSURE.patch
|
| 12 |
+
sha256: d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676
|
| 13 |
+
url: https://github.com/libffi/libffi/releases/download/v3.4.4/libffi-3.4.4.tar.gz
|
| 14 |
+
build:
|
| 15 |
+
number: '1'
|
| 16 |
+
run_exports:
|
| 17 |
+
- libffi >=3.4,<4.0a0
|
| 18 |
+
string: h6a678d5_1
|
| 19 |
+
requirements:
|
| 20 |
+
build:
|
| 21 |
+
- _libgcc_mutex 0.1 main
|
| 22 |
+
- _openmp_mutex 5.1 1_gnu
|
| 23 |
+
- _sysroot_linux-64_curr_repodata_hack 3 haa98f57_10
|
| 24 |
+
- autoconf 2.71 pl5340h5eee18b_0
|
| 25 |
+
- automake 1.16.5 pl5340h06a4308_1
|
| 26 |
+
- binutils_impl_linux-64 2.38 h2a08ee3_1
|
| 27 |
+
- binutils_linux-64 2.38.0 hc2dff05_0
|
| 28 |
+
- gcc_impl_linux-64 11.2.0 h1234567_1
|
| 29 |
+
- gcc_linux-64 11.2.0 h5c386dc_0
|
| 30 |
+
- gdbm 1.18 hd4cb3f1_4
|
| 31 |
+
- gettext 0.21.0 h39681ba_1
|
| 32 |
+
- gxx_impl_linux-64 11.2.0 h1234567_1
|
| 33 |
+
- gxx_linux-64 11.2.0 hc2dff05_0
|
| 34 |
+
- icu 73.1 h6a678d5_0
|
| 35 |
+
- kernel-headers_linux-64 3.10.0 h57e8cba_10
|
| 36 |
+
- ld_impl_linux-64 2.38 h1181459_1
|
| 37 |
+
- libgcc-devel_linux-64 11.2.0 h1234567_1
|
| 38 |
+
- libgcc-ng 11.2.0 h1234567_1
|
| 39 |
+
- libgomp 11.2.0 h1234567_1
|
| 40 |
+
- libstdcxx-devel_linux-64 11.2.0 h1234567_1
|
| 41 |
+
- libstdcxx-ng 11.2.0 h1234567_1
|
| 42 |
+
- libtool 2.4.6 h6a678d5_1009
|
| 43 |
+
- libxml2 2.10.4 hfdd30dd_2
|
| 44 |
+
- m4 1.4.18 h4e445db_0
|
| 45 |
+
- make 4.2.1 h1bed415_1
|
| 46 |
+
- ncurses 6.4 h6a678d5_0
|
| 47 |
+
- patch 2.7.6 h7b6447c_1001
|
| 48 |
+
- perl 5.34.0 h5eee18b_2
|
| 49 |
+
- readline 8.2 h5eee18b_0
|
| 50 |
+
- sed 4.8 h7b6447c_0
|
| 51 |
+
- sysroot_linux-64 2.17 h57e8cba_10
|
| 52 |
+
- texinfo 6.8 pl5262h7f8727e_0
|
| 53 |
+
- xz 5.4.6 h5eee18b_0
|
| 54 |
+
- zlib 1.2.13 h5eee18b_0
|
| 55 |
+
host:
|
| 56 |
+
- _libgcc_mutex 0.1 main
|
| 57 |
+
- _openmp_mutex 5.1 1_gnu
|
| 58 |
+
- libgcc-ng 11.2.0 h1234567_1
|
| 59 |
+
- libgomp 11.2.0 h1234567_1
|
| 60 |
+
- libstdcxx-ng 11.2.0 h1234567_1
|
| 61 |
+
run:
|
| 62 |
+
- libgcc-ng >=11.2.0
|
| 63 |
+
- libstdcxx-ng >=11.2.0
|
| 64 |
+
test:
|
| 65 |
+
requires:
|
| 66 |
+
- gcc_linux-64 11.2.0.*
|
| 67 |
+
- gxx_linux-64 11.2.0.*
|
| 68 |
+
- make
|
| 69 |
+
source_files:
|
| 70 |
+
- testsuite
|
| 71 |
+
- testsuite/libffi.bhaible
|
| 72 |
+
about:
|
| 73 |
+
description: 'The libffi library provides a portable, high level programming interface
|
| 74 |
+
|
| 75 |
+
to various calling conventions. This allows a programmer to call any
|
| 76 |
+
|
| 77 |
+
function specified by a call interface description at run-time.
|
| 78 |
+
|
| 79 |
+
'
|
| 80 |
+
dev_url: https://github.com/libffi/libffi
|
| 81 |
+
doc_url: https://sourceware.org/libffi/
|
| 82 |
+
home: https://sourceware.org/libffi/
|
| 83 |
+
license: MIT
|
| 84 |
+
license_family: MIT
|
| 85 |
+
license_file: LICENSE
|
| 86 |
+
summary: A Portable Foreign Function Interface Library
|
| 87 |
+
extra:
|
| 88 |
+
copy_test_source_files: true
|
| 89 |
+
final: true
|
| 90 |
+
flow_run_id: 9d85cb11-b977-4c5d-afe8-1f4416fc0019
|
| 91 |
+
recipe-maintainers:
|
| 92 |
+
- isuruf
|
| 93 |
+
- scopatz
|
| 94 |
+
- stefan-balke
|
| 95 |
+
remote_url: git@github.com:AnacondaRecipes/libffi-feedstock.git
|
| 96 |
+
sha: d17938611be89ed8fc328d1fd8701795d5b7ad9d
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/meta.yaml.template
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% set version = "3.4.4" %}
|
| 2 |
+
{% set am_version = "1.15" %} # keep synchronized with build.sh
|
| 3 |
+
{% set posix = 'm2-' if win else '' %}
|
| 4 |
+
{% set native = 'm2w64-' if win else '' %}
|
| 5 |
+
|
| 6 |
+
package:
|
| 7 |
+
name: libffi
|
| 8 |
+
version: {{ version }}
|
| 9 |
+
|
| 10 |
+
source:
|
| 11 |
+
url: https://github.com/libffi/libffi/releases/download/v{{version}}/libffi-{{version}}.tar.gz
|
| 12 |
+
sha256: d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676
|
| 13 |
+
patches:
|
| 14 |
+
- 0001-arm64-changes-from-v3.3-patch.patch # [osx]
|
| 15 |
+
# Windows-specific:
|
| 16 |
+
- 0002-Don-t-define-FFI_COMPLEX_TYPEDEF-ifndef-FFI_TARGET_H.patch # [win]
|
| 17 |
+
- win_cmake.patch # [win]
|
| 18 |
+
- fix_w3264_masm.patch # [win]
|
| 19 |
+
- 0004-LIBFFI_CLOSURE.patch # [linux]
|
| 20 |
+
build:
|
| 21 |
+
number: 1
|
| 22 |
+
run_exports:
|
| 23 |
+
# good history: https://abi-laboratory.pro/tracker/timeline/libffi/
|
| 24 |
+
- {{ pin_subpackage('libffi', "x.x") }}
|
| 25 |
+
|
| 26 |
+
requirements:
|
| 27 |
+
build:
|
| 28 |
+
- cmake # [win]
|
| 29 |
+
- make # [unix]
|
| 30 |
+
- autoconf # [unix]
|
| 31 |
+
- libtool # [unix]
|
| 32 |
+
- {{ posix }}patch
|
| 33 |
+
- automake # [unix]
|
| 34 |
+
- {{ posix }}texinfo # [unix]
|
| 35 |
+
- {{ compiler('c') }} # [not osx]
|
| 36 |
+
- {{ compiler('cxx') }} # [not osx]
|
| 37 |
+
- {{ posix }}sed # [unix]
|
| 38 |
+
host:
|
| 39 |
+
run:
|
| 40 |
+
|
| 41 |
+
test:
|
| 42 |
+
requires:
|
| 43 |
+
- llvm-tools # [win]
|
| 44 |
+
- m2-grep # [win]
|
| 45 |
+
- make # [unix]
|
| 46 |
+
- cmake # [win]
|
| 47 |
+
# no compile tests here, as used compiler might be not upward-compatible
|
| 48 |
+
# needs to be fixed
|
| 49 |
+
- {{ compiler('c') }} # [not osx]
|
| 50 |
+
- {{ compiler('cxx') }} # [not osx]
|
| 51 |
+
source_files:
|
| 52 |
+
- testsuite/libffi.bhaible
|
| 53 |
+
- testsuite
|
| 54 |
+
|
| 55 |
+
about:
|
| 56 |
+
home: https://sourceware.org/libffi/
|
| 57 |
+
license: MIT
|
| 58 |
+
license_file: LICENSE
|
| 59 |
+
license_family: MIT
|
| 60 |
+
summary: A Portable Foreign Function Interface Library
|
| 61 |
+
description: |
|
| 62 |
+
The libffi library provides a portable, high level programming interface
|
| 63 |
+
to various calling conventions. This allows a programmer to call any
|
| 64 |
+
function specified by a call interface description at run-time.
|
| 65 |
+
doc_url: https://sourceware.org/libffi/
|
| 66 |
+
dev_url: https://github.com/libffi/libffi
|
| 67 |
+
|
| 68 |
+
extra:
|
| 69 |
+
recipe-maintainers:
|
| 70 |
+
- stefan-balke
|
| 71 |
+
- scopatz
|
| 72 |
+
- isuruf
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/run_test.bat
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
if not exist %LIBRARY_PREFIX%/bin/ffi-7.dll exit /b 1
|
| 2 |
+
if not exist %LIBRARY_PREFIX%/lib/libffi.lib exit /b 1
|
| 3 |
+
if not exist %LIBRARY_PREFIX%/lib/ffi.lib exit /b 1
|
| 4 |
+
if not exist %LIBRARY_PREFIX%/lib/pkgconfig/libffi.pc exit /b 1
|
| 5 |
+
if not exist %LIBRARY_PREFIX%/include/ffi.h exit /b 1
|
| 6 |
+
if not exist %LIBRARY_PREFIX%/include/ffitarget.h exit /b 1
|
| 7 |
+
echo "platform name"
|
| 8 |
+
echo %SUBDIR%
|
| 9 |
+
if %SUBDIR%==win-64 (llvm-nm %LIBRARY_PREFIX%/lib/libffi.lib | grep "__imp_ffi_type_void" ) else (llvm-nm %LIBRARY_PREFIX%/lib/libffi.lib | grep "__imp__ffi_type_void")
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/run_test.sh
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set -ex
|
| 2 |
+
test -e $PREFIX/lib/libffi${SHLIB_EXT}
|
| 3 |
+
test -e $PREFIX/lib/libffi.a
|
| 4 |
+
test -e $PREFIX/lib/pkgconfig/libffi.pc
|
| 5 |
+
test -e $PREFIX/include/ffi.h
|
| 6 |
+
test -e $PREFIX/include/ffitarget.h
|
| 7 |
+
cd $PWD/testsuite/libffi.bhaible
|
| 8 |
+
echo "Triggering libffi tests"
|
| 9 |
+
if [[ $(uname) == Darwin ]]; then
|
| 10 |
+
echo "ignore compile test due possible incompatiblity ..."
|
| 11 |
+
else
|
| 12 |
+
make prefix=$PREFIX CC=$CC
|
| 13 |
+
fi
|
| 14 |
+
echo "completed triggering the tests"
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/recipe/win_cmake.patch
ADDED
|
@@ -0,0 +1,706 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
| 2 |
+
new file mode 100644
|
| 3 |
+
index 0000000..26cc2fd
|
| 4 |
+
--- /dev/null
|
| 5 |
+
+++ b/CMakeLists.txt
|
| 6 |
+
@@ -0,0 +1,61 @@
|
| 7 |
+
+cmake_minimum_required(VERSION 2.8.8)
|
| 8 |
+
+project(libffi C)
|
| 9 |
+
+
|
| 10 |
+
+set(SOURCES_LIST
|
| 11 |
+
+ src/closures.c
|
| 12 |
+
+ src/java_raw_api
|
| 13 |
+
+ src/prep_cif.c
|
| 14 |
+
+ src/raw_api.c
|
| 15 |
+
+ src/tramp.c
|
| 16 |
+
+ src/types.c)
|
| 17 |
+
+
|
| 18 |
+
+if(CMAKE_BUILD_TYPE MATCHES DEBUG)
|
| 19 |
+
+ list(APPEND SOURCES_LIST src/debug.c)
|
| 20 |
+
+ add_definitions(-DFFI_DEBUG)
|
| 21 |
+
+endif()
|
| 22 |
+
+
|
| 23 |
+
+include(configure_platform.cmake)
|
| 24 |
+
+include(configure_options.cmake)
|
| 25 |
+
+
|
| 26 |
+
+file(COPY ${FFI_CONFIG_FILE} DESTINATION ${CMAKE_BINARY_DIR})
|
| 27 |
+
+file(COPY src/${TARGETDIR}/ffitarget.h DESTINATION ${CMAKE_BINARY_DIR}/include)
|
| 28 |
+
+
|
| 29 |
+
+include_directories(${CMAKE_BINARY_DIR}/include)
|
| 30 |
+
+include_directories(${CMAKE_BINARY_DIR})
|
| 31 |
+
+include_directories(include)
|
| 32 |
+
+
|
| 33 |
+
+add_definitions(-DFFI_BUILDING)
|
| 34 |
+
+
|
| 35 |
+
+add_library(objlib OBJECT ${SOURCES_LIST})
|
| 36 |
+
+set_property(TARGET objlib PROPERTY POSITION_INDEPENDENT_CODE 1)
|
| 37 |
+
+
|
| 38 |
+
+add_library(ffi_static STATIC $<TARGET_OBJECTS:objlib>)
|
| 39 |
+
+
|
| 40 |
+
+if(MSVC)
|
| 41 |
+
+ add_definitions(-DFFI_BUILDING_DLL)
|
| 42 |
+
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
| 43 |
+
+elseif(CMAKE_SYSTEM_NAME MATCHES Darwin)
|
| 44 |
+
+ set(CMAKE_MACOSX_RPATH 1)
|
| 45 |
+
+endif()
|
| 46 |
+
+add_library(ffi_shared SHARED $<TARGET_OBJECTS:objlib> ${OBJECTS_LIST})
|
| 47 |
+
+
|
| 48 |
+
+set_target_properties(ffi_static PROPERTIES OUTPUT_NAME ffi)
|
| 49 |
+
+set_target_properties(ffi_shared PROPERTIES OUTPUT_NAME ffi)
|
| 50 |
+
+
|
| 51 |
+
+install(TARGETS ffi_static ffi_shared
|
| 52 |
+
+ EXPORT ${PROJECT_NAME}Targets
|
| 53 |
+
+ RUNTIME DESTINATION bin
|
| 54 |
+
+ ARCHIVE DESTINATION lib
|
| 55 |
+
+ LIBRARY DESTINATION lib)
|
| 56 |
+
+
|
| 57 |
+
+install(EXPORT ${PROJECT_NAME}Targets
|
| 58 |
+
+ DESTINATION share/${PROJECT_NAME})
|
| 59 |
+
+
|
| 60 |
+
+install(FILES
|
| 61 |
+
+ ${CMAKE_BINARY_DIR}/include/ffi.h
|
| 62 |
+
+ ${CMAKE_BINARY_DIR}/include/ffitarget.h
|
| 63 |
+
+ DESTINATION include)
|
| 64 |
+
+
|
| 65 |
+
+install(FILES
|
| 66 |
+
+ ${CMAKE_LIBRARY_DIR}/pkgconfig/libffi.pc
|
| 67 |
+
+ DESTINATION lib/pkgconfig)
|
| 68 |
+
diff --git a/configure_options.cmake b/configure_options.cmake
|
| 69 |
+
new file mode 100644
|
| 70 |
+
index 0000000..849231c
|
| 71 |
+
--- /dev/null
|
| 72 |
+
+++ b/configure_options.cmake
|
| 73 |
+
@@ -0,0 +1,341 @@
|
| 74 |
+
+include(CheckCSourceCompiles)
|
| 75 |
+
+include(CheckCSourceRuns)
|
| 76 |
+
+include(CheckFunctionExists)
|
| 77 |
+
+include(CheckIncludeFile)
|
| 78 |
+
+include(CheckIncludeFiles)
|
| 79 |
+
+include(CheckSymbolExists)
|
| 80 |
+
+include(CheckTypeSize)
|
| 81 |
+
+
|
| 82 |
+
+# options in AC counterpart can be overriden from command-line
|
| 83 |
+
+# e.g.: cmake .. -DFFI_MMAP_EXEC_EMUTRAMP_PAX=1 -DVERSION=X.Y
|
| 84 |
+
+if(NOT DEFINED VERSION)
|
| 85 |
+
+ set(VERSION 3.x-dev)
|
| 86 |
+
+endif()
|
| 87 |
+
+set(PACKAGE libffi)
|
| 88 |
+
+set(PACKAGE_BUGREPORT http://github.com/libffi/libffi/issues)
|
| 89 |
+
+set(PACKAGE_NAME ${PACKAGE})
|
| 90 |
+
+set(PACKAGE_STRING "${PACKAGE} ${VERSION}")
|
| 91 |
+
+set(PACKAGE_TARNAME ${PACKAGE})
|
| 92 |
+
+set(PACKAGE_URL http://github.com/libffi/libffi)
|
| 93 |
+
+set(PACKAGE_VERSION ${VERSION})
|
| 94 |
+
+set(TARGET ${TARGET_PLATFORM})
|
| 95 |
+
+set(LT_OBJDIR .libs/)
|
| 96 |
+
+set(prefix ../..)
|
| 97 |
+
+set(exec_prefix \${prefix})
|
| 98 |
+
+set(libdir \${exec_prefix}/lib)
|
| 99 |
+
+set(toolexeclibdir \${exec_prefix}/lib)
|
| 100 |
+
+set(includedir \${prefix}/include)
|
| 101 |
+
+
|
| 102 |
+
+check_type_size (size_t SIZEOF_SIZE_T)
|
| 103 |
+
+
|
| 104 |
+
+if(SIZEOF_SIZE_T STREQUAL "")
|
| 105 |
+
+ set(size_t "unsinged int")
|
| 106 |
+
+endif()
|
| 107 |
+
+
|
| 108 |
+
+if(MSVC)
|
| 109 |
+
+ get_filename_component(COMPILER_DIR "${CMAKE_C_COMPILER}" DIRECTORY)
|
| 110 |
+
+else()
|
| 111 |
+
+ enable_language(ASM)
|
| 112 |
+
+endif()
|
| 113 |
+
+
|
| 114 |
+
+set(FFI_EXEC_TRAMPOLINE_TABLE 0)
|
| 115 |
+
+if(TARGET_PLATFORM STREQUAL X86_WIN64)
|
| 116 |
+
+ if(MSVC)
|
| 117 |
+
+ list(APPEND WIN_ASSEMBLY_LIST src/x86/win64_intel.S)
|
| 118 |
+
+ enable_language(ASM_MASM)
|
| 119 |
+
+ else()
|
| 120 |
+
+ list(APPEND SOURCES_LIST src/x86/win64.S)
|
| 121 |
+
+ endif()
|
| 122 |
+
+ list(APPEND SOURCES_LIST src/x86/ffiw64.c)
|
| 123 |
+
+
|
| 124 |
+
+ set(TARGETDIR x86)
|
| 125 |
+
+elseif(TARGET_PLATFORM STREQUAL X86_64)
|
| 126 |
+
+ list(APPEND SOURCES_LIST
|
| 127 |
+
+ src/x86/ffi64.c
|
| 128 |
+
+ src/x86/unix64.S)
|
| 129 |
+
+
|
| 130 |
+
+ if(SIZEOF_SIZE_T EQUAL 4 AND TARGET_PLATFORM MATCHES X86.*)
|
| 131 |
+
+ set(CMAKE_REQUIRED_FLAGS "-Werror")
|
| 132 |
+
+
|
| 133 |
+
+ check_c_source_compiles(
|
| 134 |
+
+ "
|
| 135 |
+
+ int main(void)
|
| 136 |
+
+ {
|
| 137 |
+
+ return __x86_64__;
|
| 138 |
+
+ }
|
| 139 |
+
+ "
|
| 140 |
+
+ TARGET_X32)
|
| 141 |
+
+
|
| 142 |
+
+ set(CMAKE_REQUIRED_FLAGS)
|
| 143 |
+
+ endif()
|
| 144 |
+
+
|
| 145 |
+
+ if(NOT TARGET_X32)
|
| 146 |
+
+ list(APPEND SOURCES_LIST
|
| 147 |
+
+ src/x86/ffiw64.c
|
| 148 |
+
+ src/x86/win64.S)
|
| 149 |
+
+ endif()
|
| 150 |
+
+
|
| 151 |
+
+ set(TARGETDIR x86)
|
| 152 |
+
+elseif(TARGET_PLATFORM MATCHES X86.*)
|
| 153 |
+
+ if(MSVC)
|
| 154 |
+
+ list(APPEND WIN_ASSEMBLY_LIST src/x86/sysv_intel.S)
|
| 155 |
+
+ enable_language(ASM_MASM)
|
| 156 |
+
+ else()
|
| 157 |
+
+ list(APPEND SOURCES_LIST src/x86/sysv.S)
|
| 158 |
+
+ endif()
|
| 159 |
+
+
|
| 160 |
+
+ list(APPEND SOURCES_LIST src/x86/ffi.c)
|
| 161 |
+
+ set(TARGETDIR x86)
|
| 162 |
+
+elseif(TARGET_PLATFORM MATCHES ARM_WIN64|AARCH64)
|
| 163 |
+
+ if(TARGET_PLATFORM STREQUAL ARM_WIN64)
|
| 164 |
+
+ set(CMAKE_ASM_MASM_COMPILER ${COMPILER_DIR}/armasm64.exe)
|
| 165 |
+
+ set(CMAKE_ASM_COMPILER ${CMAKE_ASM_MASM_COMPILER})
|
| 166 |
+
+ list(APPEND WIN_ASSEMBLY_LIST src/aarch64/win64_armasm.S)
|
| 167 |
+
+ file(COPY src/aarch64/ffitarget.h DESTINATION ${CMAKE_BINARY_DIR}/include)
|
| 168 |
+
+ enable_language(ASM)
|
| 169 |
+
+ else()
|
| 170 |
+
+ list(APPEND SOURCES_LIST src/aarch64/sysv.S)
|
| 171 |
+
+ endif()
|
| 172 |
+
+
|
| 173 |
+
+ list(APPEND SOURCES_LIST src/aarch64/ffi.c)
|
| 174 |
+
+ set(TARGETDIR aarch64)
|
| 175 |
+
+elseif(TARGET_PLATFORM MATCHES ARM.*)
|
| 176 |
+
+ if(MSVC)
|
| 177 |
+
+ set(CMAKE_ASM_MASM_COMPILER ${COMPILER_DIR}/armasm.exe)
|
| 178 |
+
+ set(CMAKE_ASM_COMPILER ${CMAKE_ASM_MASM_COMPILER})
|
| 179 |
+
+ list(APPEND WIN_ASSEMBLY_LIST src/arm/sysv_msvc_arm32.S)
|
| 180 |
+
+ file(COPY src/arm/ffitarget.h DESTINATION ${CMAKE_BINARY_DIR}/include)
|
| 181 |
+
+ enable_language(ASM)
|
| 182 |
+
+ else()
|
| 183 |
+
+ list(APPEND SOURCES_LIST src/arm/sysv.S)
|
| 184 |
+
+ endif()
|
| 185 |
+
+
|
| 186 |
+
+ list(APPEND SOURCES_LIST src/arm/ffi.c)
|
| 187 |
+
+ set(TARGETDIR arm)
|
| 188 |
+
+endif()
|
| 189 |
+
+
|
| 190 |
+
+if(CMAKE_SYSTEM_NAME STREQUAL Darwin AND TARGET_PLATFORM STREQUAL AARCH64)
|
| 191 |
+
+ set(FFI_EXEC_TRAMPOLINE_TABLE 1)
|
| 192 |
+
+elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin OR TARGET_PLATFORM MATCHES .*FREEBSD.*)
|
| 193 |
+
+ set(FFI_MMAP_EXEC_WRIT 1)
|
| 194 |
+
+endif()
|
| 195 |
+
+
|
| 196 |
+
+check_type_size (double SIZEOF_DOUBLE)
|
| 197 |
+
+check_type_size ("long double" SIZEOF_LONG_DOUBLE)
|
| 198 |
+
+
|
| 199 |
+
+if(SIZEOF_LONG_DOUBLE STREQUAL "")
|
| 200 |
+
+ set(HAVE_LONG_DOUBLE 0)
|
| 201 |
+
+
|
| 202 |
+
+ if(DEFINED HAVE_LONG_DOUBLE_VARIANT)
|
| 203 |
+
+ set(HAVE_LONG_DOUBLE 1)
|
| 204 |
+
+ elseif(NOT SIZEOF_DOUBLE EQUAL SIZEOF_LONG_DOUBLE)
|
| 205 |
+
+ set(HAVE_LONG_DOUBLE 1)
|
| 206 |
+
+ endif()
|
| 207 |
+
+else()
|
| 208 |
+
+ set(HAVE_LONG_DOUBLE 1)
|
| 209 |
+
+endif()
|
| 210 |
+
+
|
| 211 |
+
+check_function_exists(alloca C_ALLOCA)
|
| 212 |
+
+check_function_exists (mmap HAVE_MMAP)
|
| 213 |
+
+
|
| 214 |
+
+check_symbol_exists (MAP_ANON sys/mman.h HAVE_MMAP_ANON)
|
| 215 |
+
+
|
| 216 |
+
+check_c_source_runs(
|
| 217 |
+
+ "
|
| 218 |
+
+ #include <stdlib.h>
|
| 219 |
+
+ #include <sys/types.h>
|
| 220 |
+
+ #include <sys/mman.h>
|
| 221 |
+
+ #include <fcntl.h>
|
| 222 |
+
+
|
| 223 |
+
+ int main(void) {
|
| 224 |
+
+ int devzero = open(\"/dev/zero\", O_RDWR);
|
| 225 |
+
+ return devzero == -1 || mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, devzero, 0) == (void *)-1 ? 1 : 0;
|
| 226 |
+
+ }" HAVE_MMAP_DEV_ZERO)
|
| 227 |
+
+
|
| 228 |
+
+check_include_file(alloca.h HAVE_ALLOCA_H)
|
| 229 |
+
+
|
| 230 |
+
+check_c_source_compiles(
|
| 231 |
+
+ "
|
| 232 |
+
+ #include <alloca.h>
|
| 233 |
+
+ int main()
|
| 234 |
+
+ {
|
| 235 |
+
+ char* x = alloca(1024);
|
| 236 |
+
+ return 0;
|
| 237 |
+
+ }
|
| 238 |
+
+ "
|
| 239 |
+
+ HAVE_ALLOCA)
|
| 240 |
+
+
|
| 241 |
+
+check_include_file(dlfcn.h HAVE_DLFCN_H)
|
| 242 |
+
+check_include_file(inttypes.h HAVE_INTTYPES_H)
|
| 243 |
+
+check_include_file(memory.h HAVE_MEMORY_H)
|
| 244 |
+
+check_include_file(stdint.h HAVE_STDINT_H)
|
| 245 |
+
+check_include_file(stdlib.h HAVE_STDLIB_H)
|
| 246 |
+
+check_include_file(strings.h HAVE_STRINGS_H)
|
| 247 |
+
+check_include_file(string.h HAVE_STRING_H)
|
| 248 |
+
+check_include_file(sys/mman.h HAVE_SYS_MMAN_H)
|
| 249 |
+
+check_include_file(sys/stat.h HAVE_SYS_STAT_H)
|
| 250 |
+
+check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
| 251 |
+
+check_include_file(unistd.h HAVE_UNISTD_H)
|
| 252 |
+
+check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
|
| 253 |
+
+
|
| 254 |
+
+check_symbol_exists(memcpy string.h HAVE_MEMCPY)
|
| 255 |
+
+set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
|
| 256 |
+
+check_symbol_exists(mkostemp stdlib.h HAVE_MKOSTEMP)
|
| 257 |
+
+set(CMAKE_REQUIRED_DEFINITIONS)
|
| 258 |
+
+
|
| 259 |
+
+if (NOT MSVC)
|
| 260 |
+
+ find_program(OBJDUMP objdump)
|
| 261 |
+
+ find_program(NM NAMES nm llvm-nm)
|
| 262 |
+
+
|
| 263 |
+
+ if(OBJDUMP)
|
| 264 |
+
+ set(DUMPTOOL_CMD "objdump -t -h") # on macOS -t -h can't be combined
|
| 265 |
+
+ set(EH_FRAME_GREP_EXPR "grep -A1 -n eh_frame | grep -q READONLY")
|
| 266 |
+
+ elseif(NM)
|
| 267 |
+
+ set(DUMPTOOL_CMD "nm -a")
|
| 268 |
+
+ set(EH_FRAME_GREP_EXPR "grep -q ' r \.eh_frame'")
|
| 269 |
+
+ endif()
|
| 270 |
+
+
|
| 271 |
+
+ execute_process(
|
| 272 |
+
+ COMMAND
|
| 273 |
+
+ sh -c "echo 'extern void foo (void); void bar (void) { foo (); foo (); }' | ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -xc -c -fpic -fexceptions -o conftest.o - 2>&1;
|
| 274 |
+
+ ${DUMPTOOL_CMD} conftest.o 2>&1 | ${EH_FRAME_GREP_EXPR}"
|
| 275 |
+
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
| 276 |
+
+ OUTPUT_VARIABLE IGNORE
|
| 277 |
+
+ ERROR_VARIABLE IGNORE
|
| 278 |
+
+ RESULT_VARIABLE HAVE_RO_EH_FRAME_EXITCODE)
|
| 279 |
+
+
|
| 280 |
+
+ file(REMOVE ${CMAKE_BINARY_DIR}/conftest.*)
|
| 281 |
+
+
|
| 282 |
+
+ if(HAVE_RO_EH_FRAME_EXITCODE EQUAL "0")
|
| 283 |
+
+ set(HAVE_RO_EH_FRAME 1)
|
| 284 |
+
+ set(EH_FRAME_FLAGS "a")
|
| 285 |
+
+ message(STATUS "Checking if .eh_frame section is read-only - yes")
|
| 286 |
+
+ else()
|
| 287 |
+
+ set(EH_FRAME_FLAGS "aw")
|
| 288 |
+
+ message(STATUS "Checking if .eh_frame section is read-only - no")
|
| 289 |
+
+ endif()
|
| 290 |
+
+
|
| 291 |
+
+ execute_process(
|
| 292 |
+
+ COMMAND sh -c "echo '.text; foo: nop; .data; .long foo-.; .text' | ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -xassembler -c -o conftest.o - 2>&1"
|
| 293 |
+
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
| 294 |
+
+ OUTPUT_VARIABLE IGNORE
|
| 295 |
+
+ ERROR_VARIABLE IGNORE
|
| 296 |
+
+ RESULT_VARIABLE HAVE_AS_X86_PCREL_EXITCODE)
|
| 297 |
+
+
|
| 298 |
+
+ file(REMOVE ${CMAKE_BINARY_DIR}/conftest.*)
|
| 299 |
+
+
|
| 300 |
+
+ if(HAVE_AS_X86_PCREL_EXITCODE EQUAL "0")
|
| 301 |
+
+ set(HAVE_AS_X86_PCREL 1)
|
| 302 |
+
+ message(STATUS "Checking HAVE_AS_X86_PCREL - yes")
|
| 303 |
+
+ else()
|
| 304 |
+
+ message(STATUS "Checking HAVE_AS_X86_PCREL - no")
|
| 305 |
+
+ endif()
|
| 306 |
+
+
|
| 307 |
+
+ execute_process(
|
| 308 |
+
+ COMMAND
|
| 309 |
+
+ sh -c "echo '.text;.globl foo;foo:;jmp bar;.section .eh_frame,\"a\",@unwind;bar:' | ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -xassembler -Wa,--fatal-warnings -c -o conftest.o - 2>&1 &&
|
| 310 |
+
+ echo 'extern void foo();int main(){foo();}' | ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} conftest.o -xc - 2>&1"
|
| 311 |
+
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
| 312 |
+
+ OUTPUT_VARIABLE IGNORE
|
| 313 |
+
+ ERROR_VARIABLE IGNORE
|
| 314 |
+
+ RESULT_VARIABLE HAVE_AS_X86_64_UNWIND_SECTION_TYPE_EXITCODE)
|
| 315 |
+
+
|
| 316 |
+
+ file(REMOVE ${CMAKE_BINARY_DIR}/conftest.*)
|
| 317 |
+
+
|
| 318 |
+
+ if(HAVE_AS_X86_64_UNWIND_SECTION_TYPE_EXITCODE EQUAL "0")
|
| 319 |
+
+ set(HAVE_AS_X86_64_UNWIND_SECTION_TYPE 1)
|
| 320 |
+
+ message(STATUS "Checking HAVE_AS_X86_64_UNWIND_SECTION_TYPE - yes")
|
| 321 |
+
+ else()
|
| 322 |
+
+ message(STATUS "Checking HAVE_AS_X86_64_UNWIND_SECTION_TYPE - no")
|
| 323 |
+
+ endif()
|
| 324 |
+
+
|
| 325 |
+
+ execute_process(
|
| 326 |
+
+ COMMAND sh -c "echo 'int __attribute__ ((visibility (\"hidden\"))) foo(void){return 1;}' | ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -xc -Werror -S -o- - 2>&1 |
|
| 327 |
+
+ grep -q '\\.hidden.*foo'"
|
| 328 |
+
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
| 329 |
+
+ OUTPUT_VARIABLE IGNORE
|
| 330 |
+
+ ERROR_VARIABLE IGNORE
|
| 331 |
+
+ RESULT_VARIABLE HAVE_HIDDEN_VISIBILITY_ATTRIBUTE_EXITCODE)
|
| 332 |
+
+
|
| 333 |
+
+ if(HAVE_HIDDEN_VISIBILITY_ATTRIBUTE_EXITCODE EQUAL "0")
|
| 334 |
+
+ set(HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1)
|
| 335 |
+
+ message(STATUS "Checking HAVE_HIDDEN_VISIBILITY_ATTRIBUTE - yes")
|
| 336 |
+
+ else()
|
| 337 |
+
+ message(STATUS "Checking HAVE_HIDDEN_VISIBILITY_ATTRIBUTE - no")
|
| 338 |
+
+ endif()
|
| 339 |
+
+endif()
|
| 340 |
+
+
|
| 341 |
+
+file(WRITE ${CMAKE_BINARY_DIR}/conftest.c "void nm_test_func(){} int main(){nm_test_func();return 0;}")
|
| 342 |
+
+
|
| 343 |
+
+if(MSVC)
|
| 344 |
+
+ execute_process(
|
| 345 |
+
+ COMMAND "${CMAKE_C_COMPILER}" ${CMAKE_C_FLAGS} /c conftest.c
|
| 346 |
+
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
| 347 |
+
+ OUTPUT_VARIABLE IGNORE
|
| 348 |
+
+ ERROR_VARIABLE IGNORE
|
| 349 |
+
+ RESULT_VARIABLE SYMBOL_UNDERSCORE_EXITCODE)
|
| 350 |
+
+
|
| 351 |
+
+ if(SYMBOL_UNDERSCORE_EXITCODE EQUAL "0")
|
| 352 |
+
+ execute_process(
|
| 353 |
+
+ COMMAND "${COMPILER_DIR}/dumpbin.exe" /ALL /RAWDATA:NONE conftest.obj | findstr _nm_test_func > NUL
|
| 354 |
+
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
| 355 |
+
+ OUTPUT_VARIABLE IGNORE
|
| 356 |
+
+ ERROR_VARIABLE IGNORE
|
| 357 |
+
+ RESULT_VARIABLE SYMBOL_UNDERSCORE_EXITCODE)
|
| 358 |
+
+ endif()
|
| 359 |
+
+elseif()
|
| 360 |
+
+ execute_process(
|
| 361 |
+
+ COMMAND sh -c "${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -xc -c -o conftest.o conftest.c 2>&1;
|
| 362 |
+
+ ${DUMPTOOL_CMD} conftest.o 2>&1 | grep -q _nm_test_func"
|
| 363 |
+
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
| 364 |
+
+ OUTPUT_VARIABLE IGNORE
|
| 365 |
+
+ ERROR_VARIABLE IGNORE
|
| 366 |
+
+ RESULT_VARIABLE SYMBOL_UNDERSCORE_EXITCODE)
|
| 367 |
+
+endif()
|
| 368 |
+
+
|
| 369 |
+
+file(REMOVE ${CMAKE_BINARY_DIR}/conftest.*)
|
| 370 |
+
+
|
| 371 |
+
+if(SYMBOL_UNDERSCORE_EXITCODE EQUAL "0")
|
| 372 |
+
+ set(SYMBOL_UNDERSCORE 1)
|
| 373 |
+
+ message(STATUS "Checking if symbols are underscored - yes")
|
| 374 |
+
+else()
|
| 375 |
+
+ message(STATUS "Checking if symbols are underscored - no")
|
| 376 |
+
+endif()
|
| 377 |
+
+
|
| 378 |
+
+check_c_source_compiles(
|
| 379 |
+
+ "
|
| 380 |
+
+ asm (\".cfi_sections\\\\n\\\\t.cfi_startproc\\\\n\\\\t.cfi_endproc\");
|
| 381 |
+
+ int main(void)
|
| 382 |
+
+ {
|
| 383 |
+
+ return 0;
|
| 384 |
+
+ }
|
| 385 |
+
+ "
|
| 386 |
+
+ HAVE_AS_CFI_PSEUDO_OP)
|
| 387 |
+
+
|
| 388 |
+
+configure_file(include/ffi.h.in ${CMAKE_BINARY_DIR}/include/ffi.h)
|
| 389 |
+
+configure_file(include/fficonfig.h.in ${CMAKE_BINARY_DIR}/include/fficonfig.h)
|
| 390 |
+
+configure_file(libffi.pc.in ${CMAKE_LIBRARY_DIR}/pkgconfig/libffi.pc)
|
| 391 |
+
+
|
| 392 |
+
+foreach(ASM_PATH IN LISTS WIN_ASSEMBLY_LIST)
|
| 393 |
+
+ get_filename_component(ASM_FILENAME "${ASM_PATH}" NAME_WE)
|
| 394 |
+
+ get_filename_component(ASM_DIRNAME "${ASM_PATH}" DIRECTORY)
|
| 395 |
+
+
|
| 396 |
+
+ add_custom_command(
|
| 397 |
+
+ COMMAND "${CMAKE_C_COMPILER}" /nologo /P /EP /I. /I"${CMAKE_CURRENT_SOURCE_DIR}/${ASM_DIRNAME}" /Fi"${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm" /Iinclude
|
| 398 |
+
+ /I"${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/${ASM_PATH}"
|
| 399 |
+
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${ASM_PATH}
|
| 400 |
+
+ OUTPUT ${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm
|
| 401 |
+
+ COMMENT "Preprocessing ${CMAKE_CURRENT_SOURCE_DIR}/${ASM_PATH}. Outputting to ${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm")
|
| 402 |
+
+
|
| 403 |
+
+ set_source_files_properties("${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm" PROPERTIES GENERATED TRUE)
|
| 404 |
+
+
|
| 405 |
+
+ add_custom_command(
|
| 406 |
+
+ COMMAND "${CMAKE_ASM_MASM_COMPILER}" /Fo "${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj" "${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm"
|
| 407 |
+
+ DEPENDS ${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm
|
| 408 |
+
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj
|
| 409 |
+
+ COMMENT "Assembling ${CMAKE_BINARY_DIR}/${ASM_FILENAME}.asm")
|
| 410 |
+
+
|
| 411 |
+
+ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj PROPERTIES EXTERNAL_OBJECT TRUE)
|
| 412 |
+
+
|
| 413 |
+
+ list(APPEND OBJECTS_LIST ${CMAKE_CURRENT_BINARY_DIR}/${ASM_FILENAME}.obj)
|
| 414 |
+
+endforeach()
|
| 415 |
+
diff --git a/configure_platform.cmake b/configure_platform.cmake
|
| 416 |
+
new file mode 100644
|
| 417 |
+
index 0000000..bc57a65
|
| 418 |
+
--- /dev/null
|
| 419 |
+
+++ b/configure_platform.cmake
|
| 420 |
+
@@ -0,0 +1,43 @@
|
| 421 |
+
+if("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "")
|
| 422 |
+
+ set(HOST_ARCH ${CMAKE_SYSTEM_PROCESSOR})
|
| 423 |
+
+else()
|
| 424 |
+
+ set(HOST_ARCH ${CMAKE_C_COMPILER_ARCHITECTURE_ID})
|
| 425 |
+
+endif()
|
| 426 |
+
+
|
| 427 |
+
+if("${TARGET_PLATFORM}" STREQUAL "")
|
| 428 |
+
+ if(HOST_ARCH MATCHES x64|x86_64|AMD64|amd64)
|
| 429 |
+
+ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
|
| 430 |
+
+ set(TARGET_PLATFORM X86_WIN64)
|
| 431 |
+
+ else()
|
| 432 |
+
+ set(TARGET_PLATFORM X86_64)
|
| 433 |
+
+ endif()
|
| 434 |
+
+ elseif(HOST_ARCH MATCHES i.*86.*|X86|x86)
|
| 435 |
+
+ if(MSVC)
|
| 436 |
+
+ set(TARGET_PLATFORM X86_WIN32)
|
| 437 |
+
+ else()
|
| 438 |
+
+ set(TARGET_PLATFORM X86)
|
| 439 |
+
+ endif()
|
| 440 |
+
+
|
| 441 |
+
+ if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
| 442 |
+
+ set(TARGET_PLATFORM X86_DARWIN)
|
| 443 |
+
+ elseif(CMAKE_SYSTEM_NAME MATCHES FreeBSD|OpenBSD)
|
| 444 |
+
+ set(TARGET_PLATFORM X86_FREEBSD)
|
| 445 |
+
+ endif()
|
| 446 |
+
+ elseif(HOST_ARCH MATCHES aarch64|ARM64|arm64)
|
| 447 |
+
+ if(MSVC)
|
| 448 |
+
+ set(TARGET_PLATFORM ARM_WIN64)
|
| 449 |
+
+ else()
|
| 450 |
+
+ set(TARGET_PLATFORM AARCH64)
|
| 451 |
+
+ endif()
|
| 452 |
+
+ elseif(HOST_ARCH MATCHES arm.*|ARM.*)
|
| 453 |
+
+ if(MSVC)
|
| 454 |
+
+ set(TARGET_PLATFORM ARM_WIN32)
|
| 455 |
+
+ else()
|
| 456 |
+
+ set(TARGET_PLATFORM ARM)
|
| 457 |
+
+ endif()
|
| 458 |
+
+ else()
|
| 459 |
+
+ message(FATAL_ERROR "Unknown host.")
|
| 460 |
+
+ endif()
|
| 461 |
+
+endif()
|
| 462 |
+
+
|
| 463 |
+
+message(STATUS "Building for TARGET_PLATFORM: ${TARGET_PLATFORM}")
|
| 464 |
+
diff --git a/include/fficonfig.h.in b/include/fficonfig.h.in
|
| 465 |
+
new file mode 100644
|
| 466 |
+
index 0000000..1b36207
|
| 467 |
+
--- /dev/null
|
| 468 |
+
+++ b/include/fficonfig.h.in
|
| 469 |
+
@@ -0,0 +1,210 @@
|
| 470 |
+
+/* fficonfig.h.in. Generated from configure.ac by autoheader. */
|
| 471 |
+
+
|
| 472 |
+
+/* Define if building universal (internal helper macro) */
|
| 473 |
+
+#cmakedefine AC_APPLE_UNIVERSAL_BUILD
|
| 474 |
+
+
|
| 475 |
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
| 476 |
+
+ systems. This function is required for `alloca.c' support on those systems.
|
| 477 |
+
+ */
|
| 478 |
+
+#cmakedefine CRAY_STACKSEG_END "@CRAY_STACKSEG_END@"
|
| 479 |
+
+
|
| 480 |
+
+/* Define if using `alloca.c'. */
|
| 481 |
+
+#cmakedefine C_ALLOCA
|
| 482 |
+
+
|
| 483 |
+
+/* Define to the flags needed for the .section .eh_frame directive. */
|
| 484 |
+
+#cmakedefine EH_FRAME_FLAGS "@EH_FRAME_FLAGS@"
|
| 485 |
+
+
|
| 486 |
+
+/* Define this if you want extra debugging. */
|
| 487 |
+
+#cmakedefine FFI_DEBUG
|
| 488 |
+
+
|
| 489 |
+
+/* Cannot use PROT_EXEC on this target, so, we revert to alternative means */
|
| 490 |
+
+#cmakedefine FFI_EXEC_TRAMPOLINE_TABLE
|
| 491 |
+
+
|
| 492 |
+
+/* Define this if you want to enable pax emulated trampolines */
|
| 493 |
+
+#cmakedefine FFI_MMAP_EXEC_EMUTRAMP_PAX
|
| 494 |
+
+
|
| 495 |
+
+/* Cannot use malloc on this target, so, we revert to alternative means */
|
| 496 |
+
+#cmakedefine01 FFI_MMAP_EXEC_WRIT
|
| 497 |
+
+
|
| 498 |
+
+/* Define this if you do not want support for the raw API. */
|
| 499 |
+
+#cmakedefine01 FFI_NO_RAW_API
|
| 500 |
+
+
|
| 501 |
+
+/* Define this if you do not want support for aggregate types. */
|
| 502 |
+
+#cmakedefine01 FFI_NO_STRUCTS
|
| 503 |
+
+
|
| 504 |
+
+/* Define to 1 if you have `alloca', as a function or macro. */
|
| 505 |
+
+#cmakedefine01 HAVE_ALLOCA
|
| 506 |
+
+
|
| 507 |
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
| 508 |
+
+ */
|
| 509 |
+
+#cmakedefine01 HAVE_ALLOCA_H
|
| 510 |
+
+
|
| 511 |
+
+/* Define if your assembler supports .cfi_* directives. */
|
| 512 |
+
+#cmakedefine HAVE_AS_CFI_PSEUDO_OP
|
| 513 |
+
+
|
| 514 |
+
+/* Define if your assembler supports .register. */
|
| 515 |
+
+#cmakedefine HAVE_AS_REGISTER_PSEUDO_OP
|
| 516 |
+
+
|
| 517 |
+
+/* Define if the compiler uses zarch features. */
|
| 518 |
+
+#cmakedefine HAVE_AS_S390_ZARCH
|
| 519 |
+
+
|
| 520 |
+
+/* Define if your assembler and linker support unaligned PC relative relocs.
|
| 521 |
+
+ */
|
| 522 |
+
+#cmakedefine HAVE_AS_SPARC_UA_PCREL
|
| 523 |
+
+
|
| 524 |
+
+/* Define if your assembler supports unwind section type. */
|
| 525 |
+
+#cmakedefine HAVE_AS_X86_64_UNWIND_SECTION_TYPE
|
| 526 |
+
+
|
| 527 |
+
+/* Define if your assembler supports PC relative relocs. */
|
| 528 |
+
+#cmakedefine HAVE_AS_X86_PCREL
|
| 529 |
+
+
|
| 530 |
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
|
| 531 |
+
+#cmakedefine01 HAVE_DLFCN_H
|
| 532 |
+
+
|
| 533 |
+
+/* Define if __attribute__((visibility("hidden"))) is supported. */
|
| 534 |
+
+#cmakedefine HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
|
| 535 |
+
+
|
| 536 |
+
+/* Define to 1 if you have the <inttypes.h> header file. */
|
| 537 |
+
+#cmakedefine01 HAVE_INTTYPES_H
|
| 538 |
+
+
|
| 539 |
+
+/* Define if you have the long double type and it is bigger than a double */
|
| 540 |
+
+#cmakedefine01 HAVE_LONG_DOUBLE
|
| 541 |
+
+
|
| 542 |
+
+/* Define if you support more than one size of the long double type */
|
| 543 |
+
+#cmakedefine HAVE_LONG_DOUBLE_VARIANT
|
| 544 |
+
+
|
| 545 |
+
+/* Define to 1 if you have the `memcpy' function. */
|
| 546 |
+
+#cmakedefine01 HAVE_MEMCPY
|
| 547 |
+
+
|
| 548 |
+
+/* Define to 1 if you have the <memory.h> header file. */
|
| 549 |
+
+#cmakedefine01 HAVE_MEMORY_H
|
| 550 |
+
+
|
| 551 |
+
+/* Define to 1 if you have the `mkostemp' function. */
|
| 552 |
+
+#cmakedefine01 HAVE_MKOSTEMP
|
| 553 |
+
+
|
| 554 |
+
+/* Define to 1 if you have the `mmap' function. */
|
| 555 |
+
+#cmakedefine01 HAVE_MMAP
|
| 556 |
+
+
|
| 557 |
+
+/* Define if mmap with MAP_ANON(YMOUS) works. */
|
| 558 |
+
+#cmakedefine HAVE_MMAP_ANON
|
| 559 |
+
+
|
| 560 |
+
+/* Define if mmap of /dev/zero works. */
|
| 561 |
+
+#cmakedefine HAVE_MMAP_DEV_ZERO
|
| 562 |
+
+
|
| 563 |
+
+/* Define if read-only mmap of a plain file works. */
|
| 564 |
+
+#cmakedefine HAVE_MMAP_FILE
|
| 565 |
+
+
|
| 566 |
+
+/* Define if .eh_frame sections should be read-only. */
|
| 567 |
+
+#cmakedefine HAVE_RO_EH_FRAME
|
| 568 |
+
+
|
| 569 |
+
+/* Define to 1 if you have the <stdint.h> header file. */
|
| 570 |
+
+#cmakedefine01 HAVE_STDINT_H
|
| 571 |
+
+
|
| 572 |
+
+/* Define to 1 if you have the <stdlib.h> header file. */
|
| 573 |
+
+#cmakedefine01 HAVE_STDLIB_H
|
| 574 |
+
+
|
| 575 |
+
+/* Define to 1 if you have the <strings.h> header file. */
|
| 576 |
+
+#cmakedefine01 HAVE_STRINGS_H
|
| 577 |
+
+
|
| 578 |
+
+/* Define to 1 if you have the <string.h> header file. */
|
| 579 |
+
+#cmakedefine01 HAVE_STRING_H
|
| 580 |
+
+
|
| 581 |
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
|
| 582 |
+
+#cmakedefine01 HAVE_SYS_MMAN_H
|
| 583 |
+
+
|
| 584 |
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
|
| 585 |
+
+#cmakedefine01 HAVE_SYS_STAT_H
|
| 586 |
+
+
|
| 587 |
+
+/* Define to 1 if you have the <sys/types.h> header file. */
|
| 588 |
+
+#cmakedefine01 HAVE_SYS_TYPES_H
|
| 589 |
+
+
|
| 590 |
+
+/* Define to 1 if you have the <unistd.h> header file. */
|
| 591 |
+
+#cmakedefine01 HAVE_UNISTD_H
|
| 592 |
+
+
|
| 593 |
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
| 594 |
+
+#cmakedefine LT_OBJDIR "@LT_OBJDIR@"
|
| 595 |
+
+
|
| 596 |
+
+/* Name of package */
|
| 597 |
+
+#cmakedefine PACKAGE "@PACKAGE@"
|
| 598 |
+
+
|
| 599 |
+
+/* Define to the address where bug reports for this package should be sent. */
|
| 600 |
+
+#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
| 601 |
+
+
|
| 602 |
+
+/* Define to the full name of this package. */
|
| 603 |
+
+#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
|
| 604 |
+
+
|
| 605 |
+
+/* Define to the full name and version of this package. */
|
| 606 |
+
+#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
|
| 607 |
+
+
|
| 608 |
+
+/* Define to the one symbol short name of this package. */
|
| 609 |
+
+#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
|
| 610 |
+
+
|
| 611 |
+
+/* Define to the home page for this package. */
|
| 612 |
+
+#cmakedefine PACKAGE_URL "@PACKAGE_URL@"
|
| 613 |
+
+
|
| 614 |
+
+/* Define to the version of this package. */
|
| 615 |
+
+#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
|
| 616 |
+
+
|
| 617 |
+
+/* The size of `double', as computed by sizeof. */
|
| 618 |
+
+#cmakedefine SIZEOF_DOUBLE @SIZEOF_DOUBLE@
|
| 619 |
+
+
|
| 620 |
+
+/* The size of `long double', as computed by sizeof. */
|
| 621 |
+
+#cmakedefine SIZEOF_LONG_DOUBLE @SIZEOF_LONG_DOUBLE@
|
| 622 |
+
+
|
| 623 |
+
+/* The size of `size_t', as computed by sizeof. */
|
| 624 |
+
+#cmakedefine SIZEOF_SIZE_T @SIZEOF_SIZE_T@
|
| 625 |
+
+
|
| 626 |
+
+/* If using the C implementation of alloca, define if you know the
|
| 627 |
+
+ direction of stack growth for your system; otherwise it will be
|
| 628 |
+
+ automatically deduced at runtime.
|
| 629 |
+
+ STACK_DIRECTION > 0 => grows toward higher addresses
|
| 630 |
+
+ STACK_DIRECTION < 0 => grows toward lower addresses
|
| 631 |
+
+ STACK_DIRECTION = 0 => direction of growth unknown */
|
| 632 |
+
+#cmakedefine STACK_DIRECTION @STACK_DIRECTION@
|
| 633 |
+
+
|
| 634 |
+
+/* Define to 1 if you have the ANSI C header files. */
|
| 635 |
+
+#cmakedefine01 STDC_HEADERS
|
| 636 |
+
+
|
| 637 |
+
+/* Define if symbols are underscored. */
|
| 638 |
+
+#cmakedefine SYMBOL_UNDERSCORE
|
| 639 |
+
+
|
| 640 |
+
+/* Define this if you are using Purify and want to suppress spurious messages.
|
| 641 |
+
+ */
|
| 642 |
+
+#cmakedefine USING_PURIFY
|
| 643 |
+
+
|
| 644 |
+
+/* Version number of package */
|
| 645 |
+
+#cmakedefine VERSION "@VERSION@"
|
| 646 |
+
+
|
| 647 |
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
| 648 |
+
+ significant byte first (like Motorola and SPARC, unlike Intel). */
|
| 649 |
+
+#if defined AC_APPLE_UNIVERSAL_BUILD
|
| 650 |
+
+# if defined __BIG_ENDIAN__
|
| 651 |
+
+# define WORDS_BIGENDIAN 1
|
| 652 |
+
+# endif
|
| 653 |
+
+#else
|
| 654 |
+
+# ifndef WORDS_BIGENDIAN
|
| 655 |
+
+# undef WORDS_BIGENDIAN
|
| 656 |
+
+# endif
|
| 657 |
+
+#endif
|
| 658 |
+
+
|
| 659 |
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
|
| 660 |
+
+#cmakedefine size_t @size_t@
|
| 661 |
+
+
|
| 662 |
+
+
|
| 663 |
+
+#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
|
| 664 |
+
+#ifdef LIBFFI_ASM
|
| 665 |
+
+#ifdef __APPLE__
|
| 666 |
+
+#define FFI_HIDDEN(name) .private_extern name
|
| 667 |
+
+#else
|
| 668 |
+
+#define FFI_HIDDEN(name) .hidden name
|
| 669 |
+
+#endif
|
| 670 |
+
+#else
|
| 671 |
+
+#define FFI_HIDDEN __attribute__ ((visibility ("hidden")))
|
| 672 |
+
+#endif
|
| 673 |
+
+#else
|
| 674 |
+
+#ifdef LIBFFI_ASM
|
| 675 |
+
+#define FFI_HIDDEN(name)
|
| 676 |
+
+#else
|
| 677 |
+
+#define FFI_HIDDEN
|
| 678 |
+
+#endif
|
| 679 |
+
+#endif
|
| 680 |
+
diff --git a/src/closures.c b/src/closures.c
|
| 681 |
+
index 5120021..c329077 100644
|
| 682 |
+
--- a/src/closures.c
|
| 683 |
+
+++ b/src/closures.c
|
| 684 |
+
@@ -137,6 +137,7 @@ ffi_closure_free (void *ptr)
|
| 685 |
+
/* Windows systems may have Data Execution Protection (DEP) enabled,
|
| 686 |
+
which requires the use of VirtualMalloc/VirtualFree to alloc/free
|
| 687 |
+
executable memory. */
|
| 688 |
+
+# undef FFI_MMAP_EXEC_WRIT
|
| 689 |
+
# define FFI_MMAP_EXEC_WRIT 1
|
| 690 |
+
# endif
|
| 691 |
+
#endif
|
| 692 |
+
diff --git a/src/dlmalloc.c b/src/dlmalloc.c
|
| 693 |
+
index d63dd36..950e977 100644
|
| 694 |
+
--- a/src/dlmalloc.c
|
| 695 |
+
+++ b/src/dlmalloc.c
|
| 696 |
+
@@ -451,6 +451,7 @@ DEFAULT_MMAP_THRESHOLD default: 256K
|
| 697 |
+
#ifdef WIN32
|
| 698 |
+
#define WIN32_LEAN_AND_MEAN
|
| 699 |
+
#include <windows.h>
|
| 700 |
+
+#undef HAVE_MMAP
|
| 701 |
+
#define HAVE_MMAP 1
|
| 702 |
+
#define HAVE_MORECORE 0
|
| 703 |
+
#define LACKS_UNISTD_H
|
| 704 |
+
--
|
| 705 |
+
2.23.0
|
| 706 |
+
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/repodata_record.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"arch": "x86_64",
|
| 3 |
+
"build": "h6a678d5_1",
|
| 4 |
+
"build_number": 1,
|
| 5 |
+
"channel": "https://repo.anaconda.com/pkgs/main/linux-64/",
|
| 6 |
+
"constrains": [],
|
| 7 |
+
"depends": [
|
| 8 |
+
"libgcc-ng >=11.2.0",
|
| 9 |
+
"libstdcxx-ng >=11.2.0"
|
| 10 |
+
],
|
| 11 |
+
"fn": "libffi-3.4.4-h6a678d5_1.conda",
|
| 12 |
+
"license": "MIT",
|
| 13 |
+
"license_family": "MIT",
|
| 14 |
+
"md5": "70646cc713f0c43926cfdcfe9b695fe0",
|
| 15 |
+
"name": "libffi",
|
| 16 |
+
"platform": "linux",
|
| 17 |
+
"sha256": "b0e7fe2e5d498bc5a2c57cf942701bba8f22ec55de55e092ffbffc40b816df88",
|
| 18 |
+
"size": 144691,
|
| 19 |
+
"subdir": "linux-64",
|
| 20 |
+
"timestamp": 1714483282000,
|
| 21 |
+
"url": "https://repo.anaconda.com/pkgs/main/linux-64/libffi-3.4.4-h6a678d5_1.conda",
|
| 22 |
+
"version": "3.4.4"
|
| 23 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/run_exports.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"weak": ["libffi >=3.4,<4.0a0"]}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/run_test.sh
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set -ex
|
| 2 |
+
test -e $PREFIX/lib/libffi${SHLIB_EXT}
|
| 3 |
+
test -e $PREFIX/lib/libffi.a
|
| 4 |
+
test -e $PREFIX/lib/pkgconfig/libffi.pc
|
| 5 |
+
test -e $PREFIX/include/ffi.h
|
| 6 |
+
test -e $PREFIX/include/ffitarget.h
|
| 7 |
+
cd $PWD/testsuite/libffi.bhaible
|
| 8 |
+
echo "Triggering libffi tests"
|
| 9 |
+
if [[ $(uname) == Darwin ]]; then
|
| 10 |
+
echo "ignore compile test due possible incompatiblity ..."
|
| 11 |
+
else
|
| 12 |
+
make prefix=$PREFIX CC=$CC
|
| 13 |
+
fi
|
| 14 |
+
echo "completed triggering the tests"
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/test_time_dependencies.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
["make", "gxx_linux-64 11.2.0.*", "gcc_linux-64 11.2.0.*"]
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/Makefile.am
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Process this file with automake to produce Makefile.in.
|
| 2 |
+
|
| 3 |
+
AUTOMAKE_OPTIONS = foreign dejagnu
|
| 4 |
+
|
| 5 |
+
EXTRA_DEJAGNU_SITE_CONFIG=../local.exp
|
| 6 |
+
|
| 7 |
+
CLEANFILES = *.exe core* *.log *.sum
|
| 8 |
+
|
| 9 |
+
EXTRA_DIST = config/default.exp lib/libffi.exp lib/target-libpath.exp \
|
| 10 |
+
lib/wrapper.exp libffi.bhaible/Makefile libffi.bhaible/README \
|
| 11 |
+
libffi.bhaible/alignof.h libffi.bhaible/bhaible.exp \
|
| 12 |
+
libffi.bhaible/test-call.c libffi.bhaible/test-callback.c \
|
| 13 |
+
libffi.bhaible/testcases.c libffi.call/align_mixed.c \
|
| 14 |
+
libffi.call/align_stdcall.c libffi.call/call.exp \
|
| 15 |
+
libffi.call/err_bad_typedef.c libffi.call/ffitest.h \
|
| 16 |
+
libffi.call/float.c libffi.call/float1.c libffi.call/float2.c \
|
| 17 |
+
libffi.call/float3.c libffi.call/float4.c libffi.call/float_va.c \
|
| 18 |
+
libffi.call/many.c libffi.call/many2.c libffi.call/many_double.c \
|
| 19 |
+
libffi.call/many_mixed.c libffi.call/negint.c libffi.call/offsets.c \
|
| 20 |
+
libffi.call/pr1172638.c libffi.call/promotion.c \
|
| 21 |
+
libffi.call/pyobjc_tc.c libffi.call/return_dbl.c \
|
| 22 |
+
libffi.call/return_dbl1.c libffi.call/return_dbl2.c \
|
| 23 |
+
libffi.call/return_fl.c libffi.call/return_fl1.c \
|
| 24 |
+
libffi.call/return_fl2.c libffi.call/return_fl3.c \
|
| 25 |
+
libffi.call/return_ldl.c libffi.call/return_ll.c \
|
| 26 |
+
libffi.call/return_ll1.c libffi.call/return_sc.c \
|
| 27 |
+
libffi.call/return_sl.c libffi.call/return_uc.c \
|
| 28 |
+
libffi.call/return_ul.c libffi.call/struct1.c libffi.call/struct10.c \
|
| 29 |
+
libffi.call/struct2.c libffi.call/struct3.c libffi.call/struct4.c \
|
| 30 |
+
libffi.call/struct5.c libffi.call/struct6.c libffi.call/struct7.c \
|
| 31 |
+
libffi.call/struct8.c libffi.call/struct9.c \
|
| 32 |
+
libffi.call/uninitialized.c libffi.call/va_1.c libffi.call/va_2.c \
|
| 33 |
+
libffi.call/va_3.c libffi.call/va_struct1.c libffi.call/va_struct2.c \
|
| 34 |
+
libffi.call/va_struct3.c libffi.call/struct_by_value_big.c \
|
| 35 |
+
libffi.call/struct_by_value_2.c libffi.call/struct_by_value_3.c \
|
| 36 |
+
libffi.call/struct_by_value_4.c libffi.call/struct_by_value_small.c \
|
| 37 |
+
libffi.call/strlen2.c libffi.call/strlen3.c libffi.call/strlen4.c \
|
| 38 |
+
libffi.call/strlen.c libffi.call/va_3.c \
|
| 39 |
+
libffi.call/struct_by_value_2.c libffi.call/struct_by_value_3.c \
|
| 40 |
+
libffi.call/struct_by_value_4.c libffi.closures/closure.exp \
|
| 41 |
+
libffi.call/s55.c libffi.call/bpo-38748.c \
|
| 42 |
+
libffi.closures/closure_fn0.c libffi.closures/closure_fn1.c \
|
| 43 |
+
libffi.closures/closure_fn2.c libffi.closures/closure_fn3.c \
|
| 44 |
+
libffi.closures/closure_fn4.c libffi.closures/closure_fn5.c \
|
| 45 |
+
libffi.closures/closure_fn6.c libffi.closures/closure_loc_fn0.c \
|
| 46 |
+
libffi.closures/closure_simple.c libffi.closures/cls_12byte.c \
|
| 47 |
+
libffi.closures/cls_16byte.c libffi.closures/cls_18byte.c \
|
| 48 |
+
libffi.closures/cls_19byte.c libffi.closures/cls_1_1byte.c \
|
| 49 |
+
libffi.closures/cls_20byte.c libffi.closures/cls_20byte1.c \
|
| 50 |
+
libffi.closures/cls_24byte.c libffi.closures/cls_2byte.c \
|
| 51 |
+
libffi.closures/cls_3_1byte.c libffi.closures/cls_3byte1.c \
|
| 52 |
+
libffi.closures/cls_3byte2.c libffi.closures/cls_3float.c \
|
| 53 |
+
libffi.closures/cls_4_1byte.c libffi.closures/cls_4byte.c \
|
| 54 |
+
libffi.closures/cls_5_1_byte.c libffi.closures/cls_5byte.c \
|
| 55 |
+
libffi.closures/cls_64byte.c libffi.closures/cls_6_1_byte.c \
|
| 56 |
+
libffi.closures/cls_6byte.c libffi.closures/cls_7_1_byte.c \
|
| 57 |
+
libffi.closures/cls_7byte.c libffi.closures/cls_8byte.c \
|
| 58 |
+
libffi.closures/cls_9byte1.c libffi.closures/cls_9byte2.c \
|
| 59 |
+
libffi.closures/cls_align_double.c libffi.closures/cls_align_float.c \
|
| 60 |
+
libffi.closures/cls_align_longdouble.c \
|
| 61 |
+
libffi.closures/cls_align_pointer.c \
|
| 62 |
+
libffi.closures/cls_align_sint16.c libffi.closures/cls_align_sint32.c \
|
| 63 |
+
libffi.closures/cls_align_sint64.c libffi.closures/cls_align_uint16.c \
|
| 64 |
+
libffi.closures/cls_align_uint32.c libffi.closures/cls_align_uint64.c \
|
| 65 |
+
libffi.closures/cls_dbls_struct.c libffi.closures/cls_double.c \
|
| 66 |
+
libffi.closures/cls_double_va.c libffi.closures/cls_float.c \
|
| 67 |
+
libffi.closures/cls_longdouble_va.c \
|
| 68 |
+
libffi.closures/cls_many_mixed_args.c \
|
| 69 |
+
libffi.closures/cls_many_mixed_float_double.c \
|
| 70 |
+
libffi.closures/cls_multi_schar.c libffi.closures/cls_multi_sshort.c \
|
| 71 |
+
libffi.closures/cls_multi_sshortchar.c \
|
| 72 |
+
libffi.closures/cls_multi_uchar.c libffi.closures/cls_multi_ushort.c \
|
| 73 |
+
libffi.closures/cls_multi_ushortchar.c libffi.closures/cls_pointer.c \
|
| 74 |
+
libffi.closures/cls_pointer_stack.c libffi.closures/cls_schar.c \
|
| 75 |
+
libffi.closures/cls_sint.c libffi.closures/cls_sshort.c \
|
| 76 |
+
libffi.closures/cls_struct_va1.c libffi.closures/cls_uchar.c \
|
| 77 |
+
libffi.closures/cls_uint.c libffi.closures/cls_uint_va.c \
|
| 78 |
+
libffi.closures/cls_ulong_va.c libffi.closures/cls_ulonglong.c \
|
| 79 |
+
libffi.closures/cls_ushort.c libffi.closures/err_bad_abi.c \
|
| 80 |
+
libffi.closures/ffitest.h libffi.closures/nested_struct.c \
|
| 81 |
+
libffi.closures/nested_struct1.c libffi.closures/nested_struct10.c \
|
| 82 |
+
libffi.closures/nested_struct11.c libffi.closures/nested_struct12.c \
|
| 83 |
+
libffi.closures/nested_struct13.c libffi.closures/nested_struct2.c \
|
| 84 |
+
libffi.closures/nested_struct3.c libffi.closures/nested_struct4.c \
|
| 85 |
+
libffi.closures/nested_struct5.c libffi.closures/nested_struct6.c \
|
| 86 |
+
libffi.closures/nested_struct7.c libffi.closures/nested_struct8.c \
|
| 87 |
+
libffi.closures/nested_struct9.c libffi.closures/problem1.c \
|
| 88 |
+
libffi.closures/single_entry_structs1.c \
|
| 89 |
+
libffi.closures/single_entry_structs2.c \
|
| 90 |
+
libffi.closures/single_entry_structs3.c libffi.closures/stret_large.c \
|
| 91 |
+
libffi.closures/stret_large2.c libffi.closures/stret_medium.c \
|
| 92 |
+
libffi.closures/stret_medium2.c libffi.closures/testclosure.c \
|
| 93 |
+
libffi.closures/unwindtest.cc libffi.closures/unwindtest_ffi_call.cc \
|
| 94 |
+
libffi.closures/cls_align_longdouble_split.c \
|
| 95 |
+
libffi.closures/cls_align_longdouble_split2.c \
|
| 96 |
+
libffi.closures/cls_longdouble.c libffi.closures/huge_struct.c \
|
| 97 |
+
libffi.complex/cls_align_complex.inc \
|
| 98 |
+
libffi.complex/cls_align_complex_double.c \
|
| 99 |
+
libffi.complex/cls_align_complex_float.c \
|
| 100 |
+
libffi.complex/cls_align_complex_longdouble.c \
|
| 101 |
+
libffi.complex/cls_complex.inc libffi.complex/cls_complex_double.c \
|
| 102 |
+
libffi.complex/cls_complex_float.c \
|
| 103 |
+
libffi.complex/cls_complex_longdouble.c \
|
| 104 |
+
libffi.complex/cls_complex_struct.inc \
|
| 105 |
+
libffi.complex/cls_complex_struct_double.c \
|
| 106 |
+
libffi.complex/cls_complex_struct_float.c \
|
| 107 |
+
libffi.complex/cls_complex_struct_longdouble.c \
|
| 108 |
+
libffi.complex/cls_complex_va.inc \
|
| 109 |
+
libffi.complex/cls_complex_va_double.c \
|
| 110 |
+
libffi.complex/cls_complex_va_float.c \
|
| 111 |
+
libffi.complex/cls_complex_va_longdouble.c libffi.complex/complex.exp \
|
| 112 |
+
libffi.complex/complex.inc libffi.complex/complex_defs_double.inc \
|
| 113 |
+
libffi.complex/complex_defs_float.inc \
|
| 114 |
+
libffi.complex/complex_defs_longdouble.inc \
|
| 115 |
+
libffi.complex/complex_double.c libffi.complex/complex_float.c \
|
| 116 |
+
libffi.complex/complex_int.c libffi.complex/complex_longdouble.c \
|
| 117 |
+
libffi.complex/ffitest.h libffi.complex/many_complex.inc \
|
| 118 |
+
libffi.complex/many_complex_double.c \
|
| 119 |
+
libffi.complex/many_complex_float.c \
|
| 120 |
+
libffi.complex/many_complex_longdouble.c \
|
| 121 |
+
libffi.complex/return_complex.inc libffi.complex/return_complex1.inc \
|
| 122 |
+
libffi.complex/return_complex1_double.c \
|
| 123 |
+
libffi.complex/return_complex1_float.c \
|
| 124 |
+
libffi.complex/return_complex1_longdouble.c \
|
| 125 |
+
libffi.complex/return_complex2.inc \
|
| 126 |
+
libffi.complex/return_complex2_double.c \
|
| 127 |
+
libffi.complex/return_complex2_float.c \
|
| 128 |
+
libffi.complex/return_complex2_longdouble.c \
|
| 129 |
+
libffi.complex/return_complex_double.c \
|
| 130 |
+
libffi.complex/return_complex_float.c \
|
| 131 |
+
libffi.complex/return_complex_longdouble.c libffi.go/aa-direct.c \
|
| 132 |
+
libffi.go/closure1.c libffi.go/ffitest.h libffi.go/go.exp \
|
| 133 |
+
libffi.go/static-chain.h
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/Makefile.in
ADDED
|
@@ -0,0 +1,662 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
| 2 |
+
# @configure_input@
|
| 3 |
+
|
| 4 |
+
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
| 5 |
+
|
| 6 |
+
# This Makefile.in is free software; the Free Software Foundation
|
| 7 |
+
# gives unlimited permission to copy and/or distribute it,
|
| 8 |
+
# with or without modifications, as long as this notice is preserved.
|
| 9 |
+
|
| 10 |
+
# This program is distributed in the hope that it will be useful,
|
| 11 |
+
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
| 12 |
+
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
| 13 |
+
# PARTICULAR PURPOSE.
|
| 14 |
+
|
| 15 |
+
@SET_MAKE@
|
| 16 |
+
VPATH = @srcdir@
|
| 17 |
+
am__is_gnu_make = { \
|
| 18 |
+
if test -z '$(MAKELEVEL)'; then \
|
| 19 |
+
false; \
|
| 20 |
+
elif test -n '$(MAKE_HOST)'; then \
|
| 21 |
+
true; \
|
| 22 |
+
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
| 23 |
+
true; \
|
| 24 |
+
else \
|
| 25 |
+
false; \
|
| 26 |
+
fi; \
|
| 27 |
+
}
|
| 28 |
+
am__make_running_with_option = \
|
| 29 |
+
case $${target_option-} in \
|
| 30 |
+
?) ;; \
|
| 31 |
+
*) echo "am__make_running_with_option: internal error: invalid" \
|
| 32 |
+
"target option '$${target_option-}' specified" >&2; \
|
| 33 |
+
exit 1;; \
|
| 34 |
+
esac; \
|
| 35 |
+
has_opt=no; \
|
| 36 |
+
sane_makeflags=$$MAKEFLAGS; \
|
| 37 |
+
if $(am__is_gnu_make); then \
|
| 38 |
+
sane_makeflags=$$MFLAGS; \
|
| 39 |
+
else \
|
| 40 |
+
case $$MAKEFLAGS in \
|
| 41 |
+
*\\[\ \ ]*) \
|
| 42 |
+
bs=\\; \
|
| 43 |
+
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
| 44 |
+
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
| 45 |
+
esac; \
|
| 46 |
+
fi; \
|
| 47 |
+
skip_next=no; \
|
| 48 |
+
strip_trailopt () \
|
| 49 |
+
{ \
|
| 50 |
+
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
| 51 |
+
}; \
|
| 52 |
+
for flg in $$sane_makeflags; do \
|
| 53 |
+
test $$skip_next = yes && { skip_next=no; continue; }; \
|
| 54 |
+
case $$flg in \
|
| 55 |
+
*=*|--*) continue;; \
|
| 56 |
+
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
| 57 |
+
-*I?*) strip_trailopt 'I';; \
|
| 58 |
+
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
| 59 |
+
-*O?*) strip_trailopt 'O';; \
|
| 60 |
+
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
| 61 |
+
-*l?*) strip_trailopt 'l';; \
|
| 62 |
+
-[dEDm]) skip_next=yes;; \
|
| 63 |
+
-[JT]) skip_next=yes;; \
|
| 64 |
+
esac; \
|
| 65 |
+
case $$flg in \
|
| 66 |
+
*$$target_option*) has_opt=yes; break;; \
|
| 67 |
+
esac; \
|
| 68 |
+
done; \
|
| 69 |
+
test $$has_opt = yes
|
| 70 |
+
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
| 71 |
+
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
| 72 |
+
pkgdatadir = $(datadir)/@PACKAGE@
|
| 73 |
+
pkgincludedir = $(includedir)/@PACKAGE@
|
| 74 |
+
pkglibdir = $(libdir)/@PACKAGE@
|
| 75 |
+
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
| 76 |
+
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
| 77 |
+
install_sh_DATA = $(install_sh) -c -m 644
|
| 78 |
+
install_sh_PROGRAM = $(install_sh) -c
|
| 79 |
+
install_sh_SCRIPT = $(install_sh) -c
|
| 80 |
+
INSTALL_HEADER = $(INSTALL_DATA)
|
| 81 |
+
transform = $(program_transform_name)
|
| 82 |
+
NORMAL_INSTALL = :
|
| 83 |
+
PRE_INSTALL = :
|
| 84 |
+
POST_INSTALL = :
|
| 85 |
+
NORMAL_UNINSTALL = :
|
| 86 |
+
PRE_UNINSTALL = :
|
| 87 |
+
POST_UNINSTALL = :
|
| 88 |
+
build_triplet = @build@
|
| 89 |
+
host_triplet = @host@
|
| 90 |
+
target_triplet = @target@
|
| 91 |
+
subdir = testsuite
|
| 92 |
+
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
| 93 |
+
am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
|
| 94 |
+
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
|
| 95 |
+
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
|
| 96 |
+
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
| 97 |
+
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
|
| 98 |
+
$(top_srcdir)/m4/ax_configure_args.m4 \
|
| 99 |
+
$(top_srcdir)/m4/ax_enable_builddir.m4 \
|
| 100 |
+
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
|
| 101 |
+
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
|
| 102 |
+
$(top_srcdir)/m4/ax_prepend_flag.m4 \
|
| 103 |
+
$(top_srcdir)/m4/ax_require_defined.m4 \
|
| 104 |
+
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
| 105 |
+
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
| 106 |
+
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
| 107 |
+
$(top_srcdir)/configure.ac
|
| 108 |
+
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
| 109 |
+
$(ACLOCAL_M4)
|
| 110 |
+
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
| 111 |
+
mkinstalldirs = $(install_sh) -d
|
| 112 |
+
CONFIG_HEADER = $(top_builddir)/fficonfig.h
|
| 113 |
+
CONFIG_CLEAN_FILES =
|
| 114 |
+
CONFIG_CLEAN_VPATH_FILES =
|
| 115 |
+
AM_V_P = $(am__v_P_@AM_V@)
|
| 116 |
+
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
| 117 |
+
am__v_P_0 = false
|
| 118 |
+
am__v_P_1 = :
|
| 119 |
+
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
| 120 |
+
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
| 121 |
+
am__v_GEN_0 = @echo " GEN " $@;
|
| 122 |
+
am__v_GEN_1 =
|
| 123 |
+
AM_V_at = $(am__v_at_@AM_V@)
|
| 124 |
+
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
| 125 |
+
am__v_at_0 = @
|
| 126 |
+
am__v_at_1 =
|
| 127 |
+
SOURCES =
|
| 128 |
+
DIST_SOURCES =
|
| 129 |
+
am__can_run_installinfo = \
|
| 130 |
+
case $$AM_UPDATE_INFO_DIR in \
|
| 131 |
+
n|no|NO) false;; \
|
| 132 |
+
*) (install-info --version) >/dev/null 2>&1;; \
|
| 133 |
+
esac
|
| 134 |
+
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
| 135 |
+
DEJATOOL = $(PACKAGE)
|
| 136 |
+
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
|
| 137 |
+
EXPECT = expect
|
| 138 |
+
RUNTEST = runtest
|
| 139 |
+
am__DIST_COMMON = $(srcdir)/Makefile.in
|
| 140 |
+
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
| 141 |
+
ACLOCAL = @ACLOCAL@
|
| 142 |
+
ALLOCA = @ALLOCA@
|
| 143 |
+
AMTAR = @AMTAR@
|
| 144 |
+
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
| 145 |
+
AM_LTLDFLAGS = @AM_LTLDFLAGS@
|
| 146 |
+
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
|
| 147 |
+
AR = @AR@
|
| 148 |
+
AUTOCONF = @AUTOCONF@
|
| 149 |
+
AUTOHEADER = @AUTOHEADER@
|
| 150 |
+
AUTOMAKE = @AUTOMAKE@
|
| 151 |
+
AWK = @AWK@
|
| 152 |
+
CC = @CC@
|
| 153 |
+
CCAS = @CCAS@
|
| 154 |
+
CCASDEPMODE = @CCASDEPMODE@
|
| 155 |
+
CCASFLAGS = @CCASFLAGS@
|
| 156 |
+
CCDEPMODE = @CCDEPMODE@
|
| 157 |
+
CFLAGS = @CFLAGS@
|
| 158 |
+
CPPFLAGS = @CPPFLAGS@
|
| 159 |
+
CSCOPE = @CSCOPE@
|
| 160 |
+
CTAGS = @CTAGS@
|
| 161 |
+
CXX = @CXX@
|
| 162 |
+
CXXCPP = @CXXCPP@
|
| 163 |
+
CXXDEPMODE = @CXXDEPMODE@
|
| 164 |
+
CXXFLAGS = @CXXFLAGS@
|
| 165 |
+
CYGPATH_W = @CYGPATH_W@
|
| 166 |
+
DEFS = @DEFS@
|
| 167 |
+
DEPDIR = @DEPDIR@
|
| 168 |
+
DLLTOOL = @DLLTOOL@
|
| 169 |
+
DSYMUTIL = @DSYMUTIL@
|
| 170 |
+
DUMPBIN = @DUMPBIN@
|
| 171 |
+
ECHO_C = @ECHO_C@
|
| 172 |
+
ECHO_N = @ECHO_N@
|
| 173 |
+
ECHO_T = @ECHO_T@
|
| 174 |
+
EGREP = @EGREP@
|
| 175 |
+
ETAGS = @ETAGS@
|
| 176 |
+
EXEEXT = @EXEEXT@
|
| 177 |
+
FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@
|
| 178 |
+
FGREP = @FGREP@
|
| 179 |
+
GREP = @GREP@
|
| 180 |
+
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
|
| 181 |
+
HAVE_LONG_DOUBLE_VARIANT = @HAVE_LONG_DOUBLE_VARIANT@
|
| 182 |
+
INSTALL = @INSTALL@
|
| 183 |
+
INSTALL_DATA = @INSTALL_DATA@
|
| 184 |
+
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
| 185 |
+
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
| 186 |
+
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
| 187 |
+
LD = @LD@
|
| 188 |
+
LDFLAGS = @LDFLAGS@
|
| 189 |
+
LIBOBJS = @LIBOBJS@
|
| 190 |
+
LIBS = @LIBS@
|
| 191 |
+
LIBTOOL = @LIBTOOL@
|
| 192 |
+
LIPO = @LIPO@
|
| 193 |
+
LN_S = @LN_S@
|
| 194 |
+
LTLIBOBJS = @LTLIBOBJS@
|
| 195 |
+
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
| 196 |
+
MAINT = @MAINT@
|
| 197 |
+
MAKEINFO = @MAKEINFO@
|
| 198 |
+
MANIFEST_TOOL = @MANIFEST_TOOL@
|
| 199 |
+
MKDIR_P = @MKDIR_P@
|
| 200 |
+
NM = @NM@
|
| 201 |
+
NMEDIT = @NMEDIT@
|
| 202 |
+
OBJDUMP = @OBJDUMP@
|
| 203 |
+
OBJEXT = @OBJEXT@
|
| 204 |
+
OPT_LDFLAGS = @OPT_LDFLAGS@
|
| 205 |
+
OTOOL = @OTOOL@
|
| 206 |
+
OTOOL64 = @OTOOL64@
|
| 207 |
+
PACKAGE = @PACKAGE@
|
| 208 |
+
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
| 209 |
+
PACKAGE_NAME = @PACKAGE_NAME@
|
| 210 |
+
PACKAGE_STRING = @PACKAGE_STRING@
|
| 211 |
+
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
| 212 |
+
PACKAGE_URL = @PACKAGE_URL@
|
| 213 |
+
PACKAGE_VERSION = @PACKAGE_VERSION@
|
| 214 |
+
PATH_SEPARATOR = @PATH_SEPARATOR@
|
| 215 |
+
PRTDIAG = @PRTDIAG@
|
| 216 |
+
RANLIB = @RANLIB@
|
| 217 |
+
READELF = @READELF@
|
| 218 |
+
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
| 219 |
+
SED = @SED@
|
| 220 |
+
SET_MAKE = @SET_MAKE@
|
| 221 |
+
SHELL = @SHELL@
|
| 222 |
+
STRIP = @STRIP@
|
| 223 |
+
TARGET = @TARGET@
|
| 224 |
+
TARGETDIR = @TARGETDIR@
|
| 225 |
+
TARGET_OBJ = @TARGET_OBJ@
|
| 226 |
+
VERSION = @VERSION@
|
| 227 |
+
abs_builddir = @abs_builddir@
|
| 228 |
+
abs_srcdir = @abs_srcdir@
|
| 229 |
+
abs_top_builddir = @abs_top_builddir@
|
| 230 |
+
abs_top_srcdir = @abs_top_srcdir@
|
| 231 |
+
ac_ct_AR = @ac_ct_AR@
|
| 232 |
+
ac_ct_CC = @ac_ct_CC@
|
| 233 |
+
ac_ct_CXX = @ac_ct_CXX@
|
| 234 |
+
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
| 235 |
+
am__include = @am__include@
|
| 236 |
+
am__leading_dot = @am__leading_dot@
|
| 237 |
+
am__quote = @am__quote@
|
| 238 |
+
am__tar = @am__tar@
|
| 239 |
+
am__untar = @am__untar@
|
| 240 |
+
ax_enable_builddir_sed = @ax_enable_builddir_sed@
|
| 241 |
+
bindir = @bindir@
|
| 242 |
+
build = @build@
|
| 243 |
+
build_alias = @build_alias@
|
| 244 |
+
build_cpu = @build_cpu@
|
| 245 |
+
build_os = @build_os@
|
| 246 |
+
build_vendor = @build_vendor@
|
| 247 |
+
builddir = @builddir@
|
| 248 |
+
datadir = @datadir@
|
| 249 |
+
datarootdir = @datarootdir@
|
| 250 |
+
docdir = @docdir@
|
| 251 |
+
dvidir = @dvidir@
|
| 252 |
+
exec_prefix = @exec_prefix@
|
| 253 |
+
host = @host@
|
| 254 |
+
host_alias = @host_alias@
|
| 255 |
+
host_cpu = @host_cpu@
|
| 256 |
+
host_os = @host_os@
|
| 257 |
+
host_vendor = @host_vendor@
|
| 258 |
+
htmldir = @htmldir@
|
| 259 |
+
includedir = @includedir@
|
| 260 |
+
infodir = @infodir@
|
| 261 |
+
install_sh = @install_sh@
|
| 262 |
+
libdir = @libdir@
|
| 263 |
+
libexecdir = @libexecdir@
|
| 264 |
+
localedir = @localedir@
|
| 265 |
+
localstatedir = @localstatedir@
|
| 266 |
+
mandir = @mandir@
|
| 267 |
+
mkdir_p = @mkdir_p@
|
| 268 |
+
oldincludedir = @oldincludedir@
|
| 269 |
+
pdfdir = @pdfdir@
|
| 270 |
+
prefix = @prefix@
|
| 271 |
+
program_transform_name = @program_transform_name@
|
| 272 |
+
psdir = @psdir@
|
| 273 |
+
runstatedir = @runstatedir@
|
| 274 |
+
sbindir = @sbindir@
|
| 275 |
+
sharedstatedir = @sharedstatedir@
|
| 276 |
+
srcdir = @srcdir@
|
| 277 |
+
sys_symbol_underscore = @sys_symbol_underscore@
|
| 278 |
+
sysconfdir = @sysconfdir@
|
| 279 |
+
target = @target@
|
| 280 |
+
target_alias = @target_alias@
|
| 281 |
+
target_cpu = @target_cpu@
|
| 282 |
+
target_os = @target_os@
|
| 283 |
+
target_vendor = @target_vendor@
|
| 284 |
+
tmake_file = @tmake_file@
|
| 285 |
+
toolexecdir = @toolexecdir@
|
| 286 |
+
toolexeclibdir = $(libdir)
|
| 287 |
+
top_build_prefix = @top_build_prefix@
|
| 288 |
+
top_builddir = @top_builddir@
|
| 289 |
+
top_srcdir = @top_srcdir@
|
| 290 |
+
AUTOMAKE_OPTIONS = foreign dejagnu
|
| 291 |
+
EXTRA_DEJAGNU_SITE_CONFIG = ../local.exp
|
| 292 |
+
CLEANFILES = *.exe core* *.log *.sum
|
| 293 |
+
EXTRA_DIST = config/default.exp lib/libffi.exp lib/target-libpath.exp \
|
| 294 |
+
lib/wrapper.exp libffi.bhaible/Makefile libffi.bhaible/README \
|
| 295 |
+
libffi.bhaible/alignof.h libffi.bhaible/bhaible.exp \
|
| 296 |
+
libffi.bhaible/test-call.c libffi.bhaible/test-callback.c \
|
| 297 |
+
libffi.bhaible/testcases.c libffi.call/align_mixed.c \
|
| 298 |
+
libffi.call/align_stdcall.c libffi.call/call.exp \
|
| 299 |
+
libffi.call/err_bad_typedef.c libffi.call/ffitest.h \
|
| 300 |
+
libffi.call/float.c libffi.call/float1.c libffi.call/float2.c \
|
| 301 |
+
libffi.call/float3.c libffi.call/float4.c libffi.call/float_va.c \
|
| 302 |
+
libffi.call/many.c libffi.call/many2.c libffi.call/many_double.c \
|
| 303 |
+
libffi.call/many_mixed.c libffi.call/negint.c libffi.call/offsets.c \
|
| 304 |
+
libffi.call/pr1172638.c libffi.call/promotion.c \
|
| 305 |
+
libffi.call/pyobjc_tc.c libffi.call/return_dbl.c \
|
| 306 |
+
libffi.call/return_dbl1.c libffi.call/return_dbl2.c \
|
| 307 |
+
libffi.call/return_fl.c libffi.call/return_fl1.c \
|
| 308 |
+
libffi.call/return_fl2.c libffi.call/return_fl3.c \
|
| 309 |
+
libffi.call/return_ldl.c libffi.call/return_ll.c \
|
| 310 |
+
libffi.call/return_ll1.c libffi.call/return_sc.c \
|
| 311 |
+
libffi.call/return_sl.c libffi.call/return_uc.c \
|
| 312 |
+
libffi.call/return_ul.c libffi.call/struct1.c libffi.call/struct10.c \
|
| 313 |
+
libffi.call/struct2.c libffi.call/struct3.c libffi.call/struct4.c \
|
| 314 |
+
libffi.call/struct5.c libffi.call/struct6.c libffi.call/struct7.c \
|
| 315 |
+
libffi.call/struct8.c libffi.call/struct9.c \
|
| 316 |
+
libffi.call/uninitialized.c libffi.call/va_1.c libffi.call/va_2.c \
|
| 317 |
+
libffi.call/va_3.c libffi.call/va_struct1.c libffi.call/va_struct2.c \
|
| 318 |
+
libffi.call/va_struct3.c libffi.call/struct_by_value_big.c \
|
| 319 |
+
libffi.call/struct_by_value_2.c libffi.call/struct_by_value_3.c \
|
| 320 |
+
libffi.call/struct_by_value_4.c libffi.call/struct_by_value_small.c \
|
| 321 |
+
libffi.call/strlen2.c libffi.call/strlen3.c libffi.call/strlen4.c \
|
| 322 |
+
libffi.call/strlen.c libffi.call/va_3.c \
|
| 323 |
+
libffi.call/struct_by_value_2.c libffi.call/struct_by_value_3.c \
|
| 324 |
+
libffi.call/struct_by_value_4.c libffi.closures/closure.exp \
|
| 325 |
+
libffi.call/s55.c libffi.call/bpo-38748.c \
|
| 326 |
+
libffi.closures/closure_fn0.c libffi.closures/closure_fn1.c \
|
| 327 |
+
libffi.closures/closure_fn2.c libffi.closures/closure_fn3.c \
|
| 328 |
+
libffi.closures/closure_fn4.c libffi.closures/closure_fn5.c \
|
| 329 |
+
libffi.closures/closure_fn6.c libffi.closures/closure_loc_fn0.c \
|
| 330 |
+
libffi.closures/closure_simple.c libffi.closures/cls_12byte.c \
|
| 331 |
+
libffi.closures/cls_16byte.c libffi.closures/cls_18byte.c \
|
| 332 |
+
libffi.closures/cls_19byte.c libffi.closures/cls_1_1byte.c \
|
| 333 |
+
libffi.closures/cls_20byte.c libffi.closures/cls_20byte1.c \
|
| 334 |
+
libffi.closures/cls_24byte.c libffi.closures/cls_2byte.c \
|
| 335 |
+
libffi.closures/cls_3_1byte.c libffi.closures/cls_3byte1.c \
|
| 336 |
+
libffi.closures/cls_3byte2.c libffi.closures/cls_3float.c \
|
| 337 |
+
libffi.closures/cls_4_1byte.c libffi.closures/cls_4byte.c \
|
| 338 |
+
libffi.closures/cls_5_1_byte.c libffi.closures/cls_5byte.c \
|
| 339 |
+
libffi.closures/cls_64byte.c libffi.closures/cls_6_1_byte.c \
|
| 340 |
+
libffi.closures/cls_6byte.c libffi.closures/cls_7_1_byte.c \
|
| 341 |
+
libffi.closures/cls_7byte.c libffi.closures/cls_8byte.c \
|
| 342 |
+
libffi.closures/cls_9byte1.c libffi.closures/cls_9byte2.c \
|
| 343 |
+
libffi.closures/cls_align_double.c libffi.closures/cls_align_float.c \
|
| 344 |
+
libffi.closures/cls_align_longdouble.c \
|
| 345 |
+
libffi.closures/cls_align_pointer.c \
|
| 346 |
+
libffi.closures/cls_align_sint16.c libffi.closures/cls_align_sint32.c \
|
| 347 |
+
libffi.closures/cls_align_sint64.c libffi.closures/cls_align_uint16.c \
|
| 348 |
+
libffi.closures/cls_align_uint32.c libffi.closures/cls_align_uint64.c \
|
| 349 |
+
libffi.closures/cls_dbls_struct.c libffi.closures/cls_double.c \
|
| 350 |
+
libffi.closures/cls_double_va.c libffi.closures/cls_float.c \
|
| 351 |
+
libffi.closures/cls_longdouble_va.c \
|
| 352 |
+
libffi.closures/cls_many_mixed_args.c \
|
| 353 |
+
libffi.closures/cls_many_mixed_float_double.c \
|
| 354 |
+
libffi.closures/cls_multi_schar.c libffi.closures/cls_multi_sshort.c \
|
| 355 |
+
libffi.closures/cls_multi_sshortchar.c \
|
| 356 |
+
libffi.closures/cls_multi_uchar.c libffi.closures/cls_multi_ushort.c \
|
| 357 |
+
libffi.closures/cls_multi_ushortchar.c libffi.closures/cls_pointer.c \
|
| 358 |
+
libffi.closures/cls_pointer_stack.c libffi.closures/cls_schar.c \
|
| 359 |
+
libffi.closures/cls_sint.c libffi.closures/cls_sshort.c \
|
| 360 |
+
libffi.closures/cls_struct_va1.c libffi.closures/cls_uchar.c \
|
| 361 |
+
libffi.closures/cls_uint.c libffi.closures/cls_uint_va.c \
|
| 362 |
+
libffi.closures/cls_ulong_va.c libffi.closures/cls_ulonglong.c \
|
| 363 |
+
libffi.closures/cls_ushort.c libffi.closures/err_bad_abi.c \
|
| 364 |
+
libffi.closures/ffitest.h libffi.closures/nested_struct.c \
|
| 365 |
+
libffi.closures/nested_struct1.c libffi.closures/nested_struct10.c \
|
| 366 |
+
libffi.closures/nested_struct11.c libffi.closures/nested_struct12.c \
|
| 367 |
+
libffi.closures/nested_struct13.c libffi.closures/nested_struct2.c \
|
| 368 |
+
libffi.closures/nested_struct3.c libffi.closures/nested_struct4.c \
|
| 369 |
+
libffi.closures/nested_struct5.c libffi.closures/nested_struct6.c \
|
| 370 |
+
libffi.closures/nested_struct7.c libffi.closures/nested_struct8.c \
|
| 371 |
+
libffi.closures/nested_struct9.c libffi.closures/problem1.c \
|
| 372 |
+
libffi.closures/single_entry_structs1.c \
|
| 373 |
+
libffi.closures/single_entry_structs2.c \
|
| 374 |
+
libffi.closures/single_entry_structs3.c libffi.closures/stret_large.c \
|
| 375 |
+
libffi.closures/stret_large2.c libffi.closures/stret_medium.c \
|
| 376 |
+
libffi.closures/stret_medium2.c libffi.closures/testclosure.c \
|
| 377 |
+
libffi.closures/unwindtest.cc libffi.closures/unwindtest_ffi_call.cc \
|
| 378 |
+
libffi.closures/cls_align_longdouble_split.c \
|
| 379 |
+
libffi.closures/cls_align_longdouble_split2.c \
|
| 380 |
+
libffi.closures/cls_longdouble.c libffi.closures/huge_struct.c \
|
| 381 |
+
libffi.complex/cls_align_complex.inc \
|
| 382 |
+
libffi.complex/cls_align_complex_double.c \
|
| 383 |
+
libffi.complex/cls_align_complex_float.c \
|
| 384 |
+
libffi.complex/cls_align_complex_longdouble.c \
|
| 385 |
+
libffi.complex/cls_complex.inc libffi.complex/cls_complex_double.c \
|
| 386 |
+
libffi.complex/cls_complex_float.c \
|
| 387 |
+
libffi.complex/cls_complex_longdouble.c \
|
| 388 |
+
libffi.complex/cls_complex_struct.inc \
|
| 389 |
+
libffi.complex/cls_complex_struct_double.c \
|
| 390 |
+
libffi.complex/cls_complex_struct_float.c \
|
| 391 |
+
libffi.complex/cls_complex_struct_longdouble.c \
|
| 392 |
+
libffi.complex/cls_complex_va.inc \
|
| 393 |
+
libffi.complex/cls_complex_va_double.c \
|
| 394 |
+
libffi.complex/cls_complex_va_float.c \
|
| 395 |
+
libffi.complex/cls_complex_va_longdouble.c libffi.complex/complex.exp \
|
| 396 |
+
libffi.complex/complex.inc libffi.complex/complex_defs_double.inc \
|
| 397 |
+
libffi.complex/complex_defs_float.inc \
|
| 398 |
+
libffi.complex/complex_defs_longdouble.inc \
|
| 399 |
+
libffi.complex/complex_double.c libffi.complex/complex_float.c \
|
| 400 |
+
libffi.complex/complex_int.c libffi.complex/complex_longdouble.c \
|
| 401 |
+
libffi.complex/ffitest.h libffi.complex/many_complex.inc \
|
| 402 |
+
libffi.complex/many_complex_double.c \
|
| 403 |
+
libffi.complex/many_complex_float.c \
|
| 404 |
+
libffi.complex/many_complex_longdouble.c \
|
| 405 |
+
libffi.complex/return_complex.inc libffi.complex/return_complex1.inc \
|
| 406 |
+
libffi.complex/return_complex1_double.c \
|
| 407 |
+
libffi.complex/return_complex1_float.c \
|
| 408 |
+
libffi.complex/return_complex1_longdouble.c \
|
| 409 |
+
libffi.complex/return_complex2.inc \
|
| 410 |
+
libffi.complex/return_complex2_double.c \
|
| 411 |
+
libffi.complex/return_complex2_float.c \
|
| 412 |
+
libffi.complex/return_complex2_longdouble.c \
|
| 413 |
+
libffi.complex/return_complex_double.c \
|
| 414 |
+
libffi.complex/return_complex_float.c \
|
| 415 |
+
libffi.complex/return_complex_longdouble.c libffi.go/aa-direct.c \
|
| 416 |
+
libffi.go/closure1.c libffi.go/ffitest.h libffi.go/go.exp \
|
| 417 |
+
libffi.go/static-chain.h
|
| 418 |
+
|
| 419 |
+
all: all-am
|
| 420 |
+
|
| 421 |
+
.SUFFIXES:
|
| 422 |
+
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
| 423 |
+
@for dep in $?; do \
|
| 424 |
+
case '$(am__configure_deps)' in \
|
| 425 |
+
*$$dep*) \
|
| 426 |
+
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
| 427 |
+
&& { if test -f $@; then exit 0; else break; fi; }; \
|
| 428 |
+
exit 1;; \
|
| 429 |
+
esac; \
|
| 430 |
+
done; \
|
| 431 |
+
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/Makefile'; \
|
| 432 |
+
$(am__cd) $(top_srcdir) && \
|
| 433 |
+
$(AUTOMAKE) --foreign testsuite/Makefile
|
| 434 |
+
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
| 435 |
+
@case '$?' in \
|
| 436 |
+
*config.status*) \
|
| 437 |
+
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
| 438 |
+
*) \
|
| 439 |
+
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
| 440 |
+
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
| 441 |
+
esac;
|
| 442 |
+
|
| 443 |
+
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
| 444 |
+
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
| 445 |
+
|
| 446 |
+
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
| 447 |
+
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
| 448 |
+
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
| 449 |
+
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
| 450 |
+
$(am__aclocal_m4_deps):
|
| 451 |
+
|
| 452 |
+
mostlyclean-libtool:
|
| 453 |
+
-rm -f *.lo
|
| 454 |
+
|
| 455 |
+
clean-libtool:
|
| 456 |
+
-rm -rf .libs _libs
|
| 457 |
+
tags TAGS:
|
| 458 |
+
|
| 459 |
+
ctags CTAGS:
|
| 460 |
+
|
| 461 |
+
cscope cscopelist:
|
| 462 |
+
|
| 463 |
+
|
| 464 |
+
check-DEJAGNU: site.exp
|
| 465 |
+
srcdir='$(srcdir)'; export srcdir; \
|
| 466 |
+
EXPECT=$(EXPECT); export EXPECT; \
|
| 467 |
+
if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
|
| 468 |
+
exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
|
| 469 |
+
if $(RUNTEST) $(RUNTESTDEFAULTFLAGS) $(AM_RUNTESTFLAGS) $(RUNTESTFLAGS); \
|
| 470 |
+
then :; else exit_status=1; fi; \
|
| 471 |
+
done; \
|
| 472 |
+
else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
|
| 473 |
+
fi; \
|
| 474 |
+
exit $$exit_status
|
| 475 |
+
site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
|
| 476 |
+
@echo 'Making a new site.exp file ...'
|
| 477 |
+
@echo '## these variables are automatically generated by make ##' >site.tmp
|
| 478 |
+
@echo '# Do not edit here. If you wish to override these values' >>site.tmp
|
| 479 |
+
@echo '# edit the last section' >>site.tmp
|
| 480 |
+
@echo 'set srcdir "$(srcdir)"' >>site.tmp
|
| 481 |
+
@echo "set objdir \"`pwd`\"" >>site.tmp
|
| 482 |
+
@echo 'set build_alias "$(build_alias)"' >>site.tmp
|
| 483 |
+
@echo 'set build_triplet $(build_triplet)' >>site.tmp
|
| 484 |
+
@echo 'set host_alias "$(host_alias)"' >>site.tmp
|
| 485 |
+
@echo 'set host_triplet $(host_triplet)' >>site.tmp
|
| 486 |
+
@echo 'set target_alias "$(target_alias)"' >>site.tmp
|
| 487 |
+
@echo 'set target_triplet $(target_triplet)' >>site.tmp
|
| 488 |
+
@list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \
|
| 489 |
+
echo "## Begin content included from file $$f. Do not modify. ##" \
|
| 490 |
+
&& cat `test -f "$$f" || echo '$(srcdir)/'`$$f \
|
| 491 |
+
&& echo "## End content included from file $$f. ##" \
|
| 492 |
+
|| exit 1; \
|
| 493 |
+
done >> site.tmp
|
| 494 |
+
@echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp
|
| 495 |
+
@if test -f site.exp; then \
|
| 496 |
+
sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \
|
| 497 |
+
fi
|
| 498 |
+
@-rm -f site.bak
|
| 499 |
+
@test ! -f site.exp || mv site.exp site.bak
|
| 500 |
+
@mv site.tmp site.exp
|
| 501 |
+
|
| 502 |
+
distclean-DEJAGNU:
|
| 503 |
+
-rm -f site.exp site.bak
|
| 504 |
+
-l='$(DEJATOOL)'; for tool in $$l; do \
|
| 505 |
+
rm -f $$tool.sum $$tool.log; \
|
| 506 |
+
done
|
| 507 |
+
distdir: $(BUILT_SOURCES)
|
| 508 |
+
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
| 509 |
+
|
| 510 |
+
distdir-am: $(DISTFILES)
|
| 511 |
+
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
| 512 |
+
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
| 513 |
+
list='$(DISTFILES)'; \
|
| 514 |
+
dist_files=`for file in $$list; do echo $$file; done | \
|
| 515 |
+
sed -e "s|^$$srcdirstrip/||;t" \
|
| 516 |
+
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
| 517 |
+
case $$dist_files in \
|
| 518 |
+
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
| 519 |
+
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
| 520 |
+
sort -u` ;; \
|
| 521 |
+
esac; \
|
| 522 |
+
for file in $$dist_files; do \
|
| 523 |
+
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
| 524 |
+
if test -d $$d/$$file; then \
|
| 525 |
+
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
| 526 |
+
if test -d "$(distdir)/$$file"; then \
|
| 527 |
+
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
| 528 |
+
fi; \
|
| 529 |
+
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
| 530 |
+
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
| 531 |
+
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
| 532 |
+
fi; \
|
| 533 |
+
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
| 534 |
+
else \
|
| 535 |
+
test -f "$(distdir)/$$file" \
|
| 536 |
+
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
| 537 |
+
|| exit 1; \
|
| 538 |
+
fi; \
|
| 539 |
+
done
|
| 540 |
+
check-am: all-am
|
| 541 |
+
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
|
| 542 |
+
check: check-am
|
| 543 |
+
all-am: Makefile
|
| 544 |
+
installdirs:
|
| 545 |
+
install: install-am
|
| 546 |
+
install-exec: install-exec-am
|
| 547 |
+
install-data: install-data-am
|
| 548 |
+
uninstall: uninstall-am
|
| 549 |
+
|
| 550 |
+
install-am: all-am
|
| 551 |
+
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
| 552 |
+
|
| 553 |
+
installcheck: installcheck-am
|
| 554 |
+
install-strip:
|
| 555 |
+
if test -z '$(STRIP)'; then \
|
| 556 |
+
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
| 557 |
+
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
| 558 |
+
install; \
|
| 559 |
+
else \
|
| 560 |
+
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
| 561 |
+
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
| 562 |
+
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
| 563 |
+
fi
|
| 564 |
+
mostlyclean-generic:
|
| 565 |
+
|
| 566 |
+
clean-generic:
|
| 567 |
+
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
| 568 |
+
|
| 569 |
+
distclean-generic:
|
| 570 |
+
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
| 571 |
+
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
| 572 |
+
|
| 573 |
+
maintainer-clean-generic:
|
| 574 |
+
@echo "This command is intended for maintainers to use"
|
| 575 |
+
@echo "it deletes files that may require special tools to rebuild."
|
| 576 |
+
clean: clean-am
|
| 577 |
+
|
| 578 |
+
clean-am: clean-generic clean-libtool mostlyclean-am
|
| 579 |
+
|
| 580 |
+
distclean: distclean-am
|
| 581 |
+
-rm -f Makefile
|
| 582 |
+
distclean-am: clean-am distclean-DEJAGNU distclean-generic
|
| 583 |
+
|
| 584 |
+
dvi: dvi-am
|
| 585 |
+
|
| 586 |
+
dvi-am:
|
| 587 |
+
|
| 588 |
+
html: html-am
|
| 589 |
+
|
| 590 |
+
html-am:
|
| 591 |
+
|
| 592 |
+
info: info-am
|
| 593 |
+
|
| 594 |
+
info-am:
|
| 595 |
+
|
| 596 |
+
install-data-am:
|
| 597 |
+
|
| 598 |
+
install-dvi: install-dvi-am
|
| 599 |
+
|
| 600 |
+
install-dvi-am:
|
| 601 |
+
|
| 602 |
+
install-exec-am:
|
| 603 |
+
|
| 604 |
+
install-html: install-html-am
|
| 605 |
+
|
| 606 |
+
install-html-am:
|
| 607 |
+
|
| 608 |
+
install-info: install-info-am
|
| 609 |
+
|
| 610 |
+
install-info-am:
|
| 611 |
+
|
| 612 |
+
install-man:
|
| 613 |
+
|
| 614 |
+
install-pdf: install-pdf-am
|
| 615 |
+
|
| 616 |
+
install-pdf-am:
|
| 617 |
+
|
| 618 |
+
install-ps: install-ps-am
|
| 619 |
+
|
| 620 |
+
install-ps-am:
|
| 621 |
+
|
| 622 |
+
installcheck-am:
|
| 623 |
+
|
| 624 |
+
maintainer-clean: maintainer-clean-am
|
| 625 |
+
-rm -f Makefile
|
| 626 |
+
maintainer-clean-am: distclean-am maintainer-clean-generic
|
| 627 |
+
|
| 628 |
+
mostlyclean: mostlyclean-am
|
| 629 |
+
|
| 630 |
+
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
| 631 |
+
|
| 632 |
+
pdf: pdf-am
|
| 633 |
+
|
| 634 |
+
pdf-am:
|
| 635 |
+
|
| 636 |
+
ps: ps-am
|
| 637 |
+
|
| 638 |
+
ps-am:
|
| 639 |
+
|
| 640 |
+
uninstall-am:
|
| 641 |
+
|
| 642 |
+
.MAKE: check-am install-am install-strip
|
| 643 |
+
|
| 644 |
+
.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
|
| 645 |
+
clean-libtool cscopelist-am ctags-am distclean \
|
| 646 |
+
distclean-DEJAGNU distclean-generic distclean-libtool distdir \
|
| 647 |
+
dvi dvi-am html html-am info info-am install install-am \
|
| 648 |
+
install-data install-data-am install-dvi install-dvi-am \
|
| 649 |
+
install-exec install-exec-am install-html install-html-am \
|
| 650 |
+
install-info install-info-am install-man install-pdf \
|
| 651 |
+
install-pdf-am install-ps install-ps-am install-strip \
|
| 652 |
+
installcheck installcheck-am installdirs maintainer-clean \
|
| 653 |
+
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
| 654 |
+
mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
|
| 655 |
+
uninstall-am
|
| 656 |
+
|
| 657 |
+
.PRECIOUS: Makefile
|
| 658 |
+
|
| 659 |
+
|
| 660 |
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
| 661 |
+
# Otherwise a system limit (for SysV at least) may be exceeded.
|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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2003, 2005, 2008, 2009, 2010, 2011, 2014, 2019, 2022 Free Software Foundation, Inc.
|
| 2 |
+
|
| 3 |
+
# This program is free software; you can redistribute it and/or modify
|
| 4 |
+
# it under the terms of the GNU General Public License as published by
|
| 5 |
+
# the Free Software Foundation; either version 3 of the License, or
|
| 6 |
+
# (at your option) any later version.
|
| 7 |
+
#
|
| 8 |
+
# This program is distributed in the hope that it will be useful,
|
| 9 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 10 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 11 |
+
# GNU General Public License for more details.
|
| 12 |
+
#
|
| 13 |
+
# You should have received a copy of the GNU General Public License
|
| 14 |
+
# along with this program; see the file COPYING3. If not see
|
| 15 |
+
# <http://www.gnu.org/licenses/>.
|
| 16 |
+
|
| 17 |
+
proc load_gcc_lib { filename } {
|
| 18 |
+
global srcdir
|
| 19 |
+
load_file $srcdir/lib/$filename
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
load_lib dg.exp
|
| 23 |
+
load_lib libgloss.exp
|
| 24 |
+
load_gcc_lib target-libpath.exp
|
| 25 |
+
load_gcc_lib wrapper.exp
|
| 26 |
+
|
| 27 |
+
proc check_effective_target_gccbug { } {
|
| 28 |
+
global has_gccbug
|
| 29 |
+
return $has_gccbug
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
# Return 1 if the target matches the effective target 'arg', 0 otherwise.
|
| 33 |
+
# This can be used with any check_* proc that takes no argument and
|
| 34 |
+
# returns only 1 or 0. It could be used with check_* procs that take
|
| 35 |
+
# arguments with keywords that pass particular arguments.
|
| 36 |
+
|
| 37 |
+
proc is-effective-target { arg } {
|
| 38 |
+
global et_index
|
| 39 |
+
set selected 0
|
| 40 |
+
if { ![info exists et_index] } {
|
| 41 |
+
# Initialize the effective target index that is used in some
|
| 42 |
+
# check_effective_target_* procs.
|
| 43 |
+
set et_index 0
|
| 44 |
+
}
|
| 45 |
+
if { [info procs check_effective_target_${arg}] != [list] } {
|
| 46 |
+
set selected [check_effective_target_${arg}]
|
| 47 |
+
} else {
|
| 48 |
+
error "unknown effective target keyword `$arg'"
|
| 49 |
+
}
|
| 50 |
+
verbose "is-effective-target: $arg $selected" 2
|
| 51 |
+
return $selected
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
proc is-effective-target-keyword { arg } {
|
| 55 |
+
if { [info procs check_effective_target_${arg}] != [list] } {
|
| 56 |
+
return 1
|
| 57 |
+
} else {
|
| 58 |
+
return 0
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
# Intercept the call to the DejaGnu version of dg-process-target to
|
| 63 |
+
# support use of an effective-target keyword in place of a list of
|
| 64 |
+
# target triplets to xfail or skip a test.
|
| 65 |
+
#
|
| 66 |
+
# The argument to dg-process-target is the keyword "target" or "xfail"
|
| 67 |
+
# followed by a selector:
|
| 68 |
+
# target-triplet-1 ...
|
| 69 |
+
# effective-target-keyword
|
| 70 |
+
# selector-expression
|
| 71 |
+
#
|
| 72 |
+
# For a target list the result is "S" if the target is selected, "N" otherwise.
|
| 73 |
+
# For an xfail list the result is "F" if the target is affected, "P" otherwise.
|
| 74 |
+
|
| 75 |
+
# In contexts that allow either "target" or "xfail" the argument can be
|
| 76 |
+
# target selector1 xfail selector2
|
| 77 |
+
# which returns "N" if selector1 is not selected, otherwise the result of
|
| 78 |
+
# "xfail selector2".
|
| 79 |
+
#
|
| 80 |
+
# A selector expression appears within curly braces and uses a single logical
|
| 81 |
+
# operator: !, &&, or ||. An operand is another selector expression, an
|
| 82 |
+
# effective-target keyword, or a list of target triplets within quotes or
|
| 83 |
+
# curly braces.
|
| 84 |
+
|
| 85 |
+
if { [info procs saved-dg-process-target] == [list] } {
|
| 86 |
+
rename dg-process-target saved-dg-process-target
|
| 87 |
+
|
| 88 |
+
# Evaluate an operand within a selector expression.
|
| 89 |
+
proc selector_opd { op } {
|
| 90 |
+
set selector "target"
|
| 91 |
+
lappend selector $op
|
| 92 |
+
set answer [ expr { [dg-process-target $selector] == "S" } ]
|
| 93 |
+
verbose "selector_opd: `$op' $answer" 2
|
| 94 |
+
return $answer
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
# Evaluate a target triplet list within a selector expression.
|
| 98 |
+
# Unlike other operands, this needs to be expanded from a list to
|
| 99 |
+
# the same string as "target".
|
| 100 |
+
proc selector_list { op } {
|
| 101 |
+
set selector "target [join $op]"
|
| 102 |
+
set answer [ expr { [dg-process-target $selector] == "S" } ]
|
| 103 |
+
verbose "selector_list: `$op' $answer" 2
|
| 104 |
+
return $answer
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
# Evaluate a selector expression.
|
| 108 |
+
proc selector_expression { exp } {
|
| 109 |
+
if { [llength $exp] == 2 } {
|
| 110 |
+
if [string match "!" [lindex $exp 0]] {
|
| 111 |
+
set op1 [lindex $exp 1]
|
| 112 |
+
set answer [expr { ! [selector_opd $op1] }]
|
| 113 |
+
} else {
|
| 114 |
+
# Assume it's a list of target triplets.
|
| 115 |
+
set answer [selector_list $exp]
|
| 116 |
+
}
|
| 117 |
+
} elseif { [llength $exp] == 3 } {
|
| 118 |
+
set op1 [lindex $exp 0]
|
| 119 |
+
set opr [lindex $exp 1]
|
| 120 |
+
set op2 [lindex $exp 2]
|
| 121 |
+
if [string match "&&" $opr] {
|
| 122 |
+
set answer [expr { [selector_opd $op1] && [selector_opd $op2] }]
|
| 123 |
+
} elseif [string match "||" $opr] {
|
| 124 |
+
set answer [expr { [selector_opd $op1] || [selector_opd $op2] }]
|
| 125 |
+
} else {
|
| 126 |
+
# Assume it's a list of target triplets.
|
| 127 |
+
set answer [selector_list $exp]
|
| 128 |
+
}
|
| 129 |
+
} else {
|
| 130 |
+
# Assume it's a list of target triplets.
|
| 131 |
+
set answer [selector_list $exp]
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
verbose "selector_expression: `$exp' $answer" 2
|
| 135 |
+
return $answer
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
# Evaluate "target selector" or "xfail selector".
|
| 139 |
+
|
| 140 |
+
proc dg-process-target-1 { args } {
|
| 141 |
+
verbose "dg-process-target-1: `$args'" 2
|
| 142 |
+
|
| 143 |
+
# Extract the 'what' keyword from the argument list.
|
| 144 |
+
set selector [string trim [lindex $args 0]]
|
| 145 |
+
if [regexp "^xfail " $selector] {
|
| 146 |
+
set what "xfail"
|
| 147 |
+
} elseif [regexp "^target " $selector] {
|
| 148 |
+
set what "target"
|
| 149 |
+
} else {
|
| 150 |
+
error "syntax error in target selector \"$selector\""
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
# Extract the rest of the list, which might be a keyword.
|
| 154 |
+
regsub "^${what}" $selector "" rest
|
| 155 |
+
set rest [string trim $rest]
|
| 156 |
+
|
| 157 |
+
if [is-effective-target-keyword $rest] {
|
| 158 |
+
# The selector is an effective target keyword.
|
| 159 |
+
if [is-effective-target $rest] {
|
| 160 |
+
return [expr { $what == "xfail" ? "F" : "S" }]
|
| 161 |
+
} else {
|
| 162 |
+
return [expr { $what == "xfail" ? "P" : "N" }]
|
| 163 |
+
}
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
if [string match "{*}" $rest] {
|
| 167 |
+
if [selector_expression [lindex $rest 0]] {
|
| 168 |
+
return [expr { $what == "xfail" ? "F" : "S" }]
|
| 169 |
+
} else {
|
| 170 |
+
return [expr { $what == "xfail" ? "P" : "N" }]
|
| 171 |
+
}
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
# The selector is not an effective-target keyword, so process
|
| 175 |
+
# the list of target triplets.
|
| 176 |
+
return [saved-dg-process-target $selector]
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
# Intercept calls to the DejaGnu function. In addition to
|
| 180 |
+
# processing "target selector" or "xfail selector", handle
|
| 181 |
+
# "target selector1 xfail selector2".
|
| 182 |
+
|
| 183 |
+
proc dg-process-target { args } {
|
| 184 |
+
verbose "replacement dg-process-target: `$args'" 2
|
| 185 |
+
|
| 186 |
+
set selector [string trim [lindex $args 0]]
|
| 187 |
+
|
| 188 |
+
# If the argument list contains both 'target' and 'xfail',
|
| 189 |
+
# process 'target' and, if that succeeds, process 'xfail'.
|
| 190 |
+
if [regexp "^target .* xfail .*" $selector] {
|
| 191 |
+
set xfail_index [string first "xfail" $selector]
|
| 192 |
+
set xfail_selector [string range $selector $xfail_index end]
|
| 193 |
+
set target_selector [string range $selector 0 [expr $xfail_index-1]]
|
| 194 |
+
set target_selector [string trim $target_selector]
|
| 195 |
+
if { [dg-process-target-1 $target_selector] == "N" } {
|
| 196 |
+
return "N"
|
| 197 |
+
}
|
| 198 |
+
return [dg-process-target-1 $xfail_selector]
|
| 199 |
+
|
| 200 |
+
}
|
| 201 |
+
return [dg-process-target-1 $selector]
|
| 202 |
+
}
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
# Define libffi callbacks for dg.exp.
|
| 206 |
+
|
| 207 |
+
proc libffi-dg-test-1 { target_compile prog do_what extra_tool_flags } {
|
| 208 |
+
|
| 209 |
+
# To get all \n in dg-output test strings to match printf output
|
| 210 |
+
# in a system that outputs it as \015\012 (i.e. not just \012), we
|
| 211 |
+
# need to change all \n into \r?\n. As there is no dejagnu flag
|
| 212 |
+
# or hook to do that, we simply change the text being tested.
|
| 213 |
+
# Unfortunately, we have to know that the variable is called
|
| 214 |
+
# dg-output-text and lives in the caller of libffi-dg-test, which
|
| 215 |
+
# is two calls up. Overriding proc dg-output would be longer and
|
| 216 |
+
# would necessarily have the same assumption.
|
| 217 |
+
upvar 2 dg-output-text output_match
|
| 218 |
+
|
| 219 |
+
if { [llength $output_match] > 1 } {
|
| 220 |
+
regsub -all "\n" [lindex $output_match 1] "\r?\n" x
|
| 221 |
+
set output_match [lreplace $output_match 1 1 $x]
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
# Set up the compiler flags, based on what we're going to do.
|
| 225 |
+
|
| 226 |
+
set options [list]
|
| 227 |
+
switch $do_what {
|
| 228 |
+
"compile" {
|
| 229 |
+
set compile_type "assembly"
|
| 230 |
+
set output_file "[file rootname [file tail $prog]].s"
|
| 231 |
+
}
|
| 232 |
+
"link" {
|
| 233 |
+
set compile_type "executable"
|
| 234 |
+
set output_file "[file rootname [file tail $prog]].exe"
|
| 235 |
+
# The following line is needed for targets like the i960 where
|
| 236 |
+
# the default output file is b.out. Sigh.
|
| 237 |
+
}
|
| 238 |
+
"run" {
|
| 239 |
+
set compile_type "executable"
|
| 240 |
+
# FIXME: "./" is to cope with "." not being in $PATH.
|
| 241 |
+
# Should this be handled elsewhere?
|
| 242 |
+
# YES.
|
| 243 |
+
set output_file "./[file rootname [file tail $prog]].exe"
|
| 244 |
+
# This is the only place where we care if an executable was
|
| 245 |
+
# created or not. If it was, dg.exp will try to run it.
|
| 246 |
+
remote_file build delete $output_file;
|
| 247 |
+
}
|
| 248 |
+
default {
|
| 249 |
+
perror "$do_what: not a valid dg-do keyword"
|
| 250 |
+
return ""
|
| 251 |
+
}
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
if { $extra_tool_flags != "" } {
|
| 255 |
+
lappend options "additional_flags=$extra_tool_flags"
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
set comp_output [libffi_target_compile "$prog" "$output_file" "$compile_type" $options];
|
| 259 |
+
|
| 260 |
+
|
| 261 |
+
return [list $comp_output $output_file]
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
proc libffi-dg-test { prog do_what extra_tool_flags } {
|
| 266 |
+
return [libffi-dg-test-1 target_compile $prog $do_what $extra_tool_flags]
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
proc libffi-dg-prune { target_triplet text } {
|
| 270 |
+
# We get this with some qemu emulated systems (eg. ppc64le-linux-gnu)
|
| 271 |
+
regsub -all "(^|\n)\[^\n\]*unable to perform all requested operations" $text "" text
|
| 272 |
+
# We get this from sparc64 linux systems
|
| 273 |
+
regsub -all "(^|\n)\[^\n\]*warning: .* has a LOAD segment with RWX permissions" $text "" text
|
| 274 |
+
return $text
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
proc libffi-init { args } {
|
| 278 |
+
global gluefile wrap_flags;
|
| 279 |
+
global srcdir
|
| 280 |
+
global blddirffi
|
| 281 |
+
global objdir
|
| 282 |
+
global TOOL_OPTIONS
|
| 283 |
+
global tool
|
| 284 |
+
global libffi_include
|
| 285 |
+
global libffi_link_flags
|
| 286 |
+
global tool_root_dir
|
| 287 |
+
global ld_library_path
|
| 288 |
+
global compiler_vendor
|
| 289 |
+
|
| 290 |
+
if ![info exists blddirffi] {
|
| 291 |
+
set blddirffi [pwd]/..
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
verbose "libffi $blddirffi"
|
| 295 |
+
|
| 296 |
+
# Which compiler are we building with?
|
| 297 |
+
if { [string match $compiler_vendor "gnu"] } {
|
| 298 |
+
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
|
| 299 |
+
if {$gccdir != ""} {
|
| 300 |
+
set gccdir [file dirname $gccdir]
|
| 301 |
+
}
|
| 302 |
+
verbose "gccdir $gccdir"
|
| 303 |
+
|
| 304 |
+
set ld_library_path "."
|
| 305 |
+
append ld_library_path ":${gccdir}"
|
| 306 |
+
|
| 307 |
+
set compiler "${gccdir}/xgcc"
|
| 308 |
+
if { [is_remote host] == 0 && [which $compiler] != 0 } {
|
| 309 |
+
foreach i "[exec $compiler --print-multi-lib]" {
|
| 310 |
+
set mldir ""
|
| 311 |
+
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
|
| 312 |
+
set mldir [string trimright $mldir "\;@"]
|
| 313 |
+
if { "$mldir" == "." } {
|
| 314 |
+
continue
|
| 315 |
+
}
|
| 316 |
+
if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
|
| 317 |
+
append ld_library_path ":${gccdir}/${mldir}"
|
| 318 |
+
}
|
| 319 |
+
}
|
| 320 |
+
}
|
| 321 |
+
}
|
| 322 |
+
|
| 323 |
+
# add the library path for libffi.
|
| 324 |
+
append ld_library_path ":${blddirffi}/.libs"
|
| 325 |
+
|
| 326 |
+
verbose "ld_library_path: $ld_library_path"
|
| 327 |
+
|
| 328 |
+
# Point to the Libffi headers in libffi.
|
| 329 |
+
set libffi_include "${blddirffi}/include"
|
| 330 |
+
verbose "libffi_include $libffi_include"
|
| 331 |
+
|
| 332 |
+
set libffi_dir "${blddirffi}/.libs"
|
| 333 |
+
verbose "libffi_dir $libffi_dir"
|
| 334 |
+
if { $libffi_dir != "" } {
|
| 335 |
+
set libffi_dir [file dirname ${libffi_dir}]
|
| 336 |
+
set libffi_link_flags "-L${libffi_dir}/.libs"
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
set_ld_library_path_env_vars
|
| 340 |
+
libffi_maybe_build_wrapper "${objdir}/testglue.o"
|
| 341 |
+
}
|
| 342 |
+
|
| 343 |
+
proc libffi_exit { } {
|
| 344 |
+
global gluefile;
|
| 345 |
+
|
| 346 |
+
if [info exists gluefile] {
|
| 347 |
+
file_on_build delete $gluefile;
|
| 348 |
+
unset gluefile;
|
| 349 |
+
}
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
proc libffi_target_compile { source dest type options } {
|
| 353 |
+
global gluefile wrap_flags;
|
| 354 |
+
global srcdir
|
| 355 |
+
global blddirffi
|
| 356 |
+
global TOOL_OPTIONS
|
| 357 |
+
global libffi_link_flags
|
| 358 |
+
global libffi_include
|
| 359 |
+
global target_triplet
|
| 360 |
+
global compiler_vendor
|
| 361 |
+
|
| 362 |
+
if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
|
| 363 |
+
lappend options "libs=${gluefile}"
|
| 364 |
+
lappend options "ldflags=$wrap_flags"
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
# TOOL_OPTIONS must come first, so that it doesn't override testcase
|
| 368 |
+
# specific options.
|
| 369 |
+
if [info exists TOOL_OPTIONS] {
|
| 370 |
+
lappend options "additional_flags=$TOOL_OPTIONS"
|
| 371 |
+
}
|
| 372 |
+
|
| 373 |
+
# search for ffi_mips.h in srcdir, too
|
| 374 |
+
lappend options "additional_flags=-I${libffi_include} -I${srcdir}/../include -I${libffi_include}/.."
|
| 375 |
+
lappend options "additional_flags=${libffi_link_flags}"
|
| 376 |
+
|
| 377 |
+
# Darwin needs a stack execution allowed flag.
|
| 378 |
+
|
| 379 |
+
if { [istarget "*-*-darwin9*"] || [istarget "*-*-darwin1*"]
|
| 380 |
+
|| [istarget "*-*-darwin2*"] } {
|
| 381 |
+
# lappend options "additional_flags=-Wl,-allow_stack_execute"
|
| 382 |
+
lappend options "additional_flags=-Wno-unused-command-line-argument"
|
| 383 |
+
}
|
| 384 |
+
|
| 385 |
+
# If you're building the compiler with --prefix set to a place
|
| 386 |
+
# where it's not yet installed, then the linker won't be able to
|
| 387 |
+
# find the libgcc used by libffi.dylib. We could pass the
|
| 388 |
+
# -dylib_file option, but that's complicated, and it's much easier
|
| 389 |
+
# to just make the linker find libgcc using -L options.
|
| 390 |
+
if { [string match "*-*-darwin*" $target_triplet] } {
|
| 391 |
+
lappend options "libs= -shared-libgcc"
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
if { [string match "*-*-openbsd*" $target_triplet] } {
|
| 395 |
+
lappend options "libs= -lpthread"
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
lappend options "libs= -lffi"
|
| 399 |
+
|
| 400 |
+
if { ![string match "*android*" $target_triplet] } {
|
| 401 |
+
|
| 402 |
+
if { [string match "aarch64*-*-linux*" $target_triplet] } {
|
| 403 |
+
lappend options "libs= -lpthread"
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
# this may be required for g++, but just confused clang.
|
| 407 |
+
if { [string match "*.cc" $source] } {
|
| 408 |
+
lappend options "c++"
|
| 409 |
+
if { [string match "*-*-darwin*" $target_triplet] } {
|
| 410 |
+
lappend options "libs= -lc++"
|
| 411 |
+
}
|
| 412 |
+
}
|
| 413 |
+
|
| 414 |
+
if { [string match "arc*-*-linux*" $target_triplet] } {
|
| 415 |
+
lappend options "libs= -lpthread"
|
| 416 |
+
}
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
verbose "options: $options"
|
| 420 |
+
return [target_compile $source $dest $type $options]
|
| 421 |
+
}
|
| 422 |
+
|
| 423 |
+
# TEST should be a preprocessor condition. Returns true if it holds.
|
| 424 |
+
proc libffi_feature_test { test } {
|
| 425 |
+
set src "ffitest[pid].c"
|
| 426 |
+
|
| 427 |
+
set f [open $src "w"]
|
| 428 |
+
puts $f "#include <ffi.h>"
|
| 429 |
+
puts $f $test
|
| 430 |
+
puts $f "/* OK */"
|
| 431 |
+
puts $f "#else"
|
| 432 |
+
puts $f "# error Failed $test"
|
| 433 |
+
puts $f "#endif"
|
| 434 |
+
close $f
|
| 435 |
+
|
| 436 |
+
set lines [libffi_target_compile $src /dev/null assembly ""]
|
| 437 |
+
file delete $src
|
| 438 |
+
|
| 439 |
+
return [string match "" $lines]
|
| 440 |
+
}
|
| 441 |
+
|
| 442 |
+
# Utility routines.
|
| 443 |
+
|
| 444 |
+
#
|
| 445 |
+
# search_for -- looks for a string match in a file
|
| 446 |
+
#
|
| 447 |
+
proc search_for { file pattern } {
|
| 448 |
+
set fd [open $file r]
|
| 449 |
+
while { [gets $fd cur_line]>=0 } {
|
| 450 |
+
if [string match "*$pattern*" $cur_line] then {
|
| 451 |
+
close $fd
|
| 452 |
+
return 1
|
| 453 |
+
}
|
| 454 |
+
}
|
| 455 |
+
close $fd
|
| 456 |
+
return 0
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
# Modified dg-runtest that can cycle through a list of optimization options
|
| 460 |
+
# as c-torture does.
|
| 461 |
+
proc libffi-dg-runtest { testcases default-extra-flags } {
|
| 462 |
+
global runtests
|
| 463 |
+
|
| 464 |
+
foreach test $testcases {
|
| 465 |
+
# If we're only testing specific files and this isn't one of
|
| 466 |
+
# them, skip it.
|
| 467 |
+
if ![runtest_file_p $runtests $test] {
|
| 468 |
+
continue
|
| 469 |
+
}
|
| 470 |
+
|
| 471 |
+
# Look for a loop within the source code - if we don't find one,
|
| 472 |
+
# don't pass -funroll[-all]-loops.
|
| 473 |
+
global torture_with_loops torture_without_loops
|
| 474 |
+
if [expr [search_for $test "for*("]+[search_for $test "while*("]] {
|
| 475 |
+
set option_list $torture_with_loops
|
| 476 |
+
} else {
|
| 477 |
+
set option_list $torture_without_loops
|
| 478 |
+
}
|
| 479 |
+
|
| 480 |
+
set nshort [file tail [file dirname $test]]/[file tail $test]
|
| 481 |
+
|
| 482 |
+
foreach flags $option_list {
|
| 483 |
+
verbose "Testing $nshort, $flags" 1
|
| 484 |
+
dg-test $test $flags ${default-extra-flags}
|
| 485 |
+
}
|
| 486 |
+
}
|
| 487 |
+
}
|
| 488 |
+
|
| 489 |
+
proc run-many-tests { testcases extra_flags } {
|
| 490 |
+
global compiler_vendor
|
| 491 |
+
global has_gccbug
|
| 492 |
+
global env
|
| 493 |
+
switch $compiler_vendor {
|
| 494 |
+
"clang" {
|
| 495 |
+
set common "-W -Wall"
|
| 496 |
+
if [info exists env(LIBFFI_TEST_OPTIMIZATION)] {
|
| 497 |
+
set optimizations [ list $env(LIBFFI_TEST_OPTIMIZATION) ]
|
| 498 |
+
} else {
|
| 499 |
+
set optimizations { "-O0" "-O2" }
|
| 500 |
+
}
|
| 501 |
+
}
|
| 502 |
+
"gnu" {
|
| 503 |
+
set common "-W -Wall -Wno-psabi"
|
| 504 |
+
if [info exists env(LIBFFI_TEST_OPTIMIZATION)] {
|
| 505 |
+
set optimizations [ list $env(LIBFFI_TEST_OPTIMIZATION) ]
|
| 506 |
+
} else {
|
| 507 |
+
set optimizations { "-O0" "-O2" }
|
| 508 |
+
}
|
| 509 |
+
}
|
| 510 |
+
default {
|
| 511 |
+
# Assume we are using the vendor compiler.
|
| 512 |
+
set common ""
|
| 513 |
+
if [info exists env(LIBFFI_TEST_OPTIMIZATION)] {
|
| 514 |
+
set optimizations [ list $env(LIBFFI_TEST_OPTIMIZATION) ]
|
| 515 |
+
} else {
|
| 516 |
+
set optimizations { "" }
|
| 517 |
+
}
|
| 518 |
+
}
|
| 519 |
+
}
|
| 520 |
+
|
| 521 |
+
info exists env(LD_LIBRARY_PATH)
|
| 522 |
+
|
| 523 |
+
set targetabis { "" }
|
| 524 |
+
if [string match $compiler_vendor "gnu"] {
|
| 525 |
+
if [libffi_feature_test "#ifdef __i386__"] {
|
| 526 |
+
set targetabis {
|
| 527 |
+
""
|
| 528 |
+
"-DABI_NUM=FFI_STDCALL -DABI_ATTR=__STDCALL__"
|
| 529 |
+
"-DABI_NUM=FFI_THISCALL -DABI_ATTR=__THISCALL__"
|
| 530 |
+
"-DABI_NUM=FFI_FASTCALL -DABI_ATTR=__FASTCALL__"
|
| 531 |
+
}
|
| 532 |
+
} elseif { [istarget "x86_64-*-*"] \
|
| 533 |
+
&& [libffi_feature_test "#if !defined __ILP32__ \
|
| 534 |
+
&& !defined __i386__"] } {
|
| 535 |
+
set targetabis {
|
| 536 |
+
""
|
| 537 |
+
"-DABI_NUM=FFI_GNUW64 -DABI_ATTR=__MSABI__"
|
| 538 |
+
}
|
| 539 |
+
}
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
+
set common [ concat $common $extra_flags ]
|
| 543 |
+
foreach test $testcases {
|
| 544 |
+
set testname [file tail $test]
|
| 545 |
+
if [search_for $test "ABI_NUM"] {
|
| 546 |
+
set abis $targetabis
|
| 547 |
+
} else {
|
| 548 |
+
set abis { "" }
|
| 549 |
+
}
|
| 550 |
+
foreach opt $optimizations {
|
| 551 |
+
foreach abi $abis {
|
| 552 |
+
set options [concat $common $opt $abi]
|
| 553 |
+
set has_gccbug false;
|
| 554 |
+
if { [string match $compiler_vendor "gnu"] \
|
| 555 |
+
&& [string match "*MSABI*" $abi] \
|
| 556 |
+
&& ( ( [string match "*DGTEST=57 *" $common] \
|
| 557 |
+
&& [string match "*call.c*" $testname] ) \
|
| 558 |
+
|| ( [string match "*DGTEST=54 *" $common] \
|
| 559 |
+
&& [string match "*callback*" $testname] ) \
|
| 560 |
+
|| [string match "*DGTEST=55 *" $common] \
|
| 561 |
+
|| [string match "*DGTEST=56 *" $common] ) } then {
|
| 562 |
+
if [libffi_feature_test "#if (__GNUC__ < 9) || ((__GNUC__ == 9) && (__GNUC_MINOR__ < 3))"] {
|
| 563 |
+
set has_gccbug true;
|
| 564 |
+
}
|
| 565 |
+
}
|
| 566 |
+
verbose "Testing $testname, $options" 1
|
| 567 |
+
verbose "has_gccbug = $has_gccbug" 1
|
| 568 |
+
dg-test $test $options ""
|
| 569 |
+
}
|
| 570 |
+
}
|
| 571 |
+
}
|
| 572 |
+
}
|
| 573 |
+
|
| 574 |
+
# Like check_conditional_xfail, but callable from a dg test.
|
| 575 |
+
|
| 576 |
+
proc dg-xfail-if { args } {
|
| 577 |
+
set args [lreplace $args 0 0]
|
| 578 |
+
set selector "target [join [lindex $args 1]]"
|
| 579 |
+
if { [dg-process-target $selector] == "S" } {
|
| 580 |
+
global compiler_conditional_xfail_data
|
| 581 |
+
set compiler_conditional_xfail_data $args
|
| 582 |
+
}
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
proc check-flags { args } {
|
| 586 |
+
|
| 587 |
+
# The args are within another list; pull them out.
|
| 588 |
+
set args [lindex $args 0]
|
| 589 |
+
|
| 590 |
+
# The next two arguments are optional. If they were not specified,
|
| 591 |
+
# use the defaults.
|
| 592 |
+
if { [llength $args] == 2 } {
|
| 593 |
+
lappend $args [list "*"]
|
| 594 |
+
}
|
| 595 |
+
if { [llength $args] == 3 } {
|
| 596 |
+
lappend $args [list ""]
|
| 597 |
+
}
|
| 598 |
+
|
| 599 |
+
# If the option strings are the defaults, or the same as the
|
| 600 |
+
# defaults, there is no need to call check_conditional_xfail to
|
| 601 |
+
# compare them to the actual options.
|
| 602 |
+
if { [string compare [lindex $args 2] "*"] == 0
|
| 603 |
+
&& [string compare [lindex $args 3] "" ] == 0 } {
|
| 604 |
+
set result 1
|
| 605 |
+
} else {
|
| 606 |
+
# The target list might be an effective-target keyword, so replace
|
| 607 |
+
# the original list with "*-*-*", since we already know it matches.
|
| 608 |
+
set result [check_conditional_xfail [lreplace $args 1 1 "*-*-*"]]
|
| 609 |
+
}
|
| 610 |
+
|
| 611 |
+
return $result
|
| 612 |
+
}
|
| 613 |
+
|
| 614 |
+
proc dg-skip-if { args } {
|
| 615 |
+
# Verify the number of arguments. The last two are optional.
|
| 616 |
+
set args [lreplace $args 0 0]
|
| 617 |
+
if { [llength $args] < 2 || [llength $args] > 4 } {
|
| 618 |
+
error "dg-skip-if 2: need 2, 3, or 4 arguments"
|
| 619 |
+
}
|
| 620 |
+
|
| 621 |
+
# Don't bother if we're already skipping the test.
|
| 622 |
+
upvar dg-do-what dg-do-what
|
| 623 |
+
if { [lindex ${dg-do-what} 1] == "N" } {
|
| 624 |
+
return
|
| 625 |
+
}
|
| 626 |
+
|
| 627 |
+
set selector [list target [lindex $args 1]]
|
| 628 |
+
if { [dg-process-target $selector] == "S" } {
|
| 629 |
+
if [check-flags $args] {
|
| 630 |
+
upvar dg-do-what dg-do-what
|
| 631 |
+
set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
|
| 632 |
+
}
|
| 633 |
+
}
|
| 634 |
+
}
|
| 635 |
+
|
| 636 |
+
# We need to make sure that additional_files and additional_sources
|
| 637 |
+
# are both cleared out after every test. It is not enough to clear
|
| 638 |
+
# them out *before* the next test run because gcc-target-compile gets
|
| 639 |
+
# run directly from some .exp files (outside of any test). (Those
|
| 640 |
+
# uses should eventually be eliminated.)
|
| 641 |
+
|
| 642 |
+
# Because the DG framework doesn't provide a hook that is run at the
|
| 643 |
+
# end of a test, we must replace dg-test with a wrapper.
|
| 644 |
+
|
| 645 |
+
if { [info procs saved-dg-test] == [list] } {
|
| 646 |
+
rename dg-test saved-dg-test
|
| 647 |
+
|
| 648 |
+
proc dg-test { args } {
|
| 649 |
+
global additional_files
|
| 650 |
+
global additional_sources
|
| 651 |
+
global errorInfo
|
| 652 |
+
|
| 653 |
+
if { [ catch { eval saved-dg-test $args } errmsg ] } {
|
| 654 |
+
set saved_info $errorInfo
|
| 655 |
+
set additional_files ""
|
| 656 |
+
set additional_sources ""
|
| 657 |
+
error $errmsg $saved_info
|
| 658 |
+
}
|
| 659 |
+
set additional_files ""
|
| 660 |
+
set additional_sources ""
|
| 661 |
+
}
|
| 662 |
+
}
|
| 663 |
+
|
| 664 |
+
# Local Variables:
|
| 665 |
+
# tcl-indent-level:4
|
| 666 |
+
# End:
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/lib/target-libpath.exp
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
|
| 2 |
+
|
| 3 |
+
# This program is free software; you can redistribute it and/or modify
|
| 4 |
+
# it under the terms of the GNU General Public License as published by
|
| 5 |
+
# the Free Software Foundation; either version 3 of the License, or
|
| 6 |
+
# (at your option) any later version.
|
| 7 |
+
#
|
| 8 |
+
# This program is distributed in the hope that it will be useful,
|
| 9 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 10 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 11 |
+
# GNU General Public License for more details.
|
| 12 |
+
#
|
| 13 |
+
# You should have received a copy of the GNU General Public License
|
| 14 |
+
# along with GCC; see the file COPYING3. If not see
|
| 15 |
+
# <http://www.gnu.org/licenses/>.
|
| 16 |
+
|
| 17 |
+
# This file was contributed by John David Anglin (dave.anglin@nrc-cnrc.gc.ca)
|
| 18 |
+
|
| 19 |
+
set orig_environment_saved 0
|
| 20 |
+
set orig_ld_library_path_saved 0
|
| 21 |
+
set orig_ld_run_path_saved 0
|
| 22 |
+
set orig_shlib_path_saved 0
|
| 23 |
+
set orig_ld_libraryn32_path_saved 0
|
| 24 |
+
set orig_ld_library64_path_saved 0
|
| 25 |
+
set orig_ld_library_path_32_saved 0
|
| 26 |
+
set orig_ld_library_path_64_saved 0
|
| 27 |
+
set orig_dyld_library_path_saved 0
|
| 28 |
+
set orig_path_saved 0
|
| 29 |
+
|
| 30 |
+
#######################################
|
| 31 |
+
# proc set_ld_library_path_env_vars { }
|
| 32 |
+
#######################################
|
| 33 |
+
|
| 34 |
+
proc set_ld_library_path_env_vars { } {
|
| 35 |
+
global ld_library_path
|
| 36 |
+
global orig_environment_saved
|
| 37 |
+
global orig_ld_library_path_saved
|
| 38 |
+
global orig_ld_run_path_saved
|
| 39 |
+
global orig_shlib_path_saved
|
| 40 |
+
global orig_ld_libraryn32_path_saved
|
| 41 |
+
global orig_ld_library64_path_saved
|
| 42 |
+
global orig_ld_library_path_32_saved
|
| 43 |
+
global orig_ld_library_path_64_saved
|
| 44 |
+
global orig_dyld_library_path_saved
|
| 45 |
+
global orig_path_saved
|
| 46 |
+
global orig_ld_library_path
|
| 47 |
+
global orig_ld_run_path
|
| 48 |
+
global orig_shlib_path
|
| 49 |
+
global orig_ld_libraryn32_path
|
| 50 |
+
global orig_ld_library64_path
|
| 51 |
+
global orig_ld_library_path_32
|
| 52 |
+
global orig_ld_library_path_64
|
| 53 |
+
global orig_dyld_library_path
|
| 54 |
+
global orig_path
|
| 55 |
+
global GCC_EXEC_PREFIX
|
| 56 |
+
|
| 57 |
+
# Set the relocated compiler prefix, but only if the user hasn't specified one.
|
| 58 |
+
if { [info exists GCC_EXEC_PREFIX] && ![info exists env(GCC_EXEC_PREFIX)] } {
|
| 59 |
+
setenv GCC_EXEC_PREFIX "$GCC_EXEC_PREFIX"
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
# Setting the ld library path causes trouble when testing cross-compilers.
|
| 63 |
+
if { [is_remote target] } {
|
| 64 |
+
return
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
if { $orig_environment_saved == 0 } {
|
| 68 |
+
global env
|
| 69 |
+
|
| 70 |
+
set orig_environment_saved 1
|
| 71 |
+
|
| 72 |
+
# Save the original environment.
|
| 73 |
+
if [info exists env(LD_LIBRARY_PATH)] {
|
| 74 |
+
set orig_ld_library_path "$env(LD_LIBRARY_PATH)"
|
| 75 |
+
set orig_ld_library_path_saved 1
|
| 76 |
+
}
|
| 77 |
+
if [info exists env(LD_RUN_PATH)] {
|
| 78 |
+
set orig_ld_run_path "$env(LD_RUN_PATH)"
|
| 79 |
+
set orig_ld_run_path_saved 1
|
| 80 |
+
}
|
| 81 |
+
if [info exists env(SHLIB_PATH)] {
|
| 82 |
+
set orig_shlib_path "$env(SHLIB_PATH)"
|
| 83 |
+
set orig_shlib_path_saved 1
|
| 84 |
+
}
|
| 85 |
+
if [info exists env(LD_LIBRARYN32_PATH)] {
|
| 86 |
+
set orig_ld_libraryn32_path "$env(LD_LIBRARYN32_PATH)"
|
| 87 |
+
set orig_ld_libraryn32_path_saved 1
|
| 88 |
+
}
|
| 89 |
+
if [info exists env(LD_LIBRARY64_PATH)] {
|
| 90 |
+
set orig_ld_library64_path "$env(LD_LIBRARY64_PATH)"
|
| 91 |
+
set orig_ld_library64_path_saved 1
|
| 92 |
+
}
|
| 93 |
+
if [info exists env(LD_LIBRARY_PATH_32)] {
|
| 94 |
+
set orig_ld_library_path_32 "$env(LD_LIBRARY_PATH_32)"
|
| 95 |
+
set orig_ld_library_path_32_saved 1
|
| 96 |
+
}
|
| 97 |
+
if [info exists env(LD_LIBRARY_PATH_64)] {
|
| 98 |
+
set orig_ld_library_path_64 "$env(LD_LIBRARY_PATH_64)"
|
| 99 |
+
set orig_ld_library_path_64_saved 1
|
| 100 |
+
}
|
| 101 |
+
if [info exists env(DYLD_LIBRARY_PATH)] {
|
| 102 |
+
set orig_dyld_library_path "$env(DYLD_LIBRARY_PATH)"
|
| 103 |
+
set orig_dyld_library_path_saved 1
|
| 104 |
+
}
|
| 105 |
+
if [info exists env(PATH)] {
|
| 106 |
+
set orig_path "$env(PATH)"
|
| 107 |
+
set orig_path_saved 1
|
| 108 |
+
}
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
# We need to set ld library path in the environment. Currently,
|
| 112 |
+
# unix.exp doesn't set the environment correctly for all systems.
|
| 113 |
+
# It only sets SHLIB_PATH and LD_LIBRARY_PATH when it executes a
|
| 114 |
+
# program. We also need the environment set for compilations, etc.
|
| 115 |
+
#
|
| 116 |
+
# On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
|
| 117 |
+
# called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
|
| 118 |
+
# (for the 64-bit ABI). The same applies to Darwin (DYLD_LIBRARY_PATH),
|
| 119 |
+
# Solaris 32 bit (LD_LIBRARY_PATH_32), Solaris 64 bit (LD_LIBRARY_PATH_64),
|
| 120 |
+
# and HP-UX (SHLIB_PATH). In some cases, the variables are independent
|
| 121 |
+
# of LD_LIBRARY_PATH, and in other cases LD_LIBRARY_PATH is used if the
|
| 122 |
+
# variable is not defined.
|
| 123 |
+
#
|
| 124 |
+
# Doing this is somewhat of a hack as ld_library_path gets repeated in
|
| 125 |
+
# SHLIB_PATH and LD_LIBRARY_PATH when unix_load sets these variables.
|
| 126 |
+
if { $orig_ld_library_path_saved } {
|
| 127 |
+
setenv LD_LIBRARY_PATH "$ld_library_path:$orig_ld_library_path"
|
| 128 |
+
} else {
|
| 129 |
+
setenv LD_LIBRARY_PATH "$ld_library_path"
|
| 130 |
+
}
|
| 131 |
+
if { $orig_ld_run_path_saved } {
|
| 132 |
+
setenv LD_RUN_PATH "$ld_library_path:$orig_ld_run_path"
|
| 133 |
+
} else {
|
| 134 |
+
setenv LD_RUN_PATH "$ld_library_path"
|
| 135 |
+
}
|
| 136 |
+
# The default shared library dynamic path search for 64-bit
|
| 137 |
+
# HP-UX executables searches LD_LIBRARY_PATH before SHLIB_PATH.
|
| 138 |
+
# LD_LIBRARY_PATH isn't used for 32-bit executables. Thus, we
|
| 139 |
+
# set LD_LIBRARY_PATH and SHLIB_PATH as if they were independent.
|
| 140 |
+
if { $orig_shlib_path_saved } {
|
| 141 |
+
setenv SHLIB_PATH "$ld_library_path:$orig_shlib_path"
|
| 142 |
+
} else {
|
| 143 |
+
setenv SHLIB_PATH "$ld_library_path"
|
| 144 |
+
}
|
| 145 |
+
if { $orig_ld_libraryn32_path_saved } {
|
| 146 |
+
setenv LD_LIBRARYN32_PATH "$ld_library_path:$orig_ld_libraryn32_path"
|
| 147 |
+
} elseif { $orig_ld_library_path_saved } {
|
| 148 |
+
setenv LD_LIBRARYN32_PATH "$ld_library_path:$orig_ld_library_path"
|
| 149 |
+
} else {
|
| 150 |
+
setenv LD_LIBRARYN32_PATH "$ld_library_path"
|
| 151 |
+
}
|
| 152 |
+
if { $orig_ld_library64_path_saved } {
|
| 153 |
+
setenv LD_LIBRARY64_PATH "$ld_library_path:$orig_ld_library64_path"
|
| 154 |
+
} elseif { $orig_ld_library_path_saved } {
|
| 155 |
+
setenv LD_LIBRARY64_PATH "$ld_library_path:$orig_ld_library_path"
|
| 156 |
+
} else {
|
| 157 |
+
setenv LD_LIBRARY64_PATH "$ld_library_path"
|
| 158 |
+
}
|
| 159 |
+
if { $orig_ld_library_path_32_saved } {
|
| 160 |
+
setenv LD_LIBRARY_PATH_32 "$ld_library_path:$orig_ld_library_path_32"
|
| 161 |
+
} elseif { $orig_ld_library_path_saved } {
|
| 162 |
+
setenv LD_LIBRARY_PATH_32 "$ld_library_path:$orig_ld_library_path"
|
| 163 |
+
} else {
|
| 164 |
+
setenv LD_LIBRARY_PATH_32 "$ld_library_path"
|
| 165 |
+
}
|
| 166 |
+
if { $orig_ld_library_path_64_saved } {
|
| 167 |
+
setenv LD_LIBRARY_PATH_64 "$ld_library_path:$orig_ld_library_path_64"
|
| 168 |
+
} elseif { $orig_ld_library_path_saved } {
|
| 169 |
+
setenv LD_LIBRARY_PATH_64 "$ld_library_path:$orig_ld_library_path"
|
| 170 |
+
} else {
|
| 171 |
+
setenv LD_LIBRARY_PATH_64 "$ld_library_path"
|
| 172 |
+
}
|
| 173 |
+
if { $orig_dyld_library_path_saved } {
|
| 174 |
+
setenv DYLD_LIBRARY_PATH "$ld_library_path:$orig_dyld_library_path"
|
| 175 |
+
} else {
|
| 176 |
+
setenv DYLD_LIBRARY_PATH "$ld_library_path"
|
| 177 |
+
}
|
| 178 |
+
if { [istarget *-*-cygwin*] || [ istarget *-*-msys* ] || [istarget *-*-mingw*] } {
|
| 179 |
+
if { $orig_path_saved } {
|
| 180 |
+
setenv PATH "$ld_library_path:$orig_path"
|
| 181 |
+
} else {
|
| 182 |
+
setenv PATH "$ld_library_path"
|
| 183 |
+
}
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
verbose -log "set_ld_library_path_env_vars: ld_library_path=$ld_library_path"
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
#######################################
|
| 190 |
+
# proc restore_ld_library_path_env_vars { }
|
| 191 |
+
#######################################
|
| 192 |
+
|
| 193 |
+
proc restore_ld_library_path_env_vars { } {
|
| 194 |
+
global orig_environment_saved
|
| 195 |
+
global orig_ld_library_path_saved
|
| 196 |
+
global orig_ld_run_path_saved
|
| 197 |
+
global orig_shlib_path_saved
|
| 198 |
+
global orig_ld_libraryn32_path_saved
|
| 199 |
+
global orig_ld_library64_path_saved
|
| 200 |
+
global orig_ld_library_path_32_saved
|
| 201 |
+
global orig_ld_library_path_64_saved
|
| 202 |
+
global orig_dyld_library_path_saved
|
| 203 |
+
global orig_path_saved
|
| 204 |
+
global orig_ld_library_path
|
| 205 |
+
global orig_ld_run_path
|
| 206 |
+
global orig_shlib_path
|
| 207 |
+
global orig_ld_libraryn32_path
|
| 208 |
+
global orig_ld_library64_path
|
| 209 |
+
global orig_ld_library_path_32
|
| 210 |
+
global orig_ld_library_path_64
|
| 211 |
+
global orig_dyld_library_path
|
| 212 |
+
global orig_path
|
| 213 |
+
|
| 214 |
+
if { $orig_environment_saved == 0 } {
|
| 215 |
+
return
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
if { $orig_ld_library_path_saved } {
|
| 219 |
+
setenv LD_LIBRARY_PATH "$orig_ld_library_path"
|
| 220 |
+
} elseif [info exists env(LD_LIBRARY_PATH)] {
|
| 221 |
+
unsetenv LD_LIBRARY_PATH
|
| 222 |
+
}
|
| 223 |
+
if { $orig_ld_run_path_saved } {
|
| 224 |
+
setenv LD_RUN_PATH "$orig_ld_run_path"
|
| 225 |
+
} elseif [info exists env(LD_RUN_PATH)] {
|
| 226 |
+
unsetenv LD_RUN_PATH
|
| 227 |
+
}
|
| 228 |
+
if { $orig_shlib_path_saved } {
|
| 229 |
+
setenv SHLIB_PATH "$orig_shlib_path"
|
| 230 |
+
} elseif [info exists env(SHLIB_PATH)] {
|
| 231 |
+
unsetenv SHLIB_PATH
|
| 232 |
+
}
|
| 233 |
+
if { $orig_ld_libraryn32_path_saved } {
|
| 234 |
+
setenv LD_LIBRARYN32_PATH "$orig_ld_libraryn32_path"
|
| 235 |
+
} elseif [info exists env(LD_LIBRARYN32_PATH)] {
|
| 236 |
+
unsetenv LD_LIBRARYN32_PATH
|
| 237 |
+
}
|
| 238 |
+
if { $orig_ld_library64_path_saved } {
|
| 239 |
+
setenv LD_LIBRARY64_PATH "$orig_ld_library64_path"
|
| 240 |
+
} elseif [info exists env(LD_LIBRARY64_PATH)] {
|
| 241 |
+
unsetenv LD_LIBRARY64_PATH
|
| 242 |
+
}
|
| 243 |
+
if { $orig_ld_library_path_32_saved } {
|
| 244 |
+
setenv LD_LIBRARY_PATH_32 "$orig_ld_library_path_32"
|
| 245 |
+
} elseif [info exists env(LD_LIBRARY_PATH_32)] {
|
| 246 |
+
unsetenv LD_LIBRARY_PATH_32
|
| 247 |
+
}
|
| 248 |
+
if { $orig_ld_library_path_64_saved } {
|
| 249 |
+
setenv LD_LIBRARY_PATH_64 "$orig_ld_library_path_64"
|
| 250 |
+
} elseif [info exists env(LD_LIBRARY_PATH_64)] {
|
| 251 |
+
unsetenv LD_LIBRARY_PATH_64
|
| 252 |
+
}
|
| 253 |
+
if { $orig_dyld_library_path_saved } {
|
| 254 |
+
setenv DYLD_LIBRARY_PATH "$orig_dyld_library_path"
|
| 255 |
+
} elseif [info exists env(DYLD_LIBRARY_PATH)] {
|
| 256 |
+
unsetenv DYLD_LIBRARY_PATH
|
| 257 |
+
}
|
| 258 |
+
if { $orig_path_saved } {
|
| 259 |
+
setenv PATH "$orig_path"
|
| 260 |
+
} elseif [info exists env(PATH)] {
|
| 261 |
+
unsetenv PATH
|
| 262 |
+
}
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
#######################################
|
| 266 |
+
# proc get_shlib_extension { }
|
| 267 |
+
#######################################
|
| 268 |
+
|
| 269 |
+
proc get_shlib_extension { } {
|
| 270 |
+
global shlib_ext
|
| 271 |
+
|
| 272 |
+
if { [ istarget *-*-darwin* ] } {
|
| 273 |
+
set shlib_ext "dylib"
|
| 274 |
+
} elseif { [ istarget *-*-cygwin* ] || [ istarget *-*-msys* ] || [ istarget *-*-mingw* ] } {
|
| 275 |
+
set shlib_ext "dll"
|
| 276 |
+
} elseif { [ istarget hppa*-*-hpux* ] } {
|
| 277 |
+
set shlib_ext "sl"
|
| 278 |
+
} else {
|
| 279 |
+
set shlib_ext "so"
|
| 280 |
+
}
|
| 281 |
+
return $shlib_ext
|
| 282 |
+
}
|
| 283 |
+
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/lib/wrapper.exp
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
|
| 2 |
+
|
| 3 |
+
# This program is free software; you can redistribute it and/or modify
|
| 4 |
+
# it under the terms of the GNU General Public License as published by
|
| 5 |
+
# the Free Software Foundation; either version 3 of the License, or
|
| 6 |
+
# (at your option) any later version.
|
| 7 |
+
#
|
| 8 |
+
# This program is distributed in the hope that it will be useful,
|
| 9 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 10 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 11 |
+
# GNU General Public License for more details.
|
| 12 |
+
#
|
| 13 |
+
# You should have received a copy of the GNU General Public License
|
| 14 |
+
# along with GCC; see the file COPYING3. If not see
|
| 15 |
+
# <http://www.gnu.org/licenses/>.
|
| 16 |
+
|
| 17 |
+
# This file contains GCC-specifics for status wrappers for test programs.
|
| 18 |
+
|
| 19 |
+
# ${tool}_maybe_build_wrapper -- Build wrapper object if the target
|
| 20 |
+
# needs it. FILENAME is the path to the wrapper file. If there are
|
| 21 |
+
# additional arguments, they are command-line options to provide to
|
| 22 |
+
# the compiler when compiling FILENAME.
|
| 23 |
+
|
| 24 |
+
proc ${tool}_maybe_build_wrapper { filename args } {
|
| 25 |
+
global gluefile wrap_flags
|
| 26 |
+
|
| 27 |
+
if { [target_info needs_status_wrapper] != "" \
|
| 28 |
+
&& [target_info needs_status_wrapper] != "0" \
|
| 29 |
+
&& ![info exists gluefile] } {
|
| 30 |
+
set saved_wrap_compile_flags [target_info wrap_compile_flags]
|
| 31 |
+
set flags [join $args " "]
|
| 32 |
+
# The wrapper code may contain code that gcc objects on. This
|
| 33 |
+
# became true for dejagnu-1.4.4. The set of warnings and code
|
| 34 |
+
# that gcc objects on may change, so just make sure -w is always
|
| 35 |
+
# passed to turn off all warnings.
|
| 36 |
+
set_currtarget_info wrap_compile_flags \
|
| 37 |
+
"$saved_wrap_compile_flags -w $flags"
|
| 38 |
+
set result [build_wrapper $filename]
|
| 39 |
+
set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags"
|
| 40 |
+
if { $result != "" } {
|
| 41 |
+
set gluefile [lindex $result 0]
|
| 42 |
+
set wrap_flags [lindex $result 1]
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/Makefile
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CC = gcc
|
| 2 |
+
CFLAGS = -O2 -Wall
|
| 3 |
+
prefix =
|
| 4 |
+
includedir = $(prefix)/include
|
| 5 |
+
libdir = $(prefix)/lib
|
| 6 |
+
CPPFLAGS = -I$(includedir)
|
| 7 |
+
LDFLAGS = -L$(libdir) -Wl,-rpath,$(libdir)
|
| 8 |
+
|
| 9 |
+
all: check-call check-callback
|
| 10 |
+
|
| 11 |
+
test-call: test-call.c testcases.c
|
| 12 |
+
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o test-call test-call.c -lffi
|
| 13 |
+
|
| 14 |
+
test-callback: test-callback.c testcases.c
|
| 15 |
+
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o test-callback test-callback.c -lffi
|
| 16 |
+
|
| 17 |
+
check-call: test-call
|
| 18 |
+
./test-call > test-call.out
|
| 19 |
+
LC_ALL=C uniq -u < test-call.out > failed-call
|
| 20 |
+
test '!' -s failed-call
|
| 21 |
+
|
| 22 |
+
check-callback: test-callback
|
| 23 |
+
./test-callback > test-callback.out
|
| 24 |
+
LC_ALL=C uniq -u < test-callback.out > failed-callback
|
| 25 |
+
test '!' -s failed-callback
|
| 26 |
+
|
| 27 |
+
clean:
|
| 28 |
+
rm -f test-call test-callback test-call.out test-callback.out failed-call failed-callback
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/README
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This package contains a test suite for libffi.
|
| 2 |
+
|
| 3 |
+
This test suite can be compiled with a C compiler. No need for 'expect'
|
| 4 |
+
or some other package that is often not installed.
|
| 5 |
+
|
| 6 |
+
The test suite consists of 81 C functions, each with a different signature.
|
| 7 |
+
* test-call verifies that calling each function directly produces the same
|
| 8 |
+
results as calling the function indirectly through 'ffi_call'.
|
| 9 |
+
* test-callback verifies that calling each function directly produces the same
|
| 10 |
+
results as calling a function that is a callback (object build by
|
| 11 |
+
'ffi_prep_closure_loc') and simulates the original function.
|
| 12 |
+
|
| 13 |
+
Each direct or indirect invocation should produce one line of output to
|
| 14 |
+
stdout. A correct output consists of paired lines, such as
|
| 15 |
+
|
| 16 |
+
void f(void):
|
| 17 |
+
void f(void):
|
| 18 |
+
int f(void):->99
|
| 19 |
+
int f(void):->99
|
| 20 |
+
int f(int):(1)->2
|
| 21 |
+
int f(int):(1)->2
|
| 22 |
+
int f(2*int):(1,2)->3
|
| 23 |
+
int f(2*int):(1,2)->3
|
| 24 |
+
...
|
| 25 |
+
|
| 26 |
+
The Makefile then creates two files:
|
| 27 |
+
* failed-call, which consists of the non-paired lines of output of
|
| 28 |
+
'test-call',
|
| 29 |
+
* failed-callback, which consists of the non-paired lines of output of
|
| 30 |
+
'test-callback'.
|
| 31 |
+
|
| 32 |
+
The test suite passes if both failed-call and failed-callback come out
|
| 33 |
+
as empty.
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
How to use the test suite
|
| 37 |
+
-------------------------
|
| 38 |
+
|
| 39 |
+
1. Modify the Makefile's variables
|
| 40 |
+
prefix = the directory in which libffi was installed
|
| 41 |
+
CC = the C compiler, often with options such as "-m32" or "-m64"
|
| 42 |
+
that enforce a certain ABI,
|
| 43 |
+
CFLAGS = optimization options (need to change them only for non-GCC
|
| 44 |
+
compilers)
|
| 45 |
+
2. Run "make". If it fails already in "test-call", run also
|
| 46 |
+
"make check-callback".
|
| 47 |
+
3. If this failed, inspect the output files.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
How to interpret the results
|
| 51 |
+
----------------------------
|
| 52 |
+
|
| 53 |
+
The failed-call and failed-callback files consist of paired lines:
|
| 54 |
+
The first line is the result of the direct invocation.
|
| 55 |
+
The second line is the result of invocation through libffi.
|
| 56 |
+
|
| 57 |
+
For example, this output
|
| 58 |
+
|
| 59 |
+
uchar f(uchar,ushort,uint,ulong):(97,2,3,4)->255
|
| 60 |
+
uchar f(uchar,ushort,uint,ulong):(97,2,3,4)->0
|
| 61 |
+
|
| 62 |
+
indicates that the arguments were passed correctly, but the return
|
| 63 |
+
value came out wrong.
|
| 64 |
+
|
| 65 |
+
And this output
|
| 66 |
+
|
| 67 |
+
float f(17*float,3*int,L):(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,6,7,8,561,1105,1729,2465,2821,6601)->15319.1
|
| 68 |
+
float f(17*float,3*int,L):(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,-140443648,10,268042216,-72537980,-140443648,-140443648,-140443648,-140443648,-140443648)->-6.47158e+08
|
| 69 |
+
|
| 70 |
+
indicates that integer arguments that come after 17 floating-point arguments
|
| 71 |
+
were not passed correctly.
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
Credits
|
| 75 |
+
-------
|
| 76 |
+
|
| 77 |
+
The test suite is based on the one of GNU libffcall-2.0.
|
| 78 |
+
Authors: Bill Triggs, Bruno Haible
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/alignof.h
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Determine alignment of types.
|
| 2 |
+
Copyright (C) 2003-2004, 2006, 2009-2017 Free Software Foundation, Inc.
|
| 3 |
+
|
| 4 |
+
This program is free software; you can redistribute it and/or modify
|
| 5 |
+
it under the terms of the GNU General Public License as published by
|
| 6 |
+
the Free Software Foundation; either version 2, or (at your option)
|
| 7 |
+
any later version.
|
| 8 |
+
|
| 9 |
+
This program is distributed in the hope that it will be useful,
|
| 10 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 11 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 12 |
+
GNU General Public License for more details.
|
| 13 |
+
|
| 14 |
+
You should have received a copy of the GNU General Public License
|
| 15 |
+
along with this program; if not, see <https://www.gnu.org/licenses/>. */
|
| 16 |
+
|
| 17 |
+
#ifndef _ALIGNOF_H
|
| 18 |
+
#define _ALIGNOF_H
|
| 19 |
+
|
| 20 |
+
#include <stddef.h>
|
| 21 |
+
|
| 22 |
+
/* alignof_slot (TYPE)
|
| 23 |
+
Determine the alignment of a structure slot (field) of a given type,
|
| 24 |
+
at compile time. Note that the result depends on the ABI.
|
| 25 |
+
This is the same as alignof (TYPE) and _Alignof (TYPE), defined in
|
| 26 |
+
<stdalign.h> if __alignof_is_defined is 1.
|
| 27 |
+
Note: The result cannot be used as a value for an 'enum' constant,
|
| 28 |
+
due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */
|
| 29 |
+
#if defined __cplusplus
|
| 30 |
+
template <class type> struct alignof_helper { char __slot1; type __slot2; };
|
| 31 |
+
# define alignof_slot(type) offsetof (alignof_helper<type>, __slot2)
|
| 32 |
+
#else
|
| 33 |
+
# define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
|
| 34 |
+
#endif
|
| 35 |
+
|
| 36 |
+
/* alignof_type (TYPE)
|
| 37 |
+
Determine the good alignment of an object of the given type at compile time.
|
| 38 |
+
Note that this is not necessarily the same as alignof_slot(type).
|
| 39 |
+
For example, with GNU C on x86 platforms: alignof_type(double) = 8, but
|
| 40 |
+
- when -malign-double is not specified: alignof_slot(double) = 4,
|
| 41 |
+
- when -malign-double is specified: alignof_slot(double) = 8.
|
| 42 |
+
Note: The result cannot be used as a value for an 'enum' constant,
|
| 43 |
+
due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */
|
| 44 |
+
#if defined __GNUC__ || defined __IBM__ALIGNOF__
|
| 45 |
+
# define alignof_type __alignof__
|
| 46 |
+
#else
|
| 47 |
+
# define alignof_type alignof_slot
|
| 48 |
+
#endif
|
| 49 |
+
|
| 50 |
+
#endif /* _ALIGNOF_H */
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/bhaible.exp
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2003, 2006, 2009, 2010, 2014, 2018 Free Software Foundation, Inc.
|
| 2 |
+
|
| 3 |
+
# This program is free software; you can redistribute it and/or modify
|
| 4 |
+
# it under the terms of the GNU General Public License as published by
|
| 5 |
+
# the Free Software Foundation; either version 3 of the License, or
|
| 6 |
+
# (at your option) any later version.
|
| 7 |
+
#
|
| 8 |
+
# This program is distributed in the hope that it will be useful,
|
| 9 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 10 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 11 |
+
# GNU General Public License for more details.
|
| 12 |
+
#
|
| 13 |
+
# You should have received a copy of the GNU General Public License
|
| 14 |
+
# along with this program; see the file COPYING3. If not see
|
| 15 |
+
# <http://www.gnu.org/licenses/>.
|
| 16 |
+
|
| 17 |
+
dg-init
|
| 18 |
+
libffi-init
|
| 19 |
+
|
| 20 |
+
global srcdir subdir
|
| 21 |
+
global compiler_vendor
|
| 22 |
+
|
| 23 |
+
# The conversion of this testsuite into a dejagnu compatible testsuite
|
| 24 |
+
# was done in a pretty lazy fashion, and requires the use of compiler
|
| 25 |
+
# flags to disable warnings for now.
|
| 26 |
+
if { [string match $compiler_vendor "gnu"] } {
|
| 27 |
+
set warning_options "-Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-uninitialized";
|
| 28 |
+
}
|
| 29 |
+
if { [string match $compiler_vendor "microsoft"] } {
|
| 30 |
+
# -wd4996 suggest use of vsprintf_s instead of vsprintf
|
| 31 |
+
# -wd4116 unnamed type definition
|
| 32 |
+
# -wd4101 unreferenced local variable
|
| 33 |
+
# -wd4244 warning about implicit double to float conversion
|
| 34 |
+
set warning_options "-wd4996 -wd4116 -wd4101 -wd4244";
|
| 35 |
+
}
|
| 36 |
+
if { ![string match $compiler_vendor "microsoft"] && ![string match $compiler_vendor "gnu"] } {
|
| 37 |
+
set warning_options "-Wno-unused-variable -Wno-unused-parameter -Wno-uninitialized";
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
set tlist [lsort [glob -nocomplain -- $srcdir/$subdir/test-call.c]]
|
| 42 |
+
|
| 43 |
+
for {set i 1} {$i < 82} {incr i} {
|
| 44 |
+
run-many-tests $tlist [format "-DDGTEST=%d %s" $i $warning_options]
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
set tlist [lsort [glob -nocomplain -- $srcdir/$subdir/test-callback.c]]
|
| 48 |
+
|
| 49 |
+
for {set i 1} {$i < 81} {incr i} {
|
| 50 |
+
if { [libffi_feature_test "#if FFI_CLOSURES"] } {
|
| 51 |
+
run-many-tests $tlist [format "-DDGTEST=%d %s" $i $warning_options]
|
| 52 |
+
} else {
|
| 53 |
+
foreach test $tlist {
|
| 54 |
+
unsupported [format "%s -DDGTEST=%d %s" $test $i $warning_options]
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
dg-finish
|
| 60 |
+
|
| 61 |
+
# Local Variables:
|
| 62 |
+
# tcl-indent-level:4
|
| 63 |
+
# End:
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/test-call.c
ADDED
|
@@ -0,0 +1,1746 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
Copyright 1993 Bill Triggs <Bill.Triggs@inrialpes.fr>
|
| 3 |
+
Copyright 1995-2017 Bruno Haible <bruno@clisp.org>
|
| 4 |
+
|
| 5 |
+
This program is free software: you can redistribute it and/or modify
|
| 6 |
+
it under the terms of the GNU General Public License as published by
|
| 7 |
+
the Free Software Foundation; either version 3 of the License, or
|
| 8 |
+
(at your option) any later version.
|
| 9 |
+
|
| 10 |
+
This program is distributed in the hope that it will be useful,
|
| 11 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
+
GNU General Public License for more details.
|
| 14 |
+
|
| 15 |
+
You should have received a copy of the GNU General Public License
|
| 16 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
+
**/
|
| 18 |
+
|
| 19 |
+
/* { dg-do run { xfail gccbug } } */
|
| 20 |
+
|
| 21 |
+
#include <stdio.h>
|
| 22 |
+
#include <stdlib.h>
|
| 23 |
+
#include <string.h>
|
| 24 |
+
#include <ffi.h>
|
| 25 |
+
#include "alignof.h"
|
| 26 |
+
#include <stdarg.h>
|
| 27 |
+
|
| 28 |
+
/* libffi testsuite local changes -------------------------------- */
|
| 29 |
+
#ifdef DGTEST
|
| 30 |
+
/* Redefine exit(1) as a test failure */
|
| 31 |
+
#define exit(V) (void)((V) ? (abort(), 1) : exit(0))
|
| 32 |
+
int count = 0;
|
| 33 |
+
char rbuf1[2048];
|
| 34 |
+
char rbuf2[2048];
|
| 35 |
+
int _fprintf(FILE *stream, const char *format, ...)
|
| 36 |
+
{
|
| 37 |
+
va_list args;
|
| 38 |
+
va_start(args, format);
|
| 39 |
+
|
| 40 |
+
switch (count++)
|
| 41 |
+
{
|
| 42 |
+
case 0:
|
| 43 |
+
case 1:
|
| 44 |
+
vsprintf(&rbuf1[strlen(rbuf1)], format, args);
|
| 45 |
+
break;
|
| 46 |
+
case 2:
|
| 47 |
+
printf("%s", rbuf1);
|
| 48 |
+
vsprintf(rbuf2, format, args);
|
| 49 |
+
break;
|
| 50 |
+
case 3:
|
| 51 |
+
vsprintf(&rbuf2[strlen(rbuf2)], format, args);
|
| 52 |
+
printf("%s", rbuf2);
|
| 53 |
+
fflush (stdout);
|
| 54 |
+
if (strcmp (rbuf1, rbuf2)) abort();
|
| 55 |
+
break;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
va_end(args);
|
| 59 |
+
|
| 60 |
+
return 0;
|
| 61 |
+
}
|
| 62 |
+
#define fprintf _fprintf
|
| 63 |
+
#endif
|
| 64 |
+
/* --------------------------------------------------------------- */
|
| 65 |
+
|
| 66 |
+
#include "testcases.c"
|
| 67 |
+
|
| 68 |
+
#ifndef ABI_NUM
|
| 69 |
+
#define ABI_NUM FFI_DEFAULT_ABI
|
| 70 |
+
#endif
|
| 71 |
+
|
| 72 |
+
/* Definitions that ought to be part of libffi. */
|
| 73 |
+
static ffi_type ffi_type_char;
|
| 74 |
+
#define ffi_type_slonglong ffi_type_sint64
|
| 75 |
+
#define ffi_type_ulonglong ffi_type_uint64
|
| 76 |
+
|
| 77 |
+
/* libffi does not support arrays inside structs. */
|
| 78 |
+
#define SKIP_EXTRA_STRUCTS
|
| 79 |
+
|
| 80 |
+
#define FFI_PREP_CIF(cif,argtypes,rettype) \
|
| 81 |
+
if (ffi_prep_cif(&(cif),ABI_NUM,sizeof(argtypes)/sizeof(argtypes[0]),&rettype,argtypes) != FFI_OK) abort()
|
| 82 |
+
#define FFI_PREP_CIF_NOARGS(cif,rettype) \
|
| 83 |
+
if (ffi_prep_cif(&(cif),ABI_NUM,0,&rettype,NULL) != FFI_OK) abort()
|
| 84 |
+
#define FFI_CALL(cif,fn,args,retaddr) \
|
| 85 |
+
ffi_call(&(cif),(void(*)(void))(fn),retaddr,args)
|
| 86 |
+
|
| 87 |
+
long clear_traces_i (long a, long b, long c, long d, long e, long f, long g, long h,
|
| 88 |
+
long i, long j, long k, long l, long m, long n, long o, long p)
|
| 89 |
+
{ return 0; }
|
| 90 |
+
float clear_traces_f (float a, float b, float c, float d, float e, float f, float g,
|
| 91 |
+
float h, float i, float j, float k, float l, float m, float n,
|
| 92 |
+
float o, float p)
|
| 93 |
+
{ return 0.0; }
|
| 94 |
+
double clear_traces_d (double a, double b, double c, double d, double e, double f, double g,
|
| 95 |
+
double h, double i, double j, double k, double l, double m, double n,
|
| 96 |
+
double o, double p)
|
| 97 |
+
{ return 0.0; }
|
| 98 |
+
J clear_traces_J (void)
|
| 99 |
+
{ J j; j.l1 = j.l2 = 0; return j; }
|
| 100 |
+
void clear_traces (void)
|
| 101 |
+
{ clear_traces_i(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
| 102 |
+
clear_traces_f(0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
|
| 103 |
+
clear_traces_d(0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
|
| 104 |
+
clear_traces_J();
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
void
|
| 108 |
+
void_tests (void)
|
| 109 |
+
{
|
| 110 |
+
#if (!defined(DGTEST)) || DGTEST == 1
|
| 111 |
+
v_v();
|
| 112 |
+
clear_traces();
|
| 113 |
+
{
|
| 114 |
+
ffi_cif cif;
|
| 115 |
+
FFI_PREP_CIF_NOARGS(cif,ffi_type_void);
|
| 116 |
+
{
|
| 117 |
+
FFI_CALL(cif,v_v,NULL,NULL);
|
| 118 |
+
}
|
| 119 |
+
}
|
| 120 |
+
#endif
|
| 121 |
+
return;
|
| 122 |
+
}
|
| 123 |
+
void
|
| 124 |
+
int_tests (void)
|
| 125 |
+
{
|
| 126 |
+
int ir;
|
| 127 |
+
ffi_arg retvalue;
|
| 128 |
+
#if (!defined(DGTEST)) || DGTEST == 2
|
| 129 |
+
ir = i_v();
|
| 130 |
+
fprintf(out,"->%d\n",ir);
|
| 131 |
+
fflush(out);
|
| 132 |
+
ir = 0; clear_traces();
|
| 133 |
+
{
|
| 134 |
+
ffi_cif cif;
|
| 135 |
+
FFI_PREP_CIF_NOARGS(cif,ffi_type_sint);
|
| 136 |
+
{
|
| 137 |
+
FFI_CALL(cif,i_v,NULL,&retvalue);
|
| 138 |
+
ir = retvalue;
|
| 139 |
+
}
|
| 140 |
+
}
|
| 141 |
+
fprintf(out,"->%d\n",ir);
|
| 142 |
+
fflush(out);
|
| 143 |
+
#endif
|
| 144 |
+
|
| 145 |
+
#if (!defined(DGTEST)) || DGTEST == 3
|
| 146 |
+
ir = i_i(i1);
|
| 147 |
+
fprintf(out,"->%d\n",ir);
|
| 148 |
+
fflush(out);
|
| 149 |
+
ir = 0; clear_traces();
|
| 150 |
+
{
|
| 151 |
+
ffi_type* argtypes[] = { &ffi_type_sint };
|
| 152 |
+
ffi_cif cif;
|
| 153 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_sint);
|
| 154 |
+
{
|
| 155 |
+
/*const*/ void* args[] = { &i1 };
|
| 156 |
+
FFI_CALL(cif,i_i,args,&retvalue);
|
| 157 |
+
ir = retvalue;
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
fprintf(out,"->%d\n",ir);
|
| 161 |
+
fflush(out);
|
| 162 |
+
#endif
|
| 163 |
+
|
| 164 |
+
#if (!defined(DGTEST)) || DGTEST == 4
|
| 165 |
+
ir = i_i2(i1,i2);
|
| 166 |
+
fprintf(out,"->%d\n",ir);
|
| 167 |
+
fflush(out);
|
| 168 |
+
ir = 0; clear_traces();
|
| 169 |
+
{
|
| 170 |
+
ffi_type* argtypes[] = { &ffi_type_sint, &ffi_type_sint };
|
| 171 |
+
ffi_cif cif;
|
| 172 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_sint);
|
| 173 |
+
{
|
| 174 |
+
/*const*/ void* args[] = { &i1, &i2 };
|
| 175 |
+
FFI_CALL(cif,i_i2,args,&retvalue);
|
| 176 |
+
ir = retvalue;
|
| 177 |
+
}
|
| 178 |
+
}
|
| 179 |
+
fprintf(out,"->%d\n",ir);
|
| 180 |
+
fflush(out);
|
| 181 |
+
#endif
|
| 182 |
+
|
| 183 |
+
#if (!defined(DGTEST)) || DGTEST == 5
|
| 184 |
+
ir = i_i4(i1,i2,i3,i4);
|
| 185 |
+
fprintf(out,"->%d\n",ir);
|
| 186 |
+
fflush(out);
|
| 187 |
+
ir = 0; clear_traces();
|
| 188 |
+
{
|
| 189 |
+
ffi_type* argtypes[] = { &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint };
|
| 190 |
+
ffi_cif cif;
|
| 191 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_sint);
|
| 192 |
+
{
|
| 193 |
+
/*const*/ void* args[] = { &i1, &i2, &i3, &i4 };
|
| 194 |
+
FFI_CALL(cif,i_i4,args,&retvalue);
|
| 195 |
+
ir = retvalue;
|
| 196 |
+
}
|
| 197 |
+
}
|
| 198 |
+
fprintf(out,"->%d\n",ir);
|
| 199 |
+
fflush(out);
|
| 200 |
+
#endif
|
| 201 |
+
|
| 202 |
+
#if (!defined(DGTEST)) || DGTEST == 6
|
| 203 |
+
ir = i_i8(i1,i2,i3,i4,i5,i6,i7,i8);
|
| 204 |
+
fprintf(out,"->%d\n",ir);
|
| 205 |
+
fflush(out);
|
| 206 |
+
ir = 0; clear_traces();
|
| 207 |
+
{
|
| 208 |
+
ffi_type* argtypes[] = { &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint };
|
| 209 |
+
ffi_cif cif;
|
| 210 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_sint);
|
| 211 |
+
{
|
| 212 |
+
/*const*/ void* args[] = { &i1, &i2, &i3, &i4, &i5, &i6, &i7, &i8 };
|
| 213 |
+
FFI_CALL(cif,i_i8,args,&retvalue);
|
| 214 |
+
ir = retvalue;
|
| 215 |
+
}
|
| 216 |
+
}
|
| 217 |
+
fprintf(out,"->%d\n",ir);
|
| 218 |
+
fflush(out);
|
| 219 |
+
#endif
|
| 220 |
+
|
| 221 |
+
#if (!defined(DGTEST)) || DGTEST == 7
|
| 222 |
+
ir = i_i16(i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16);
|
| 223 |
+
fprintf(out,"->%d\n",ir);
|
| 224 |
+
fflush(out);
|
| 225 |
+
ir = 0; clear_traces();
|
| 226 |
+
{
|
| 227 |
+
ffi_type* argtypes[] = { &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_sint };
|
| 228 |
+
ffi_cif cif;
|
| 229 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_sint);
|
| 230 |
+
{
|
| 231 |
+
/*const*/ void* args[] = { &i1, &i2, &i3, &i4, &i5, &i6, &i7, &i8, &i9, &i10, &i11, &i12, &i13, &i14, &i15, &i16 };
|
| 232 |
+
FFI_CALL(cif,i_i16,args,&retvalue);
|
| 233 |
+
ir = retvalue;
|
| 234 |
+
}
|
| 235 |
+
}
|
| 236 |
+
fprintf(out,"->%d\n",ir);
|
| 237 |
+
fflush(out);
|
| 238 |
+
#endif
|
| 239 |
+
|
| 240 |
+
return;
|
| 241 |
+
}
|
| 242 |
+
void
|
| 243 |
+
float_tests (void)
|
| 244 |
+
{
|
| 245 |
+
float fr;
|
| 246 |
+
|
| 247 |
+
#if (!defined(DGTEST)) || DGTEST == 8
|
| 248 |
+
fr = f_f(f1);
|
| 249 |
+
fprintf(out,"->%g\n",fr);
|
| 250 |
+
fflush(out);
|
| 251 |
+
fr = 0.0; clear_traces();
|
| 252 |
+
{
|
| 253 |
+
ffi_type* argtypes[] = { &ffi_type_float };
|
| 254 |
+
ffi_cif cif;
|
| 255 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 256 |
+
{
|
| 257 |
+
/*const*/ void* args[] = { &f1 };
|
| 258 |
+
FFI_CALL(cif,f_f,args,&fr);
|
| 259 |
+
}
|
| 260 |
+
}
|
| 261 |
+
fprintf(out,"->%g\n",fr);
|
| 262 |
+
fflush(out);
|
| 263 |
+
#endif
|
| 264 |
+
|
| 265 |
+
#if (!defined(DGTEST)) || DGTEST == 9
|
| 266 |
+
fr = f_f2(f1,f2);
|
| 267 |
+
fprintf(out,"->%g\n",fr);
|
| 268 |
+
fflush(out);
|
| 269 |
+
fr = 0.0; clear_traces();
|
| 270 |
+
{
|
| 271 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float };
|
| 272 |
+
ffi_cif cif;
|
| 273 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 274 |
+
{
|
| 275 |
+
/*const*/ void* args[] = { &f1, &f2 };
|
| 276 |
+
FFI_CALL(cif,f_f2,args,&fr);
|
| 277 |
+
}
|
| 278 |
+
}
|
| 279 |
+
fprintf(out,"->%g\n",fr);
|
| 280 |
+
fflush(out);
|
| 281 |
+
#endif
|
| 282 |
+
|
| 283 |
+
#if (!defined(DGTEST)) || DGTEST == 10
|
| 284 |
+
fr = f_f4(f1,f2,f3,f4);
|
| 285 |
+
fprintf(out,"->%g\n",fr);
|
| 286 |
+
fflush(out);
|
| 287 |
+
fr = 0.0; clear_traces();
|
| 288 |
+
{
|
| 289 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float };
|
| 290 |
+
ffi_cif cif;
|
| 291 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 292 |
+
{
|
| 293 |
+
/*const*/ void* args[] = { &f1, &f2, &f3, &f4 };
|
| 294 |
+
FFI_CALL(cif,f_f4,args,&fr);
|
| 295 |
+
}
|
| 296 |
+
}
|
| 297 |
+
fprintf(out,"->%g\n",fr);
|
| 298 |
+
fflush(out);
|
| 299 |
+
#endif
|
| 300 |
+
|
| 301 |
+
#if (!defined(DGTEST)) || DGTEST == 11
|
| 302 |
+
fr = f_f8(f1,f2,f3,f4,f5,f6,f7,f8);
|
| 303 |
+
fprintf(out,"->%g\n",fr);
|
| 304 |
+
fflush(out);
|
| 305 |
+
fr = 0.0; clear_traces();
|
| 306 |
+
{
|
| 307 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float };
|
| 308 |
+
ffi_cif cif;
|
| 309 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 310 |
+
{
|
| 311 |
+
/*const*/ void* args[] = { &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8 };
|
| 312 |
+
FFI_CALL(cif,f_f8,args,&fr);
|
| 313 |
+
}
|
| 314 |
+
}
|
| 315 |
+
fprintf(out,"->%g\n",fr);
|
| 316 |
+
fflush(out);
|
| 317 |
+
#endif
|
| 318 |
+
|
| 319 |
+
#if (!defined(DGTEST)) || DGTEST == 12
|
| 320 |
+
fr = f_f16(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16);
|
| 321 |
+
fprintf(out,"->%g\n",fr);
|
| 322 |
+
fflush(out);
|
| 323 |
+
fr = 0.0; clear_traces();
|
| 324 |
+
{
|
| 325 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float };
|
| 326 |
+
ffi_cif cif;
|
| 327 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 328 |
+
{
|
| 329 |
+
/*const*/ void* args[] = { &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8, &f9, &f10, &f11, &f12, &f13, &f14, &f15, &f16 };
|
| 330 |
+
FFI_CALL(cif,f_f16,args,&fr);
|
| 331 |
+
}
|
| 332 |
+
}
|
| 333 |
+
fprintf(out,"->%g\n",fr);
|
| 334 |
+
fflush(out);
|
| 335 |
+
#endif
|
| 336 |
+
|
| 337 |
+
#if (!defined(DGTEST)) || DGTEST == 13
|
| 338 |
+
fr = f_f24(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24);
|
| 339 |
+
fprintf(out,"->%g\n",fr);
|
| 340 |
+
fflush(out);
|
| 341 |
+
fr = 0.0; clear_traces();
|
| 342 |
+
{
|
| 343 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float };
|
| 344 |
+
ffi_cif cif;
|
| 345 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 346 |
+
{
|
| 347 |
+
/*const*/ void* args[] = { &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8, &f9, &f10, &f11, &f12, &f13, &f14, &f15, &f16, &f17, &f18, &f19, &f20, &f21, &f22, &f23, &f24 };
|
| 348 |
+
FFI_CALL(cif,f_f24,args,&fr);
|
| 349 |
+
}
|
| 350 |
+
}
|
| 351 |
+
fprintf(out,"->%g\n",fr);
|
| 352 |
+
fflush(out);
|
| 353 |
+
#endif
|
| 354 |
+
}
|
| 355 |
+
void
|
| 356 |
+
double_tests (void)
|
| 357 |
+
{
|
| 358 |
+
double dr;
|
| 359 |
+
|
| 360 |
+
#if (!defined(DGTEST)) || DGTEST == 14
|
| 361 |
+
|
| 362 |
+
dr = d_d(d1);
|
| 363 |
+
fprintf(out,"->%g\n",dr);
|
| 364 |
+
fflush(out);
|
| 365 |
+
dr = 0.0; clear_traces();
|
| 366 |
+
{
|
| 367 |
+
ffi_type* argtypes[] = { &ffi_type_double };
|
| 368 |
+
ffi_cif cif;
|
| 369 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 370 |
+
{
|
| 371 |
+
/*const*/ void* args[] = { &d1 };
|
| 372 |
+
FFI_CALL(cif,d_d,args,&dr);
|
| 373 |
+
}
|
| 374 |
+
}
|
| 375 |
+
fprintf(out,"->%g\n",dr);
|
| 376 |
+
fflush(out);
|
| 377 |
+
#endif
|
| 378 |
+
|
| 379 |
+
#if (!defined(DGTEST)) || DGTEST == 15
|
| 380 |
+
dr = d_d2(d1,d2);
|
| 381 |
+
fprintf(out,"->%g\n",dr);
|
| 382 |
+
fflush(out);
|
| 383 |
+
dr = 0.0; clear_traces();
|
| 384 |
+
{
|
| 385 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double };
|
| 386 |
+
ffi_cif cif;
|
| 387 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 388 |
+
{
|
| 389 |
+
/*const*/ void* args[] = { &d1, &d2 };
|
| 390 |
+
FFI_CALL(cif,d_d2,args,&dr);
|
| 391 |
+
}
|
| 392 |
+
}
|
| 393 |
+
fprintf(out,"->%g\n",dr);
|
| 394 |
+
fflush(out);
|
| 395 |
+
#endif
|
| 396 |
+
|
| 397 |
+
#if (!defined(DGTEST)) || DGTEST == 16
|
| 398 |
+
dr = d_d4(d1,d2,d3,d4);
|
| 399 |
+
fprintf(out,"->%g\n",dr);
|
| 400 |
+
fflush(out);
|
| 401 |
+
dr = 0.0; clear_traces();
|
| 402 |
+
{
|
| 403 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double };
|
| 404 |
+
ffi_cif cif;
|
| 405 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 406 |
+
{
|
| 407 |
+
/*const*/ void* args[] = { &d1, &d2, &d3, &d4 };
|
| 408 |
+
FFI_CALL(cif,d_d4,args,&dr);
|
| 409 |
+
}
|
| 410 |
+
}
|
| 411 |
+
fprintf(out,"->%g\n",dr);
|
| 412 |
+
fflush(out);
|
| 413 |
+
#endif
|
| 414 |
+
|
| 415 |
+
#if (!defined(DGTEST)) || DGTEST == 17
|
| 416 |
+
dr = d_d8(d1,d2,d3,d4,d5,d6,d7,d8);
|
| 417 |
+
fprintf(out,"->%g\n",dr);
|
| 418 |
+
fflush(out);
|
| 419 |
+
dr = 0.0; clear_traces();
|
| 420 |
+
{
|
| 421 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double };
|
| 422 |
+
ffi_cif cif;
|
| 423 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 424 |
+
{
|
| 425 |
+
/*const*/ void* args[] = { &d1, &d2, &d3, &d4, &d5, &d6, &d7, &d8 };
|
| 426 |
+
FFI_CALL(cif,d_d8,args,&dr);
|
| 427 |
+
}
|
| 428 |
+
}
|
| 429 |
+
fprintf(out,"->%g\n",dr);
|
| 430 |
+
fflush(out);
|
| 431 |
+
#endif
|
| 432 |
+
|
| 433 |
+
#if (!defined(DGTEST)) || DGTEST == 18
|
| 434 |
+
dr = d_d16(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15,d16);
|
| 435 |
+
fprintf(out,"->%g\n",dr);
|
| 436 |
+
fflush(out);
|
| 437 |
+
dr = 0.0; clear_traces();
|
| 438 |
+
{
|
| 439 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double };
|
| 440 |
+
ffi_cif cif;
|
| 441 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 442 |
+
{
|
| 443 |
+
/*const*/ void* args[] = { &d1, &d2, &d3, &d4, &d5, &d6, &d7, &d8, &d9, &d10, &d11, &d12, &d13, &d14, &d15, &d16 };
|
| 444 |
+
FFI_CALL(cif,d_d16,args,&dr);
|
| 445 |
+
}
|
| 446 |
+
}
|
| 447 |
+
fprintf(out,"->%g\n",dr);
|
| 448 |
+
fflush(out);
|
| 449 |
+
#endif
|
| 450 |
+
return;
|
| 451 |
+
}
|
| 452 |
+
void
|
| 453 |
+
pointer_tests (void)
|
| 454 |
+
{
|
| 455 |
+
void* vpr;
|
| 456 |
+
|
| 457 |
+
#if (!defined(DGTEST)) || DGTEST == 19
|
| 458 |
+
vpr = vp_vpdpcpsp(&uc1,&d2,str3,&I4);
|
| 459 |
+
fprintf(out,"->0x%p\n",vpr);
|
| 460 |
+
fflush(out);
|
| 461 |
+
vpr = 0; clear_traces();
|
| 462 |
+
{
|
| 463 |
+
ffi_type* argtypes[] = { &ffi_type_pointer, &ffi_type_pointer, &ffi_type_pointer, &ffi_type_pointer };
|
| 464 |
+
ffi_cif cif;
|
| 465 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_pointer);
|
| 466 |
+
{
|
| 467 |
+
void* puc1 = &uc1;
|
| 468 |
+
void* pd2 = &d2;
|
| 469 |
+
void* pstr3 = str3;
|
| 470 |
+
void* pI4 = &I4;
|
| 471 |
+
/*const*/ void* args[] = { &puc1, &pd2, &pstr3, &pI4 };
|
| 472 |
+
FFI_CALL(cif,vp_vpdpcpsp,args,&vpr);
|
| 473 |
+
}
|
| 474 |
+
}
|
| 475 |
+
fprintf(out,"->0x%p\n",vpr);
|
| 476 |
+
fflush(out);
|
| 477 |
+
#endif
|
| 478 |
+
return;
|
| 479 |
+
}
|
| 480 |
+
void
|
| 481 |
+
mixed_number_tests (void)
|
| 482 |
+
{
|
| 483 |
+
uchar ucr;
|
| 484 |
+
ushort usr;
|
| 485 |
+
float fr;
|
| 486 |
+
double dr;
|
| 487 |
+
long long llr;
|
| 488 |
+
|
| 489 |
+
/* Unsigned types.
|
| 490 |
+
*/
|
| 491 |
+
#if (!defined(DGTEST)) || DGTEST == 20
|
| 492 |
+
ucr = uc_ucsil(uc1, us2, ui3, ul4);
|
| 493 |
+
fprintf(out,"->%u\n",ucr);
|
| 494 |
+
fflush(out);
|
| 495 |
+
ucr = 0; clear_traces();
|
| 496 |
+
{
|
| 497 |
+
ffi_type* argtypes[] = { &ffi_type_uchar, &ffi_type_ushort, &ffi_type_uint, &ffi_type_ulong };
|
| 498 |
+
ffi_cif cif;
|
| 499 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_uchar);
|
| 500 |
+
{
|
| 501 |
+
ffi_arg r;
|
| 502 |
+
/*const*/ void* args[] = { &uc1, &us2, &ui3, &ul4 };
|
| 503 |
+
FFI_CALL(cif,uc_ucsil,args,&r);
|
| 504 |
+
ucr = (uchar) r;
|
| 505 |
+
}
|
| 506 |
+
}
|
| 507 |
+
fprintf(out,"->%u\n",ucr);
|
| 508 |
+
fflush(out);
|
| 509 |
+
#endif
|
| 510 |
+
|
| 511 |
+
#if (!defined(DGTEST)) || DGTEST == 21
|
| 512 |
+
/* Mixed int & float types.
|
| 513 |
+
*/
|
| 514 |
+
dr = d_iidd(i1,i2,d3,d4);
|
| 515 |
+
fprintf(out,"->%g\n",dr);
|
| 516 |
+
fflush(out);
|
| 517 |
+
dr = 0.0; clear_traces();
|
| 518 |
+
{
|
| 519 |
+
ffi_type* argtypes[] = { &ffi_type_sint, &ffi_type_sint, &ffi_type_double, &ffi_type_double };
|
| 520 |
+
ffi_cif cif;
|
| 521 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 522 |
+
{
|
| 523 |
+
/*const*/ void* args[] = { &i1, &i2, &d3, &d4 };
|
| 524 |
+
FFI_CALL(cif,d_iidd,args,&dr);
|
| 525 |
+
}
|
| 526 |
+
}
|
| 527 |
+
fprintf(out,"->%g\n",dr);
|
| 528 |
+
fflush(out);
|
| 529 |
+
#endif
|
| 530 |
+
|
| 531 |
+
#if (!defined(DGTEST)) || DGTEST == 22
|
| 532 |
+
dr = d_iiidi(i1,i2,i3,d4,i5);
|
| 533 |
+
fprintf(out,"->%g\n",dr);
|
| 534 |
+
fflush(out);
|
| 535 |
+
dr = 0.0; clear_traces();
|
| 536 |
+
{
|
| 537 |
+
ffi_type* argtypes[] = { &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_double, &ffi_type_sint };
|
| 538 |
+
ffi_cif cif;
|
| 539 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 540 |
+
{
|
| 541 |
+
/*const*/ void* args[] = { &i1, &i2, &i3, &d4, &i5 };
|
| 542 |
+
FFI_CALL(cif,d_iiidi,args,&dr);
|
| 543 |
+
}
|
| 544 |
+
}
|
| 545 |
+
fprintf(out,"->%g\n",dr);
|
| 546 |
+
fflush(out);
|
| 547 |
+
#endif
|
| 548 |
+
|
| 549 |
+
#if (!defined(DGTEST)) || DGTEST == 23
|
| 550 |
+
dr = d_idid(i1,d2,i3,d4);
|
| 551 |
+
fprintf(out,"->%g\n",dr);
|
| 552 |
+
fflush(out);
|
| 553 |
+
dr = 0.0; clear_traces();
|
| 554 |
+
{
|
| 555 |
+
ffi_type* argtypes[] = { &ffi_type_sint, &ffi_type_double, &ffi_type_sint, &ffi_type_double };
|
| 556 |
+
ffi_cif cif;
|
| 557 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 558 |
+
{
|
| 559 |
+
/*const*/ void* args[] = { &i1, &d2, &i3, &d4 };
|
| 560 |
+
FFI_CALL(cif,d_idid,args,&dr);
|
| 561 |
+
}
|
| 562 |
+
}
|
| 563 |
+
fprintf(out,"->%g\n",dr);
|
| 564 |
+
fflush(out);
|
| 565 |
+
#endif
|
| 566 |
+
|
| 567 |
+
#if (!defined(DGTEST)) || DGTEST == 24
|
| 568 |
+
dr = d_fdi(f1,d2,i3);
|
| 569 |
+
fprintf(out,"->%g\n",dr);
|
| 570 |
+
fflush(out);
|
| 571 |
+
dr = 0.0; clear_traces();
|
| 572 |
+
{
|
| 573 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_double, &ffi_type_sint };
|
| 574 |
+
ffi_cif cif;
|
| 575 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 576 |
+
{
|
| 577 |
+
/*const*/ void* args[] = { &f1, &d2, &i3 };
|
| 578 |
+
FFI_CALL(cif,d_fdi,args,&dr);
|
| 579 |
+
}
|
| 580 |
+
}
|
| 581 |
+
fprintf(out,"->%g\n",dr);
|
| 582 |
+
fflush(out);
|
| 583 |
+
#endif
|
| 584 |
+
|
| 585 |
+
#if (!defined(DGTEST)) || DGTEST == 25
|
| 586 |
+
usr = us_cdcd(c1,d2,c3,d4);
|
| 587 |
+
fprintf(out,"->%u\n",usr);
|
| 588 |
+
fflush(out);
|
| 589 |
+
usr = 0; clear_traces();
|
| 590 |
+
{
|
| 591 |
+
ffi_type* argtypes[] = { &ffi_type_char, &ffi_type_double, &ffi_type_char, &ffi_type_double };
|
| 592 |
+
ffi_cif cif;
|
| 593 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_ushort);
|
| 594 |
+
{
|
| 595 |
+
ffi_arg rint;
|
| 596 |
+
/*const*/ void* args[] = { &c1, &d2, &c3, &d4 };
|
| 597 |
+
FFI_CALL(cif,us_cdcd,args,&rint);
|
| 598 |
+
usr = (ushort) rint;
|
| 599 |
+
}
|
| 600 |
+
}
|
| 601 |
+
fprintf(out,"->%u\n",usr);
|
| 602 |
+
fflush(out);
|
| 603 |
+
#endif
|
| 604 |
+
|
| 605 |
+
#if (!defined(DGTEST)) || DGTEST == 26
|
| 606 |
+
/* Long long types.
|
| 607 |
+
*/
|
| 608 |
+
llr = ll_iiilli(i1,i2,i3,ll1,i13);
|
| 609 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 610 |
+
fflush(out);
|
| 611 |
+
llr = 0; clear_traces();
|
| 612 |
+
{
|
| 613 |
+
ffi_type* argtypes[] = { &ffi_type_sint, &ffi_type_sint, &ffi_type_sint, &ffi_type_slonglong, &ffi_type_sint };
|
| 614 |
+
ffi_cif cif;
|
| 615 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slonglong);
|
| 616 |
+
{
|
| 617 |
+
/*const*/ void* args[] = { &i1, &i2, &i3, &ll1, &i13 };
|
| 618 |
+
FFI_CALL(cif,ll_iiilli,args,&llr);
|
| 619 |
+
}
|
| 620 |
+
}
|
| 621 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 622 |
+
fflush(out);
|
| 623 |
+
#endif
|
| 624 |
+
|
| 625 |
+
#if (!defined(DGTEST)) || DGTEST == 27
|
| 626 |
+
llr = ll_flli(f13,ll1,i13);
|
| 627 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 628 |
+
fflush(out);
|
| 629 |
+
llr = 0; clear_traces();
|
| 630 |
+
{
|
| 631 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_slonglong, &ffi_type_sint };
|
| 632 |
+
ffi_cif cif;
|
| 633 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slonglong);
|
| 634 |
+
{
|
| 635 |
+
/*const*/ void* args[] = { &f13, &ll1, &i13 };
|
| 636 |
+
FFI_CALL(cif,ll_flli,args,&llr);
|
| 637 |
+
}
|
| 638 |
+
}
|
| 639 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 640 |
+
fflush(out);
|
| 641 |
+
#endif
|
| 642 |
+
|
| 643 |
+
#if (!defined(DGTEST)) || DGTEST == 28
|
| 644 |
+
fr = f_fi(f1,i9);
|
| 645 |
+
fprintf(out,"->%g\n",fr);
|
| 646 |
+
fflush(out);
|
| 647 |
+
fr = 0.0; clear_traces();
|
| 648 |
+
{
|
| 649 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_sint };
|
| 650 |
+
ffi_cif cif;
|
| 651 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 652 |
+
{
|
| 653 |
+
/*const*/ void* args[] = { &f1, &i9 };
|
| 654 |
+
FFI_CALL(cif,f_fi,args,&fr);
|
| 655 |
+
}
|
| 656 |
+
}
|
| 657 |
+
fprintf(out,"->%g\n",fr);
|
| 658 |
+
fflush(out);
|
| 659 |
+
#endif
|
| 660 |
+
|
| 661 |
+
#if (!defined(DGTEST)) || DGTEST == 29
|
| 662 |
+
fr = f_f2i(f1,f2,i9);
|
| 663 |
+
fprintf(out,"->%g\n",fr);
|
| 664 |
+
fflush(out);
|
| 665 |
+
fr = 0.0; clear_traces();
|
| 666 |
+
{
|
| 667 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_sint };
|
| 668 |
+
ffi_cif cif;
|
| 669 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 670 |
+
{
|
| 671 |
+
/*const*/ void* args[] = { &f1, &f2, &i9 };
|
| 672 |
+
FFI_CALL(cif,f_f2i,args,&fr);
|
| 673 |
+
}
|
| 674 |
+
}
|
| 675 |
+
fprintf(out,"->%g\n",fr);
|
| 676 |
+
fflush(out);
|
| 677 |
+
#endif
|
| 678 |
+
|
| 679 |
+
#if (!defined(DGTEST)) || DGTEST == 30
|
| 680 |
+
fr = f_f3i(f1,f2,f3,i9);
|
| 681 |
+
fprintf(out,"->%g\n",fr);
|
| 682 |
+
fflush(out);
|
| 683 |
+
fr = 0.0; clear_traces();
|
| 684 |
+
{
|
| 685 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_sint };
|
| 686 |
+
ffi_cif cif;
|
| 687 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 688 |
+
{
|
| 689 |
+
/*const*/ void* args[] = { &f1, &f2, &f3, &i9 };
|
| 690 |
+
FFI_CALL(cif,f_f3i,args,&fr);
|
| 691 |
+
}
|
| 692 |
+
}
|
| 693 |
+
fprintf(out,"->%g\n",fr);
|
| 694 |
+
fflush(out);
|
| 695 |
+
#endif
|
| 696 |
+
|
| 697 |
+
#if (!defined(DGTEST)) || DGTEST == 31
|
| 698 |
+
fr = f_f4i(f1,f2,f3,f4,i9);
|
| 699 |
+
fprintf(out,"->%g\n",fr);
|
| 700 |
+
fflush(out);
|
| 701 |
+
fr = 0.0; clear_traces();
|
| 702 |
+
{
|
| 703 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_sint };
|
| 704 |
+
ffi_cif cif;
|
| 705 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 706 |
+
{
|
| 707 |
+
/*const*/ void* args[] = { &f1, &f2, &f3, &f4, &i9 };
|
| 708 |
+
FFI_CALL(cif,f_f4i,args,&fr);
|
| 709 |
+
}
|
| 710 |
+
}
|
| 711 |
+
fprintf(out,"->%g\n",fr);
|
| 712 |
+
fflush(out);
|
| 713 |
+
#endif
|
| 714 |
+
|
| 715 |
+
#if (!defined(DGTEST)) || DGTEST == 32
|
| 716 |
+
fr = f_f7i(f1,f2,f3,f4,f5,f6,f7,i9);
|
| 717 |
+
fprintf(out,"->%g\n",fr);
|
| 718 |
+
fflush(out);
|
| 719 |
+
fr = 0.0; clear_traces();
|
| 720 |
+
{
|
| 721 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_sint };
|
| 722 |
+
ffi_cif cif;
|
| 723 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 724 |
+
{
|
| 725 |
+
/*const*/ void* args[] = { &f1, &f2, &f3, &f4, &f5, &f6, &f7, &i9 };
|
| 726 |
+
FFI_CALL(cif,f_f7i,args,&fr);
|
| 727 |
+
}
|
| 728 |
+
}
|
| 729 |
+
fprintf(out,"->%g\n",fr);
|
| 730 |
+
fflush(out);
|
| 731 |
+
#endif
|
| 732 |
+
|
| 733 |
+
#if (!defined(DGTEST)) || DGTEST == 33
|
| 734 |
+
fr = f_f8i(f1,f2,f3,f4,f5,f6,f7,f8,i9);
|
| 735 |
+
fprintf(out,"->%g\n",fr);
|
| 736 |
+
fflush(out);
|
| 737 |
+
fr = 0.0; clear_traces();
|
| 738 |
+
{
|
| 739 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_sint };
|
| 740 |
+
ffi_cif cif;
|
| 741 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 742 |
+
{
|
| 743 |
+
/*const*/ void* args[] = { &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8, &i9 };
|
| 744 |
+
FFI_CALL(cif,f_f8i,args,&fr);
|
| 745 |
+
}
|
| 746 |
+
}
|
| 747 |
+
fprintf(out,"->%g\n",fr);
|
| 748 |
+
fflush(out);
|
| 749 |
+
#endif
|
| 750 |
+
|
| 751 |
+
#if (!defined(DGTEST)) || DGTEST == 34
|
| 752 |
+
fr = f_f12i(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,i9);
|
| 753 |
+
fprintf(out,"->%g\n",fr);
|
| 754 |
+
fflush(out);
|
| 755 |
+
fr = 0.0; clear_traces();
|
| 756 |
+
{
|
| 757 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_sint };
|
| 758 |
+
ffi_cif cif;
|
| 759 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 760 |
+
{
|
| 761 |
+
/*const*/ void* args[] = { &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8, &f9, &f10, &f11, &f12, &i9 };
|
| 762 |
+
FFI_CALL(cif,f_f12i,args,&fr);
|
| 763 |
+
}
|
| 764 |
+
}
|
| 765 |
+
fprintf(out,"->%g\n",fr);
|
| 766 |
+
fflush(out);
|
| 767 |
+
#endif
|
| 768 |
+
|
| 769 |
+
#if (!defined(DGTEST)) || DGTEST == 35
|
| 770 |
+
fr = f_f13i(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,i9);
|
| 771 |
+
fprintf(out,"->%g\n",fr);
|
| 772 |
+
fflush(out);
|
| 773 |
+
fr = 0.0; clear_traces();
|
| 774 |
+
{
|
| 775 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_sint };
|
| 776 |
+
ffi_cif cif;
|
| 777 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 778 |
+
{
|
| 779 |
+
/*const*/ void* args[] = { &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8, &f9, &f10, &f11, &f12, &f13, &i9 };
|
| 780 |
+
FFI_CALL(cif,f_f13i,args,&fr);
|
| 781 |
+
}
|
| 782 |
+
}
|
| 783 |
+
fprintf(out,"->%g\n",fr);
|
| 784 |
+
fflush(out);
|
| 785 |
+
#endif
|
| 786 |
+
|
| 787 |
+
#if (!defined(DGTEST)) || DGTEST == 36
|
| 788 |
+
dr = d_di(d1,i9);
|
| 789 |
+
fprintf(out,"->%g\n",dr);
|
| 790 |
+
fflush(out);
|
| 791 |
+
dr = 0.0; clear_traces();
|
| 792 |
+
{
|
| 793 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_sint };
|
| 794 |
+
ffi_cif cif;
|
| 795 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 796 |
+
{
|
| 797 |
+
/*const*/ void* args[] = { &d1, &i9 };
|
| 798 |
+
FFI_CALL(cif,d_di,args,&dr);
|
| 799 |
+
}
|
| 800 |
+
}
|
| 801 |
+
fprintf(out,"->%g\n",dr);
|
| 802 |
+
fflush(out);
|
| 803 |
+
#endif
|
| 804 |
+
|
| 805 |
+
#if (!defined(DGTEST)) || DGTEST == 37
|
| 806 |
+
dr = d_d2i(d1,d2,i9);
|
| 807 |
+
fprintf(out,"->%g\n",dr);
|
| 808 |
+
fflush(out);
|
| 809 |
+
dr = 0.0; clear_traces();
|
| 810 |
+
{
|
| 811 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double, &ffi_type_sint };
|
| 812 |
+
ffi_cif cif;
|
| 813 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 814 |
+
{
|
| 815 |
+
/*const*/ void* args[] = { &d1, &d2, &i9 };
|
| 816 |
+
FFI_CALL(cif,d_d2i,args,&dr);
|
| 817 |
+
}
|
| 818 |
+
}
|
| 819 |
+
fprintf(out,"->%g\n",dr);
|
| 820 |
+
fflush(out);
|
| 821 |
+
#endif
|
| 822 |
+
|
| 823 |
+
#if (!defined(DGTEST)) || DGTEST == 38
|
| 824 |
+
dr = d_d3i(d1,d2,d3,i9);
|
| 825 |
+
fprintf(out,"->%g\n",dr);
|
| 826 |
+
fflush(out);
|
| 827 |
+
dr = 0.0; clear_traces();
|
| 828 |
+
{
|
| 829 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_sint };
|
| 830 |
+
ffi_cif cif;
|
| 831 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 832 |
+
{
|
| 833 |
+
/*const*/ void* args[] = { &d1, &d2, &d3, &i9 };
|
| 834 |
+
FFI_CALL(cif,d_d3i,args,&dr);
|
| 835 |
+
}
|
| 836 |
+
}
|
| 837 |
+
fprintf(out,"->%g\n",dr);
|
| 838 |
+
fflush(out);
|
| 839 |
+
#endif
|
| 840 |
+
|
| 841 |
+
#if (!defined(DGTEST)) || DGTEST == 39
|
| 842 |
+
dr = d_d4i(d1,d2,d3,d4,i9);
|
| 843 |
+
fprintf(out,"->%g\n",dr);
|
| 844 |
+
fflush(out);
|
| 845 |
+
dr = 0.0; clear_traces();
|
| 846 |
+
{
|
| 847 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_sint };
|
| 848 |
+
ffi_cif cif;
|
| 849 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 850 |
+
{
|
| 851 |
+
/*const*/ void* args[] = { &d1, &d2, &d3, &d4, &i9 };
|
| 852 |
+
FFI_CALL(cif,d_d4i,args,&dr);
|
| 853 |
+
}
|
| 854 |
+
}
|
| 855 |
+
fprintf(out,"->%g\n",dr);
|
| 856 |
+
fflush(out);
|
| 857 |
+
#endif
|
| 858 |
+
|
| 859 |
+
#if (!defined(DGTEST)) || DGTEST == 40
|
| 860 |
+
dr = d_d7i(d1,d2,d3,d4,d5,d6,d7,i9);
|
| 861 |
+
fprintf(out,"->%g\n",dr);
|
| 862 |
+
fflush(out);
|
| 863 |
+
dr = 0.0; clear_traces();
|
| 864 |
+
{
|
| 865 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_sint };
|
| 866 |
+
ffi_cif cif;
|
| 867 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 868 |
+
{
|
| 869 |
+
/*const*/ void* args[] = { &d1, &d2, &d3, &d4, &d5, &d6, &d7, &i9 };
|
| 870 |
+
FFI_CALL(cif,d_d7i,args,&dr);
|
| 871 |
+
}
|
| 872 |
+
}
|
| 873 |
+
fprintf(out,"->%g\n",dr);
|
| 874 |
+
fflush(out);
|
| 875 |
+
#endif
|
| 876 |
+
|
| 877 |
+
#if (!defined(DGTEST)) || DGTEST == 41
|
| 878 |
+
dr = d_d8i(d1,d2,d3,d4,d5,d6,d7,d8,i9);
|
| 879 |
+
fprintf(out,"->%g\n",dr);
|
| 880 |
+
fflush(out);
|
| 881 |
+
dr = 0.0; clear_traces();
|
| 882 |
+
{
|
| 883 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_sint };
|
| 884 |
+
ffi_cif cif;
|
| 885 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 886 |
+
{
|
| 887 |
+
/*const*/ void* args[] = { &d1, &d2, &d3, &d4, &d5, &d6, &d7, &d8, &i9 };
|
| 888 |
+
FFI_CALL(cif,d_d8i,args,&dr);
|
| 889 |
+
}
|
| 890 |
+
}
|
| 891 |
+
fprintf(out,"->%g\n",dr);
|
| 892 |
+
fflush(out);
|
| 893 |
+
#endif
|
| 894 |
+
|
| 895 |
+
#if (!defined(DGTEST)) || DGTEST == 42
|
| 896 |
+
dr = d_d12i(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,i9);
|
| 897 |
+
fprintf(out,"->%g\n",dr);
|
| 898 |
+
fflush(out);
|
| 899 |
+
dr = 0.0; clear_traces();
|
| 900 |
+
{
|
| 901 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_sint };
|
| 902 |
+
ffi_cif cif;
|
| 903 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 904 |
+
{
|
| 905 |
+
/*const*/ void* args[] = { &d1, &d2, &d3, &d4, &d5, &d6, &d7, &d8, &d9, &d10, &d11, &d12, &i9 };
|
| 906 |
+
FFI_CALL(cif,d_d12i,args,&dr);
|
| 907 |
+
}
|
| 908 |
+
}
|
| 909 |
+
fprintf(out,"->%g\n",dr);
|
| 910 |
+
fflush(out);
|
| 911 |
+
#endif
|
| 912 |
+
|
| 913 |
+
#if (!defined(DGTEST)) || DGTEST == 43
|
| 914 |
+
dr = d_d13i(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,i9);
|
| 915 |
+
fprintf(out,"->%g\n",dr);
|
| 916 |
+
fflush(out);
|
| 917 |
+
dr = 0.0; clear_traces();
|
| 918 |
+
{
|
| 919 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_sint };
|
| 920 |
+
ffi_cif cif;
|
| 921 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 922 |
+
{
|
| 923 |
+
/*const*/ void* args[] = { &d1, &d2, &d3, &d4, &d5, &d6, &d7, &d8, &d9, &d10, &d11, &d12, &d13, &i9 };
|
| 924 |
+
FFI_CALL(cif,d_d13i,args,&dr);
|
| 925 |
+
}
|
| 926 |
+
}
|
| 927 |
+
fprintf(out,"->%g\n",dr);
|
| 928 |
+
fflush(out);
|
| 929 |
+
#endif
|
| 930 |
+
return;
|
| 931 |
+
}
|
| 932 |
+
void
|
| 933 |
+
small_structure_return_tests (void)
|
| 934 |
+
{
|
| 935 |
+
#if (!defined(DGTEST)) || DGTEST == 44
|
| 936 |
+
{
|
| 937 |
+
Size1 r = S1_v();
|
| 938 |
+
fprintf(out,"->{%c}\n",r.x1);
|
| 939 |
+
fflush(out);
|
| 940 |
+
memset(&r,0,sizeof(r)); clear_traces();
|
| 941 |
+
{
|
| 942 |
+
ffi_type* ffi_type_Size1_elements[] = { &ffi_type_char, NULL };
|
| 943 |
+
ffi_type ffi_type_Size1;
|
| 944 |
+
ffi_type_Size1.type = FFI_TYPE_STRUCT;
|
| 945 |
+
ffi_type_Size1.size = sizeof(Size1);
|
| 946 |
+
ffi_type_Size1.alignment = alignof_slot(Size1);
|
| 947 |
+
ffi_type_Size1.elements = ffi_type_Size1_elements;
|
| 948 |
+
ffi_cif cif;
|
| 949 |
+
FFI_PREP_CIF_NOARGS(cif,ffi_type_Size1);
|
| 950 |
+
{
|
| 951 |
+
FFI_CALL(cif,S1_v,NULL,&r);
|
| 952 |
+
}
|
| 953 |
+
}
|
| 954 |
+
fprintf(out,"->{%c}\n",r.x1);
|
| 955 |
+
fflush(out);
|
| 956 |
+
}
|
| 957 |
+
#endif
|
| 958 |
+
#if (!defined(DGTEST)) || DGTEST == 45
|
| 959 |
+
{
|
| 960 |
+
Size2 r = S2_v();
|
| 961 |
+
fprintf(out,"->{%c%c}\n",r.x1,r.x2);
|
| 962 |
+
fflush(out);
|
| 963 |
+
memset(&r,0,sizeof(r)); clear_traces();
|
| 964 |
+
{
|
| 965 |
+
ffi_type* ffi_type_Size2_elements[] = { &ffi_type_char, &ffi_type_char, NULL };
|
| 966 |
+
ffi_type ffi_type_Size2;
|
| 967 |
+
ffi_type_Size2.type = FFI_TYPE_STRUCT;
|
| 968 |
+
ffi_type_Size2.size = sizeof(Size2);
|
| 969 |
+
ffi_type_Size2.alignment = alignof_slot(Size2);
|
| 970 |
+
ffi_type_Size2.elements = ffi_type_Size2_elements;
|
| 971 |
+
ffi_cif cif;
|
| 972 |
+
FFI_PREP_CIF_NOARGS(cif,ffi_type_Size2);
|
| 973 |
+
{
|
| 974 |
+
FFI_CALL(cif,S2_v,NULL,&r);
|
| 975 |
+
}
|
| 976 |
+
}
|
| 977 |
+
fprintf(out,"->{%c%c}\n",r.x1,r.x2);
|
| 978 |
+
fflush(out);
|
| 979 |
+
}
|
| 980 |
+
#endif
|
| 981 |
+
#if (!defined(DGTEST)) || DGTEST == 46
|
| 982 |
+
{
|
| 983 |
+
Size3 r = S3_v();
|
| 984 |
+
fprintf(out,"->{%c%c%c}\n",r.x1,r.x2,r.x3);
|
| 985 |
+
fflush(out);
|
| 986 |
+
memset(&r,0,sizeof(r)); clear_traces();
|
| 987 |
+
{
|
| 988 |
+
ffi_type* ffi_type_Size3_elements[] = { &ffi_type_char, &ffi_type_char, &ffi_type_char, NULL };
|
| 989 |
+
ffi_type ffi_type_Size3;
|
| 990 |
+
ffi_type_Size3.type = FFI_TYPE_STRUCT;
|
| 991 |
+
ffi_type_Size3.size = sizeof(Size3);
|
| 992 |
+
ffi_type_Size3.alignment = alignof_slot(Size3);
|
| 993 |
+
ffi_type_Size3.elements = ffi_type_Size3_elements;
|
| 994 |
+
ffi_cif cif;
|
| 995 |
+
FFI_PREP_CIF_NOARGS(cif,ffi_type_Size3);
|
| 996 |
+
{
|
| 997 |
+
FFI_CALL(cif,S3_v,NULL,&r);
|
| 998 |
+
}
|
| 999 |
+
}
|
| 1000 |
+
fprintf(out,"->{%c%c%c}\n",r.x1,r.x2,r.x3);
|
| 1001 |
+
fflush(out);
|
| 1002 |
+
}
|
| 1003 |
+
#endif
|
| 1004 |
+
#if (!defined(DGTEST)) || DGTEST == 47
|
| 1005 |
+
{
|
| 1006 |
+
Size4 r = S4_v();
|
| 1007 |
+
fprintf(out,"->{%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4);
|
| 1008 |
+
fflush(out);
|
| 1009 |
+
memset(&r,0,sizeof(r)); clear_traces();
|
| 1010 |
+
{
|
| 1011 |
+
ffi_type* ffi_type_Size4_elements[] = { &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, NULL };
|
| 1012 |
+
ffi_type ffi_type_Size4;
|
| 1013 |
+
ffi_type_Size4.type = FFI_TYPE_STRUCT;
|
| 1014 |
+
ffi_type_Size4.size = sizeof(Size4);
|
| 1015 |
+
ffi_type_Size4.alignment = alignof_slot(Size4);
|
| 1016 |
+
ffi_type_Size4.elements = ffi_type_Size4_elements;
|
| 1017 |
+
ffi_cif cif;
|
| 1018 |
+
FFI_PREP_CIF_NOARGS(cif,ffi_type_Size4);
|
| 1019 |
+
{
|
| 1020 |
+
FFI_CALL(cif,S4_v,NULL,&r);
|
| 1021 |
+
}
|
| 1022 |
+
}
|
| 1023 |
+
fprintf(out,"->{%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4);
|
| 1024 |
+
fflush(out);
|
| 1025 |
+
}
|
| 1026 |
+
#endif
|
| 1027 |
+
#if (!defined(DGTEST)) || DGTEST == 48
|
| 1028 |
+
{
|
| 1029 |
+
Size7 r = S7_v();
|
| 1030 |
+
fprintf(out,"->{%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7);
|
| 1031 |
+
fflush(out);
|
| 1032 |
+
memset(&r,0,sizeof(r)); clear_traces();
|
| 1033 |
+
{
|
| 1034 |
+
ffi_type* ffi_type_Size7_elements[] = { &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, NULL };
|
| 1035 |
+
ffi_type ffi_type_Size7;
|
| 1036 |
+
ffi_type_Size7.type = FFI_TYPE_STRUCT;
|
| 1037 |
+
ffi_type_Size7.size = sizeof(Size7);
|
| 1038 |
+
ffi_type_Size7.alignment = alignof_slot(Size7);
|
| 1039 |
+
ffi_type_Size7.elements = ffi_type_Size7_elements;
|
| 1040 |
+
ffi_cif cif;
|
| 1041 |
+
FFI_PREP_CIF_NOARGS(cif,ffi_type_Size7);
|
| 1042 |
+
{
|
| 1043 |
+
FFI_CALL(cif,S7_v,NULL,&r);
|
| 1044 |
+
}
|
| 1045 |
+
}
|
| 1046 |
+
fprintf(out,"->{%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7);
|
| 1047 |
+
fflush(out);
|
| 1048 |
+
}
|
| 1049 |
+
#endif
|
| 1050 |
+
#if (!defined(DGTEST)) || DGTEST == 49
|
| 1051 |
+
{
|
| 1052 |
+
Size8 r = S8_v();
|
| 1053 |
+
fprintf(out,"->{%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8);
|
| 1054 |
+
fflush(out);
|
| 1055 |
+
memset(&r,0,sizeof(r)); clear_traces();
|
| 1056 |
+
{
|
| 1057 |
+
ffi_type* ffi_type_Size8_elements[] = { &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, NULL };
|
| 1058 |
+
ffi_type ffi_type_Size8;
|
| 1059 |
+
ffi_type_Size8.type = FFI_TYPE_STRUCT;
|
| 1060 |
+
ffi_type_Size8.size = sizeof(Size8);
|
| 1061 |
+
ffi_type_Size8.alignment = alignof_slot(Size8);
|
| 1062 |
+
ffi_type_Size8.elements = ffi_type_Size8_elements;
|
| 1063 |
+
ffi_cif cif;
|
| 1064 |
+
FFI_PREP_CIF_NOARGS(cif,ffi_type_Size8);
|
| 1065 |
+
{
|
| 1066 |
+
FFI_CALL(cif,S8_v,NULL,&r);
|
| 1067 |
+
}
|
| 1068 |
+
}
|
| 1069 |
+
fprintf(out,"->{%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8);
|
| 1070 |
+
fflush(out);
|
| 1071 |
+
}
|
| 1072 |
+
#endif
|
| 1073 |
+
#if (!defined(DGTEST)) || DGTEST == 50
|
| 1074 |
+
{
|
| 1075 |
+
Size12 r = S12_v();
|
| 1076 |
+
fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12);
|
| 1077 |
+
fflush(out);
|
| 1078 |
+
memset(&r,0,sizeof(r)); clear_traces();
|
| 1079 |
+
{
|
| 1080 |
+
ffi_type* ffi_type_Size12_elements[] = { &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, NULL };
|
| 1081 |
+
ffi_type ffi_type_Size12;
|
| 1082 |
+
ffi_type_Size12.type = FFI_TYPE_STRUCT;
|
| 1083 |
+
ffi_type_Size12.size = sizeof(Size12);
|
| 1084 |
+
ffi_type_Size12.alignment = alignof_slot(Size12);
|
| 1085 |
+
ffi_type_Size12.elements = ffi_type_Size12_elements;
|
| 1086 |
+
ffi_cif cif;
|
| 1087 |
+
FFI_PREP_CIF_NOARGS(cif,ffi_type_Size12);
|
| 1088 |
+
{
|
| 1089 |
+
FFI_CALL(cif,S12_v,NULL,&r);
|
| 1090 |
+
}
|
| 1091 |
+
}
|
| 1092 |
+
fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12);
|
| 1093 |
+
fflush(out);
|
| 1094 |
+
}
|
| 1095 |
+
#endif
|
| 1096 |
+
#if (!defined(DGTEST)) || DGTEST == 51
|
| 1097 |
+
{
|
| 1098 |
+
Size15 r = S15_v();
|
| 1099 |
+
fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15);
|
| 1100 |
+
fflush(out);
|
| 1101 |
+
memset(&r,0,sizeof(r)); clear_traces();
|
| 1102 |
+
{
|
| 1103 |
+
ffi_type* ffi_type_Size15_elements[] = { &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, NULL };
|
| 1104 |
+
ffi_type ffi_type_Size15;
|
| 1105 |
+
ffi_type_Size15.type = FFI_TYPE_STRUCT;
|
| 1106 |
+
ffi_type_Size15.size = sizeof(Size15);
|
| 1107 |
+
ffi_type_Size15.alignment = alignof_slot(Size15);
|
| 1108 |
+
ffi_type_Size15.elements = ffi_type_Size15_elements;
|
| 1109 |
+
ffi_cif cif;
|
| 1110 |
+
FFI_PREP_CIF_NOARGS(cif,ffi_type_Size15);
|
| 1111 |
+
{
|
| 1112 |
+
FFI_CALL(cif,S15_v,NULL,&r);
|
| 1113 |
+
}
|
| 1114 |
+
}
|
| 1115 |
+
fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15);
|
| 1116 |
+
fflush(out);
|
| 1117 |
+
}
|
| 1118 |
+
#endif
|
| 1119 |
+
#if (!defined(DGTEST)) || DGTEST == 52
|
| 1120 |
+
{
|
| 1121 |
+
Size16 r = S16_v();
|
| 1122 |
+
fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15,r.x16);
|
| 1123 |
+
fflush(out);
|
| 1124 |
+
memset(&r,0,sizeof(r)); clear_traces();
|
| 1125 |
+
{
|
| 1126 |
+
ffi_type* ffi_type_Size16_elements[] = { &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, &ffi_type_char, NULL };
|
| 1127 |
+
ffi_type ffi_type_Size16;
|
| 1128 |
+
ffi_type_Size16.type = FFI_TYPE_STRUCT;
|
| 1129 |
+
ffi_type_Size16.size = sizeof(Size16);
|
| 1130 |
+
ffi_type_Size16.alignment = alignof_slot(Size16);
|
| 1131 |
+
ffi_type_Size16.elements = ffi_type_Size16_elements;
|
| 1132 |
+
ffi_cif cif;
|
| 1133 |
+
FFI_PREP_CIF_NOARGS(cif,ffi_type_Size16);
|
| 1134 |
+
{
|
| 1135 |
+
FFI_CALL(cif,S16_v,NULL,&r);
|
| 1136 |
+
}
|
| 1137 |
+
}
|
| 1138 |
+
fprintf(out,"->{%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c}\n",r.x1,r.x2,r.x3,r.x4,r.x5,r.x6,r.x7,r.x8,r.x9,r.x10,r.x11,r.x12,r.x13,r.x14,r.x15,r.x16);
|
| 1139 |
+
fflush(out);
|
| 1140 |
+
}
|
| 1141 |
+
#endif
|
| 1142 |
+
}
|
| 1143 |
+
void
|
| 1144 |
+
structure_tests (void)
|
| 1145 |
+
{
|
| 1146 |
+
Int Ir;
|
| 1147 |
+
Char Cr;
|
| 1148 |
+
Float Fr;
|
| 1149 |
+
Double Dr;
|
| 1150 |
+
J Jr;
|
| 1151 |
+
#ifndef SKIP_EXTRA_STRUCTS
|
| 1152 |
+
T Tr;
|
| 1153 |
+
X Xr;
|
| 1154 |
+
#endif
|
| 1155 |
+
|
| 1156 |
+
#if (!defined(DGTEST)) || DGTEST == 53
|
| 1157 |
+
Ir = I_III(I1,I2,I3);
|
| 1158 |
+
fprintf(out,"->{%d}\n",Ir.x);
|
| 1159 |
+
fflush(out);
|
| 1160 |
+
Ir.x = 0; clear_traces();
|
| 1161 |
+
{
|
| 1162 |
+
ffi_type* ffi_type_Int_elements[] = { &ffi_type_sint, NULL };
|
| 1163 |
+
ffi_type ffi_type_Int;
|
| 1164 |
+
ffi_type_Int.type = FFI_TYPE_STRUCT;
|
| 1165 |
+
ffi_type_Int.size = sizeof(Int);
|
| 1166 |
+
ffi_type_Int.alignment = alignof_slot(Int);
|
| 1167 |
+
ffi_type_Int.elements = ffi_type_Int_elements;
|
| 1168 |
+
ffi_type* argtypes[] = { &ffi_type_Int, &ffi_type_Int, &ffi_type_Int };
|
| 1169 |
+
ffi_cif cif;
|
| 1170 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_Int);
|
| 1171 |
+
{
|
| 1172 |
+
/*const*/ void* args[] = { &I1, &I2, &I3 };
|
| 1173 |
+
FFI_CALL(cif,I_III,args,&Ir);
|
| 1174 |
+
}
|
| 1175 |
+
}
|
| 1176 |
+
fprintf(out,"->{%d}\n",Ir.x);
|
| 1177 |
+
fflush(out);
|
| 1178 |
+
#endif
|
| 1179 |
+
#if (!defined(DGTEST)) || DGTEST == 54
|
| 1180 |
+
Cr = C_CdC(C1,d2,C3);
|
| 1181 |
+
fprintf(out,"->{'%c'}\n",Cr.x);
|
| 1182 |
+
fflush(out);
|
| 1183 |
+
Cr.x = '\0'; clear_traces();
|
| 1184 |
+
{
|
| 1185 |
+
ffi_type* ffi_type_Char_elements[] = { &ffi_type_char, NULL };
|
| 1186 |
+
ffi_type ffi_type_Char;
|
| 1187 |
+
ffi_type_Char.type = FFI_TYPE_STRUCT;
|
| 1188 |
+
ffi_type_Char.size = sizeof(Char);
|
| 1189 |
+
ffi_type_Char.alignment = alignof_slot(Char);
|
| 1190 |
+
ffi_type_Char.elements = ffi_type_Char_elements;
|
| 1191 |
+
ffi_type* argtypes[] = { &ffi_type_Char, &ffi_type_double, &ffi_type_Char };
|
| 1192 |
+
ffi_cif cif;
|
| 1193 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_Char);
|
| 1194 |
+
{
|
| 1195 |
+
/*const*/ void* args[] = { &C1, &d2, &C3 };
|
| 1196 |
+
FFI_CALL(cif,C_CdC,args,&Cr);
|
| 1197 |
+
}
|
| 1198 |
+
}
|
| 1199 |
+
fprintf(out,"->{'%c'}\n",Cr.x);
|
| 1200 |
+
fflush(out);
|
| 1201 |
+
#endif
|
| 1202 |
+
#if (!defined(DGTEST)) || DGTEST == 55
|
| 1203 |
+
Fr = F_Ffd(F1,f2,d3);
|
| 1204 |
+
fprintf(out,"->{%g}\n",Fr.x);
|
| 1205 |
+
fflush(out);
|
| 1206 |
+
Fr.x = 0.0; clear_traces();
|
| 1207 |
+
{
|
| 1208 |
+
ffi_type* ffi_type_Float_elements[] = { &ffi_type_float, NULL };
|
| 1209 |
+
ffi_type ffi_type_Float;
|
| 1210 |
+
ffi_type_Float.type = FFI_TYPE_STRUCT;
|
| 1211 |
+
ffi_type_Float.size = sizeof(Float);
|
| 1212 |
+
ffi_type_Float.alignment = alignof_slot(Float);
|
| 1213 |
+
ffi_type_Float.elements = ffi_type_Float_elements;
|
| 1214 |
+
ffi_type* argtypes[] = { &ffi_type_Float, &ffi_type_float, &ffi_type_double };
|
| 1215 |
+
ffi_cif cif;
|
| 1216 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_Float);
|
| 1217 |
+
{
|
| 1218 |
+
/*const*/ void* args[] = { &F1, &f2, &d3 };
|
| 1219 |
+
FFI_CALL(cif,F_Ffd,args,&Fr);
|
| 1220 |
+
}
|
| 1221 |
+
}
|
| 1222 |
+
fprintf(out,"->{%g}\n",Fr.x);
|
| 1223 |
+
fflush(out);
|
| 1224 |
+
#endif
|
| 1225 |
+
#if (!defined(DGTEST)) || DGTEST == 56
|
| 1226 |
+
Dr = D_fDd(f1,D2,d3);
|
| 1227 |
+
fprintf(out,"->{%g}\n",Dr.x);
|
| 1228 |
+
fflush(out);
|
| 1229 |
+
Dr.x = 0.0; clear_traces();
|
| 1230 |
+
{
|
| 1231 |
+
ffi_type* ffi_type_Double_elements[] = { &ffi_type_double, NULL };
|
| 1232 |
+
ffi_type ffi_type_Double;
|
| 1233 |
+
ffi_type_Double.type = FFI_TYPE_STRUCT;
|
| 1234 |
+
ffi_type_Double.size = sizeof(Double);
|
| 1235 |
+
ffi_type_Double.alignment = alignof_slot(Double);
|
| 1236 |
+
ffi_type_Double.elements = ffi_type_Double_elements;
|
| 1237 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_Double, &ffi_type_double };
|
| 1238 |
+
ffi_cif cif;
|
| 1239 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_Double);
|
| 1240 |
+
{
|
| 1241 |
+
/*const*/ void* args[] = { &f1, &D2, &d3 };
|
| 1242 |
+
FFI_CALL(cif,D_fDd,args,&Dr);
|
| 1243 |
+
}
|
| 1244 |
+
}
|
| 1245 |
+
fprintf(out,"->{%g}\n",Dr.x);
|
| 1246 |
+
fflush(out);
|
| 1247 |
+
#endif
|
| 1248 |
+
#if (!defined(DGTEST)) || DGTEST == 57
|
| 1249 |
+
Dr = D_Dfd(D1,f2,d3);
|
| 1250 |
+
fprintf(out,"->{%g}\n",Dr.x);
|
| 1251 |
+
fflush(out);
|
| 1252 |
+
Dr.x = 0.0; clear_traces();
|
| 1253 |
+
{
|
| 1254 |
+
ffi_type* ffi_type_Double_elements[] = { &ffi_type_double, NULL };
|
| 1255 |
+
ffi_type ffi_type_Double;
|
| 1256 |
+
ffi_type_Double.type = FFI_TYPE_STRUCT;
|
| 1257 |
+
ffi_type_Double.size = sizeof(Double);
|
| 1258 |
+
ffi_type_Double.alignment = alignof_slot(Double);
|
| 1259 |
+
ffi_type_Double.elements = ffi_type_Double_elements;
|
| 1260 |
+
ffi_type* argtypes[] = { &ffi_type_Double, &ffi_type_float, &ffi_type_double };
|
| 1261 |
+
ffi_cif cif;
|
| 1262 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_Double);
|
| 1263 |
+
{
|
| 1264 |
+
/*const*/ void* args[] = { &D1, &f2, &d3 };
|
| 1265 |
+
FFI_CALL(cif,D_Dfd,args,&Dr);
|
| 1266 |
+
}
|
| 1267 |
+
}
|
| 1268 |
+
fprintf(out,"->{%g}\n",Dr.x);
|
| 1269 |
+
fflush(out);
|
| 1270 |
+
#endif
|
| 1271 |
+
#if (!defined(DGTEST)) || DGTEST == 58
|
| 1272 |
+
Jr = J_JiJ(J1,i2,J2);
|
| 1273 |
+
fprintf(out,"->{%ld,%ld}\n",Jr.l1,Jr.l2);
|
| 1274 |
+
fflush(out);
|
| 1275 |
+
Jr.l1 = Jr.l2 = 0; clear_traces();
|
| 1276 |
+
{
|
| 1277 |
+
ffi_type* ffi_type_J_elements[] = { &ffi_type_slong, &ffi_type_slong, NULL };
|
| 1278 |
+
ffi_type ffi_type_J;
|
| 1279 |
+
ffi_type_J.type = FFI_TYPE_STRUCT;
|
| 1280 |
+
ffi_type_J.size = sizeof(J);
|
| 1281 |
+
ffi_type_J.alignment = alignof_slot(J);
|
| 1282 |
+
ffi_type_J.elements = ffi_type_J_elements;
|
| 1283 |
+
ffi_type* argtypes[] = { &ffi_type_J, &ffi_type_sint, &ffi_type_J };
|
| 1284 |
+
ffi_cif cif;
|
| 1285 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_J);
|
| 1286 |
+
{
|
| 1287 |
+
/*const*/ void* args[] = { &J1, &i2, &J2 };
|
| 1288 |
+
FFI_CALL(cif,J_JiJ,args,&Jr);
|
| 1289 |
+
}
|
| 1290 |
+
}
|
| 1291 |
+
fprintf(out,"->{%ld,%ld}\n",Jr.l1,Jr.l2);
|
| 1292 |
+
fflush(out);
|
| 1293 |
+
#endif
|
| 1294 |
+
#ifndef SKIP_EXTRA_STRUCTS
|
| 1295 |
+
#if (!defined(DGTEST)) || DGTEST == 59
|
| 1296 |
+
Tr = T_TcT(T1,' ',T2);
|
| 1297 |
+
fprintf(out,"->{\"%c%c%c\"}\n",Tr.c[0],Tr.c[1],Tr.c[2]);
|
| 1298 |
+
fflush(out);
|
| 1299 |
+
Tr.c[0] = Tr.c[1] = Tr.c[2] = 0; clear_traces();
|
| 1300 |
+
{
|
| 1301 |
+
ffi_type* ffi_type_T_elements[] = { ??, NULL };
|
| 1302 |
+
ffi_type ffi_type_T;
|
| 1303 |
+
ffi_type_T.type = FFI_TYPE_STRUCT;
|
| 1304 |
+
ffi_type_T.size = sizeof(T);
|
| 1305 |
+
ffi_type_T.alignment = alignof_slot(T);
|
| 1306 |
+
ffi_type_T.elements = ffi_type_T_elements;
|
| 1307 |
+
ffi_type* argtypes[] = { &ffi_type_T, &ffi_type_char, &ffi_type_T };
|
| 1308 |
+
ffi_cif cif;
|
| 1309 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_T);
|
| 1310 |
+
{
|
| 1311 |
+
char space = ' ';
|
| 1312 |
+
/*const*/ void* args[] = { &T1, &space, &T2 };
|
| 1313 |
+
FFI_CALL(cif,T_TcT,args,&Tr);
|
| 1314 |
+
}
|
| 1315 |
+
}
|
| 1316 |
+
fprintf(out,"->{\"%c%c%c\"}\n",Tr.c[0],Tr.c[1],Tr.c[2]);
|
| 1317 |
+
fflush(out);
|
| 1318 |
+
#endif
|
| 1319 |
+
#if (!defined(DGTEST)) || DGTEST == 60
|
| 1320 |
+
Xr = X_BcdB(B1,c2,d3,B2);
|
| 1321 |
+
fprintf(out,"->{\"%s\",'%c'}\n",Xr.c,Xr.c1);
|
| 1322 |
+
fflush(out);
|
| 1323 |
+
Xr.c[0]=Xr.c1='\0'; clear_traces();
|
| 1324 |
+
{
|
| 1325 |
+
ffi_type* ffi_type_X_elements[] = { ??, NULL };
|
| 1326 |
+
ffi_type ffi_type_X;
|
| 1327 |
+
ffi_type_X.type = FFI_TYPE_STRUCT;
|
| 1328 |
+
ffi_type_X.size = sizeof(X);
|
| 1329 |
+
ffi_type_X.alignment = alignof_slot(X);
|
| 1330 |
+
ffi_type_X.elements = ffi_type_X_elements;
|
| 1331 |
+
ffi_type* argtypes[] = { &ffi_type_X, &ffi_type_char, &ffi_type_double, &ffi_type_X };
|
| 1332 |
+
ffi_cif cif;
|
| 1333 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_X);
|
| 1334 |
+
{
|
| 1335 |
+
/*const*/ void* args[] = { &B1, &c2, &d3, &B2 };
|
| 1336 |
+
FFI_CALL(cif,X_BcdB,args,&Xr);
|
| 1337 |
+
}
|
| 1338 |
+
}
|
| 1339 |
+
fprintf(out,"->{\"%s\",'%c'}\n",Xr.c,Xr.c1);
|
| 1340 |
+
fflush(out);
|
| 1341 |
+
#endif
|
| 1342 |
+
#endif
|
| 1343 |
+
|
| 1344 |
+
return;
|
| 1345 |
+
}
|
| 1346 |
+
|
| 1347 |
+
void
|
| 1348 |
+
gpargs_boundary_tests (void)
|
| 1349 |
+
{
|
| 1350 |
+
ffi_type* ffi_type_K_elements[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, NULL };
|
| 1351 |
+
ffi_type ffi_type_K;
|
| 1352 |
+
ffi_type* ffi_type_L_elements[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, NULL };
|
| 1353 |
+
ffi_type ffi_type_L;
|
| 1354 |
+
long lr;
|
| 1355 |
+
long long llr;
|
| 1356 |
+
float fr;
|
| 1357 |
+
double dr;
|
| 1358 |
+
|
| 1359 |
+
ffi_type_K.type = FFI_TYPE_STRUCT;
|
| 1360 |
+
ffi_type_K.size = sizeof(K);
|
| 1361 |
+
ffi_type_K.alignment = alignof_slot(K);
|
| 1362 |
+
ffi_type_K.elements = ffi_type_K_elements;
|
| 1363 |
+
|
| 1364 |
+
ffi_type_L.type = FFI_TYPE_STRUCT;
|
| 1365 |
+
ffi_type_L.size = sizeof(L);
|
| 1366 |
+
ffi_type_L.alignment = alignof_slot(L);
|
| 1367 |
+
ffi_type_L.elements = ffi_type_L_elements;
|
| 1368 |
+
|
| 1369 |
+
#if (!defined(DGTEST)) || DGTEST == 61
|
| 1370 |
+
lr = l_l0K(K1,l9);
|
| 1371 |
+
fprintf(out,"->%ld\n",lr);
|
| 1372 |
+
fflush(out);
|
| 1373 |
+
lr = 0; clear_traces();
|
| 1374 |
+
{
|
| 1375 |
+
ffi_type* argtypes[] = { &ffi_type_K, &ffi_type_slong };
|
| 1376 |
+
ffi_cif cif;
|
| 1377 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slong);
|
| 1378 |
+
{
|
| 1379 |
+
/*const*/ void* args[] = { &K1, &l9 };
|
| 1380 |
+
FFI_CALL(cif,l_l0K,args,&lr);
|
| 1381 |
+
}
|
| 1382 |
+
}
|
| 1383 |
+
fprintf(out,"->%ld\n",lr);
|
| 1384 |
+
fflush(out);
|
| 1385 |
+
#endif
|
| 1386 |
+
#if (!defined(DGTEST)) || DGTEST == 62
|
| 1387 |
+
lr = l_l1K(l1,K1,l9);
|
| 1388 |
+
fprintf(out,"->%ld\n",lr);
|
| 1389 |
+
fflush(out);
|
| 1390 |
+
lr = 0; clear_traces();
|
| 1391 |
+
{
|
| 1392 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_K, &ffi_type_slong };
|
| 1393 |
+
ffi_cif cif;
|
| 1394 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slong);
|
| 1395 |
+
{
|
| 1396 |
+
/*const*/ void* args[] = { &l1, &K1, &l9 };
|
| 1397 |
+
FFI_CALL(cif,l_l1K,args,&lr);
|
| 1398 |
+
}
|
| 1399 |
+
}
|
| 1400 |
+
fprintf(out,"->%ld\n",lr);
|
| 1401 |
+
fflush(out);
|
| 1402 |
+
#endif
|
| 1403 |
+
#if (!defined(DGTEST)) || DGTEST == 63
|
| 1404 |
+
lr = l_l2K(l1,l2,K1,l9);
|
| 1405 |
+
fprintf(out,"->%ld\n",lr);
|
| 1406 |
+
fflush(out);
|
| 1407 |
+
lr = 0; clear_traces();
|
| 1408 |
+
{
|
| 1409 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_K, &ffi_type_slong };
|
| 1410 |
+
ffi_cif cif;
|
| 1411 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slong);
|
| 1412 |
+
{
|
| 1413 |
+
/*const*/ void* args[] = { &l1, &l2, &K1, &l9 };
|
| 1414 |
+
FFI_CALL(cif,l_l2K,args,&lr);
|
| 1415 |
+
}
|
| 1416 |
+
}
|
| 1417 |
+
fprintf(out,"->%ld\n",lr);
|
| 1418 |
+
fflush(out);
|
| 1419 |
+
#endif
|
| 1420 |
+
#if (!defined(DGTEST)) || DGTEST == 64
|
| 1421 |
+
lr = l_l3K(l1,l2,l3,K1,l9);
|
| 1422 |
+
fprintf(out,"->%ld\n",lr);
|
| 1423 |
+
fflush(out);
|
| 1424 |
+
lr = 0; clear_traces();
|
| 1425 |
+
{
|
| 1426 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_K, &ffi_type_slong };
|
| 1427 |
+
ffi_cif cif;
|
| 1428 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slong);
|
| 1429 |
+
{
|
| 1430 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &K1, &l9 };
|
| 1431 |
+
FFI_CALL(cif,l_l3K,args,&lr);
|
| 1432 |
+
}
|
| 1433 |
+
}
|
| 1434 |
+
fprintf(out,"->%ld\n",lr);
|
| 1435 |
+
fflush(out);
|
| 1436 |
+
#endif
|
| 1437 |
+
#if (!defined(DGTEST)) || DGTEST == 65
|
| 1438 |
+
lr = l_l4K(l1,l2,l3,l4,K1,l9);
|
| 1439 |
+
fprintf(out,"->%ld\n",lr);
|
| 1440 |
+
fflush(out);
|
| 1441 |
+
lr = 0; clear_traces();
|
| 1442 |
+
{
|
| 1443 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_K, &ffi_type_slong };
|
| 1444 |
+
ffi_cif cif;
|
| 1445 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slong);
|
| 1446 |
+
{
|
| 1447 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &l4, &K1, &l9 };
|
| 1448 |
+
FFI_CALL(cif,l_l4K,args,&lr);
|
| 1449 |
+
}
|
| 1450 |
+
}
|
| 1451 |
+
fprintf(out,"->%ld\n",lr);
|
| 1452 |
+
fflush(out);
|
| 1453 |
+
#endif
|
| 1454 |
+
#if (!defined(DGTEST)) || DGTEST == 66
|
| 1455 |
+
lr = l_l5K(l1,l2,l3,l4,l5,K1,l9);
|
| 1456 |
+
fprintf(out,"->%ld\n",lr);
|
| 1457 |
+
fflush(out);
|
| 1458 |
+
lr = 0; clear_traces();
|
| 1459 |
+
{
|
| 1460 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_K, &ffi_type_slong };
|
| 1461 |
+
ffi_cif cif;
|
| 1462 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slong);
|
| 1463 |
+
{
|
| 1464 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &l4, &l5, &K1, &l9 };
|
| 1465 |
+
FFI_CALL(cif,l_l5K,args,&lr);
|
| 1466 |
+
}
|
| 1467 |
+
}
|
| 1468 |
+
fprintf(out,"->%ld\n",lr);
|
| 1469 |
+
fflush(out);
|
| 1470 |
+
#endif
|
| 1471 |
+
#if (!defined(DGTEST)) || DGTEST == 67
|
| 1472 |
+
lr = l_l6K(l1,l2,l3,l4,l5,l6,K1,l9);
|
| 1473 |
+
fprintf(out,"->%ld\n",lr);
|
| 1474 |
+
fflush(out);
|
| 1475 |
+
lr = 0; clear_traces();
|
| 1476 |
+
{
|
| 1477 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_K, &ffi_type_slong };
|
| 1478 |
+
ffi_cif cif;
|
| 1479 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slong);
|
| 1480 |
+
{
|
| 1481 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &l4, &l5, &l6, &K1, &l9 };
|
| 1482 |
+
FFI_CALL(cif,l_l6K,args,&lr);
|
| 1483 |
+
}
|
| 1484 |
+
}
|
| 1485 |
+
fprintf(out,"->%ld\n",lr);
|
| 1486 |
+
fflush(out);
|
| 1487 |
+
#endif
|
| 1488 |
+
#if (!defined(DGTEST)) || DGTEST == 68
|
| 1489 |
+
fr = f_f17l3L(f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,l6,l7,l8,L1);
|
| 1490 |
+
fprintf(out,"->%g\n",fr);
|
| 1491 |
+
fflush(out);
|
| 1492 |
+
fr = 0.0; clear_traces();
|
| 1493 |
+
{
|
| 1494 |
+
ffi_type* argtypes[] = { &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_float, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_L };
|
| 1495 |
+
ffi_cif cif;
|
| 1496 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_float);
|
| 1497 |
+
{
|
| 1498 |
+
/*const*/ void* args[] = { &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8, &f9, &f10, &f11, &f12, &f13, &f14, &f15, &f16, &f17, &l6, &l7, &l8, &L1 };
|
| 1499 |
+
FFI_CALL(cif,f_f17l3L,args,&fr);
|
| 1500 |
+
}
|
| 1501 |
+
}
|
| 1502 |
+
fprintf(out,"->%g\n",fr);
|
| 1503 |
+
fflush(out);
|
| 1504 |
+
#endif
|
| 1505 |
+
#if (!defined(DGTEST)) || DGTEST == 69
|
| 1506 |
+
dr = d_d17l3L(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15,d16,d17,l6,l7,l8,L1);
|
| 1507 |
+
fprintf(out,"->%g\n",dr);
|
| 1508 |
+
fflush(out);
|
| 1509 |
+
dr = 0.0; clear_traces();
|
| 1510 |
+
{
|
| 1511 |
+
ffi_type* argtypes[] = { &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_double, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_L };
|
| 1512 |
+
ffi_cif cif;
|
| 1513 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 1514 |
+
{
|
| 1515 |
+
/*const*/ void* args[] = { &d1, &d2, &d3, &d4, &d5, &d6, &d7, &d8, &d9, &d10, &d11, &d12, &d13, &d14, &d15, &d16, &d17, &l6, &l7, &l8, &L1 };
|
| 1516 |
+
FFI_CALL(cif,d_d17l3L,args,&dr);
|
| 1517 |
+
}
|
| 1518 |
+
}
|
| 1519 |
+
fprintf(out,"->%g\n",dr);
|
| 1520 |
+
fflush(out);
|
| 1521 |
+
#endif
|
| 1522 |
+
#if (!defined(DGTEST)) || DGTEST == 70
|
| 1523 |
+
llr = ll_l2ll(l1,l2,ll1,l9);
|
| 1524 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1525 |
+
fflush(out);
|
| 1526 |
+
llr = 0; clear_traces();
|
| 1527 |
+
{
|
| 1528 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slonglong, &ffi_type_slong };
|
| 1529 |
+
ffi_cif cif;
|
| 1530 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slonglong);
|
| 1531 |
+
{
|
| 1532 |
+
/*const*/ void* args[] = { &l1, &l2, &ll1, &l9 };
|
| 1533 |
+
FFI_CALL(cif,ll_l2ll,args,&llr);
|
| 1534 |
+
}
|
| 1535 |
+
}
|
| 1536 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1537 |
+
fflush(out);
|
| 1538 |
+
#endif
|
| 1539 |
+
#if (!defined(DGTEST)) || DGTEST == 71
|
| 1540 |
+
llr = ll_l3ll(l1,l2,l3,ll1,l9);
|
| 1541 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1542 |
+
fflush(out);
|
| 1543 |
+
llr = 0; clear_traces();
|
| 1544 |
+
{
|
| 1545 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slonglong, &ffi_type_slong };
|
| 1546 |
+
ffi_cif cif;
|
| 1547 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slonglong);
|
| 1548 |
+
{
|
| 1549 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &ll1, &l9 };
|
| 1550 |
+
FFI_CALL(cif,ll_l3ll,args,&llr);
|
| 1551 |
+
}
|
| 1552 |
+
}
|
| 1553 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1554 |
+
fflush(out);
|
| 1555 |
+
#endif
|
| 1556 |
+
#if (!defined(DGTEST)) || DGTEST == 72
|
| 1557 |
+
llr = ll_l4ll(l1,l2,l3,l4,ll1,l9);
|
| 1558 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1559 |
+
fflush(out);
|
| 1560 |
+
llr = 0; clear_traces();
|
| 1561 |
+
{
|
| 1562 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slonglong, &ffi_type_slong };
|
| 1563 |
+
ffi_cif cif;
|
| 1564 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slonglong);
|
| 1565 |
+
{
|
| 1566 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &l4, &ll1, &l9 };
|
| 1567 |
+
FFI_CALL(cif,ll_l4ll,args,&llr);
|
| 1568 |
+
}
|
| 1569 |
+
}
|
| 1570 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1571 |
+
fflush(out);
|
| 1572 |
+
#endif
|
| 1573 |
+
#if (!defined(DGTEST)) || DGTEST == 73
|
| 1574 |
+
llr = ll_l5ll(l1,l2,l3,l4,l5,ll1,l9);
|
| 1575 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1576 |
+
fflush(out);
|
| 1577 |
+
llr = 0; clear_traces();
|
| 1578 |
+
{
|
| 1579 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slonglong, &ffi_type_slong };
|
| 1580 |
+
ffi_cif cif;
|
| 1581 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slonglong);
|
| 1582 |
+
{
|
| 1583 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &l4, &l5, &ll1, &l9 };
|
| 1584 |
+
FFI_CALL(cif,ll_l5ll,args,&llr);
|
| 1585 |
+
}
|
| 1586 |
+
}
|
| 1587 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1588 |
+
fflush(out);
|
| 1589 |
+
#endif
|
| 1590 |
+
#if (!defined(DGTEST)) || DGTEST == 74
|
| 1591 |
+
llr = ll_l6ll(l1,l2,l3,l4,l5,l6,ll1,l9);
|
| 1592 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1593 |
+
fflush(out);
|
| 1594 |
+
llr = 0; clear_traces();
|
| 1595 |
+
{
|
| 1596 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slonglong, &ffi_type_slong };
|
| 1597 |
+
ffi_cif cif;
|
| 1598 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slonglong);
|
| 1599 |
+
{
|
| 1600 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &l4, &l5, &l6, &ll1, &l9 };
|
| 1601 |
+
FFI_CALL(cif,ll_l6ll,args,&llr);
|
| 1602 |
+
}
|
| 1603 |
+
}
|
| 1604 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1605 |
+
fflush(out);
|
| 1606 |
+
#endif
|
| 1607 |
+
#if (!defined(DGTEST)) || DGTEST == 75
|
| 1608 |
+
llr = ll_l7ll(l1,l2,l3,l4,l5,l6,l7,ll1,l9);
|
| 1609 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1610 |
+
fflush(out);
|
| 1611 |
+
llr = 0; clear_traces();
|
| 1612 |
+
{
|
| 1613 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slonglong, &ffi_type_slong };
|
| 1614 |
+
ffi_cif cif;
|
| 1615 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_slonglong);
|
| 1616 |
+
{
|
| 1617 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &l4, &l5, &l6, &l7, &ll1, &l9 };
|
| 1618 |
+
FFI_CALL(cif,ll_l7ll,args,&llr);
|
| 1619 |
+
}
|
| 1620 |
+
}
|
| 1621 |
+
fprintf(out,"->0x%lx%08lx\n",(long)(llr>>32),(long)(llr&0xffffffff));
|
| 1622 |
+
fflush(out);
|
| 1623 |
+
#endif
|
| 1624 |
+
#if (!defined(DGTEST)) || DGTEST == 76
|
| 1625 |
+
dr = d_l2d(l1,l2,d2,l9);
|
| 1626 |
+
fprintf(out,"->%g\n",dr);
|
| 1627 |
+
fflush(out);
|
| 1628 |
+
dr = 0.0; clear_traces();
|
| 1629 |
+
{
|
| 1630 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_double, &ffi_type_slong };
|
| 1631 |
+
ffi_cif cif;
|
| 1632 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 1633 |
+
{
|
| 1634 |
+
/*const*/ void* args[] = { &l1, &l2, &d2, &l9 };
|
| 1635 |
+
FFI_CALL(cif,d_l2d,args,&dr);
|
| 1636 |
+
}
|
| 1637 |
+
}
|
| 1638 |
+
fprintf(out,"->%g\n",dr);
|
| 1639 |
+
fflush(out);
|
| 1640 |
+
#endif
|
| 1641 |
+
#if (!defined(DGTEST)) || DGTEST == 77
|
| 1642 |
+
dr = d_l3d(l1,l2,l3,d2,l9);
|
| 1643 |
+
fprintf(out,"->%g\n",dr);
|
| 1644 |
+
fflush(out);
|
| 1645 |
+
dr = 0.0; clear_traces();
|
| 1646 |
+
{
|
| 1647 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_double, &ffi_type_slong };
|
| 1648 |
+
ffi_cif cif;
|
| 1649 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 1650 |
+
{
|
| 1651 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &d2, &l9 };
|
| 1652 |
+
FFI_CALL(cif,d_l3d,args,&dr);
|
| 1653 |
+
}
|
| 1654 |
+
}
|
| 1655 |
+
fprintf(out,"->%g\n",dr);
|
| 1656 |
+
fflush(out);
|
| 1657 |
+
#endif
|
| 1658 |
+
#if (!defined(DGTEST)) || DGTEST == 78
|
| 1659 |
+
dr = d_l4d(l1,l2,l3,l4,d2,l9);
|
| 1660 |
+
fprintf(out,"->%g\n",dr);
|
| 1661 |
+
fflush(out);
|
| 1662 |
+
dr = 0.0; clear_traces();
|
| 1663 |
+
{
|
| 1664 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_double, &ffi_type_slong };
|
| 1665 |
+
ffi_cif cif;
|
| 1666 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 1667 |
+
{
|
| 1668 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &l4, &d2, &l9 };
|
| 1669 |
+
FFI_CALL(cif,d_l4d,args,&dr);
|
| 1670 |
+
}
|
| 1671 |
+
}
|
| 1672 |
+
fprintf(out,"->%g\n",dr);
|
| 1673 |
+
fflush(out);
|
| 1674 |
+
#endif
|
| 1675 |
+
#if (!defined(DGTEST)) || DGTEST == 79
|
| 1676 |
+
dr = d_l5d(l1,l2,l3,l4,l5,d2,l9);
|
| 1677 |
+
fprintf(out,"->%g\n",dr);
|
| 1678 |
+
fflush(out);
|
| 1679 |
+
dr = 0.0; clear_traces();
|
| 1680 |
+
{
|
| 1681 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_double, &ffi_type_slong };
|
| 1682 |
+
ffi_cif cif;
|
| 1683 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 1684 |
+
{
|
| 1685 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &l4, &l5, &d2, &l9 };
|
| 1686 |
+
FFI_CALL(cif,d_l5d,args,&dr);
|
| 1687 |
+
}
|
| 1688 |
+
}
|
| 1689 |
+
fprintf(out,"->%g\n",dr);
|
| 1690 |
+
fflush(out);
|
| 1691 |
+
#endif
|
| 1692 |
+
#if (!defined(DGTEST)) || DGTEST == 80
|
| 1693 |
+
dr = d_l6d(l1,l2,l3,l4,l5,l6,d2,l9);
|
| 1694 |
+
fprintf(out,"->%g\n",dr);
|
| 1695 |
+
fflush(out);
|
| 1696 |
+
dr = 0.0; clear_traces();
|
| 1697 |
+
{
|
| 1698 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_double, &ffi_type_slong };
|
| 1699 |
+
ffi_cif cif;
|
| 1700 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 1701 |
+
{
|
| 1702 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &l4, &l5, &l6, &d2, &l9 };
|
| 1703 |
+
FFI_CALL(cif,d_l6d,args,&dr);
|
| 1704 |
+
}
|
| 1705 |
+
}
|
| 1706 |
+
fprintf(out,"->%g\n",dr);
|
| 1707 |
+
fflush(out);
|
| 1708 |
+
#endif
|
| 1709 |
+
#if (!defined(DGTEST)) || DGTEST == 81
|
| 1710 |
+
dr = d_l7d(l1,l2,l3,l4,l5,l6,l7,d2,l9);
|
| 1711 |
+
fprintf(out,"->%g\n",dr);
|
| 1712 |
+
fflush(out);
|
| 1713 |
+
dr = 0.0; clear_traces();
|
| 1714 |
+
{
|
| 1715 |
+
ffi_type* argtypes[] = { &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_slong, &ffi_type_double, &ffi_type_slong };
|
| 1716 |
+
ffi_cif cif;
|
| 1717 |
+
FFI_PREP_CIF(cif,argtypes,ffi_type_double);
|
| 1718 |
+
{
|
| 1719 |
+
/*const*/ void* args[] = { &l1, &l2, &l3, &l4, &l5, &l6, &l7, &d2, &l9 };
|
| 1720 |
+
FFI_CALL(cif,d_l7d,args,&dr);
|
| 1721 |
+
}
|
| 1722 |
+
}
|
| 1723 |
+
fprintf(out,"->%g\n",dr);
|
| 1724 |
+
fflush(out);
|
| 1725 |
+
#endif
|
| 1726 |
+
return;
|
| 1727 |
+
}
|
| 1728 |
+
|
| 1729 |
+
int
|
| 1730 |
+
main (void)
|
| 1731 |
+
{
|
| 1732 |
+
ffi_type_char = (char)(-1) < 0 ? ffi_type_schar : ffi_type_uchar;
|
| 1733 |
+
out = stdout;
|
| 1734 |
+
|
| 1735 |
+
void_tests();
|
| 1736 |
+
int_tests();
|
| 1737 |
+
float_tests();
|
| 1738 |
+
double_tests();
|
| 1739 |
+
pointer_tests();
|
| 1740 |
+
mixed_number_tests();
|
| 1741 |
+
small_structure_return_tests();
|
| 1742 |
+
structure_tests();
|
| 1743 |
+
gpargs_boundary_tests();
|
| 1744 |
+
|
| 1745 |
+
exit(0);
|
| 1746 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/test-callback.c
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.bhaible/testcases.c
ADDED
|
@@ -0,0 +1,747 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1993 Bill Triggs <Bill.Triggs@inrialpes.fr>
|
| 3 |
+
* Copyright 1995-2017 Bruno Haible <bruno@clisp.org>
|
| 4 |
+
*
|
| 5 |
+
* This program is free software: you can redistribute it and/or modify
|
| 6 |
+
* it under the terms of the GNU General Public License as published by
|
| 7 |
+
* the Free Software Foundation; either version 3 of the License, or
|
| 8 |
+
* (at your option) any later version.
|
| 9 |
+
*
|
| 10 |
+
* This program is distributed in the hope that it will be useful,
|
| 11 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
+
* GNU General Public License for more details.
|
| 14 |
+
*
|
| 15 |
+
* You should have received a copy of the GNU General Public License
|
| 16 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
+
*/
|
| 18 |
+
|
| 19 |
+
/* This file defines test functions of selected signatures, that exercise
|
| 20 |
+
dark corners of the various ABIs. */
|
| 21 |
+
|
| 22 |
+
#include <stdio.h>
|
| 23 |
+
|
| 24 |
+
FILE* out;
|
| 25 |
+
|
| 26 |
+
#define uchar unsigned char
|
| 27 |
+
#define ushort unsigned short
|
| 28 |
+
#define uint unsigned int
|
| 29 |
+
#define ulong unsigned long
|
| 30 |
+
|
| 31 |
+
typedef struct { char x; } Char;
|
| 32 |
+
typedef struct { short x; } Short;
|
| 33 |
+
typedef struct { int x; } Int;
|
| 34 |
+
typedef struct { long x; } Long;
|
| 35 |
+
typedef struct { float x; } Float;
|
| 36 |
+
typedef struct { double x; } Double;
|
| 37 |
+
typedef struct { char c; float f; } A;
|
| 38 |
+
typedef struct { double d; int i[3]; } B;
|
| 39 |
+
typedef struct { long l1; long l2; } J;
|
| 40 |
+
typedef struct { long l1; long l2; long l3; long l4; } K;
|
| 41 |
+
typedef struct { long l1; long l2; long l3; long l4; long l5; long l6; } L;
|
| 42 |
+
typedef struct { char x1; } Size1;
|
| 43 |
+
typedef struct { char x1; char x2; } Size2;
|
| 44 |
+
typedef struct { char x1; char x2; char x3; } Size3;
|
| 45 |
+
typedef struct { char x1; char x2; char x3; char x4; } Size4;
|
| 46 |
+
typedef struct {
|
| 47 |
+
char x1; char x2; char x3; char x4; char x5; char x6; char x7;
|
| 48 |
+
} Size7;
|
| 49 |
+
typedef struct {
|
| 50 |
+
char x1; char x2; char x3; char x4; char x5; char x6; char x7; char x8;
|
| 51 |
+
} Size8;
|
| 52 |
+
typedef struct {
|
| 53 |
+
char x1; char x2; char x3; char x4; char x5; char x6; char x7; char x8;
|
| 54 |
+
char x9; char x10; char x11; char x12;
|
| 55 |
+
} Size12;
|
| 56 |
+
typedef struct {
|
| 57 |
+
char x1; char x2; char x3; char x4; char x5; char x6; char x7; char x8;
|
| 58 |
+
char x9; char x10; char x11; char x12; char x13; char x14; char x15;
|
| 59 |
+
} Size15;
|
| 60 |
+
typedef struct {
|
| 61 |
+
char x1; char x2; char x3; char x4; char x5; char x6; char x7; char x8;
|
| 62 |
+
char x9; char x10; char x11; char x12; char x13; char x14; char x15; char x16;
|
| 63 |
+
} Size16;
|
| 64 |
+
typedef struct { char c[3]; } T;
|
| 65 |
+
typedef struct { char c[33],c1; } X;
|
| 66 |
+
|
| 67 |
+
/* Don't use a number over 127, as some systems use signed chars and
|
| 68 |
+
the test case 25 doesn't account for this, resulting in undefined
|
| 69 |
+
behavior. See https://github.com/libffi/libffi/issues/598. */
|
| 70 |
+
char c1='a', c2=127, c3=(char)1;
|
| 71 |
+
|
| 72 |
+
short s1=32767, s2=(short)32768, s3=3, s4=4, s5=5, s6=6, s7=7, s8=8, s9=9;
|
| 73 |
+
int i1=1, i2=2, i3=3, i4=4, i5=5, i6=6, i7=7, i8=8, i9=9,
|
| 74 |
+
i10=11, i11=12, i12=13, i13=14, i14=15, i15=16, i16=17;
|
| 75 |
+
long l1=1, l2=2, l3=3, l4=4, l5=5, l6=6, l7=7, l8=8, l9=9;
|
| 76 |
+
long long ll1 = 3875056143130689530LL;
|
| 77 |
+
float f1=0.1f, f2=0.2f, f3=0.3f, f4=0.4f, f5=0.5f, f6=0.6f, f7=0.7f, f8=0.8f, f9=0.9f,
|
| 78 |
+
f10=1.1f, f11=1.2f, f12=1.3f, f13=1.4f, f14=1.5f, f15=1.6f, f16=1.7f, f17=1.8f,
|
| 79 |
+
f18=1.9f, f19=2.1f, f20=2.2f, f21=2.3f, f22=2.4f, f23=2.5f, f24=2.6f;
|
| 80 |
+
double d1=0.1, d2=0.2, d3=0.3, d4=0.4, d5=0.5, d6=0.6, d7=0.7, d8=0.8, d9=0.9,
|
| 81 |
+
d10=1.1, d11=1.2, d12=1.3, d13=1.4, d14=1.5, d15=1.6, d16=1.7, d17=1.8;
|
| 82 |
+
|
| 83 |
+
uchar uc1='a', uc2=127, uc3=128, uc4=255, uc5=(uchar)-1;
|
| 84 |
+
ushort us1=1, us2=2, us3=3, us4=4, us5=5, us6=6, us7=7, us8=8, us9=9;
|
| 85 |
+
uint ui1=1, ui2=2, ui3=3, ui4=4, ui5=5, ui6=6, ui7=7, ui8=8, ui9=9;
|
| 86 |
+
ulong ul1=1, ul2=2, ul3=3, ul4=4, ul5=5, ul6=6, ul7=7, ul8=8, ul9=9;
|
| 87 |
+
|
| 88 |
+
char *str1="hello",str2[]="goodbye",*str3="still here?";
|
| 89 |
+
Char C1={'A'}, C2={'B'}, C3={'C'}, C4={'\377'}, C5={(char)(-1)};
|
| 90 |
+
Short S1={1}, S2={2}, S3={3}, S4={4}, S5={5}, S6={6}, S7={7}, S8={8}, S9={9};
|
| 91 |
+
Int I1={1}, I2={2}, I3={3}, I4={4}, I5={5}, I6={6}, I7={7}, I8={8}, I9={9};
|
| 92 |
+
Float F1={0.1f}, F2={0.2f}, F3={0.3f}, F4={0.4f}, F5={0.5f}, F6={0.6f}, F7={0.7f}, F8={0.8f}, F9={0.9f};
|
| 93 |
+
Double D1={0.1}, D2={0.2}, D3={0.3}, D4={0.4}, D5={0.5}, D6={0.6}, D7={0.7}, D8={0.8}, D9={0.9};
|
| 94 |
+
|
| 95 |
+
A A1={'a',0.1f},A2={'b',0.2f},A3={'\377',0.3f};
|
| 96 |
+
B B1={0.1,{1,2,3}},B2={0.2,{5,4,3}};
|
| 97 |
+
J J1={47,11},J2={73,55};
|
| 98 |
+
K K1={19,69,12,28};
|
| 99 |
+
L L1={561,1105,1729,2465,2821,6601}; /* A002997 */
|
| 100 |
+
Size1 Size1_1={'a'};
|
| 101 |
+
Size2 Size2_1={'a','b'};
|
| 102 |
+
Size3 Size3_1={'a','b','c'};
|
| 103 |
+
Size4 Size4_1={'a','b','c','d'};
|
| 104 |
+
Size7 Size7_1={'a','b','c','d','e','f','g'};
|
| 105 |
+
Size8 Size8_1={'a','b','c','d','e','f','g','h'};
|
| 106 |
+
Size12 Size12_1={'a','b','c','d','e','f','g','h','i','j','k','l'};
|
| 107 |
+
Size15 Size15_1={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o'};
|
| 108 |
+
Size16 Size16_1={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p'};
|
| 109 |
+
T T1={{'t','h','e'}},T2={{'f','o','x'}};
|
| 110 |
+
X X1={"abcdefghijklmnopqrstuvwxyzABCDEF",'G'}, X2={"123",'9'}, X3={"return-return-return",'R'};
|
| 111 |
+
|
| 112 |
+
#if defined(__GNUC__)
|
| 113 |
+
#define __STDCALL__ __attribute__((stdcall))
|
| 114 |
+
#define __THISCALL__ __attribute__((thiscall))
|
| 115 |
+
#define __FASTCALL__ __attribute__((fastcall))
|
| 116 |
+
#define __MSABI__ __attribute__((ms_abi))
|
| 117 |
+
#else
|
| 118 |
+
#define __STDCALL__ __stdcall
|
| 119 |
+
#define __THISCALL__ __thiscall
|
| 120 |
+
#define __FASTCALL__ __fastcall
|
| 121 |
+
#endif
|
| 122 |
+
|
| 123 |
+
#ifndef ABI_ATTR
|
| 124 |
+
#define ABI_ATTR
|
| 125 |
+
#endif
|
| 126 |
+
|
| 127 |
+
/* void tests */
|
| 128 |
+
void ABI_ATTR v_v (void)
|
| 129 |
+
{
|
| 130 |
+
fprintf(out,"void f(void):\n");
|
| 131 |
+
fflush(out);
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
/* int tests */
|
| 135 |
+
int ABI_ATTR i_v (void)
|
| 136 |
+
{
|
| 137 |
+
int r=99;
|
| 138 |
+
fprintf(out,"int f(void):");
|
| 139 |
+
fflush(out);
|
| 140 |
+
return r;
|
| 141 |
+
}
|
| 142 |
+
int ABI_ATTR i_i (int a)
|
| 143 |
+
{
|
| 144 |
+
int r=a+1;
|
| 145 |
+
fprintf(out,"int f(int):(%d)",a);
|
| 146 |
+
fflush(out);
|
| 147 |
+
return r;
|
| 148 |
+
}
|
| 149 |
+
int ABI_ATTR i_i2 (int a, int b)
|
| 150 |
+
{
|
| 151 |
+
int r=a+b;
|
| 152 |
+
fprintf(out,"int f(2*int):(%d,%d)",a,b);
|
| 153 |
+
fflush(out);
|
| 154 |
+
return r;
|
| 155 |
+
}
|
| 156 |
+
int ABI_ATTR i_i4 (int a, int b, int c, int d)
|
| 157 |
+
{
|
| 158 |
+
int r=a+b+c+d;
|
| 159 |
+
fprintf(out,"int f(4*int):(%d,%d,%d,%d)",a,b,c,d);
|
| 160 |
+
fflush(out);
|
| 161 |
+
return r;
|
| 162 |
+
}
|
| 163 |
+
int ABI_ATTR i_i8 (int a, int b, int c, int d, int e, int f, int g, int h)
|
| 164 |
+
{
|
| 165 |
+
int r=a+b+c+d+e+f+g+h;
|
| 166 |
+
fprintf(out,"int f(8*int):(%d,%d,%d,%d,%d,%d,%d,%d)",a,b,c,d,e,f,g,h);
|
| 167 |
+
fflush(out);
|
| 168 |
+
return r;
|
| 169 |
+
}
|
| 170 |
+
int ABI_ATTR i_i16 (int a, int b, int c, int d, int e, int f, int g, int h,
|
| 171 |
+
int i, int j, int k, int l, int m, int n, int o, int p)
|
| 172 |
+
{
|
| 173 |
+
int r=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p;
|
| 174 |
+
fprintf(out,"int f(16*int):(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)",
|
| 175 |
+
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
|
| 176 |
+
fflush(out);
|
| 177 |
+
return r;
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
/* float tests */
|
| 181 |
+
float ABI_ATTR f_f (float a)
|
| 182 |
+
{
|
| 183 |
+
float r=a+1.0f;
|
| 184 |
+
fprintf(out,"float f(float):(%g)",a);
|
| 185 |
+
fflush(out);
|
| 186 |
+
return r;
|
| 187 |
+
}
|
| 188 |
+
float ABI_ATTR f_f2 (float a, float b)
|
| 189 |
+
{
|
| 190 |
+
float r=a+b;
|
| 191 |
+
fprintf(out,"float f(2*float):(%g,%g)",a,b);
|
| 192 |
+
fflush(out);
|
| 193 |
+
return r;
|
| 194 |
+
}
|
| 195 |
+
float ABI_ATTR f_f4 (float a, float b, float c, float d)
|
| 196 |
+
{
|
| 197 |
+
float r=a+b+c+d;
|
| 198 |
+
fprintf(out,"float f(4*float):(%g,%g,%g,%g)",a,b,c,d);
|
| 199 |
+
fflush(out);
|
| 200 |
+
return r;
|
| 201 |
+
}
|
| 202 |
+
float ABI_ATTR f_f8 (float a, float b, float c, float d, float e, float f,
|
| 203 |
+
float g, float h)
|
| 204 |
+
{
|
| 205 |
+
float r=a+b+c+d+e+f+g+h;
|
| 206 |
+
fprintf(out,"float f(8*float):(%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h);
|
| 207 |
+
fflush(out);
|
| 208 |
+
return r;
|
| 209 |
+
}
|
| 210 |
+
float ABI_ATTR f_f16 (float a, float b, float c, float d, float e, float f, float g, float h,
|
| 211 |
+
float i, float j, float k, float l, float m, float n, float o, float p)
|
| 212 |
+
{
|
| 213 |
+
float r=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p;
|
| 214 |
+
fprintf(out,"float f(16*float):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
|
| 215 |
+
fflush(out);
|
| 216 |
+
return r;
|
| 217 |
+
}
|
| 218 |
+
float ABI_ATTR f_f24 (float a, float b, float c, float d, float e, float f, float g, float h,
|
| 219 |
+
float i, float j, float k, float l, float m, float n, float o, float p,
|
| 220 |
+
float q, float s, float t, float u, float v, float w, float x, float y)
|
| 221 |
+
{
|
| 222 |
+
float r=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+s+t+u+v+w+x+y;
|
| 223 |
+
fprintf(out,"float f(24*float):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,v,w,x,y);
|
| 224 |
+
fflush(out);
|
| 225 |
+
return r;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
/* double tests */
|
| 229 |
+
double ABI_ATTR d_d (double a)
|
| 230 |
+
{
|
| 231 |
+
double r=a+1.0;
|
| 232 |
+
fprintf(out,"double f(double):(%g)",a);
|
| 233 |
+
fflush(out);
|
| 234 |
+
return r;
|
| 235 |
+
}
|
| 236 |
+
double ABI_ATTR d_d2 (double a, double b)
|
| 237 |
+
{
|
| 238 |
+
double r=a+b;
|
| 239 |
+
fprintf(out,"double f(2*double):(%g,%g)",a,b);
|
| 240 |
+
fflush(out);
|
| 241 |
+
return r;
|
| 242 |
+
}
|
| 243 |
+
double ABI_ATTR d_d4 (double a, double b, double c, double d)
|
| 244 |
+
{
|
| 245 |
+
double r=a+b+c+d;
|
| 246 |
+
fprintf(out,"double f(4*double):(%g,%g,%g,%g)",a,b,c,d);
|
| 247 |
+
fflush(out);
|
| 248 |
+
return r;
|
| 249 |
+
}
|
| 250 |
+
double ABI_ATTR d_d8 (double a, double b, double c, double d, double e, double f,
|
| 251 |
+
double g, double h)
|
| 252 |
+
{
|
| 253 |
+
double r=a+b+c+d+e+f+g+h;
|
| 254 |
+
fprintf(out,"double f(8*double):(%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h);
|
| 255 |
+
fflush(out);
|
| 256 |
+
return r;
|
| 257 |
+
}
|
| 258 |
+
double ABI_ATTR d_d16 (double a, double b, double c, double d, double e, double f,
|
| 259 |
+
double g, double h, double i, double j, double k, double l,
|
| 260 |
+
double m, double n, double o, double p)
|
| 261 |
+
{
|
| 262 |
+
double r=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p;
|
| 263 |
+
fprintf(out,"double f(16*double):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
|
| 264 |
+
fflush(out);
|
| 265 |
+
return r;
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
/* pointer tests */
|
| 269 |
+
void* ABI_ATTR vp_vpdpcpsp (void* a, double* b, char* c, Int* d)
|
| 270 |
+
{
|
| 271 |
+
void* ret = (char*)b + 1;
|
| 272 |
+
fprintf(out,"void* f(void*,double*,char*,Int*):(0x%p,0x%p,0x%p,0x%p)",a,b,c,d);
|
| 273 |
+
fflush(out);
|
| 274 |
+
return ret;
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
/* mixed number tests */
|
| 278 |
+
uchar ABI_ATTR uc_ucsil (uchar a, ushort b, uint c, ulong d)
|
| 279 |
+
{
|
| 280 |
+
uchar r = (uchar)-1;
|
| 281 |
+
fprintf(out,"uchar f(uchar,ushort,uint,ulong):(%u,%u,%u,%lu)",a,b,c,d);
|
| 282 |
+
fflush(out);
|
| 283 |
+
return r;
|
| 284 |
+
}
|
| 285 |
+
double ABI_ATTR d_iidd (int a, int b, double c, double d)
|
| 286 |
+
{
|
| 287 |
+
double r = a+b+c+d;
|
| 288 |
+
fprintf(out,"double f(int,int,double,double):(%d,%d,%g,%g)",a,b,c,d);
|
| 289 |
+
fflush(out);
|
| 290 |
+
return r;
|
| 291 |
+
}
|
| 292 |
+
double ABI_ATTR d_iiidi (int a, int b, int c, double d, int e)
|
| 293 |
+
{
|
| 294 |
+
double r = a+b+c+d+e;
|
| 295 |
+
fprintf(out,"double f(int,int,int,double,int):(%d,%d,%d,%g,%d)",a,b,c,d,e);
|
| 296 |
+
fflush(out);
|
| 297 |
+
return r;
|
| 298 |
+
}
|
| 299 |
+
double ABI_ATTR d_idid (int a, double b, int c, double d)
|
| 300 |
+
{
|
| 301 |
+
double r = a+b+c+d;
|
| 302 |
+
fprintf(out,"double f(int,double,int,double):(%d,%g,%d,%g)",a,b,c,d);
|
| 303 |
+
fflush(out);
|
| 304 |
+
return r;
|
| 305 |
+
}
|
| 306 |
+
double ABI_ATTR d_fdi (float a, double b, int c)
|
| 307 |
+
{
|
| 308 |
+
double r = a+b+c;
|
| 309 |
+
fprintf(out,"double f(float,double,int):(%g,%g,%d)",a,b,c);
|
| 310 |
+
fflush(out);
|
| 311 |
+
return r;
|
| 312 |
+
}
|
| 313 |
+
ushort ABI_ATTR us_cdcd (char a, double b, char c, double d)
|
| 314 |
+
{
|
| 315 |
+
ushort r = (ushort)(a + b + c + d);
|
| 316 |
+
fprintf(out,"ushort f(char,double,char,double):('%c',%g,'%c',%g)",a,b,c,d);
|
| 317 |
+
fflush(out);
|
| 318 |
+
return r;
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
long long ABI_ATTR ll_iiilli (int a, int b, int c, long long d, int e)
|
| 322 |
+
{
|
| 323 |
+
long long r = (long long)(int)a+(long long)(int)b+(long long)(int)c+d+(long long)(int)e;
|
| 324 |
+
fprintf(out,"long long f(int,int,int,long long,int):(%d,%d,%d,0x%lx%08lx,%d)",a,b,c,(long)(d>>32),(long)(d&0xffffffff),e);
|
| 325 |
+
fflush(out);
|
| 326 |
+
return r;
|
| 327 |
+
}
|
| 328 |
+
long long ABI_ATTR ll_flli (float a, long long b, int c)
|
| 329 |
+
{
|
| 330 |
+
long long r = (long long)(int)a + b + (long long)c;
|
| 331 |
+
fprintf(out,"long long f(float,long long,int):(%g,0x%lx%08lx,0x%lx)",a,(long)(b>>32),(long)(b&0xffffffff),(long)c);
|
| 332 |
+
fflush(out);
|
| 333 |
+
return r;
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
float ABI_ATTR f_fi (float a, int z)
|
| 337 |
+
{
|
| 338 |
+
float r = a+z;
|
| 339 |
+
fprintf(out,"float f(float,int):(%g,%d)",a,z);
|
| 340 |
+
fflush(out);
|
| 341 |
+
return r;
|
| 342 |
+
}
|
| 343 |
+
float ABI_ATTR f_f2i (float a, float b, int z)
|
| 344 |
+
{
|
| 345 |
+
float r = a+b+z;
|
| 346 |
+
fprintf(out,"float f(2*float,int):(%g,%g,%d)",a,b,z);
|
| 347 |
+
fflush(out);
|
| 348 |
+
return r;
|
| 349 |
+
}
|
| 350 |
+
float ABI_ATTR f_f3i (float a, float b, float c, int z)
|
| 351 |
+
{
|
| 352 |
+
float r = a+b+c+z;
|
| 353 |
+
fprintf(out,"float f(3*float,int):(%g,%g,%g,%d)",a,b,c,z);
|
| 354 |
+
fflush(out);
|
| 355 |
+
return r;
|
| 356 |
+
}
|
| 357 |
+
float ABI_ATTR f_f4i (float a, float b, float c, float d, int z)
|
| 358 |
+
{
|
| 359 |
+
float r = a+b+c+d+z;
|
| 360 |
+
fprintf(out,"float f(4*float,int):(%g,%g,%g,%g,%d)",a,b,c,d,z);
|
| 361 |
+
fflush(out);
|
| 362 |
+
return r;
|
| 363 |
+
}
|
| 364 |
+
float ABI_ATTR f_f7i (float a, float b, float c, float d, float e, float f, float g,
|
| 365 |
+
int z)
|
| 366 |
+
{
|
| 367 |
+
float r = a+b+c+d+e+f+g+z;
|
| 368 |
+
fprintf(out,"float f(7*float,int):(%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,z);
|
| 369 |
+
fflush(out);
|
| 370 |
+
return r;
|
| 371 |
+
}
|
| 372 |
+
float ABI_ATTR f_f8i (float a, float b, float c, float d, float e, float f, float g,
|
| 373 |
+
float h, int z)
|
| 374 |
+
{
|
| 375 |
+
float r = a+b+c+d+e+f+g+h+z;
|
| 376 |
+
fprintf(out,"float f(8*float,int):(%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,z);
|
| 377 |
+
fflush(out);
|
| 378 |
+
return r;
|
| 379 |
+
}
|
| 380 |
+
float ABI_ATTR f_f12i (float a, float b, float c, float d, float e, float f, float g,
|
| 381 |
+
float h, float i, float j, float k, float l, int z)
|
| 382 |
+
{
|
| 383 |
+
float r = a+b+c+d+e+f+g+h+i+j+k+l+z;
|
| 384 |
+
fprintf(out,"float f(12*float,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,z);
|
| 385 |
+
fflush(out);
|
| 386 |
+
return r;
|
| 387 |
+
}
|
| 388 |
+
float ABI_ATTR f_f13i (float a, float b, float c, float d, float e, float f, float g,
|
| 389 |
+
float h, float i, float j, float k, float l, float m, int z)
|
| 390 |
+
{
|
| 391 |
+
float r = a+b+c+d+e+f+g+h+i+j+k+l+m+z;
|
| 392 |
+
fprintf(out,"float f(13*float,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,m,z);
|
| 393 |
+
fflush(out);
|
| 394 |
+
return r;
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
+
double ABI_ATTR d_di (double a, int z)
|
| 398 |
+
{
|
| 399 |
+
double r = a+z;
|
| 400 |
+
fprintf(out,"double f(double,int):(%g,%d)",a,z);
|
| 401 |
+
fflush(out);
|
| 402 |
+
return r;
|
| 403 |
+
}
|
| 404 |
+
double ABI_ATTR d_d2i (double a, double b, int z)
|
| 405 |
+
{
|
| 406 |
+
double r = a+b+z;
|
| 407 |
+
fprintf(out,"double f(2*double,int):(%g,%g,%d)",a,b,z);
|
| 408 |
+
fflush(out);
|
| 409 |
+
return r;
|
| 410 |
+
}
|
| 411 |
+
double ABI_ATTR d_d3i (double a, double b, double c, int z)
|
| 412 |
+
{
|
| 413 |
+
double r = a+b+c+z;
|
| 414 |
+
fprintf(out,"double f(3*double,int):(%g,%g,%g,%d)",a,b,c,z);
|
| 415 |
+
fflush(out);
|
| 416 |
+
return r;
|
| 417 |
+
}
|
| 418 |
+
double ABI_ATTR d_d4i (double a, double b, double c, double d, int z)
|
| 419 |
+
{
|
| 420 |
+
double r = a+b+c+d+z;
|
| 421 |
+
fprintf(out,"double f(4*double,int):(%g,%g,%g,%g,%d)",a,b,c,d,z);
|
| 422 |
+
fflush(out);
|
| 423 |
+
return r;
|
| 424 |
+
}
|
| 425 |
+
double ABI_ATTR d_d7i (double a, double b, double c, double d, double e, double f,
|
| 426 |
+
double g, int z)
|
| 427 |
+
{
|
| 428 |
+
double r = a+b+c+d+e+f+g+z;
|
| 429 |
+
fprintf(out,"double f(7*double,int):(%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,z);
|
| 430 |
+
fflush(out);
|
| 431 |
+
return r;
|
| 432 |
+
}
|
| 433 |
+
double ABI_ATTR d_d8i (double a, double b, double c, double d, double e, double f,
|
| 434 |
+
double g, double h, int z)
|
| 435 |
+
{
|
| 436 |
+
double r = a+b+c+d+e+f+g+h+z;
|
| 437 |
+
fprintf(out,"double f(8*double,int):(%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,z);
|
| 438 |
+
fflush(out);
|
| 439 |
+
return r;
|
| 440 |
+
}
|
| 441 |
+
double ABI_ATTR d_d12i (double a, double b, double c, double d, double e, double f,
|
| 442 |
+
double g, double h, double i, double j, double k, double l,
|
| 443 |
+
int z)
|
| 444 |
+
{
|
| 445 |
+
double r = a+b+c+d+e+f+g+h+i+j+k+l+z;
|
| 446 |
+
fprintf(out,"double f(12*double,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,z);
|
| 447 |
+
fflush(out);
|
| 448 |
+
return r;
|
| 449 |
+
}
|
| 450 |
+
double ABI_ATTR d_d13i (double a, double b, double c, double d, double e, double f,
|
| 451 |
+
double g, double h, double i, double j, double k, double l,
|
| 452 |
+
double m, int z)
|
| 453 |
+
{
|
| 454 |
+
double r = a+b+c+d+e+f+g+h+i+j+k+l+m+z;
|
| 455 |
+
fprintf(out,"double f(13*double,int):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%d)",a,b,c,d,e,f,g,h,i,j,k,l,m,z);
|
| 456 |
+
fflush(out);
|
| 457 |
+
return r;
|
| 458 |
+
}
|
| 459 |
+
|
| 460 |
+
/* small structure return tests */
|
| 461 |
+
Size1 ABI_ATTR S1_v (void)
|
| 462 |
+
{
|
| 463 |
+
fprintf(out,"Size1 f(void):");
|
| 464 |
+
fflush(out);
|
| 465 |
+
return Size1_1;
|
| 466 |
+
}
|
| 467 |
+
Size2 ABI_ATTR S2_v (void)
|
| 468 |
+
{
|
| 469 |
+
fprintf(out,"Size2 f(void):");
|
| 470 |
+
fflush(out);
|
| 471 |
+
return Size2_1;
|
| 472 |
+
}
|
| 473 |
+
Size3 ABI_ATTR S3_v (void)
|
| 474 |
+
{
|
| 475 |
+
fprintf(out,"Size3 f(void):");
|
| 476 |
+
fflush(out);
|
| 477 |
+
return Size3_1;
|
| 478 |
+
}
|
| 479 |
+
Size4 ABI_ATTR S4_v (void)
|
| 480 |
+
{
|
| 481 |
+
fprintf(out,"Size4 f(void):");
|
| 482 |
+
fflush(out);
|
| 483 |
+
return Size4_1;
|
| 484 |
+
}
|
| 485 |
+
Size7 ABI_ATTR S7_v (void)
|
| 486 |
+
{
|
| 487 |
+
fprintf(out,"Size7 f(void):");
|
| 488 |
+
fflush(out);
|
| 489 |
+
return Size7_1;
|
| 490 |
+
}
|
| 491 |
+
Size8 ABI_ATTR S8_v (void)
|
| 492 |
+
{
|
| 493 |
+
fprintf(out,"Size8 f(void):");
|
| 494 |
+
fflush(out);
|
| 495 |
+
return Size8_1;
|
| 496 |
+
}
|
| 497 |
+
Size12 ABI_ATTR S12_v (void)
|
| 498 |
+
{
|
| 499 |
+
fprintf(out,"Size12 f(void):");
|
| 500 |
+
fflush(out);
|
| 501 |
+
return Size12_1;
|
| 502 |
+
}
|
| 503 |
+
Size15 ABI_ATTR S15_v (void)
|
| 504 |
+
{
|
| 505 |
+
fprintf(out,"Size15 f(void):");
|
| 506 |
+
fflush(out);
|
| 507 |
+
return Size15_1;
|
| 508 |
+
}
|
| 509 |
+
Size16 ABI_ATTR S16_v (void)
|
| 510 |
+
{
|
| 511 |
+
fprintf(out,"Size16 f(void):");
|
| 512 |
+
fflush(out);
|
| 513 |
+
return Size16_1;
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
/* structure tests */
|
| 517 |
+
Int ABI_ATTR I_III (Int a, Int b, Int c)
|
| 518 |
+
{
|
| 519 |
+
Int r;
|
| 520 |
+
r.x = a.x + b.x + c.x;
|
| 521 |
+
fprintf(out,"Int f(Int,Int,Int):({%d},{%d},{%d})",a.x,b.x,c.x);
|
| 522 |
+
fflush(out);
|
| 523 |
+
return r;
|
| 524 |
+
}
|
| 525 |
+
Char ABI_ATTR C_CdC (Char a, double b, Char c)
|
| 526 |
+
{
|
| 527 |
+
Char r;
|
| 528 |
+
r.x = (a.x + c.x)/2;
|
| 529 |
+
fprintf(out,"Char f(Char,double,Char):({'%c'},%g,{'%c'})",a.x,b,c.x);
|
| 530 |
+
fflush(out);
|
| 531 |
+
return r;
|
| 532 |
+
}
|
| 533 |
+
Float ABI_ATTR F_Ffd (Float a, float b, double c)
|
| 534 |
+
{
|
| 535 |
+
Float r;
|
| 536 |
+
r.x = (float) (a.x + b + c);
|
| 537 |
+
fprintf(out,"Float f(Float,float,double):({%g},%g,%g)",a.x,b,c);
|
| 538 |
+
fflush(out);
|
| 539 |
+
return r;
|
| 540 |
+
}
|
| 541 |
+
Double ABI_ATTR D_fDd (float a, Double b, double c)
|
| 542 |
+
{
|
| 543 |
+
Double r;
|
| 544 |
+
r.x = a + b.x + c;
|
| 545 |
+
fprintf(out,"Double f(float,Double,double):(%g,{%g},%g)",a,b.x,c);
|
| 546 |
+
fflush(out);
|
| 547 |
+
return r;
|
| 548 |
+
}
|
| 549 |
+
Double ABI_ATTR D_Dfd (Double a, float b, double c)
|
| 550 |
+
{
|
| 551 |
+
Double r;
|
| 552 |
+
r.x = a.x + b + c;
|
| 553 |
+
fprintf(out,"Double f(Double,float,double):({%g},%g,%g)",a.x,b,c);
|
| 554 |
+
fflush(out);
|
| 555 |
+
return r;
|
| 556 |
+
}
|
| 557 |
+
J ABI_ATTR J_JiJ (J a, int b, J c)
|
| 558 |
+
{
|
| 559 |
+
J r;
|
| 560 |
+
r.l1 = a.l1+c.l1; r.l2 = a.l2+b+c.l2;
|
| 561 |
+
fprintf(out,"J f(J,int,J):({%ld,%ld},%d,{%ld,%ld})",a.l1,a.l2,b,c.l1,c.l2);
|
| 562 |
+
fflush(out);
|
| 563 |
+
return r;
|
| 564 |
+
}
|
| 565 |
+
T ABI_ATTR T_TcT (T a, char b, T c)
|
| 566 |
+
{
|
| 567 |
+
T r;
|
| 568 |
+
r.c[0]='b'; r.c[1]=c.c[1]; r.c[2]=c.c[2];
|
| 569 |
+
fprintf(out,"T f(T,char,T):({\"%c%c%c\"},'%c',{\"%c%c%c\"})",a.c[0],a.c[1],a.c[2],b,c.c[0],c.c[1],c.c[2]);
|
| 570 |
+
fflush(out);
|
| 571 |
+
return r;
|
| 572 |
+
}
|
| 573 |
+
X ABI_ATTR X_BcdB (B a, char b, double c, B d)
|
| 574 |
+
{
|
| 575 |
+
static X xr={"return val",'R'};
|
| 576 |
+
X r;
|
| 577 |
+
r = xr;
|
| 578 |
+
r.c1 = b;
|
| 579 |
+
fprintf(out,"X f(B,char,double,B):({%g,{%d,%d,%d}},'%c',%g,{%g,{%d,%d,%d}})",
|
| 580 |
+
a.d,a.i[0],a.i[1],a.i[2],b,c,d.d,d.i[0],d.i[1],d.i[2]);
|
| 581 |
+
fflush(out);
|
| 582 |
+
return r;
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
/* Test for cases where some argument (especially structure, 'long long', or
|
| 586 |
+
'double') may be passed partially in general-purpose argument registers
|
| 587 |
+
and partially on the stack. Different ABIs pass between 4 and 8 arguments
|
| 588 |
+
(or none) in general-purpose argument registers. */
|
| 589 |
+
|
| 590 |
+
long ABI_ATTR l_l0K (K b, long c)
|
| 591 |
+
{
|
| 592 |
+
long r = b.l1 + b.l2 + b.l3 + b.l4 + c;
|
| 593 |
+
fprintf(out,"long f(K,long):(%ld,%ld,%ld,%ld,%ld)",b.l1,b.l2,b.l3,b.l4,c);
|
| 594 |
+
fflush(out);
|
| 595 |
+
return r;
|
| 596 |
+
}
|
| 597 |
+
long ABI_ATTR l_l1K (long a1, K b, long c)
|
| 598 |
+
{
|
| 599 |
+
long r = a1 + b.l1 + b.l2 + b.l3 + b.l4 + c;
|
| 600 |
+
fprintf(out,"long f(long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld)",a1,b.l1,b.l2,b.l3,b.l4,c);
|
| 601 |
+
fflush(out);
|
| 602 |
+
return r;
|
| 603 |
+
}
|
| 604 |
+
long ABI_ATTR l_l2K (long a1, long a2, K b, long c)
|
| 605 |
+
{
|
| 606 |
+
long r = a1 + a2 + b.l1 + b.l2 + b.l3 + b.l4 + c;
|
| 607 |
+
fprintf(out,"long f(2*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,b.l1,b.l2,b.l3,b.l4,c);
|
| 608 |
+
fflush(out);
|
| 609 |
+
return r;
|
| 610 |
+
}
|
| 611 |
+
long ABI_ATTR l_l3K (long a1, long a2, long a3, K b, long c)
|
| 612 |
+
{
|
| 613 |
+
long r = a1 + a2 + a3 + b.l1 + b.l2 + b.l3 + b.l4 + c;
|
| 614 |
+
fprintf(out,"long f(3*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,b.l1,b.l2,b.l3,b.l4,c);
|
| 615 |
+
fflush(out);
|
| 616 |
+
return r;
|
| 617 |
+
}
|
| 618 |
+
long ABI_ATTR l_l4K (long a1, long a2, long a3, long a4, K b, long c)
|
| 619 |
+
{
|
| 620 |
+
long r = a1 + a2 + a3 + a4 + b.l1 + b.l2 + b.l3 + b.l4 + c;
|
| 621 |
+
fprintf(out,"long f(4*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,b.l1,b.l2,b.l3,b.l4,c);
|
| 622 |
+
fflush(out);
|
| 623 |
+
return r;
|
| 624 |
+
}
|
| 625 |
+
long ABI_ATTR l_l5K (long a1, long a2, long a3, long a4, long a5, K b, long c)
|
| 626 |
+
{
|
| 627 |
+
long r = a1 + a2 + a3 + a4 + a5 + b.l1 + b.l2 + b.l3 + b.l4 + c;
|
| 628 |
+
fprintf(out,"long f(5*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,a5,b.l1,b.l2,b.l3,b.l4,c);
|
| 629 |
+
fflush(out);
|
| 630 |
+
return r;
|
| 631 |
+
}
|
| 632 |
+
long ABI_ATTR l_l6K (long a1, long a2, long a3, long a4, long a5, long a6, K b, long c)
|
| 633 |
+
{
|
| 634 |
+
long r = a1 + a2 + a3 + a4 + a5 + a6 + b.l1 + b.l2 + b.l3 + b.l4 + c;
|
| 635 |
+
fprintf(out,"long f(6*long,K,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a1,a2,a3,a4,a5,a6,b.l1,b.l2,b.l3,b.l4,c);
|
| 636 |
+
fflush(out);
|
| 637 |
+
return r;
|
| 638 |
+
}
|
| 639 |
+
/* These tests is crafted on the knowledge that for all known ABIs:
|
| 640 |
+
* 17 > number of floating-point argument registers,
|
| 641 |
+
* 3 < number of general-purpose argument registers < 3 + 6. */
|
| 642 |
+
float ABI_ATTR f_f17l3L (float a, float b, float c, float d, float e, float f, float g,
|
| 643 |
+
float h, float i, float j, float k, float l, float m, float n,
|
| 644 |
+
float o, float p, float q,
|
| 645 |
+
long s, long t, long u, L z)
|
| 646 |
+
{
|
| 647 |
+
float r = a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+s+t+u+z.l1+z.l2+z.l3+z.l4+z.l5+z.l6;
|
| 648 |
+
fprintf(out,"float f(17*float,3*int,L):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,z.l1,z.l2,z.l3,z.l4,z.l5,z.l6);
|
| 649 |
+
fflush(out);
|
| 650 |
+
return r;
|
| 651 |
+
}
|
| 652 |
+
double ABI_ATTR d_d17l3L (double a, double b, double c, double d, double e, double f,
|
| 653 |
+
double g, double h, double i, double j, double k, double l,
|
| 654 |
+
double m, double n, double o, double p, double q,
|
| 655 |
+
long s, long t, long u, L z)
|
| 656 |
+
{
|
| 657 |
+
double r = a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+s+t+u+z.l1+z.l2+z.l3+z.l4+z.l5+z.l6;
|
| 658 |
+
fprintf(out,"double f(17*double,3*int,L):(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld)",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,z.l1,z.l2,z.l3,z.l4,z.l5,z.l6);
|
| 659 |
+
fflush(out);
|
| 660 |
+
return r;
|
| 661 |
+
}
|
| 662 |
+
|
| 663 |
+
long long ABI_ATTR ll_l2ll (long a1, long a2, long long b, long c)
|
| 664 |
+
{
|
| 665 |
+
long long r = (long long) (a1 + a2) + b + c;
|
| 666 |
+
fprintf(out,"long long f(2*long,long long,long):(%ld,%ld,0x%lx%08lx,%ld)",a1,a2,(long)(b>>32),(long)(b&0xffffffff),c);
|
| 667 |
+
fflush(out);
|
| 668 |
+
return r;
|
| 669 |
+
}
|
| 670 |
+
long long ABI_ATTR ll_l3ll (long a1, long a2, long a3, long long b, long c)
|
| 671 |
+
{
|
| 672 |
+
long long r = (long long) (a1 + a2 + a3) + b + c;
|
| 673 |
+
fprintf(out,"long long f(3*long,long long,long):(%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,(long)(b>>32),(long)(b&0xffffffff),c);
|
| 674 |
+
fflush(out);
|
| 675 |
+
return r;
|
| 676 |
+
}
|
| 677 |
+
long long ABI_ATTR ll_l4ll (long a1, long a2, long a3, long a4, long long b, long c)
|
| 678 |
+
{
|
| 679 |
+
long long r = (long long) (a1 + a2 + a3 + a4) + b + c;
|
| 680 |
+
fprintf(out,"long long f(4*long,long long,long):(%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,(long)(b>>32),(long)(b&0xffffffff),c);
|
| 681 |
+
fflush(out);
|
| 682 |
+
return r;
|
| 683 |
+
}
|
| 684 |
+
long long ABI_ATTR ll_l5ll (long a1, long a2, long a3, long a4, long a5, long long b, long c)
|
| 685 |
+
{
|
| 686 |
+
long long r = (long long) (a1 + a2 + a3 + a4 + a5) + b + c;
|
| 687 |
+
fprintf(out,"long long f(5*long,long long,long):(%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,(long)(b>>32),(long)(b&0xffffffff),c);
|
| 688 |
+
fflush(out);
|
| 689 |
+
return r;
|
| 690 |
+
}
|
| 691 |
+
long long ABI_ATTR ll_l6ll (long a1, long a2, long a3, long a4, long a5, long a6, long long b, long c)
|
| 692 |
+
{
|
| 693 |
+
long long r = (long long) (a1 + a2 + a3 + a4 + a5 + a6) + b + c;
|
| 694 |
+
fprintf(out,"long long f(6*long,long long,long):(%ld,%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,a6,(long)(b>>32),(long)(b&0xffffffff),c);
|
| 695 |
+
fflush(out);
|
| 696 |
+
return r;
|
| 697 |
+
}
|
| 698 |
+
long long ABI_ATTR ll_l7ll (long a1, long a2, long a3, long a4, long a5, long a6, long a7, long long b, long c)
|
| 699 |
+
{
|
| 700 |
+
long long r = (long long) (a1 + a2 + a3 + a4 + a5 + a6 + a7) + b + c;
|
| 701 |
+
fprintf(out,"long long f(7*long,long long,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,0x%lx%08lx,%ld)",a1,a2,a3,a4,a5,a6,a7,(long)(b>>32),(long)(b&0xffffffff),c);
|
| 702 |
+
fflush(out);
|
| 703 |
+
return r;
|
| 704 |
+
}
|
| 705 |
+
|
| 706 |
+
double ABI_ATTR d_l2d (long a1, long a2, double b, long c)
|
| 707 |
+
{
|
| 708 |
+
double r = (double) (a1 + a2) + b + c;
|
| 709 |
+
fprintf(out,"double f(2*long,double,long):(%ld,%ld,%g,%ld)",a1,a2,b,c);
|
| 710 |
+
fflush(out);
|
| 711 |
+
return r;
|
| 712 |
+
}
|
| 713 |
+
double ABI_ATTR d_l3d (long a1, long a2, long a3, double b, long c)
|
| 714 |
+
{
|
| 715 |
+
double r = (double) (a1 + a2 + a3) + b + c;
|
| 716 |
+
fprintf(out,"double f(3*long,double,long):(%ld,%ld,%ld,%g,%ld)",a1,a2,a3,b,c);
|
| 717 |
+
fflush(out);
|
| 718 |
+
return r;
|
| 719 |
+
}
|
| 720 |
+
double ABI_ATTR d_l4d (long a1, long a2, long a3, long a4, double b, long c)
|
| 721 |
+
{
|
| 722 |
+
double r = (double) (a1 + a2 + a3 + a4) + b + c;
|
| 723 |
+
fprintf(out,"double f(4*long,double,long):(%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,b,c);
|
| 724 |
+
fflush(out);
|
| 725 |
+
return r;
|
| 726 |
+
}
|
| 727 |
+
double ABI_ATTR d_l5d (long a1, long a2, long a3, long a4, long a5, double b, long c)
|
| 728 |
+
{
|
| 729 |
+
double r = (double) (a1 + a2 + a3 + a4 + a5) + b + c;
|
| 730 |
+
fprintf(out,"double f(5*long,double,long):(%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,b,c);
|
| 731 |
+
fflush(out);
|
| 732 |
+
return r;
|
| 733 |
+
}
|
| 734 |
+
double ABI_ATTR d_l6d (long a1, long a2, long a3, long a4, long a5, long a6, double b, long c)
|
| 735 |
+
{
|
| 736 |
+
double r = (double) (a1 + a2 + a3 + a4 + a5 + a6) + b + c;
|
| 737 |
+
fprintf(out,"double f(6*long,double,long):(%ld,%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,a6,b,c);
|
| 738 |
+
fflush(out);
|
| 739 |
+
return r;
|
| 740 |
+
}
|
| 741 |
+
double ABI_ATTR d_l7d (long a1, long a2, long a3, long a4, long a5, long a6, long a7, double b, long c)
|
| 742 |
+
{
|
| 743 |
+
double r = (double) (a1 + a2 + a3 + a4 + a5 + a6 + a7) + b + c;
|
| 744 |
+
fprintf(out,"double f(7*long,double,long):(%ld,%ld,%ld,%ld,%ld,%ld,%ld,%g,%ld)",a1,a2,a3,a4,a5,a6,a7,b,c);
|
| 745 |
+
fflush(out);
|
| 746 |
+
return r;
|
| 747 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/align_mixed.c
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Area: ffi_call
|
| 2 |
+
Purpose: Check for proper argument alignment.
|
| 3 |
+
Limitations: none.
|
| 4 |
+
PR: none.
|
| 5 |
+
Originator: <twalljava@java.net> (from many_win32.c) */
|
| 6 |
+
|
| 7 |
+
/* { dg-do run } */
|
| 8 |
+
|
| 9 |
+
#include "ffitest.h"
|
| 10 |
+
|
| 11 |
+
static float ABI_ATTR align_arguments(int i1,
|
| 12 |
+
double f2,
|
| 13 |
+
int i3,
|
| 14 |
+
double f4)
|
| 15 |
+
{
|
| 16 |
+
return i1+f2+i3+f4;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
int main(void)
|
| 20 |
+
{
|
| 21 |
+
ffi_cif cif;
|
| 22 |
+
ffi_type *args[4] = {
|
| 23 |
+
&ffi_type_sint,
|
| 24 |
+
&ffi_type_double,
|
| 25 |
+
&ffi_type_sint,
|
| 26 |
+
&ffi_type_double
|
| 27 |
+
};
|
| 28 |
+
double fa[2] = {1,2};
|
| 29 |
+
int ia[2] = {1,2};
|
| 30 |
+
void *values[4] = {&ia[0], &fa[0], &ia[1], &fa[1]};
|
| 31 |
+
float f, ff;
|
| 32 |
+
|
| 33 |
+
/* Initialize the cif */
|
| 34 |
+
CHECK(ffi_prep_cif(&cif, ABI_NUM, 4,
|
| 35 |
+
&ffi_type_float, args) == FFI_OK);
|
| 36 |
+
|
| 37 |
+
ff = align_arguments(ia[0], fa[0], ia[1], fa[1]);
|
| 38 |
+
|
| 39 |
+
ffi_call(&cif, FFI_FN(align_arguments), &f, values);
|
| 40 |
+
|
| 41 |
+
if (f == ff)
|
| 42 |
+
printf("align arguments tests ok!\n");
|
| 43 |
+
else
|
| 44 |
+
CHECK(0);
|
| 45 |
+
exit(0);
|
| 46 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/align_stdcall.c
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Area: ffi_call
|
| 2 |
+
Purpose: Check for proper argument alignment.
|
| 3 |
+
Limitations: none.
|
| 4 |
+
PR: none.
|
| 5 |
+
Originator: <twalljava@java.net> (from many_win32.c) */
|
| 6 |
+
|
| 7 |
+
/* { dg-do run } */
|
| 8 |
+
|
| 9 |
+
#include "ffitest.h"
|
| 10 |
+
|
| 11 |
+
static float ABI_ATTR align_arguments(int i1,
|
| 12 |
+
double f2,
|
| 13 |
+
int i3,
|
| 14 |
+
double f4)
|
| 15 |
+
{
|
| 16 |
+
return i1+f2+i3+f4;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
int main(void)
|
| 20 |
+
{
|
| 21 |
+
ffi_cif cif;
|
| 22 |
+
ffi_type *args[4] = {
|
| 23 |
+
&ffi_type_sint,
|
| 24 |
+
&ffi_type_double,
|
| 25 |
+
&ffi_type_sint,
|
| 26 |
+
&ffi_type_double
|
| 27 |
+
};
|
| 28 |
+
double fa[2] = {1,2};
|
| 29 |
+
int ia[2] = {1,2};
|
| 30 |
+
void *values[4] = {&ia[0], &fa[0], &ia[1], &fa[1]};
|
| 31 |
+
float f, ff;
|
| 32 |
+
|
| 33 |
+
/* Initialize the cif */
|
| 34 |
+
CHECK(ffi_prep_cif(&cif, ABI_NUM, 4,
|
| 35 |
+
&ffi_type_float, args) == FFI_OK);
|
| 36 |
+
|
| 37 |
+
ff = align_arguments(ia[0], fa[0], ia[1], fa[1]);;
|
| 38 |
+
|
| 39 |
+
ffi_call(&cif, FFI_FN(align_arguments), &f, values);
|
| 40 |
+
|
| 41 |
+
if (f == ff)
|
| 42 |
+
printf("align arguments tests ok!\n");
|
| 43 |
+
else
|
| 44 |
+
CHECK(0);
|
| 45 |
+
exit(0);
|
| 46 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/bpo-38748.c
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Area: bpo-38748
|
| 2 |
+
Purpose: test for stdcall alignment problem
|
| 3 |
+
Source: github.com/python/cpython/pull/26204 */
|
| 4 |
+
|
| 5 |
+
/* { dg-do run } */
|
| 6 |
+
|
| 7 |
+
#include "ffitest.h"
|
| 8 |
+
#include "ffi_common.h"
|
| 9 |
+
|
| 10 |
+
static UINT32 ABI_ATTR align_arguments(UINT32 l1,
|
| 11 |
+
UINT64 l2)
|
| 12 |
+
{
|
| 13 |
+
return l1 + (UINT32) l2;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
int main(void)
|
| 17 |
+
{
|
| 18 |
+
ffi_cif cif;
|
| 19 |
+
ffi_type *args[4] = {
|
| 20 |
+
&ffi_type_uint32,
|
| 21 |
+
&ffi_type_uint64
|
| 22 |
+
};
|
| 23 |
+
ffi_arg lr1, lr2;
|
| 24 |
+
UINT32 l1 = 1;
|
| 25 |
+
UINT64 l2 = 2;
|
| 26 |
+
void *values[2] = {&l1, &l2};
|
| 27 |
+
|
| 28 |
+
/* Initialize the cif */
|
| 29 |
+
CHECK(ffi_prep_cif(&cif, ABI_NUM, 2,
|
| 30 |
+
&ffi_type_uint32, args) == FFI_OK);
|
| 31 |
+
|
| 32 |
+
lr1 = align_arguments(l1, l2);
|
| 33 |
+
|
| 34 |
+
ffi_call(&cif, FFI_FN(align_arguments), &lr2, values);
|
| 35 |
+
|
| 36 |
+
if (lr1 == lr2)
|
| 37 |
+
printf("bpo-38748 arguments tests ok!\n");
|
| 38 |
+
else
|
| 39 |
+
CHECK(0);
|
| 40 |
+
exit(0);
|
| 41 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/call.exp
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2003, 2006, 2009, 2010, 2014 Free Software Foundation, Inc.
|
| 2 |
+
|
| 3 |
+
# This program is free software; you can redistribute it and/or modify
|
| 4 |
+
# it under the terms of the GNU General Public License as published by
|
| 5 |
+
# the Free Software Foundation; either version 3 of the License, or
|
| 6 |
+
# (at your option) any later version.
|
| 7 |
+
#
|
| 8 |
+
# This program is distributed in the hope that it will be useful,
|
| 9 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 10 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 11 |
+
# GNU General Public License for more details.
|
| 12 |
+
#
|
| 13 |
+
# You should have received a copy of the GNU General Public License
|
| 14 |
+
# along with this program; see the file COPYING3. If not see
|
| 15 |
+
# <http://www.gnu.org/licenses/>.
|
| 16 |
+
|
| 17 |
+
dg-init
|
| 18 |
+
libffi-init
|
| 19 |
+
|
| 20 |
+
global srcdir subdir
|
| 21 |
+
|
| 22 |
+
if { [string match $compiler_vendor "microsoft"] } {
|
| 23 |
+
# -wd4005 macro redefinition
|
| 24 |
+
# -wd4244 implicit conversion to type of smaller size
|
| 25 |
+
# -wd4305 truncation to smaller type
|
| 26 |
+
# -wd4477 printf %lu of uintptr_t
|
| 27 |
+
# -wd4312 implicit conversion to type of greater size
|
| 28 |
+
# -wd4311 pointer truncation to unsigned long
|
| 29 |
+
# -EHsc C++ Exception Handling (no SEH exceptions)
|
| 30 |
+
set additional_options "-wd4005 -wd4244 -wd4305 -wd4477 -wd4312 -wd4311 -EHsc";
|
| 31 |
+
} else {
|
| 32 |
+
set additional_options "";
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
set tlist [lsort [glob -nocomplain -- $srcdir/$subdir/*.c]]
|
| 36 |
+
|
| 37 |
+
run-many-tests $tlist $additional_options
|
| 38 |
+
|
| 39 |
+
set tlist [lsort [glob -nocomplain -- $srcdir/$subdir/*.cc]]
|
| 40 |
+
|
| 41 |
+
# No C++ for or1k
|
| 42 |
+
if { [istarget "or1k-*-*"] } {
|
| 43 |
+
foreach test $tlist {
|
| 44 |
+
unsupported "$test"
|
| 45 |
+
}
|
| 46 |
+
} else {
|
| 47 |
+
run-many-tests $tlist $additional_options
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
dg-finish
|
| 51 |
+
|
| 52 |
+
# Local Variables:
|
| 53 |
+
# tcl-indent-level:4
|
| 54 |
+
# End:
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/err_bad_typedef.c
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Area: ffi_prep_cif
|
| 2 |
+
Purpose: Test error return for bad typedefs.
|
| 3 |
+
Limitations: none.
|
| 4 |
+
PR: none.
|
| 5 |
+
Originator: Blake Chaffin 6/6/2007 */
|
| 6 |
+
|
| 7 |
+
/* { dg-do run } */
|
| 8 |
+
|
| 9 |
+
#include "ffitest.h"
|
| 10 |
+
|
| 11 |
+
int main (void)
|
| 12 |
+
{
|
| 13 |
+
ffi_cif cif;
|
| 14 |
+
ffi_type* arg_types[1];
|
| 15 |
+
|
| 16 |
+
ffi_type badType = ffi_type_void;
|
| 17 |
+
|
| 18 |
+
arg_types[0] = NULL;
|
| 19 |
+
|
| 20 |
+
badType.size = 0;
|
| 21 |
+
|
| 22 |
+
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 0, &badType,
|
| 23 |
+
arg_types) == FFI_BAD_TYPEDEF);
|
| 24 |
+
|
| 25 |
+
exit(0);
|
| 26 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/ffitest.h
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include <stdlib.h>
|
| 2 |
+
#include <stdio.h>
|
| 3 |
+
#include <string.h>
|
| 4 |
+
#include <fcntl.h>
|
| 5 |
+
#include <ffi.h>
|
| 6 |
+
#include "fficonfig.h"
|
| 7 |
+
|
| 8 |
+
#include <float.h>
|
| 9 |
+
#include <math.h>
|
| 10 |
+
|
| 11 |
+
#if defined HAVE_STDINT_H
|
| 12 |
+
#include <stdint.h>
|
| 13 |
+
#endif
|
| 14 |
+
|
| 15 |
+
#if defined HAVE_INTTYPES_H
|
| 16 |
+
#include <inttypes.h>
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#define MAX_ARGS 256
|
| 20 |
+
|
| 21 |
+
#define CHECK(x) \
|
| 22 |
+
do { \
|
| 23 |
+
if(!(x)){ \
|
| 24 |
+
printf("Check failed:\n%s\n", #x); \
|
| 25 |
+
abort(); \
|
| 26 |
+
} \
|
| 27 |
+
} while(0)
|
| 28 |
+
|
| 29 |
+
#define CHECK_FLOAT_EQ(x, y) \
|
| 30 |
+
do { \
|
| 31 |
+
if(fabs((x) - (y)) > FLT_EPSILON){ \
|
| 32 |
+
printf("Check failed CHECK_FLOAT_EQ(%s, %s)\n", #x, #y); \
|
| 33 |
+
abort(); \
|
| 34 |
+
} \
|
| 35 |
+
} while(0)
|
| 36 |
+
|
| 37 |
+
#define CHECK_DOUBLE_EQ(x, y) \
|
| 38 |
+
do { \
|
| 39 |
+
if(fabs((x) - (y)) > DBL_EPSILON){ \
|
| 40 |
+
printf("Check failed CHECK_FLOAT_EQ(%s, %s)\n", #x, #y); \
|
| 41 |
+
abort(); \
|
| 42 |
+
} \
|
| 43 |
+
} while(0)
|
| 44 |
+
|
| 45 |
+
/* Define macros so that compilers other than gcc can run the tests. */
|
| 46 |
+
#undef __UNUSED__
|
| 47 |
+
#if defined(__GNUC__)
|
| 48 |
+
#define __UNUSED__ __attribute__((__unused__))
|
| 49 |
+
#define __STDCALL__ __attribute__((stdcall))
|
| 50 |
+
#define __THISCALL__ __attribute__((thiscall))
|
| 51 |
+
#define __FASTCALL__ __attribute__((fastcall))
|
| 52 |
+
#define __MSABI__ __attribute__((ms_abi))
|
| 53 |
+
#else
|
| 54 |
+
#define __UNUSED__
|
| 55 |
+
#define __STDCALL__ __stdcall
|
| 56 |
+
#define __THISCALL__ __thiscall
|
| 57 |
+
#define __FASTCALL__ __fastcall
|
| 58 |
+
#endif
|
| 59 |
+
|
| 60 |
+
#ifndef ABI_NUM
|
| 61 |
+
#define ABI_NUM FFI_DEFAULT_ABI
|
| 62 |
+
#define ABI_ATTR
|
| 63 |
+
#endif
|
| 64 |
+
|
| 65 |
+
/* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a
|
| 66 |
+
file open. */
|
| 67 |
+
#ifdef HAVE_MMAP_ANON
|
| 68 |
+
# undef HAVE_MMAP_DEV_ZERO
|
| 69 |
+
|
| 70 |
+
# include <sys/mman.h>
|
| 71 |
+
# ifndef MAP_FAILED
|
| 72 |
+
# define MAP_FAILED -1
|
| 73 |
+
# endif
|
| 74 |
+
# if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
|
| 75 |
+
# define MAP_ANONYMOUS MAP_ANON
|
| 76 |
+
# endif
|
| 77 |
+
# define USING_MMAP
|
| 78 |
+
|
| 79 |
+
#endif
|
| 80 |
+
|
| 81 |
+
#ifdef HAVE_MMAP_DEV_ZERO
|
| 82 |
+
|
| 83 |
+
# include <sys/mman.h>
|
| 84 |
+
# ifndef MAP_FAILED
|
| 85 |
+
# define MAP_FAILED -1
|
| 86 |
+
# endif
|
| 87 |
+
# define USING_MMAP
|
| 88 |
+
|
| 89 |
+
#endif
|
| 90 |
+
|
| 91 |
+
/* msvc kludge. */
|
| 92 |
+
#if defined(_MSC_VER)
|
| 93 |
+
#define PRIdLL "I64d"
|
| 94 |
+
#define PRIuLL "I64u"
|
| 95 |
+
#else
|
| 96 |
+
#define PRIdLL "lld"
|
| 97 |
+
#define PRIuLL "llu"
|
| 98 |
+
#endif
|
| 99 |
+
|
| 100 |
+
/* Tru64 UNIX kludge. */
|
| 101 |
+
#if defined(__alpha__) && defined(__osf__)
|
| 102 |
+
/* Tru64 UNIX V4.0 doesn't support %lld/%lld, but long is 64-bit. */
|
| 103 |
+
#undef PRIdLL
|
| 104 |
+
#define PRIdLL "ld"
|
| 105 |
+
#undef PRIuLL
|
| 106 |
+
#define PRIuLL "lu"
|
| 107 |
+
#define PRId8 "hd"
|
| 108 |
+
#define PRIu8 "hu"
|
| 109 |
+
#define PRId64 "ld"
|
| 110 |
+
#define PRIu64 "lu"
|
| 111 |
+
#define PRIuPTR "lu"
|
| 112 |
+
#endif
|
| 113 |
+
|
| 114 |
+
/* PA HP-UX kludge. */
|
| 115 |
+
#if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR)
|
| 116 |
+
#define PRIuPTR "lu"
|
| 117 |
+
#endif
|
| 118 |
+
|
| 119 |
+
/* IRIX kludge. */
|
| 120 |
+
#if defined(__sgi)
|
| 121 |
+
/* IRIX 6.5 <inttypes.h> provides all definitions, but only for C99
|
| 122 |
+
compilations. */
|
| 123 |
+
#define PRId8 "hhd"
|
| 124 |
+
#define PRIu8 "hhu"
|
| 125 |
+
#if (_MIPS_SZLONG == 32)
|
| 126 |
+
#define PRId64 "lld"
|
| 127 |
+
#define PRIu64 "llu"
|
| 128 |
+
#endif
|
| 129 |
+
/* This doesn't match <inttypes.h>, which always has "lld" here, but the
|
| 130 |
+
arguments are uint64_t, int64_t, which are unsigned long, long for
|
| 131 |
+
64-bit in <sgidefs.h>. */
|
| 132 |
+
#if (_MIPS_SZLONG == 64)
|
| 133 |
+
#define PRId64 "ld"
|
| 134 |
+
#define PRIu64 "lu"
|
| 135 |
+
#endif
|
| 136 |
+
/* This doesn't match <inttypes.h>, which has "u" here, but the arguments
|
| 137 |
+
are uintptr_t, which is always unsigned long. */
|
| 138 |
+
#define PRIuPTR "lu"
|
| 139 |
+
#endif
|
| 140 |
+
|
| 141 |
+
/* Solaris < 10 kludge. */
|
| 142 |
+
#if defined(__sun__) && defined(__svr4__) && !defined(PRIuPTR)
|
| 143 |
+
#if defined(__arch64__) || defined (__x86_64__)
|
| 144 |
+
#define PRIuPTR "lu"
|
| 145 |
+
#else
|
| 146 |
+
#define PRIuPTR "u"
|
| 147 |
+
#endif
|
| 148 |
+
#endif
|
| 149 |
+
|
| 150 |
+
/* MSVC kludge. */
|
| 151 |
+
#if defined _MSC_VER
|
| 152 |
+
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
|
| 153 |
+
#define PRIuPTR "lu"
|
| 154 |
+
#define PRIu8 "u"
|
| 155 |
+
#define PRId8 "d"
|
| 156 |
+
#define PRIu64 "I64u"
|
| 157 |
+
#define PRId64 "I64d"
|
| 158 |
+
#endif
|
| 159 |
+
#endif
|
| 160 |
+
|
| 161 |
+
#ifndef PRIuPTR
|
| 162 |
+
#define PRIuPTR "u"
|
| 163 |
+
#endif
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float.c
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Area: ffi_call
|
| 2 |
+
Purpose: Check return value float.
|
| 3 |
+
Limitations: none.
|
| 4 |
+
PR: none.
|
| 5 |
+
Originator: From the original ffitest.c */
|
| 6 |
+
|
| 7 |
+
/* { dg-do run } */
|
| 8 |
+
|
| 9 |
+
#include "ffitest.h"
|
| 10 |
+
|
| 11 |
+
static int floating(int a, float b, double c, long double d)
|
| 12 |
+
{
|
| 13 |
+
int i;
|
| 14 |
+
|
| 15 |
+
i = (int) ((float)a/b + ((float)c/(float)d));
|
| 16 |
+
|
| 17 |
+
return i;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
int main (void)
|
| 21 |
+
{
|
| 22 |
+
ffi_cif cif;
|
| 23 |
+
ffi_type *args[MAX_ARGS];
|
| 24 |
+
void *values[MAX_ARGS];
|
| 25 |
+
ffi_arg rint;
|
| 26 |
+
|
| 27 |
+
float f;
|
| 28 |
+
signed int si1;
|
| 29 |
+
double d;
|
| 30 |
+
long double ld;
|
| 31 |
+
|
| 32 |
+
args[0] = &ffi_type_sint;
|
| 33 |
+
values[0] = &si1;
|
| 34 |
+
args[1] = &ffi_type_float;
|
| 35 |
+
values[1] = &f;
|
| 36 |
+
args[2] = &ffi_type_double;
|
| 37 |
+
values[2] = &d;
|
| 38 |
+
args[3] = &ffi_type_longdouble;
|
| 39 |
+
values[3] = &ld;
|
| 40 |
+
|
| 41 |
+
/* Initialize the cif */
|
| 42 |
+
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4,
|
| 43 |
+
&ffi_type_sint, args) == FFI_OK);
|
| 44 |
+
|
| 45 |
+
si1 = 6;
|
| 46 |
+
f = 3.14159;
|
| 47 |
+
d = (double)1.0/(double)3.0;
|
| 48 |
+
ld = 2.71828182846L;
|
| 49 |
+
|
| 50 |
+
floating (si1, f, d, ld);
|
| 51 |
+
|
| 52 |
+
ffi_call(&cif, FFI_FN(floating), &rint, values);
|
| 53 |
+
|
| 54 |
+
printf ("%d vs %d\n", (int)rint, floating (si1, f, d, ld));
|
| 55 |
+
|
| 56 |
+
CHECK((int)rint == floating(si1, f, d, ld));
|
| 57 |
+
|
| 58 |
+
exit (0);
|
| 59 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float1.c
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Area: ffi_call
|
| 2 |
+
Purpose: Check return value double.
|
| 3 |
+
Limitations: none.
|
| 4 |
+
PR: none.
|
| 5 |
+
Originator: From the original ffitest.c */
|
| 6 |
+
|
| 7 |
+
/* { dg-do run } */
|
| 8 |
+
#include "ffitest.h"
|
| 9 |
+
#include "float.h"
|
| 10 |
+
|
| 11 |
+
#include <math.h>
|
| 12 |
+
|
| 13 |
+
typedef union
|
| 14 |
+
{
|
| 15 |
+
double d;
|
| 16 |
+
unsigned char c[sizeof (double)];
|
| 17 |
+
} value_type;
|
| 18 |
+
|
| 19 |
+
#define CANARY 0xba
|
| 20 |
+
|
| 21 |
+
static double dblit(float f)
|
| 22 |
+
{
|
| 23 |
+
return f/3.0;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
int main (void)
|
| 27 |
+
{
|
| 28 |
+
ffi_cif cif;
|
| 29 |
+
ffi_type *args[MAX_ARGS];
|
| 30 |
+
void *values[MAX_ARGS];
|
| 31 |
+
float f;
|
| 32 |
+
value_type result[2];
|
| 33 |
+
unsigned int i;
|
| 34 |
+
|
| 35 |
+
args[0] = &ffi_type_float;
|
| 36 |
+
values[0] = &f;
|
| 37 |
+
|
| 38 |
+
/* Initialize the cif */
|
| 39 |
+
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
|
| 40 |
+
&ffi_type_double, args) == FFI_OK);
|
| 41 |
+
|
| 42 |
+
f = 3.14159;
|
| 43 |
+
|
| 44 |
+
/* Put a canary in the return array. This is a regression test for
|
| 45 |
+
a buffer overrun. */
|
| 46 |
+
memset(result[1].c, CANARY, sizeof (double));
|
| 47 |
+
|
| 48 |
+
ffi_call(&cif, FFI_FN(dblit), &result[0].d, values);
|
| 49 |
+
|
| 50 |
+
/* These are not always the same!! Check for a reasonable delta */
|
| 51 |
+
|
| 52 |
+
CHECK(fabs(result[0].d - dblit(f)) < DBL_EPSILON);
|
| 53 |
+
|
| 54 |
+
/* Check the canary. */
|
| 55 |
+
for (i = 0; i < sizeof (double); ++i)
|
| 56 |
+
CHECK(result[1].c[i] == CANARY);
|
| 57 |
+
|
| 58 |
+
exit(0);
|
| 59 |
+
|
| 60 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float2.c
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Area: ffi_call
|
| 2 |
+
Purpose: Check return value long double.
|
| 3 |
+
Limitations: none.
|
| 4 |
+
PR: none.
|
| 5 |
+
Originator: From the original ffitest.c */
|
| 6 |
+
/* { dg-do run } */
|
| 7 |
+
|
| 8 |
+
#include "ffitest.h"
|
| 9 |
+
#include "float.h"
|
| 10 |
+
|
| 11 |
+
#include <math.h>
|
| 12 |
+
|
| 13 |
+
static long double ldblit(float f)
|
| 14 |
+
{
|
| 15 |
+
return (long double) (((long double) f)/ (long double) 3.0);
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
int main (void)
|
| 19 |
+
{
|
| 20 |
+
ffi_cif cif;
|
| 21 |
+
ffi_type *args[MAX_ARGS];
|
| 22 |
+
void *values[MAX_ARGS];
|
| 23 |
+
float f;
|
| 24 |
+
long double ld;
|
| 25 |
+
long double original;
|
| 26 |
+
|
| 27 |
+
args[0] = &ffi_type_float;
|
| 28 |
+
values[0] = &f;
|
| 29 |
+
|
| 30 |
+
/* Initialize the cif */
|
| 31 |
+
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
|
| 32 |
+
&ffi_type_longdouble, args) == FFI_OK);
|
| 33 |
+
|
| 34 |
+
f = 3.14159;
|
| 35 |
+
|
| 36 |
+
#if defined(__sun) && defined(__GNUC__)
|
| 37 |
+
/* long double support under SunOS/gcc is pretty much non-existent.
|
| 38 |
+
You'll get the odd bus error in library routines like printf() */
|
| 39 |
+
#else
|
| 40 |
+
printf ("%Lf\n", ldblit(f));
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
ld = 666;
|
| 44 |
+
ffi_call(&cif, FFI_FN(ldblit), &ld, values);
|
| 45 |
+
|
| 46 |
+
#if defined(__sun) && defined(__GNUC__)
|
| 47 |
+
/* long double support under SunOS/gcc is pretty much non-existent.
|
| 48 |
+
You'll get the odd bus error in library routines like printf() */
|
| 49 |
+
#else
|
| 50 |
+
printf ("%Lf, %Lf, %Lf, %Lf\n", ld, ldblit(f), ld - ldblit(f), LDBL_EPSILON);
|
| 51 |
+
#endif
|
| 52 |
+
|
| 53 |
+
/* These are not always the same!! Check for a reasonable delta */
|
| 54 |
+
original = ldblit(f);
|
| 55 |
+
if (((ld > original) ? (ld - original) : (original - ld)) < LDBL_EPSILON)
|
| 56 |
+
puts("long double return value tests ok!");
|
| 57 |
+
else
|
| 58 |
+
CHECK(0);
|
| 59 |
+
|
| 60 |
+
exit(0);
|
| 61 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float3.c
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Area: ffi_call
|
| 2 |
+
Purpose: Check float arguments with different orders.
|
| 3 |
+
Limitations: none.
|
| 4 |
+
PR: none.
|
| 5 |
+
Originator: From the original ffitest.c */
|
| 6 |
+
|
| 7 |
+
/* { dg-do run } */
|
| 8 |
+
|
| 9 |
+
#include "ffitest.h"
|
| 10 |
+
#include "float.h"
|
| 11 |
+
|
| 12 |
+
#include <math.h>
|
| 13 |
+
|
| 14 |
+
static double floating_1(float a, double b, long double c)
|
| 15 |
+
{
|
| 16 |
+
return (double) a + b + (double) c;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
static double floating_2(long double a, double b, float c)
|
| 20 |
+
{
|
| 21 |
+
return (double) a + b + (double) c;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
int main (void)
|
| 25 |
+
{
|
| 26 |
+
ffi_cif cif;
|
| 27 |
+
ffi_type *args[MAX_ARGS];
|
| 28 |
+
void *values[MAX_ARGS];
|
| 29 |
+
double rd;
|
| 30 |
+
|
| 31 |
+
float f;
|
| 32 |
+
double d;
|
| 33 |
+
long double ld;
|
| 34 |
+
|
| 35 |
+
args[0] = &ffi_type_float;
|
| 36 |
+
values[0] = &f;
|
| 37 |
+
args[1] = &ffi_type_double;
|
| 38 |
+
values[1] = &d;
|
| 39 |
+
args[2] = &ffi_type_longdouble;
|
| 40 |
+
values[2] = &ld;
|
| 41 |
+
|
| 42 |
+
/* Initialize the cif */
|
| 43 |
+
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 3,
|
| 44 |
+
&ffi_type_double, args) == FFI_OK);
|
| 45 |
+
|
| 46 |
+
f = 3.14159;
|
| 47 |
+
d = (double)1.0/(double)3.0;
|
| 48 |
+
ld = 2.71828182846L;
|
| 49 |
+
|
| 50 |
+
floating_1 (f, d, ld);
|
| 51 |
+
|
| 52 |
+
ffi_call(&cif, FFI_FN(floating_1), &rd, values);
|
| 53 |
+
|
| 54 |
+
CHECK(fabs(rd - floating_1(f, d, ld)) < DBL_EPSILON);
|
| 55 |
+
|
| 56 |
+
args[0] = &ffi_type_longdouble;
|
| 57 |
+
values[0] = &ld;
|
| 58 |
+
args[1] = &ffi_type_double;
|
| 59 |
+
values[1] = &d;
|
| 60 |
+
args[2] = &ffi_type_float;
|
| 61 |
+
values[2] = &f;
|
| 62 |
+
|
| 63 |
+
/* Initialize the cif */
|
| 64 |
+
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 3,
|
| 65 |
+
&ffi_type_double, args) == FFI_OK);
|
| 66 |
+
|
| 67 |
+
floating_2 (ld, d, f);
|
| 68 |
+
|
| 69 |
+
ffi_call(&cif, FFI_FN(floating_2), &rd, values);
|
| 70 |
+
|
| 71 |
+
CHECK(fabs(rd - floating_2(ld, d, f)) < DBL_EPSILON);
|
| 72 |
+
|
| 73 |
+
exit (0);
|
| 74 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float4.c
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Area: ffi_call
|
| 2 |
+
Purpose: Check denorm double value.
|
| 3 |
+
Limitations: none.
|
| 4 |
+
PR: PR26483.
|
| 5 |
+
Originator: From the original ffitest.c */
|
| 6 |
+
|
| 7 |
+
/* { dg-do run } */
|
| 8 |
+
/* { dg-options "-mieee" { target alpha*-*-* } } */
|
| 9 |
+
|
| 10 |
+
#include "ffitest.h"
|
| 11 |
+
#include "float.h"
|
| 12 |
+
|
| 13 |
+
typedef union
|
| 14 |
+
{
|
| 15 |
+
double d;
|
| 16 |
+
unsigned char c[sizeof (double)];
|
| 17 |
+
} value_type;
|
| 18 |
+
|
| 19 |
+
#define CANARY 0xba
|
| 20 |
+
|
| 21 |
+
static double dblit(double d)
|
| 22 |
+
{
|
| 23 |
+
return d;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
int main (void)
|
| 27 |
+
{
|
| 28 |
+
ffi_cif cif;
|
| 29 |
+
ffi_type *args[MAX_ARGS];
|
| 30 |
+
void *values[MAX_ARGS];
|
| 31 |
+
double d;
|
| 32 |
+
value_type result[2];
|
| 33 |
+
unsigned int i;
|
| 34 |
+
|
| 35 |
+
args[0] = &ffi_type_double;
|
| 36 |
+
values[0] = &d;
|
| 37 |
+
|
| 38 |
+
/* Initialize the cif */
|
| 39 |
+
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
|
| 40 |
+
&ffi_type_double, args) == FFI_OK);
|
| 41 |
+
|
| 42 |
+
d = DBL_MIN / 2;
|
| 43 |
+
|
| 44 |
+
/* Put a canary in the return array. This is a regression test for
|
| 45 |
+
a buffer overrun. */
|
| 46 |
+
memset(result[1].c, CANARY, sizeof (double));
|
| 47 |
+
|
| 48 |
+
ffi_call(&cif, FFI_FN(dblit), &result[0].d, values);
|
| 49 |
+
|
| 50 |
+
/* The standard delta check doesn't work for denorms. Since we didn't do
|
| 51 |
+
any arithmetic, we should get the original result back, and hence an
|
| 52 |
+
exact check should be OK here. */
|
| 53 |
+
|
| 54 |
+
CHECK(result[0].d == dblit(d));
|
| 55 |
+
|
| 56 |
+
/* Check the canary. */
|
| 57 |
+
for (i = 0; i < sizeof (double); ++i)
|
| 58 |
+
CHECK(result[1].c[i] == CANARY);
|
| 59 |
+
|
| 60 |
+
exit(0);
|
| 61 |
+
|
| 62 |
+
}
|
miniconda3/pkgs/libffi-3.4.4-h6a678d5_1/info/test/testsuite/libffi.call/float_va.c
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Area: fp and variadics
|
| 2 |
+
Purpose: check fp inputs and returns work on variadics, even the fixed params
|
| 3 |
+
Limitations: None
|
| 4 |
+
PR: none
|
| 5 |
+
Originator: <david.gilbert@linaro.org> 2011-01-25
|
| 6 |
+
|
| 7 |
+
Intended to stress the difference in ABI on ARM vfp
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
/* { dg-do run } */
|
| 11 |
+
|
| 12 |
+
#include <stdarg.h>
|
| 13 |
+
|
| 14 |
+
#include "ffitest.h"
|
| 15 |
+
|
| 16 |
+
/* prints out all the parameters, and returns the sum of them all.
|
| 17 |
+
* 'x' is the number of variadic parameters all of which are double in this test
|
| 18 |
+
*/
|
| 19 |
+
double float_va_fn(unsigned int x, double y,...)
|
| 20 |
+
{
|
| 21 |
+
double total=0.0;
|
| 22 |
+
va_list ap;
|
| 23 |
+
unsigned int i;
|
| 24 |
+
|
| 25 |
+
total+=(double)x;
|
| 26 |
+
total+=y;
|
| 27 |
+
|
| 28 |
+
printf("%u: %.1f :", x, y);
|
| 29 |
+
|
| 30 |
+
va_start(ap, y);
|
| 31 |
+
for(i=0;i<x;i++)
|
| 32 |
+
{
|
| 33 |
+
double arg=va_arg(ap, double);
|
| 34 |
+
total+=arg;
|
| 35 |
+
printf(" %d:%.1f ", i, arg);
|
| 36 |
+
}
|
| 37 |
+
va_end(ap);
|
| 38 |
+
|
| 39 |
+
printf(" total: %.1f\n", total);
|
| 40 |
+
|
| 41 |
+
return total;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
int main (void)
|
| 45 |
+
{
|
| 46 |
+
ffi_cif cif;
|
| 47 |
+
|
| 48 |
+
ffi_type *arg_types[5];
|
| 49 |
+
void *values[5];
|
| 50 |
+
double doubles[5];
|
| 51 |
+
unsigned int firstarg;
|
| 52 |
+
double resfp;
|
| 53 |
+
|
| 54 |
+
/* First test, pass float_va_fn(0,2.0) - note there are no actual
|
| 55 |
+
* variadic parameters, but it's declared variadic so the ABI may be
|
| 56 |
+
* different. */
|
| 57 |
+
/* Call it statically and then via ffi */
|
| 58 |
+
resfp=float_va_fn(0,2.0);
|
| 59 |
+
/* { dg-output "0: 2.0 : total: 2.0" } */
|
| 60 |
+
printf("compiled: %.1f\n", resfp);
|
| 61 |
+
/* { dg-output "\ncompiled: 2.0" } */
|
| 62 |
+
|
| 63 |
+
arg_types[0] = &ffi_type_uint;
|
| 64 |
+
arg_types[1] = &ffi_type_double;
|
| 65 |
+
arg_types[2] = NULL;
|
| 66 |
+
CHECK(ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 2, 2,
|
| 67 |
+
&ffi_type_double, arg_types) == FFI_OK);
|
| 68 |
+
|
| 69 |
+
firstarg = 0;
|
| 70 |
+
doubles[0] = 2.0;
|
| 71 |
+
values[0] = &firstarg;
|
| 72 |
+
values[1] = &doubles[0];
|
| 73 |
+
ffi_call(&cif, FFI_FN(float_va_fn), &resfp, values);
|
| 74 |
+
/* { dg-output "\n0: 2.0 : total: 2.0" } */
|
| 75 |
+
printf("ffi: %.1f\n", resfp);
|
| 76 |
+
/* { dg-output "\nffi: 2.0" } */
|
| 77 |
+
CHECK_DOUBLE_EQ(resfp, 2);
|
| 78 |
+
|
| 79 |
+
/* Second test, float_va_fn(2,2.0,3.0,4.0), now with variadic params */
|
| 80 |
+
/* Call it statically and then via ffi */
|
| 81 |
+
resfp=float_va_fn(2,2.0,3.0,4.0);
|
| 82 |
+
/* { dg-output "\n2: 2.0 : 0:3.0 1:4.0 total: 11.0" } */
|
| 83 |
+
printf("compiled: %.1f\n", resfp);
|
| 84 |
+
/* { dg-output "\ncompiled: 11.0" } */
|
| 85 |
+
CHECK_DOUBLE_EQ(resfp, 11);
|
| 86 |
+
|
| 87 |
+
arg_types[0] = &ffi_type_uint;
|
| 88 |
+
arg_types[1] = &ffi_type_double;
|
| 89 |
+
arg_types[2] = &ffi_type_double;
|
| 90 |
+
arg_types[3] = &ffi_type_double;
|
| 91 |
+
arg_types[4] = NULL;
|
| 92 |
+
CHECK(ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 2, 4,
|
| 93 |
+
&ffi_type_double, arg_types) == FFI_OK);
|
| 94 |
+
|
| 95 |
+
firstarg = 2;
|
| 96 |
+
doubles[0] = 2.0;
|
| 97 |
+
doubles[1] = 3.0;
|
| 98 |
+
doubles[2] = 4.0;
|
| 99 |
+
values[0] = &firstarg;
|
| 100 |
+
values[1] = &doubles[0];
|
| 101 |
+
values[2] = &doubles[1];
|
| 102 |
+
values[3] = &doubles[2];
|
| 103 |
+
ffi_call(&cif, FFI_FN(float_va_fn), &resfp, values);
|
| 104 |
+
/* { dg-output "\n2: 2.0 : 0:3.0 1:4.0 total: 11.0" } */
|
| 105 |
+
printf("ffi: %.1f\n", resfp);
|
| 106 |
+
/* { dg-output "\nffi: 11.0" } */
|
| 107 |
+
CHECK_DOUBLE_EQ(resfp, 11);
|
| 108 |
+
|
| 109 |
+
exit(0);
|
| 110 |
+
}
|