[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patches] allow non-fpu m68k libraries



Nathan Sidwell <nathan@xxxxxxxxxxxxxxxx> writes:
> -#ifdef __mcoldfire__
> +#if !defined (__mcoldfire__)
> +	fmove.x %fp0, -(%sp)
> +#elif defined (__mcffpu__)
>  	fmove.l %fp0, -(%sp)
>  #else
> -	fmove.x %fp0, -(%sp)
> +	move.l #0, -(%sp)
> +	move.l #0, -(%sp)

I suggest using clr.l here instead.

>  #endif
>  	move.l %a0, -(%sp)
>  	move.l %d1, -(%sp)
> @@ -161,10 +164,10 @@ _dl_runtime_profile:
>  	move.l (%sp)+, %d0
>  	move.l (%sp)+, %d1
>  	move.l (%sp)+, %a0
> -#ifdef __mcoldfire__
> -	fmove.d (%sp)+, %fp0
> -#else
> +#if !defined (__mcoldfire__)
>  	fmove.x (%sp)+, %fp0
> +#elif defined (__mcffpu__)
> +	fmove.l (%sp)+, %fp0
>  #endif

You don't pop the value in the non-FPU case.  It would probably be
easiest to fix that by bringing the following:

 	lea 20(%sp), %sp

into the #ifdef block too, and using 28 rather than 20 for the
non-FPU case.

>  /* Default control word set at startup.  */
>  extern fpu_control_t __fpu_control;
> -
>  #endif /* _M68K_FPU_CONTROL_H */

FWIW, I personally find it easier to read with the blank line there.

Richard