This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] add softfp to sparc-*-linux*


Hello!

Hans-Peter Nilsson wrote:
> No you don't need (and shouldn't try), you can use symbolic names.
> See the second example in the Extended Asm chapter.

I thought that looked funny. Thanks for the tip. Here is the patch again
without the unneeded register dancing.

+/* Some assembly to speed things up. */
+#define __FP_FRAC_ADD_3(r2,r1,r0,x2,x1,x0,y2,y1,y0)			\
+  __asm__ ("addcc %r7,%8,%2\n\
+	    addxcc %r5,%6,%1\n\
+	    addx %r3,%4,%0"						\
+	   : "=r" ((USItype)(r2)),					\
+	     "=&r" ((USItype)(r1)),					\
+	     "=&r" ((USItype)(r0))					\
+	   : "%rJ" ((USItype)(x2)),					\
+	     "rI" ((USItype)(y2)),					\
+	     "%rJ" ((USItype)(x1)),					\
+	     "rI" ((USItype)(y1)),					\
+	     "%rJ" ((USItype)(x0)),					\
+	     "rI" ((USItype)(y0))					\
+	   : "cc")


You don't need earlyclobber for output operand 0, since it is only used in the last asm insn in the sequence. Earlyclobbers can be removed for operand 0 in all defined asm sequences.


Please also double check __FP_FRAC_ADDI_4. It looks that "+" should be used to mark operands that are both read and written. You are only referring to the first 5 operands in your asm sequence.

+
+#define	__BIG_ENDIAN	4321
+#define __BYTE_ORDER __BIG_ENDIAN
+


Please align these defines.


Thanks,
Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]