This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,AIX] Nil check size threshold control for AIX
- From: "REIX, Tony" <tony dot reix at atos dot net>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: "dje dot gcc at gmail dot com" <dje dot gcc at gmail dot com>, "thanm at google dot com" <thanm at google dot com>
- Date: Tue, 12 Dec 2017 08:59:09 +0000
- Subject: [PATCH,AIX] Nil check size threshold control for AIX
- Authentication-results: sourceware.org; auth=none
Description:
* This patch tells the Go frontend to insert explicit guards (check for nil -> panic) for AIX since relying on a fault does not work on AIX for page 0.
Tests:
* AIX: Build: SUCCESS
- build made by means of gmake.
ChangeLog:
* go-lang.c (go_langhook_init): Handle AIX case for nil_check_size_threshold.
Cordialement,
Tony Reix
ATOS / Bull SAS
ATOS Expert
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net
Index: gcc/go/go-lang.c
===================================================================
--- ./gcc/go/go-lang.c (revision 255466)
+++ ./gcc/go/go-lang.c (working copy)
@@ -112,7 +112,11 @@ go_langhook_init (void)
args.check_divide_overflow = go_check_divide_overflow;
args.compiling_runtime = go_compiling_runtime;
args.debug_escape_level = go_debug_escape_level;
+#ifdef TARGET_AIX
+ args.nil_check_size_threshold = -1;
+#else
args.nil_check_size_threshold = 4096;
+#endif
args.linemap = go_get_linemap();
args.backend = go_get_backend();
go_create_gogo (&args);