This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFC 0/6] Flags outputs for asms
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: law at redhat dot com, peterz at infradead dot org, hpa at zytor dot com, torvalds at linux-foundation dot org, jakub at redhat dot com
- Date: Thu, 7 May 2015 14:38:54 -0700
- Subject: [RFC 0/6] Flags outputs for asms
- Authentication-results: sourceware.org; auth=none
Here's a prototype for i386 only, which stands up to light testing.
I'd rather post this tonight rather than wait until tomorrow when I
can write more proper dejagnu tests.
I've tested the intermedate patches via config-list.mk, so despite
mucking around with vec.h vs target.h, all targets still compile.
That said, quite a bit of cleanup in expand_asm_stmt was required
in order to make the target hook not be completely unintelligable,
so depsite full regression testing on x86_64 and ppc64, I could
well have broken something.
r~
void bar(void);
#define DO1(C) \
int s##C(void) { int r; asm("" : "=@cc"#C(r)); return r; } \
int j##C(void) { int r; asm("" : "=@cc"#C(r)); if (!r) bar(); }
#define DO2(C) DO1(C) DO1(n##C)
DO2(a)
DO2(b)
DO2(c)
DO2(e)
DO2(g)
DO2(l)
DO2(o)
DO2(p)
DO2(s)
DO2(z)
DO2(ae)
DO2(be)
DO2(ge)
DO2(le)
---
Richard Henderson (6):
Only resolve_asm_operand_names once
Merge expand_asm_operands into expand_asm_stmt
Canonicalize asm volatility earlier
Convert to md_asm_adjust
i386: Add CCPmode
i386: Implement asm flag outputs
gcc/cfgexpand.c | 674 ++++++++++++++++++-----------------------
gcc/config/cris/cris.c | 88 +++---
gcc/config/i386/constraints.md | 5 +
gcc/config/i386/i386-modes.def | 2 +
gcc/config/i386/i386.c | 163 ++++++++--
gcc/config/mn10300/mn10300.c | 20 +-
gcc/config/rs6000/rs6000.c | 17 +-
gcc/config/visium/visium.c | 21 +-
gcc/config/vxworks.c | 2 +-
gcc/doc/tm.texi | 18 +-
gcc/doc/tm.texi.in | 2 +-
gcc/gimple.c | 2 +-
gcc/gimplify.c | 2 +-
gcc/hooks.c | 8 -
gcc/hooks.h | 1 -
gcc/incpath.c | 1 +
gcc/mode-switching.c | 2 +-
gcc/stmt.c | 7 +-
gcc/system.h | 1 +
gcc/target.def | 30 +-
20 files changed, 558 insertions(+), 508 deletions(-)
--
2.1.0