== This week ==
* Sprint recovery day (2/10)
* TCWG-140 - Transform end of loop conditions to min_expr (6/10)
- Investigated match.pd change added by Andrew Pinski
* TCWG-734 - GCC Autovectorization (1/10)
- EPIC Review
* Misc (1/10)
- Conference calls
== Next week ==
- Call with Charles and Prathamesh for Autovectorization planning
- Begin developing patch for TCWG-140
- Benchmark TCWG-146 patch
- TCWG-832 investigation
== This week ==
* cfgloop.h flatten (2/10)
- Rebased and tested on top of Andrew's patch
- bootstrapped on x86_64-unknown-linux-gnu
- building on all targets in config-list.mk in progress
* TCWG-777 (2/10)
- Problem is still present on trunk
- Original test-case: http://pastebin.com/UTv8g3aA
- Original test-case assembly for -O1: http://pastebin.com/815TgDjV
- Possibly reduced test-case: http://pastebin.com/UGUteX4a
- Assembly for reduced test-case for -O1: http://pastebin.com/edKu6CxH
- x86 assembly for reduced test-case for -O1: http://pastebin.com/9APbJeLr
- Workaround: To disable CSE in branch conditions make flags volatile.
This prevents
storing result of ands to temporary but leads to worse code-gen.
- Possible approaches from (https://bugs.launchpad.net/gcc-linaro/+bug/851258):
a) teach PRE not to fold in such cases ? I don't know how.
b) Write a new tree-ssa pass that "unfolds" cse on result of test conditions.
Check if operand in if (operand != 0) is a result of test condition.
eg:
_8 = flags & 1;
if (_8 != 0)
goto true_branch
else
goto false_branch
In this case we could add an attribute to _8 say "unfold".
If we again come across if (_8 != 0) at a later point,
and it's marked with "unfold",
we can create a new ssa var with definition of _8.
so it becomes:
_9 = flags & 1;
if (_9 != 0)
...
which will "undo" CSE on test conditions.
Does this sounds reasonable ?
Should we do it on all test conditions ?
I don't understand "suitable compare insn" a target should have in above link.
* TCWG-145 (2/10)
- Optimization is already implemented in PRE pass.
- Verified for various test-cases in eembc.
- Currently gcc does not convert global statics to locals
- remove-local-statics-7.c not handled currently by gcc:
(https://gcc.gnu.org/ml/gcc-patches/2008-07/msg01007.html)
- Desirable to have ipa dead-store analysis to avoid stores to static vars:
https://gcc.gnu.org/ml/gcc-patches/2008-07/msg01609.htmlhttps://gcc.gnu.org/ml/gcc-patches/2008-07/msg01602.html
- continuing to look for cases where static-to-locals wins over PRE.
* Misc (4/10)
- Built firefox on x86 non-LTO
- Read thru tree-ssa-dse.c, IPA, LTO doc
- US Visa application
- Setting up home office
== Issues ==
Not able to connect to #linaro-tcwg thru ircproxy.linaro.org , password invalid.
== Next Week ==
- TCWG-830
- TCWG-835
- TCWG-844
- continue investigating branch out of range error issue.
- Work towards committing cfgloop.h patch
== Progress ==
Sprint recovery [2/10]
(TCWG-775) NEON intrinsics error messages [7/10]
. familiarisation with differences between ARM and AArch64 NEON/SIMD backends
. started porting error reporting changes to ARM NEON backend
. pinged patch for AArch64 work
Misc [1/10]
== Plans ==
continue NEON error messages
vectorization work discussions
== Progress ==
* Maintenance (CARD-1833 1/10)
- Looking at AArch64 ADD->SUB a bit more
* Buildbots (CARD-1823 6/10)
- Moving LNT bot to CMake
- Setting up LLD and LLDB buildbots
- Investigating LNT instability / Perf buildbot
* Background (3/10)
- Code review, meetings, discussions, etc.
- Reviewing more stride vectorizer patches (back-end)
== Plan ==
* Try to get some development going back again...
# Progress #
* Linaro GDB [7/10]
** TCWG-805, aarch64 native debugging multi-arch support.
Aarch64 GDB works well debugging Aarch32 programs, except on handling
fork/vfork and watchpoint. Test harness uses ldd which doesn't
handle aarch32 too.
Report a kernel issue that it doesn't get TLS base right through
ptrace in compat mode. Got a patch to fix it.
* FSF GDB [3/10]
** Push in a fix to unbreak arm native gdb build.
** Post a patch to fix a bug on using PTRACE_GETREGSET on arm-linux.
** GDB 7.10 release. Branch isn't created. Test results of arm
and aarch64 look good.
# Plan #
* TCWG-805, start to push some preparatory patches upstream.
* Off on Thu.
--
Yao
Hello toolchain people,
I created a patch on top of upstream binutils for a feature I need which
should be universally useful as well. Now I have 3 questions for you:
1) Does it look sane enough?
2) If so, could you integrate it in the Linaro release?
3) Would you be willing to promote it upstream?
Comments appreciated.
Here's the patch:
----- >8
Subject: [PATCH] gas: introduce section name substitution support
When gas is invoked with --sectname-subst, the occurrence of %S in a section
name will be substituted by the name of the current section. For example:
.macro exception_code
.pushsection %S.exception
[exception code here]
.popsection
.endm
.text
[code]
exception_code
[...]
.section .init
[init code]
exception_code
[...]
In the first exception_code invocation the .text.exception section is
created while in the second invocation it is the .init.exception section
that is created. This is useful e.g. to discriminate between anciliary
sections that are tied to .init code and can be discarded at run time when
initialization is over vs anciliary sections tied to .text sections that
need to stay resident.
This would also allow for actually omitting __exit sections from the Linux
kernel binary when modules are configured in even when exit marked code
generates exception table entries.
Signed-off-by: Nicolas Pitre <nico(a)linaro.org>
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 57fc30a..0189bb2 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2015-06-03 Nicolas Pitre <nico(a)linaro.org>
+
+ * as.c (show_usage): Document --sectname-subst.
+ (parse_args): Add --sectname-subst.
+ * as.h (flag_sectname_subst): New.
+ * config/obj-elf.c (obj_elf_section_name): Add %S substitution.
+ * doc/as.texinfo: Document it.
+
2015-06-03 Matthew Wahab <matthew.wahab(a)arm.com>
* config/tc-arm.c (arm_archs): Add "armv8.1-a".
diff --git a/gas/as.c b/gas/as.c
index 2a8923f..fecfcd2 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -284,6 +284,8 @@ Options:\n\
fprintf (stream, _("\
--size-check=[error|warning]\n\
ELF .size directive check (default --size-check=error)\n"));
+ fprintf (stream, _("\
+ --sectname-subst enable section name substitution sequences\n"));
#endif
fprintf (stream, _("\
-f skip whitespace and comment preprocessing\n"));
@@ -447,6 +449,7 @@ parse_args (int * pargc, char *** pargv)
OPTION_EXECSTACK,
OPTION_NOEXECSTACK,
OPTION_SIZE_CHECK,
+ OPTION_SECTNAME_SUBST,
OPTION_ALTERNATE,
OPTION_AL,
OPTION_HASH_TABLE_SIZE,
@@ -481,6 +484,7 @@ parse_args (int * pargc, char *** pargv)
,{"execstack", no_argument, NULL, OPTION_EXECSTACK}
,{"noexecstack", no_argument, NULL, OPTION_NOEXECSTACK}
,{"size-check", required_argument, NULL, OPTION_SIZE_CHECK}
+ ,{"sectname-subst", no_argument, NULL, OPTION_SECTNAME_SUBST}
#endif
,{"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
,{"gdwarf-2", no_argument, NULL, OPTION_GDWARF2}
@@ -848,6 +852,10 @@ This program has absolutely no warranty.\n"));
else
as_fatal (_("Invalid --size-check= option: `%s'"), optarg);
break;
+
+ case OPTION_SECTNAME_SUBST:
+ flag_sectname_subst = 1;
+ break;
#endif
case 'Z':
flag_always_generate_output = 1;
diff --git a/gas/as.h b/gas/as.h
index 6de319e..635b2c5 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -589,6 +589,9 @@ COMMON enum
size_check_warning
}
flag_size_check;
+
+/* If section name substitution sequences should be honored */
+COMMON int flag_sectname_subst;
#endif
#ifndef DOLLAR_AMBIGU
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 4d7a8a7..78dc6d9 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -917,6 +917,27 @@ obj_elf_section_name (void)
name = (char *) xmalloc (end - input_line_pointer + 1);
memcpy (name, input_line_pointer, end - input_line_pointer);
name[end - input_line_pointer] = '\0';
+
+ while (flag_sectname_subst)
+ {
+ char *subst = strchr (name, '%');
+ if (subst && subst[1] == 'S')
+ {
+ int oldlen = strlen (name);
+ int substlen = strlen (now_seg->name);
+ int newlen = oldlen - 2 + substlen;
+ char *newname = (char *) xmalloc (newlen + 1);
+ int headlen = subst - name;
+ memcpy (newname, name, headlen);
+ strcpy (newname + headlen, now_seg->name);
+ strcat (newname + headlen, subst + 2);
+ xfree (name);
+ name = newname;
+ }
+ else
+ break;
+ }
+
#ifdef tc_canonicalize_section_name
name = tc_canonicalize_section_name (name);
#endif
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index 5710e1c..be13b6a 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -6259,6 +6259,36 @@ For ELF targets, the @code{.section} directive is used like this:
.section @var{name} [, "@var{flags}"[, @@@var{type}[,@var{flag_specific_arguments}]]]
@end smallexample
+@cindex --sectname-subst
+If the @samp{--sectname-subst} command-line option is provided, the @var{name}
+argument may contain a substitution sequence. Only @code{%S} is supported
+at the moment, and substitutes the current section name. For example:
+
+@smallexample
+.macro exception_code
+.section %S.exception
+[exception code here]
+.previous
+.endm
+
+.text
+[code]
+exception_code
+[...]
+
+.section .init
+[init code]
+exception_code
+[...]
+@end smallexample
+
+The two @code{exception_code} invocations above would create the
+(a)code{.text.exception} and @code{.init.exception} sections respectively.
+This is useful e.g. to discriminate between anciliary sections that are
+tied to setup code to be discarded after use from anciliary sections that
+need to stay resident without having to define two @code{exception_code}
+macros just for that purpose.
+
The optional @var{flags} argument is a quoted string which may contain any
combination of the following characters:
@table @code
Nicolas
* 1 day off (2/10)
== Progress ==
* Neon intrinsics tests
- committed last batch of tests
- need to think about tests for vget_lane which are still missing,
but not high priority
* linaro-gcc-5.1-2015.06 snapshot (4/10)
- committed branch merge with upstream gcc-5-branch
- prepared snapshot & updated release scripts
* Upstream maintenance (1/10)
- backported a fix from Michael to 4.8 and 4.9 branches
- backported fix for PR62308 to 4.9 branch
- most of the time spent on bootstrapping on aarch64 HW
- started looking at some recent new tests having trouble dealing
with some multilib variants
* Misc (3/10)
- meetings, conf-calls, emails, ...
== Next ==
* linaro-gcc-5.1-2015.06 snapshot
- build release notes
- create a proper tag
* backports, release, validation:
- update doc according to our new process
* validation:
- take unstable tests into account
* upstream maintenance:
- check recent regressions
== Progress ==
* Maintenance (CARD-1833 2/10)
- Initial work on ADD<->SUB for negative imm in asm
* Buildbots (CARD-1823 6/10)
- Adding test-suite to CMake buildbot (D10244)
- Bisecting broken self-hosting vfp3 bots
* Background (2/10)
- Code review, meetings, discussions, etc.
- Some more meetings about infrastructure...
- LLVM status and plan for next half
* Sprint Week in Grenoble
== Plan ==
* Continue with CMake LNT changes
* Carry on with ADD/SUB change
* Revive ASM warnings discussion