aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/libffi/testsuite/libffi.go
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:39 +0300
commita6a92afe03e02795227d2641b49819b687f088f8 (patch)
treef6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /contrib/restricted/libffi/testsuite/libffi.go
parentc6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff)
downloadydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'contrib/restricted/libffi/testsuite/libffi.go')
-rw-r--r--contrib/restricted/libffi/testsuite/libffi.go/aa-direct.c68
-rw-r--r--contrib/restricted/libffi/testsuite/libffi.go/aa-direct/ya.make40
-rw-r--r--contrib/restricted/libffi/testsuite/libffi.go/closure1.c56
-rw-r--r--contrib/restricted/libffi/testsuite/libffi.go/closure1/ya.make40
-rw-r--r--contrib/restricted/libffi/testsuite/libffi.go/ffitest.h2
-rw-r--r--contrib/restricted/libffi/testsuite/libffi.go/static-chain.h38
-rw-r--r--contrib/restricted/libffi/testsuite/libffi.go/ya.make12
7 files changed, 128 insertions, 128 deletions
diff --git a/contrib/restricted/libffi/testsuite/libffi.go/aa-direct.c b/contrib/restricted/libffi/testsuite/libffi.go/aa-direct.c
index b00c404ab3..4b2f5b5ed8 100644
--- a/contrib/restricted/libffi/testsuite/libffi.go/aa-direct.c
+++ b/contrib/restricted/libffi/testsuite/libffi.go/aa-direct.c
@@ -1,34 +1,34 @@
-/* { dg-do run } */
-
-#include "static-chain.h"
-
-#if defined(__GNUC__) && !defined(__clang__) && defined(STATIC_CHAIN_REG)
-
-#include "ffitest.h"
-
-/* Blatent assumption here that the prologue doesn't clobber the
- static chain for trivial functions. If this is not true, don't
- define STATIC_CHAIN_REG, and we'll test what we can via other tests. */
-void *doit(void)
-{
- register void *chain __asm__(STATIC_CHAIN_REG);
- return chain;
-}
-
-int main()
-{
- ffi_cif cif;
- void *result;
-
- CHECK(ffi_prep_cif(&cif, ABI_NUM, 0, &ffi_type_pointer, NULL) == FFI_OK);
-
- ffi_call_go(&cif, FFI_FN(doit), &result, NULL, &result);
-
- CHECK(result == &result);
-
- return 0;
-}
-
-#else /* UNSUPPORTED */
-int main() { return 0; }
-#endif
+/* { dg-do run } */
+
+#include "static-chain.h"
+
+#if defined(__GNUC__) && !defined(__clang__) && defined(STATIC_CHAIN_REG)
+
+#include "ffitest.h"
+
+/* Blatent assumption here that the prologue doesn't clobber the
+ static chain for trivial functions. If this is not true, don't
+ define STATIC_CHAIN_REG, and we'll test what we can via other tests. */
+void *doit(void)
+{
+ register void *chain __asm__(STATIC_CHAIN_REG);
+ return chain;
+}
+
+int main()
+{
+ ffi_cif cif;
+ void *result;
+
+ CHECK(ffi_prep_cif(&cif, ABI_NUM, 0, &ffi_type_pointer, NULL) == FFI_OK);
+
+ ffi_call_go(&cif, FFI_FN(doit), &result, NULL, &result);
+
+ CHECK(result == &result);
+
+ return 0;
+}
+
+#else /* UNSUPPORTED */
+int main() { return 0; }
+#endif
diff --git a/contrib/restricted/libffi/testsuite/libffi.go/aa-direct/ya.make b/contrib/restricted/libffi/testsuite/libffi.go/aa-direct/ya.make
index a065cc77d9..6127c121ea 100644
--- a/contrib/restricted/libffi/testsuite/libffi.go/aa-direct/ya.make
+++ b/contrib/restricted/libffi/testsuite/libffi.go/aa-direct/ya.make
@@ -1,9 +1,9 @@
-# Generated by devtools/yamaker.
-
-PROGRAM()
-
+# Generated by devtools/yamaker.
+
+PROGRAM()
+
WITHOUT_LICENSE_TEXTS()
-
+
OWNER(
borman
g:cpp-contrib
@@ -11,18 +11,18 @@ OWNER(
LICENSE(GPL-2.0-only)
-PEERDIR(
- contrib/restricted/libffi
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_RUNTIME()
-
-SRCDIR(contrib/restricted/libffi/testsuite/libffi.go)
-
-SRCS(
- aa-direct.c
-)
-
-END()
+PEERDIR(
+ contrib/restricted/libffi
+)
+
+NO_COMPILER_WARNINGS()
+
+NO_RUNTIME()
+
+SRCDIR(contrib/restricted/libffi/testsuite/libffi.go)
+
+SRCS(
+ aa-direct.c
+)
+
+END()
diff --git a/contrib/restricted/libffi/testsuite/libffi.go/closure1.c b/contrib/restricted/libffi/testsuite/libffi.go/closure1.c
index 7b34afc88c..6666ad9236 100644
--- a/contrib/restricted/libffi/testsuite/libffi.go/closure1.c
+++ b/contrib/restricted/libffi/testsuite/libffi.go/closure1.c
@@ -1,28 +1,28 @@
-/* { dg-do run } */
-
-#include "ffitest.h"
-
-void doit(ffi_cif *cif, void *rvalue, void **avalue, void *closure)
-{
- (void)cif;
- (void)avalue;
- *(void **)rvalue = closure;
-}
-
-typedef void * (*FN)(void);
-
-int main()
-{
- ffi_cif cif;
- ffi_go_closure cl;
- void *result;
-
- CHECK(ffi_prep_cif(&cif, ABI_NUM, 0, &ffi_type_pointer, NULL) == FFI_OK);
- CHECK(ffi_prep_go_closure(&cl, &cif, doit) == FFI_OK);
-
- ffi_call_go(&cif, FFI_FN(*(FN *)&cl), &result, NULL, &cl);
-
- CHECK(result == &cl);
-
- exit(0);
-}
+/* { dg-do run } */
+
+#include "ffitest.h"
+
+void doit(ffi_cif *cif, void *rvalue, void **avalue, void *closure)
+{
+ (void)cif;
+ (void)avalue;
+ *(void **)rvalue = closure;
+}
+
+typedef void * (*FN)(void);
+
+int main()
+{
+ ffi_cif cif;
+ ffi_go_closure cl;
+ void *result;
+
+ CHECK(ffi_prep_cif(&cif, ABI_NUM, 0, &ffi_type_pointer, NULL) == FFI_OK);
+ CHECK(ffi_prep_go_closure(&cl, &cif, doit) == FFI_OK);
+
+ ffi_call_go(&cif, FFI_FN(*(FN *)&cl), &result, NULL, &cl);
+
+ CHECK(result == &cl);
+
+ exit(0);
+}
diff --git a/contrib/restricted/libffi/testsuite/libffi.go/closure1/ya.make b/contrib/restricted/libffi/testsuite/libffi.go/closure1/ya.make
index d758d0bd64..3a7d6db0c4 100644
--- a/contrib/restricted/libffi/testsuite/libffi.go/closure1/ya.make
+++ b/contrib/restricted/libffi/testsuite/libffi.go/closure1/ya.make
@@ -1,9 +1,9 @@
-# Generated by devtools/yamaker.
-
-PROGRAM()
-
+# Generated by devtools/yamaker.
+
+PROGRAM()
+
WITHOUT_LICENSE_TEXTS()
-
+
OWNER(
borman
g:cpp-contrib
@@ -11,18 +11,18 @@ OWNER(
LICENSE(GPL-2.0-only)
-PEERDIR(
- contrib/restricted/libffi
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_RUNTIME()
-
-SRCDIR(contrib/restricted/libffi/testsuite/libffi.go)
-
-SRCS(
- closure1.c
-)
-
-END()
+PEERDIR(
+ contrib/restricted/libffi
+)
+
+NO_COMPILER_WARNINGS()
+
+NO_RUNTIME()
+
+SRCDIR(contrib/restricted/libffi/testsuite/libffi.go)
+
+SRCS(
+ closure1.c
+)
+
+END()
diff --git a/contrib/restricted/libffi/testsuite/libffi.go/ffitest.h b/contrib/restricted/libffi/testsuite/libffi.go/ffitest.h
index d27d362d6a..1e9446fbbc 100644
--- a/contrib/restricted/libffi/testsuite/libffi.go/ffitest.h
+++ b/contrib/restricted/libffi/testsuite/libffi.go/ffitest.h
@@ -1 +1 @@
-#include "../libffi.call/ffitest.h"
+#include "../libffi.call/ffitest.h"
diff --git a/contrib/restricted/libffi/testsuite/libffi.go/static-chain.h b/contrib/restricted/libffi/testsuite/libffi.go/static-chain.h
index 3675b40a54..0bc98f1ac7 100644
--- a/contrib/restricted/libffi/testsuite/libffi.go/static-chain.h
+++ b/contrib/restricted/libffi/testsuite/libffi.go/static-chain.h
@@ -1,19 +1,19 @@
-#ifdef __aarch64__
-# define STATIC_CHAIN_REG "x18"
-#elif defined(__alpha__)
-# define STATIC_CHAIN_REG "$1"
-#elif defined(__arm__)
-# define STATIC_CHAIN_REG "ip"
-#elif defined(__sparc__)
-# if defined(__arch64__) || defined(__sparcv9)
-# define STATIC_CHAIN_REG "g5"
-# else
-# define STATIC_CHAIN_REG "g2"
-# endif
-#elif defined(__x86_64__)
-# define STATIC_CHAIN_REG "r10"
-#elif defined(__i386__)
-# ifndef ABI_NUM
-# define STATIC_CHAIN_REG "ecx" /* FFI_DEFAULT_ABI only */
-# endif
-#endif
+#ifdef __aarch64__
+# define STATIC_CHAIN_REG "x18"
+#elif defined(__alpha__)
+# define STATIC_CHAIN_REG "$1"
+#elif defined(__arm__)
+# define STATIC_CHAIN_REG "ip"
+#elif defined(__sparc__)
+# if defined(__arch64__) || defined(__sparcv9)
+# define STATIC_CHAIN_REG "g5"
+# else
+# define STATIC_CHAIN_REG "g2"
+# endif
+#elif defined(__x86_64__)
+# define STATIC_CHAIN_REG "r10"
+#elif defined(__i386__)
+# ifndef ABI_NUM
+# define STATIC_CHAIN_REG "ecx" /* FFI_DEFAULT_ABI only */
+# endif
+#endif
diff --git a/contrib/restricted/libffi/testsuite/libffi.go/ya.make b/contrib/restricted/libffi/testsuite/libffi.go/ya.make
index 9e8d002d78..6a53163151 100644
--- a/contrib/restricted/libffi/testsuite/libffi.go/ya.make
+++ b/contrib/restricted/libffi/testsuite/libffi.go/ya.make
@@ -1,6 +1,6 @@
-# Generated by devtools/yamaker.
-
-RECURSE(
- aa-direct
- closure1
-)
+# Generated by devtools/yamaker.
+
+RECURSE(
+ aa-direct
+ closure1
+)