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 for 3.2] PDP-11 -msoft-float support


On Mon, Oct 07, 2002 at 04:56:14PM +0900, Naohiko Shimizu wrote:
> diff -urN gcc-20020930/ChangeLog gcc-20020930-pdp11/ChangeLog
> --- gcc-20020930/ChangeLog	Tue Oct  1 05:00:34 2002
> +++ gcc-20020930-pdp11/ChangeLog	Mon Oct  7 16:33:37 2002
> @@ -1,3 +1,39 @@
> +2002-10-05  Naohiko Shimizu <nshimizu@keyaki.cc.u-tokai.ac.jp>

Never provide changelog entries as a patch.

> -	fprintf(stream, "\tmov fp, -(sp)\n");			
> -	fprintf(stream, "\tmov sp, fp\n");				
> +	fprintf(stream, "\tmov r5, -(sp)\n");			
> +	fprintf(stream, "\tmov sp, r5\n");				

Why?

Anyway, consider using reg_names so that everything is consistent.

> +	/* change fp -> r5 due to the compile error on libgcc2.c */

An actual explanation should be provided.  This does not help
anyone understand why they shouldn't revert the change.

> -	    fprintf((stream), "\tadd $%o, sp\n", fsize);      		
> +	    fprintf((stream), "\tadd $0%o, sp\n", (fsize)&0xffff);

Should be "$%#o".

> -#define LEGITIMATE_CONSTANT_P(X) (1)
> +#define LEGITIMATE_CONSTANT_P(X) (TARGET_FPU? 1: !(GET_CODE(X) == CONST_DOUBLE))

Are you sure?  This means many long long values aren't legitimate.
Can you store the constant zero to memory easily?  In which case
CONST0_RTX should be valid.

>  (define_insn "movdi"
> -  [(set (match_operand:DI 0 "general_operand" "=g")
> -	(match_operand:DI 1 "general_operand" "g"))]
> +  [(set (match_operand:DI 0 "general_operand" "=g,rm,m")
> +	(match_operand:DI 1 "general_operand" "m,r,a"))]
>    ""
>    "* return output_move_quad (operands);"

Are you sure you don't want offsetable memory, ie the 'o' constraint?

> +;; lsr
> +(define_insn "" 
> +  [(set (match_operand:HI 0 "general_operand" "=rR,Q")
> +	(lshiftrt:HI (match_operand:HI 1 "general_operand" "0,0")
> +		   (const_int 1)))]
> +  ""
> +  "clc\;ror %0"
> +  [(set_attr "length" "1,2")])

Are you sure your length attribute is correct?  It looks
to me like you've always got 2 instructions here.

> +(define_insn "negsi2"
> +  [(set (match_operand:SI 0 "register_operand" "=r")
> +	(neg:SI (match_operand:SI 1 "general_operand" "0")))]
> +  ""
> +{ /* Here we trust that operands don't overlap */

Huh?  You forced them to overlap.

I went ahead and committed the patch, since I suspect 
that no one else is using pdp11, and that'll reduce
the subsequent patches.

Please see http://gcc.gnu.org/cvs.html to see how to
generate patches against the cvs repository instead
of snapshots.  Hopefully you're not behind a firewall
that prevents this...


r~


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