diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-25 19:13:44 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-25 19:13:44 +0000 |
commit | 28c07da5f67fec0f677a408dc0e54d61374b872c (patch) | |
tree | 3d1ddd9e5907df213130f3823dd250c92c37a1c5 /libffi/src/ia64/ia64_flags.h | |
parent | 9dcd77b5d4ba45bea3176e89f83f4ef8168cfe1e (diff) | |
download | gcc-28c07da5f67fec0f677a408dc0e54d61374b872c.tar.gz |
2000-02-25 Hans Boehm <boehm@acm.org>
* src/ia64/ffi.c, src/ia64/ia64_flags.h, src/ia64/unix.S: New
files.
* src/raw_api.c (ffi_translate_args): Fixed typo in argument
list.
(ffi_prep_raw_closure): Use ffi_translate_args, not
ffi_closure_translate.
* src/java_raw_api.c: New file.
* src/ffitest.c (closure_test_fn): New function.
(main): Define `rint' as long long on IA64. Added new test when
FFI_CLOSURES is defined.
* include/ffi.h.in (ALIGN): Use size_t, not unsigned.
(ffi_abi): Recognize IA64.
(ffi_raw): Added `flt' field.
Added "Java raw API" code.
* configure.in: Recognize ia64.
* Makefile.am (TARGET_SRC_IA64): New macro.
(libffi_la_common_SOURCES): Added java_raw_api.c.
(libffi_la_SOURCES): Define in IA64 case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32151 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/src/ia64/ia64_flags.h')
-rw-r--r-- | libffi/src/ia64/ia64_flags.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/libffi/src/ia64/ia64_flags.h b/libffi/src/ia64/ia64_flags.h new file mode 100644 index 00000000000..23dbd3e0237 --- /dev/null +++ b/libffi/src/ia64/ia64_flags.h @@ -0,0 +1,62 @@ +/* ----------------------------------------------------------------------- + ia64_flags.h - Copyright (c) 2000 Hewlett Packard Company + + IA64/unix Foreign Function Interface + + Original author: Hans Boehm, HP Labs + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + ----------------------------------------------------------------------- */ + + +/* Homogeneous Floating Point Aggregates (HFAs) which are returned */ +/* in FP registers. The least significant bits specify the size in */ +/* words. */ +#define FFI_IS_FLOAT_FP_AGGREGATE 0x1000 +#define FFI_IS_DOUBLE_FP_AGGREGATE 0x0800 +#define FLOAT_FP_AGGREGATE_BIT 12 +#define DOUBLE_FP_AGGREGATE_BIT 11 + +/* Small structures containing N words. If N=1, they are returned */ +/* as though they were integers. */ +#define FFI_IS_SMALL_STRUCT2 0x40 /* Struct > 8, <=16 bytes */ +#define FFI_IS_SMALL_STRUCT3 0x41 /* Struct > 16 <= 24 bytes */ +#define FFI_IS_SMALL_STRUCT4 0x42 /* Struct > 24, <=32 bytes */ + +/* Flag values identifying particularly simple cases, which are */ +/* handled specially. We treat functions as simple if they take all */ +/* arguments can be passed as 32 or 64 bit integer quantities, there is */ +/* either no return value or it can be treated as a 64bit integer, and */ +/* if there are at most 2 arguments. */ +/* This is OR'ed with the normal flag values. */ +#define FFI_SIMPLE_V 0x10000 /* () -> X */ +#define FFI_SIMPLE_I 0x20000 /* (int) -> X */ +#define FFI_SIMPLE_L 0x30000 /* (long) -> X */ +#define FFI_SIMPLE_II 0x40000 /* (int,int) -> X */ +#define FFI_SIMPLE_IL 0x50000 /* (int,long) -> X */ +#define FFI_SIMPLE_LI 0x60000 /* (long,int) -> X */ +#define FFI_SIMPLE_LL 0x70000 /* (long,long) -> X */ + +/* Mask for all of the FFI_SIMPLE bits: */ +#define FFI_SIMPLE 0xf0000 + +/* An easy way to build FFI_SIMPLE flags from FFI_SIMPLE_V: */ +#define FFI_ADD_LONG_ARG(flag) (((flag) << 1) | 0x10000) +#define FFI_ADD_INT_ARG(flag) ((flag) << 1) |