Commit a1ab4c31 by Arnaud Charlet

gcc-interface: New directory.

	* gcc-interface: New directory.

	* ada-tree.def, cuintp.c, gigi.h, Makefile.in, targtyps.c, ada.h,
	utils.c, ada-tree.h, decl.c, lang.opt, Make-lang.in, trans.c,
	config-lang.in, deftarg.c, lang-specs.h, misc.c, utils2.c: Moved
	to gcc-interface subdirectory.

From-SVN: r138246
parent 46897370
# Top level configure fragment for GNU Ada (GNAT).
# Copyright (C) 1994-2003, 2007 Free Software Foundation, Inc.
# Copyright (C) 1994-2008 Free Software Foundation, Inc.
#This file is part of GCC.
#GCC is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 3, or (at your option)
#the Free Software Foundation; either version 2, or (at your option)
#any later version.
#GCC is distributed in the hope that it will be useful,
......@@ -14,28 +14,15 @@
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with GCC; see the file COPYING3. If not see
#<http://www.gnu.org/licenses/>.
# Configure looks for the existence of this file to auto-config each language.
# We define several parameters used by configure:
#
# language - name of language as it would appear in $(LANGUAGES)
# boot_language - "yes" if we need to build this language in stage1
# compilers - value to add to $(COMPILERS)
#along with GCC; see the file COPYING. If not, write to
#the Free Software Foundation, 51 Franklin Street, Fifth Floor,
#Boston, MA 02110-1301, USA.
language="ada"
boot_language=yes
boot_language_boot_flags='ADAFLAGS="$(BOOT_ADAFLAGS)"'
compilers="gnat1\$(exeext)"
gtfiles="\$(srcdir)/ada/ada-tree.h \$(srcdir)/ada/gigi.h \$(srcdir)/ada/decl.c \$(srcdir)/ada/trans.c \$(srcdir)/ada/utils.c"
outputs=ada/Makefile
target_libs="target-libada"
lang_dirs="gnattools"
gcc_subdir="ada/gcc-interface"
# Ada will not work until the front end starts emitting GIMPLE trees.
build_by_default=no
if [ -f ${srcdir}/gcc/ada/gcc-interface/config-lang.in ]; then
. ${srcdir}/gcc/ada/gcc-interface/config-lang.in
else
. ${srcdir}/ada/gcc-interface/config-lang.in
fi
This source diff could not be displayed because it is too large. You can view the blob instead.
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* *
* GNAT-SPECIFIC GCC TREE CODES *
* *
* Specification *
* *
* Copyright (C) 1992-2007, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License along with GCC; see the file COPYING3. If not see *
* <http://www.gnu.org/licenses/>. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
* *
****************************************************************************/
/* A type that is an unconstrained array itself. This node is never passed
to GCC. TREE_TYPE is the type of the fat pointer and TYPE_OBJECT_RECORD_TYPE
is the type of a record containing the template and data. */
DEFTREECODE (UNCONSTRAINED_ARRAY_TYPE, "unconstrained_array_type", tcc_type, 0)
/* A reference to an unconstrained array. This node only exists as an
intermediate node during the translation of a GNAT tree to a GCC tree;
it is never passed to GCC. The only field used is operand 0, which
is the fat pointer object. */
DEFTREECODE (UNCONSTRAINED_ARRAY_REF, "unconstrained_array_ref",
tcc_reference, 1)
/* An expression that returns an RTL suitable for its type. Operand 0
is an expression to be evaluated for side effects only. */
DEFTREECODE (NULL_EXPR, "null_expr", tcc_expression, 1)
/* Same as ADDR_EXPR, except that if the operand represents a bit field,
return the address of the byte containing the bit. This is used
for the 'Address attribute and never shows up in the tree. */
DEFTREECODE (ATTR_ADDR_EXPR, "attr_addr_expr", tcc_reference, 1)
/* Here are the tree codes for the statement types known to Ada. These
must be at the end of this file to allow IS_ADA_STMT to work. */
/* This is how record_code_position and insert_code_for work. The former
makes this tree node, whose operand is a statement. The latter inserts
the actual statements into this node. Gimplification consists of
just returning the inner statement. */
DEFTREECODE (STMT_STMT, "stmt_stmt", tcc_statement, 1)
/* A loop. LOOP_STMT_TOP_COND and LOOP_STMT_BOT_COND are the tests to exit a
loop at the top and bottom, respectively. LOOP_STMT_UPDATE is the statement
to update the loop iterator at the continue point. LOOP_STMT_BODY are the
statements in the body of the loop. LOOP_STMT_LABEL points to the LABEL_DECL
of the end label of the loop. */
DEFTREECODE (LOOP_STMT, "loop_stmt", tcc_statement, 5)
/* Conditionally exit a loop. EXIT_STMT_COND is the condition, which, if
true, will cause the loop to be exited. If no condition is specified,
the loop is unconditionally exited. EXIT_STMT_LABEL is the end label
corresponding to the loop to exit. */
DEFTREECODE (EXIT_STMT, "exit_stmt", tcc_statement, 2)
/* A exception region. REGION_STMT_BODY is the statement to be executed
inside the region. REGION_STMT_HANDLE is a statement that represents
the exception handlers (usually a BLOCK_STMT of HANDLE_STMTs).
REGION_STMT_BLOCK is the BLOCK node for the declarative region, if any. */
DEFTREECODE (REGION_STMT, "region_stmt", tcc_statement, 3)
/* An exception handler. HANDLER_STMT_ARG is the value to pass to
expand_start_catch, HANDLER_STMT_LIST is the list of statements for the
handler itself, and HANDLER_STMT_BLOCK is the BLOCK node for this
binding. */
DEFTREECODE (HANDLER_STMT, "handler_stmt", tcc_statement, 3)
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* *
* A D A *
* *
* C Header File *
* *
* Copyright (C) 1992-2008, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
* ware Foundation; either version 2, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING. If not, write *
* to the Free Software Foundation, 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
* *
* As a special exception, if you link this file with other files to *
* produce an executable, this file does not by itself cause the resulting *
* executable to be covered by the GNU General Public License. This except- *
* ion does not however invalidate any other reasons why the executable *
* file might be covered by the GNU Public License. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
* *
****************************************************************************/
/* This file contains some standard macros for performing Ada-like
operations. These are used to aid in the translation of other headers. */
#ifndef GCC_ADA_H
#define GCC_ADA_H
/* Inlined functions in header are preceded by INLINE, which is normally set
to extern inline for GCC, but may be set to static for use in standard
ANSI-C. */
#ifndef INLINE
#ifdef __GNUC__
#define INLINE static inline
#else
#define INLINE static
#endif
#endif
/* Define a macro to concatenate two strings. Write it for ANSI C and
for traditional C. */
#ifdef __STDC__
#define CAT(A,B) A##B
#else
#define _ECHO(A) A
#define CAT(A,B) ECHO(A)B
#endif
/* The following macro definition simulates the effect of a declaration of
a subtype, where the first two parameters give the name of the type and
subtype, and the third and fourth parameters give the subtype range. The
effect is to compile a typedef defining the subtype as a synonym for the
type, together with two constants defining the end points. */
#define SUBTYPE(SUBTYPE,TYPE,FIRST,LAST) \
typedef TYPE SUBTYPE; \
enum { CAT (SUBTYPE,__First) = FIRST, \
CAT (SUBTYPE,__Last) = LAST };
/* The following definitions provide the equivalent of the Ada IN and NOT IN
operators, assuming that the subtype involved has been defined using the
SUBTYPE macro defined above. */
#define IN(VALUE,SUBTYPE) \
(((VALUE) >= (SUBTYPE) CAT (SUBTYPE,__First)) \
&& ((VALUE) <= (SUBTYPE) CAT (SUBTYPE,__Last)))
#endif
# Top level configure fragment for GNU Ada (GNAT).
# Copyright (C) 1994-2008 Free Software Foundation, Inc.
#This file is part of GCC.
#GCC is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 3, or (at your option)
#any later version.
#GCC is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with GCC; see the file COPYING3. If not see
#<http://www.gnu.org/licenses/>.
# Configure looks for the existence of this file to auto-config each language.
# We define several parameters used by configure:
#
# language - name of language as it would appear in $(LANGUAGES)
# boot_language - "yes" if we need to build this language in stage1
# compilers - value to add to $(COMPILERS)
language="ada"
gcc_subdir="ada/gcc-interface"
boot_language=yes
boot_language_boot_flags='ADAFLAGS="$(BOOT_ADAFLAGS)"'
compilers="gnat1\$(exeext)"
gtfiles="\$(srcdir)/ada/gcc-interface/ada-tree.h \$(srcdir)/ada/gcc-interface/gigi.h \$(srcdir)/ada/gcc-interface/decl.c \$(srcdir)/ada/gcc-interface/trans.c \$(srcdir)/ada/gcc-interface/utils.c"
outputs="ada/gcc-interface/Makefile ada/Makefile"
target_libs="target-libada"
lang_dirs="gnattools"
# Ada will not work until the front end starts emitting GIMPLE trees.
build_by_default=no
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* *
* C U I N T P *
* *
* C Implementation File *
* *
* Copyright (C) 1992-2008, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License along with GCC; see the file COPYING3. If not see *
* <http://www.gnu.org/licenses/>. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
* *
****************************************************************************/
/* This file corresponds to the Ada package body Uintp. It was created
manually from the files uintp.ads and uintp.adb. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "ada.h"
#include "types.h"
#include "uintp.h"
#include "atree.h"
#include "elists.h"
#include "nlists.h"
#include "stringt.h"
#include "fe.h"
#include "gigi.h"
#include "ada-tree.h"
/* Universal integers are represented by the Uint type which is an index into
the Uints_Ptr table containing Uint_Entry values. A Uint_Entry contains an
index and length for getting the "digits" of the universal integer from the
Udigits_Ptr table.
For efficiency, this method is used only for integer values larger than the
constant Uint_Bias. If a Uint is less than this constant, then it contains
the integer value itself. The origin of the Uints_Ptr table is adjusted so
that a Uint value of Uint_Bias indexes the first element.
First define a utility function that operates like build_int_cst for
integral types and does a conversion to floating-point for real types. */
static tree
build_cst_from_int (tree type, HOST_WIDE_INT low)
{
if (TREE_CODE (type) == REAL_TYPE)
return convert (type, build_int_cst (NULL_TREE, low));
else
return build_int_cst_type (type, low);
}
/* Similar to UI_To_Int, but return a GCC INTEGER_CST or REAL_CST node,
depending on whether TYPE is an integral or real type. Overflow is tested
by the constant-folding used to build the node. TYPE is the GCC type of
the resulting node. */
tree
UI_To_gnu (Uint Input, tree type)
{
tree gnu_ret;
/* We might have a TYPE with biased representation and be passed an
unbiased value that doesn't fit. We always use an unbiased type able
to hold any such possible value for intermediate computations, and
then rely on a conversion back to TYPE to perform the bias adjustment
when need be. */
int biased_type_p
= (TREE_CODE (type) == INTEGER_TYPE
&& TYPE_BIASED_REPRESENTATION_P (type));
tree comp_type = biased_type_p ? get_base_type (type) : type;
if (Input <= Uint_Direct_Last)
gnu_ret = build_cst_from_int (comp_type, Input - Uint_Direct_Bias);
else
{
Int Idx = Uints_Ptr[Input].Loc;
Pos Length = Uints_Ptr[Input].Length;
Int First = Udigits_Ptr[Idx];
tree gnu_base;
gcc_assert (Length > 0);
/* The computations we perform below always require a type at least as
large as an integer not to overflow. REAL types are always fine, but
INTEGER or ENUMERAL types we are handed may be too short. We use a
base integer type node for the computations in this case and will
convert the final result back to the incoming type later on.
The base integer precision must be superior than 16. */
if (TREE_CODE (comp_type) != REAL_TYPE
&& TYPE_PRECISION (comp_type) < TYPE_PRECISION (long_integer_type_node))
{
comp_type = long_integer_type_node;
gcc_assert (TYPE_PRECISION (comp_type) > 16);
}
gnu_base = build_cst_from_int (comp_type, Base);
gnu_ret = build_cst_from_int (comp_type, First);
if (First < 0)
for (Idx++, Length--; Length; Idx++, Length--)
gnu_ret = fold_build2 (MINUS_EXPR, comp_type,
fold_build2 (MULT_EXPR, comp_type,
gnu_ret, gnu_base),
build_cst_from_int (comp_type,
Udigits_Ptr[Idx]));
else
for (Idx++, Length--; Length; Idx++, Length--)
gnu_ret = fold_build2 (PLUS_EXPR, comp_type,
fold_build2 (MULT_EXPR, comp_type,
gnu_ret, gnu_base),
build_cst_from_int (comp_type,
Udigits_Ptr[Idx]));
}
gnu_ret = convert (type, gnu_ret);
/* We don't need any NOP_EXPR or NON_LVALUE_EXPR on GNU_RET. */
while ((TREE_CODE (gnu_ret) == NOP_EXPR
|| TREE_CODE (gnu_ret) == NON_LVALUE_EXPR)
&& TREE_TYPE (TREE_OPERAND (gnu_ret, 0)) == TREE_TYPE (gnu_ret))
gnu_ret = TREE_OPERAND (gnu_ret, 0);
return gnu_ret;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* *
* D E F T A R G *
* *
* Body *
* *
* Copyright (C) 1992-2003 Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
* ware Foundation; either version 2, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING. If not, write *
* to the Free Software Foundation, 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
* *
* As a special exception, if you link this file with other files to *
* produce an executable, this file does not by itself cause the resulting *
* executable to be covered by the GNU General Public License. This except- *
* ion does not however invalidate any other reasons why the executable *
* file might be covered by the GNU Public License. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
* *
****************************************************************************/
/* Include a default definition for TARGET_FLAGS for gnatpsta. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
int target_flags = TARGET_DEFAULT;
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* *
* L A N G - S P E C S *
* *
* C Header File *
* *
* Copyright (C) 1992-2008, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
* ware Foundation; either version 3, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License along with GCC; see the file COPYING3. If not see *
* <http://www.gnu.org/licenses/>. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
* *
****************************************************************************/
/* This is the contribution to the `default_compilers' array in gcc.c for
GNAT. */
{".ads", "@ada", 0, 0, 0},
{".adb", "@ada", 0, 0, 0},
{"@ada",
"\
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{!S:%{!c:%e-c or -S required for Ada}}\
gnat1 %{I*} %{k8:-gnatk8} %{Wall:-gnatwa} %{w:-gnatws} %{!Q:-quiet}\
%{nostdinc*} %{nostdlib*}\
-dumpbase %{.adb:%b.adb}%{.ads:%b.ads}%{!.adb:%{!.ads:%b.ada}}\
%{O*} %{W*} %{w} %{p} %{pg:-p} %{a} %{f*} %{d*} %{g*&m*} "
#if defined(TARGET_VXWORKS_RTP)
"%{fRTS=rtp:-mrtp} "
#endif
#if CONFIG_DUAL_EXCEPTIONS
"%{fRTS=sjlj:-fsjlj} "
#endif
"%1 %{!S:%{o*:%w%*-gnatO}} \
%i %{S:%W{o*}%{!o*:-o %b.s}} \
%{gnatc*|gnats*: -o %j} %{-param*} \
%{!gnatc*:%{!gnats*:%(invoke_as)}}", 0, 0, 0},
; Options for the Ada front end.
; Copyright (C) 2003, 2007 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
; Software Foundation; either version 3, or (at your option) any later
; version.
;
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
; for more details.
;
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING3. If not see
; <http://www.gnu.org/licenses/>.
; See the GCC internals manual for a description of this file's format.
; Please try to keep this file in ASCII collating order.
Language
Ada
I
Ada Joined Separate
; Documented for C
Wall
Ada
; Documented for C
Wmissing-prototypes
Ada
; Documented for C
Wstrict-prototypes
Ada
; Documented for C
Wwrite-strings
Ada
; Documented for C
Wlong-long
Ada
; Documented for C
Wvariadic-macros
Ada
; Documented for C
Wold-style-definition
Ada
; Documented for C
Wmissing-format-attribute
Ada
; Documented for C
Woverlength-strings
Ada
; Documented for C
nostdinc
Ada RejectNegative
; Don't look for source files
nostdlib
Ada
; Don't look for object files
feliminate-unused-debug-types
Ada
; Effect documented for C - intercepted for Ada to force the associated flag
; not to be set by default, as it currently eliminates unreferenced parallel
; types we need for encoding descriptions to the debugger.
fRTS=
Ada Joined RejectNegative
; Selects the runtime
gdwarf+
Ada
; Explicit request for dwarf debug info with GNAT specific extensions.
gant
Ada Joined Undocumented
; Catches typos
gnatO
Ada Separate
; Sets name of output ALI file (internal switch)
gnat
Ada Joined
-gnat<options> Specify options to GNAT
; This comment is to ensure we retain the blank line above.
/****************************************************************************
* *
* GNAT COMPILER COMPONENTS *
* *
* T A R G T Y P S *
* *
* Body *
* *
* Copyright (C) 1992-2007, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
* ware Foundation; either version 2, or (at your option) any later ver- *
* sion. GNAT is distributed in the hope that it will be useful, but WITH- *
* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. You should have received a copy of the GNU General *
* Public License distributed with GNAT; see file COPYING. If not, write *
* to the Free Software Foundation, 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
* *
* As a special exception, if you link this file with other files to *
* produce an executable, this file does not by itself cause the resulting *
* executable to be covered by the GNU General Public License. This except- *
* ion does not however invalidate any other reasons why the executable *
* file might be covered by the GNU Public License. *
* *
* GNAT was originally developed by the GNAT team at New York University. *
* Extensive contributions were provided by Ada Core Technologies Inc. *
* *
****************************************************************************/
/* Functions for retrieving target types. See Ada package Get_Targ */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "real.h"
#include "rtl.h"
#include "ada.h"
#include "types.h"
#include "atree.h"
#include "elists.h"
#include "namet.h"
#include "nlists.h"
#include "snames.h"
#include "stringt.h"
#include "uintp.h"
#include "urealp.h"
#include "fe.h"
#include "sinfo.h"
#include "einfo.h"
#include "ada-tree.h"
#include "gigi.h"
/* If we don't have a specific size for Ada's equivalent of `long', use that
of C. */
#ifndef ADA_LONG_TYPE_SIZE
#define ADA_LONG_TYPE_SIZE LONG_TYPE_SIZE
#endif
#ifndef WIDEST_HARDWARE_FP_SIZE
#define WIDEST_HARDWARE_FP_SIZE LONG_DOUBLE_TYPE_SIZE
#endif
/* The following provide a functional interface for the front end Ada code
to determine the sizes that are used for various C types. */
Pos
get_target_bits_per_unit (void)
{
return BITS_PER_UNIT;
}
Pos
get_target_bits_per_word (void)
{
return BITS_PER_WORD;
}
Pos
get_target_char_size (void)
{
return CHAR_TYPE_SIZE;
}
Pos
get_target_wchar_t_size (void)
{
/* We never want wide characters less than "short" in Ada. */
return MAX (SHORT_TYPE_SIZE, WCHAR_TYPE_SIZE);
}
Pos
get_target_short_size (void)
{
return SHORT_TYPE_SIZE;
}
Pos
get_target_int_size (void)
{
return INT_TYPE_SIZE;
}
Pos
get_target_long_size (void)
{
return ADA_LONG_TYPE_SIZE;
}
Pos
get_target_long_long_size (void)
{
return LONG_LONG_TYPE_SIZE;
}
Pos
get_target_float_size (void)
{
return fp_prec_to_size (FLOAT_TYPE_SIZE);
}
Pos
get_target_double_size (void)
{
return fp_prec_to_size (DOUBLE_TYPE_SIZE);
}
Pos
get_target_long_double_size (void)
{
return fp_prec_to_size (WIDEST_HARDWARE_FP_SIZE);
}
Pos
get_target_pointer_size (void)
{
return POINTER_SIZE;
}
/* Alignment related values, mapped to attributes for functional and
documentation purposes. */
/* Standard'Maximum_Default_Alignment. Maximum alignment that the compiler
might choose by default for a type or object.
Stricter alignment requests trigger gigi's aligning_type circuitry for
stack objects or objects allocated by the default allocator. */
Pos
get_target_maximum_default_alignment (void)
{
return BIGGEST_ALIGNMENT / BITS_PER_UNIT;
}
/* Standard'Default_Allocator_Alignment. Alignment guaranteed to be honored
by the default allocator (System.Memory.Alloc or malloc if we have no
run-time library at hand).
Stricter alignment requests trigger gigi's aligning_type circuitry for
objects allocated by the default allocator. */
Pos
get_target_default_allocator_alignment (void)
{
/* ??? Need a way to get info about __gnat_malloc from here (whether
it is handy and what alignment it honors). */
return MALLOC_ABI_ALIGNMENT / BITS_PER_UNIT;
}
/* Standard'Maximum_Allowed_Alignment. Maximum alignment that we may
accept for any type or object. */
#ifndef MAX_OFILE_ALIGNMENT
#define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
#endif
Pos
get_target_maximum_allowed_alignment (void)
{
return MAX_OFILE_ALIGNMENT / BITS_PER_UNIT;
}
/* Standard'Maximum_Alignment. The single attribute initially made
available, now a synonym of Standard'Maximum_Default_Alignment. */
Pos
get_target_maximum_alignment (void)
{
return get_target_maximum_default_alignment ();
}
#ifndef FLOAT_WORDS_BIG_ENDIAN
#define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
#endif
Nat
get_float_words_be (void)
{
return FLOAT_WORDS_BIG_ENDIAN;
}
Nat
get_words_be (void)
{
return WORDS_BIG_ENDIAN;
}
Nat
get_bytes_be (void)
{
return BYTES_BIG_ENDIAN;
}
Nat
get_bits_be (void)
{
return BITS_BIG_ENDIAN;
}
Nat
get_strict_alignment (void)
{
return STRICT_ALIGNMENT;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment