Re: [PATCH] powerpc: Replace cc constraint in inline assembly with cr0

2014-11-02 Thread Anton Blanchard
Hi Segher, Our inline assembly only clobbers the first condition register field, but we mark all of them as being clobbered. No, we don't. cc has been an alias for cr0 for over twenty two and a half years now; it has never changed meaning. This is an LLVM bug. Thanks! I opened

Re: [PATCH] powerpc: Replace cc constraint in inline assembly with cr0

2014-11-01 Thread Segher Boessenkool
On Sat, Nov 01, 2014 at 11:42:51AM +1100, Anton Blanchard wrote: Our inline assembly only clobbers the first condition register field, but we mark all of them as being clobbered. No, we don't. cc has been an alias for cr0 for over twenty two and a half years now; it has never changed meaning.

[PATCH] powerpc: Replace cc constraint in inline assembly with cr0

2014-10-31 Thread Anton Blanchard
Our inline assembly only clobbers the first condition register field, but we mark all of them as being clobbered. This will cause LLVM to save and restore the non volatile condition register fields around the inline assembly, which is completely unnecessary. A simple example: void foo(void) {