This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/53190] CSE (?) CSEs asms
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 May 2012 08:39:19 +0000
- Subject: [Bug rtl-optimization/53190] CSE (?) CSEs asms
- Auto-submitted: auto-generated
- References: <bug-53190-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53190
--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2012-05-03 08:39:19 UTC ---
(In reply to comment #6)
> Well, the asm in glibc is simply
>
> extern __inline __attribute__ ((__always_inline__)) long int
> __attribute__ ((__nothrow__ )) lrintf (float __x)
> {
> long int __res;
> __asm ("cvtss2si %1, %0" : "=r" (__res) : "xm" (__x));
> return __res;
> }
>
> thus the CLOBBERs somehow magically appear anyways it seems.
Yes, this is done in ix86_md_asm_clobbers. The reasoning is the same as for
flags reg, most asms "probably" touch both status regs anyway. This prevents
asms from being scheduled in between CC-like producer/consumer chain.