[rtems-libbsd commit] Use MIPS in_cksum.c for SPARC

Joel Sherrill joel.sherrill at OARcorp.com
Tue Apr 17 15:07:06 UTC 2012


Any particular rationale on why to use the MIPS for SPARC?
Is there some reasoning possible would mean it makes sense
to use the MIPS implementation on other architectures?

On 04/17/2012 09:58 AM, Sebastian Huber wrote:
> Module:    rtems-libbsd
> Branch:    master
> Commit:    68df6075afeb6c4d8f04562b977f9162f71b8869
> Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=68df6075afeb6c4d8f04562b977f9162f71b8869
>
> Author:    Sebastian Huber<sebastian.huber at embedded-brains.de>
> Date:      Tue Apr 17 16:07:34 2012 +0200
>
> Use MIPS in_cksum.c for SPARC
>
> ---
>
>   Makefile                     |    2 +-
>   freebsd-to-rtems.py          |    2 +-
>   freebsd/mips/mips/in_cksum.c |    5 +++++
>   3 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 27d2a22..177f30e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -411,7 +411,7 @@ ifeq ($(RTEMS_CPU), powerpc)
>   C_FILES += freebsd/powerpc/powerpc/in_cksum.c
>   endif
>   ifeq ($(RTEMS_CPU), sparc)
> -C_FILES += freebsd/netinet/in_cksum.c
> +C_FILES += freebsd/mips/mips/in_cksum.c
>   endif
>   ifeq ($(RTEMS_CPU), sparc64)
>   C_FILES += freebsd/sparc64/sparc64/in_cksum.c
> diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py
> index d440605..803b273 100755
> --- a/freebsd-to-rtems.py
> +++ b/freebsd-to-rtems.py
> @@ -2006,7 +2006,7 @@ in_cksum.addCPUDependentSourceFiles(
>   in_cksum.addCPUDependentSourceFiles(
>   	'sparc',
>   	[
> -		'netinet/in_cksum.c',
> +		'mips/mips/in_cksum.c',
>   	]
>   )
>   in_cksum.addCPUDependentSourceFiles(
> diff --git a/freebsd/mips/mips/in_cksum.c b/freebsd/mips/mips/in_cksum.c
> index b4a12df..a519c72 100644
> --- a/freebsd/mips/mips/in_cksum.c
> +++ b/freebsd/mips/mips/in_cksum.c
> @@ -187,7 +187,12 @@ in_addword(u_short a, u_short b)
>   }
>
>   u_short
> +#ifdef __rtems__
> +/* Prototype does not match in FreeBSD code */
> +in_pseudo(u_int a, u_int b, u_int c)
> +#else
>   in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c)
> +#endif
>   {
>   	u_int64_t sum;
>   	union q_util q_util;
>
> _______________________________________________
> rtems-vc mailing list
> rtems-vc at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-vc


-- 
Joel Sherrill, Ph.D.             Director of Research&   Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985





More information about the devel mailing list