This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/68095] New: "cc" clobber with Flag Output Operands
- From: "gccbugzilla at limegreensocks dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Oct 2015 04:39:28 +0000
- Subject: [Bug inline-asm/68095] New: "cc" clobber with Flag Output Operands
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68095
Bug ID: 68095
Summary: "cc" clobber with Flag Output Operands
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: inline-asm
Assignee: unassigned at gcc dot gnu.org
Reporter: gccbugzilla at limegreensocks dot com
Target Milestone: ---
Normally when trying to use a register and clobber it at the same time, the
compiler kicks out an error (operand has impossible constraints). However that
doesn't happen when using Flag Output Operands and the "cc" clobber:
asm ("cmp %2, %1" : "=@ccc"(r) : "m"(*p), "ri"(2): "cc");
Should this be a conflict?
On the other hand, the asm is changing the flags. So is the "cc" *required*?
But it doesn't seem to be:
asm ("cmp %2, %1" : "=@ccc"(r) : "m"(*p), "ri"(2));
Now that asm flags are a real thing, we should pick one and enforce it.