This is the mail archive of the
mailing list for the GCC project.
Re: [RFC 0/6] Flags outputs for asms
- From: Jeff Law <law at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>, "H. Peter Anvin" <hpa at zytor dot com>, gcc-patches at gcc dot gnu dot org
- Cc: peterz at infradead dot org, torvalds at linux-foundation dot org, jakub at redhat dot com
- Date: Fri, 08 May 2015 09:39:26 -0600
- Subject: Re: [RFC 0/6] Flags outputs for asms
- Authentication-results: sourceware.org; auth=none
- References: <1431034740-5375-1-git-send-email-rth at redhat dot com> <554C0E31 dot 5070509 at zytor dot com> <554C0F71 dot 2060802 at zytor dot com> <554CD50F dot 2010904 at redhat dot com>
On 05/08/2015 09:23 AM, Richard Henderson wrote:
Kai looked at this last year, it's possible, but rather tedious to do in
GCC due to the separation of JUMP_INSN vs CALL_INSN and the need to
duplicate the conditional jumps as conditional sibcalls.
On 05/07/2015 06:20 PM, H. Peter Anvin wrote:
This is a separate issue which really shouldn't have anything to do with
this, but is there a specific reason why:
void good1(int x, int y)
: "=@ccp" (pf)
: "r" (x), "g" (y));
... ends up generating a jump to a jump?
0: 39 f7 cmp %esi,%edi
2: 7a 0c jp 10 <good1+0x10>
4: f3 c3 repz retq
6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
d: 00 00 00
10: e9 00 00 00 00 jmpq 15 <good1+0x15>
11: R_X86_64_PC32 beta-0x4
15: 66 66 2e 0f 1f 84 00 data32 nopw %cs:0x0(%rax,%rax,1)
1c: 00 00 00 00
Yes, the i386 backend has not implemented conditional sibcalls. AFAIK the only
targets that have done that are ones with predication: ia64 and maybe arm32.
It could certainly be done; I've no idea off hand how difficult it might be. I
suspect that some new code has to be written generically in order to enable it.
There's a BZ about this, I'm not sure if Kai put all his thoughts on the
topic into the BZ or not.