This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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 faster memcpy on MIPS


On Thu, Jan 3, 2013 at 8:47 PM, Steve Ellcey wrote:
> Steven,
>
> Could you test out this patch and see if it works for you.  I was able to
> build with no problems.  I decided to try the minimal change needed and look
> at doing some of the cleanup that Richard mentioned in a later patch.
>
> Steve Ellcey
>
>
>
>
> diff --git a/newlib/libc/machine/mips/memcpy.S b/newlib/libc/machine/mips/memcpy.S
> index fe7cb15..8db8953 100644
> --- a/newlib/libc/machine/mips/memcpy.S
> +++ b/newlib/libc/machine/mips/memcpy.S
> @@ -56,7 +56,7 @@
>  #endif
>  #endif
>
> -#if (_MIPS_SIM == _ABI64) || (_MIPS_SIM == _ABIN32)
> +#if defined(_MIPS_SIM) && ((_MIPS_SIM == _ABI64) || (_MIPS_SIM == _ABIN32))
>  #ifndef DISABLE_DOUBLE
>  #define USE_DOUBLE
>  #endif
> @@ -203,7 +203,7 @@
>  #define REG1 t1
>  #define REG2 t2
>  #define REG3 t3
> -#if _MIPS_SIM == _ABIO32
> +#if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32)
>  #  define REG4 t4
>  #  define REG5 t5
>  #  define REG6 t6


This at least builds and passes testing, see
http://gcc.gnu.org/ml/gcc-testresults/2013-01/msg00282.html.
(Not sure why the newlib test results are repeated so many times...)

Just let me know if Richard's patch needs testing also.

Ciao!
Steven


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