[rtems commit] Added in_cksum_sparc. h to optimize IP checksum calculations for SPARC.

Joel Sherrill Joel.Sherrill at OARcorp.com
Thu Jun 20 22:42:51 UTC 2013


My quick check when I committed the __ change showed that the sparc64 GCC also defined __sparc__. It additionally defines a v9 symbol.

Gedare will need to follow up to either use this or not for sparc64.

Jiri Gaisler <jiri at gaisler.se> wrote:


On 06/20/2013 11:14 AM, Ralf Corsepius wrote:
> On 06/19/2013 03:16 PM, Joel Sherrill wrote:
>> Module:    rtems
>> Branch:    master
>> Commit:    1f4ee306d3ab326a84d0bf74ad6afdedaaa435f8
>> Changeset:
>> http://git.rtems.org/rtems/commit/?id=1f4ee306d3ab326a84d0bf74ad6afdedaaa435f8
>>
>> Author:    Jiri Gaisler <jiri at gaisler.se>
>> Date:      Sun Jun 16 00:13:41 2013 +0200
>>
>> Added in_cksum_sparc.h to optimize IP checksum calculations for SPARC.
>>
>> ---
>>
>>   cpukit/libnetworking/netinet/in_cksum.c       |    4 +
>>   cpukit/libnetworking/netinet/in_cksum_sparc.h |  308 +++++++++++++++++++++++++
>>   2 files changed, 312 insertions(+), 0 deletions(-)
>>
>> diff --git a/cpukit/libnetworking/netinet/in_cksum.c
>> b/cpukit/libnetworking/netinet/in_cksum.c
>> index ec7e49c..ff25ad6 100644
>> --- a/cpukit/libnetworking/netinet/in_cksum.c
>> +++ b/cpukit/libnetworking/netinet/in_cksum.c
>> @@ -61,6 +61,10 @@
>>
>>   #include "in_cksum_nios2.h"
>>
>> +#elif (defined(__GNUC__) && defined(__sparc))
>> +
>> +#include "in_cksum_sparc.h"
>> +
>>   #else
>
> I am having several issues with this patch:
>
> a) Has this code been tested with/checked against sparc64-rtems4.11 toolchains?

No, it has been tested against sparc-rtems4.11. sparc64 is a different
architecture which requires its own implementation of in_cksum_xxx.h.

>
> I haven't tried to check which code paths are being used with the sparc64 and
> hardly won't have a possibility to check in near future, so this question could
> be a red herring.
>
>
> b)  This code should use __sparc__ instead of __sparc.
>
> __sparc is a pre-POSIX anachronism, is still supported by GCC but actually
> should not be used anymore.

Good point. I believe Joel has fixed this already.

Jiri.

>
> Ralf
>
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel




More information about the devel mailing list