Commit 8f78ecdb by Eric Botcazou Committed by Eric Botcazou

Revert

	2014-04-22  Richard Henderson  <rth@redhat.com>

	* gcc-interface/Makefile.in: Support aarch64-linux.

	2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>

	* fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
	(Error_Msg_N): Likewise.
	(Error_Msg_NE): Likewise.
	(Get_External_Name_With_Suffix): Likewise.
	* types.h (Fat_Pointer): Delete.
	(String_Pointer): New type.
	(DECLARE_STRING_POINTER): New macro.
	* gcc-interface/decl.c (create_concat_name): Adjust.
	* gcc-interface/trans.c (post_error): Likewise.
	(post_error_ne): Likewise.
	* gcc-interface/misc.c (internal_error_function): Likewise.

From-SVN: r209684
parent eab264af
2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
Revert
2014-04-22 Richard Henderson <rth@redhat.com>
* gcc-interface/Makefile.in: Support aarch64-linux.
2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
* fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
(Error_Msg_N): Likewise.
(Error_Msg_NE): Likewise.
(Get_External_Name_With_Suffix): Likewise.
* types.h (Fat_Pointer): Delete.
(String_Pointer): New type.
(DECLARE_STRING_POINTER): New macro.
* gcc-interface/decl.c (create_concat_name): Adjust.
* gcc-interface/trans.c (post_error): Likewise.
(post_error_ne): Likewise.
* gcc-interface/misc.c (internal_error_function): Likewise.
2014-04-22 Richard Henderson <rth@redhat.com> 2014-04-22 Richard Henderson <rth@redhat.com>
* gcc-interface/Makefile.in: Support aarch64-linux. * gcc-interface/Makefile.in: Support aarch64-linux.
......
...@@ -39,7 +39,7 @@ extern "C" { ...@@ -39,7 +39,7 @@ extern "C" {
/* comperr: */ /* comperr: */
#define Compiler_Abort comperr__compiler_abort #define Compiler_Abort comperr__compiler_abort
extern int Compiler_Abort (String_Pointer, int, String_Pointer) ATTRIBUTE_NORETURN; extern int Compiler_Abort (Fat_Pointer, int, Fat_Pointer) ATTRIBUTE_NORETURN;
/* csets: */ /* csets: */
...@@ -90,8 +90,8 @@ extern Node_Id Get_Attribute_Definition_Clause (Entity_Id, char); ...@@ -90,8 +90,8 @@ extern Node_Id Get_Attribute_Definition_Clause (Entity_Id, char);
#define Error_Msg_NE errout__error_msg_ne #define Error_Msg_NE errout__error_msg_ne
#define Set_Identifier_Casing errout__set_identifier_casing #define Set_Identifier_Casing errout__set_identifier_casing
extern void Error_Msg_N (String_Pointer, Node_Id); extern void Error_Msg_N (Fat_Pointer, Node_Id);
extern void Error_Msg_NE (String_Pointer, Node_Id, Entity_Id); extern void Error_Msg_NE (Fat_Pointer, Node_Id, Entity_Id);
extern void Set_Identifier_Casing (Char *, const Char *); extern void Set_Identifier_Casing (Char *, const Char *);
/* err_vars: */ /* err_vars: */
...@@ -151,7 +151,7 @@ extern void Setup_Asm_Outputs (Node_Id); ...@@ -151,7 +151,7 @@ extern void Setup_Asm_Outputs (Node_Id);
extern void Get_Encoded_Name (Entity_Id); extern void Get_Encoded_Name (Entity_Id);
extern void Get_External_Name (Entity_Id, Boolean); extern void Get_External_Name (Entity_Id, Boolean);
extern void Get_External_Name_With_Suffix (Entity_Id, String_Pointer); extern void Get_External_Name_With_Suffix (Entity_Id, Fat_Pointer);
/* exp_util: */ /* exp_util: */
......
...@@ -2188,44 +2188,6 @@ ifeq ($(strip $(filter-out alpha% linux%,$(target_cpu) $(target_os))),) ...@@ -2188,44 +2188,6 @@ ifeq ($(strip $(filter-out alpha% linux%,$(target_cpu) $(target_os))),)
LIBRARY_VERSION := $(LIB_VERSION) LIBRARY_VERSION := $(LIB_VERSION)
endif endif
# AArch64 Linux
ifeq ($(strip $(filter-out aarch64% linux%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS = \
a-exetim.adb<a-exetim-posix.adb \
a-exetim.ads<a-exetim-default.ads \
a-intnam.ads<a-intnam-linux.ads \
a-synbar.adb<a-synbar-posix.adb \
a-synbar.ads<a-synbar-posix.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
s-mudido.adb<s-mudido-affinity.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osprim.adb<s-osprim-posix.adb \
s-taprop.adb<s-taprop-linux.adb \
s-tasinf.ads<s-tasinf-linux.ads \
s-tasinf.adb<s-tasinf-linux.adb \
s-tpopsp.adb<s-tpopsp-tls.adb \
s-taspri.ads<s-taspri-posix.ads \
g-sercom.adb<g-sercom-linux.adb \
$(ATOMICS_TARGET_PAIRS) \
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
system.ads<system-linux-x86_64.ads
## ^^ Note the above is a pretty-close placeholder.
TOOLS_TARGET_PAIRS = \
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
EH_MECHANISM=-gcc
THREADSLIB=-lpthread -lrt
GNATLIB_SHARED=gnatlib-shared-dual
GMEM_LIB = gmemlib
LIBRARY_VERSION := $(LIB_VERSION)
endif
# x86-64 Linux # x86-64 Linux
ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),) ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
LIBGNAT_TARGET_PAIRS = \ LIBGNAT_TARGET_PAIRS = \
......
...@@ -8861,10 +8861,8 @@ create_concat_name (Entity_Id gnat_entity, const char *suffix) ...@@ -8861,10 +8861,8 @@ create_concat_name (Entity_Id gnat_entity, const char *suffix)
if (suffix) if (suffix)
{ {
String_Template temp = {1, (int) strlen (suffix)}; String_Template temp = {1, (int) strlen (suffix)};
DECLARE_STRING_POINTER (sp); Fat_Pointer fp = {suffix, &temp};
sp.Bounds = &temp; Get_External_Name_With_Suffix (gnat_entity, fp);
sp.Array = suffix;
Get_External_Name_With_Suffix (gnat_entity, sp);
} }
else else
Get_External_Name (gnat_entity, 0); Get_External_Name (gnat_entity, 0);
......
...@@ -283,8 +283,8 @@ internal_error_function (diagnostic_context *context, ...@@ -283,8 +283,8 @@ internal_error_function (diagnostic_context *context,
text_info tinfo; text_info tinfo;
char *buffer, *p, *loc; char *buffer, *p, *loc;
String_Template temp, temp_loc; String_Template temp, temp_loc;
DECLARE_STRING_POINTER (sp, sp_loc); Fat_Pointer fp, fp_loc;
expanded_location xloc; expanded_location s;
/* Warn if plugins present. */ /* Warn if plugins present. */
warn_if_plugins (); warn_if_plugins ();
...@@ -311,21 +311,21 @@ internal_error_function (diagnostic_context *context, ...@@ -311,21 +311,21 @@ internal_error_function (diagnostic_context *context,
temp.Low_Bound = 1; temp.Low_Bound = 1;
temp.High_Bound = p - buffer; temp.High_Bound = p - buffer;
sp.Bounds = &temp; fp.Bounds = &temp;
sp.Array = buffer; fp.Array = buffer;
xloc = expand_location (input_location); s = expand_location (input_location);
if (context->show_column && xloc.column != 0) if (context->show_column && s.column != 0)
asprintf (&loc, "%s:%d:%d", xloc.file, xloc.line, xloc.column); asprintf (&loc, "%s:%d:%d", s.file, s.line, s.column);
else else
asprintf (&loc, "%s:%d", xloc.file, xloc.line); asprintf (&loc, "%s:%d", s.file, s.line);
temp_loc.Low_Bound = 1; temp_loc.Low_Bound = 1;
temp_loc.High_Bound = strlen (loc); temp_loc.High_Bound = strlen (loc);
sp_loc.Bounds = &temp_loc; fp_loc.Bounds = &temp_loc;
sp_loc.Array = loc; fp_loc.Array = loc;
Current_Error_Node = error_gnat_node; Current_Error_Node = error_gnat_node;
Compiler_Abort (sp, -1, sp_loc); Compiler_Abort (fp, -1, fp_loc);
} }
/* Perform all the initialization steps that are language-specific. */ /* Perform all the initialization steps that are language-specific. */
......
...@@ -9356,16 +9356,16 @@ void ...@@ -9356,16 +9356,16 @@ void
post_error (const char *msg, Node_Id node) post_error (const char *msg, Node_Id node)
{ {
String_Template temp; String_Template temp;
DECLARE_STRING_POINTER (sp); Fat_Pointer fp;
if (No (node)) if (No (node))
return; return;
temp.Low_Bound = 1; temp.Low_Bound = 1;
temp.High_Bound = strlen (msg); temp.High_Bound = strlen (msg);
sp.Bounds = &temp; fp.Bounds = &temp;
sp.Array = msg; fp.Array = msg;
Error_Msg_N (sp, node); Error_Msg_N (fp, node);
} }
/* Similar to post_error, but NODE is the node at which to post the error and /* Similar to post_error, but NODE is the node at which to post the error and
...@@ -9375,16 +9375,16 @@ void ...@@ -9375,16 +9375,16 @@ void
post_error_ne (const char *msg, Node_Id node, Entity_Id ent) post_error_ne (const char *msg, Node_Id node, Entity_Id ent)
{ {
String_Template temp; String_Template temp;
DECLARE_STRING_POINTER (sp); Fat_Pointer fp;
if (No (node)) if (No (node))
return; return;
temp.Low_Bound = 1; temp.Low_Bound = 1;
temp.High_Bound = strlen (msg); temp.High_Bound = strlen (msg);
sp.Bounds = &temp; fp.Bounds = &temp;
sp.Array = msg; fp.Array = msg;
Error_Msg_NE (sp, node, ent); Error_Msg_NE (fp, node, ent);
} }
/* Similar to post_error_ne, but NUM is the number to use for the '^'. */ /* Similar to post_error_ne, but NUM is the number to use for the '^'. */
......
...@@ -76,14 +76,11 @@ typedef Char *Str; ...@@ -76,14 +76,11 @@ typedef Char *Str;
/* Pointer to string of Chars */ /* Pointer to string of Chars */
typedef Char *Str_Ptr; typedef Char *Str_Ptr;
/* Types for the fat pointer used for strings and the template it points to. /* Types for the fat pointer used for strings and the template it
On most platforms the fat pointer is naturally aligned but, on the rest, points to. */
it is given twice the natural alignment. For maximum portability, we do typedef struct {int Low_Bound, High_Bound; } String_Template;
not overalign the type but only the objects. */ typedef struct {const char *Array; String_Template *Bounds; }
typedef struct { int Low_Bound, High_Bound; } String_Template; __attribute ((aligned (sizeof (char *) * 2))) Fat_Pointer;
typedef struct { const char *Array; String_Template *Bounds; } String_Pointer;
#define DECLARE_STRING_POINTER(...) \
__attribute__ ((aligned (sizeof (char *) * 2))) String_Pointer __VA_ARGS__
/* Types for Node/Entity Kinds: */ /* Types for Node/Entity Kinds: */
......
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