Thread (27 messages) flat view 27 messages, 8 authors, 2011-12-01

Re: [PATCH 5/6] powerpc/boot: Add mfdcrx

From: Tony Breeds <hidden>
Date: 2011-11-30 23:30:27

On Wed, Nov 30, 2011 at 02:09:20PM +0100, Segher Boessenkool wrote:
quoted
+#define mfdcrx(rn) \
+	({	\
+		unsigned long rval; \
+		asm volatile("mfdcrx %0,%1" : "=r"(rval) : "g"(rn)); \
+		rval; \
+	})
"g" is never correct on PowerPC, you want "r" here.  You can write
this as a static inline btw, you only need the #define stuff when
there is an "i" constraint involved.
Okay I'll change it to "i", mostly I used a #define to match the style
of m[tf]dcr.  To be honnest I didn't know about the issue with "i"
constraints and static inlines.

Yours Tony

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help