a122cca953
to build the kernel. It doesn't affect the operation if gcc. Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary. Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c 1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c 1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes) Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc. Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>. Reviewed by: -arch Submitted by: netchild
113 lines
3.5 KiB
C
113 lines
3.5 KiB
C
/* $FreeBSD$ */
|
|
/*
|
|
* Copyright (c) 2000, 2001 by LSI Logic Corporation
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice immediately at the beginning of the file, without modification,
|
|
* this list of conditions, and the following disclaimer.
|
|
* 2. The name of the author may not be used to endorse or promote products
|
|
* derived from this software without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
|
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
* SUCH DAMAGE.
|
|
*
|
|
*
|
|
* Name: MPI_TYPE.H
|
|
* Title: MPI Basic type definitions
|
|
* Creation Date: June 6, 2000
|
|
*
|
|
* MPI Version: 01.02.01
|
|
*
|
|
* Version History
|
|
* ---------------
|
|
*
|
|
* Date Version Description
|
|
* -------- -------- ------------------------------------------------------
|
|
* 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
|
|
* 06-06-00 01.00.01 Update version number for 1.0 release.
|
|
* 11-02-00 01.01.01 Original release for post 1.0 work
|
|
* 02-20-01 01.01.02 Added define and ifdef for MPI_POINTER.
|
|
* 08-08-01 01.02.01 Original release for v1.2 work.
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
|
|
#ifndef MPI_TYPE_H
|
|
#define MPI_TYPE_H
|
|
|
|
|
|
/*******************************************************************************
|
|
* Define MPI_POINTER if it hasn't already been defined. By default MPI_POINTER
|
|
* is defined to be a near pointer. MPI_POINTER can be defined as a far pointer
|
|
* by defining MPI_POINTER as "far *" before this header file is included.
|
|
*/
|
|
#ifndef MPI_POINTER
|
|
#define MPI_POINTER *
|
|
#endif
|
|
|
|
|
|
/*****************************************************************************
|
|
*
|
|
* B a s i c T y p e s
|
|
*
|
|
*****************************************************************************/
|
|
|
|
typedef signed char S8;
|
|
typedef unsigned char U8;
|
|
typedef signed short S16;
|
|
typedef unsigned short U16;
|
|
|
|
#if defined(unix) || defined(__arm) || defined(ALPHA) || defined(__GNUC__) || defined(__INTEL_COMPILER)
|
|
|
|
typedef signed int S32;
|
|
typedef unsigned int U32;
|
|
|
|
#else
|
|
|
|
typedef signed long S32;
|
|
typedef unsigned long U32;
|
|
|
|
#endif
|
|
|
|
|
|
typedef struct _S64
|
|
{
|
|
U32 Low;
|
|
S32 High;
|
|
} S64;
|
|
|
|
typedef struct _U64
|
|
{
|
|
U32 Low;
|
|
U32 High;
|
|
} U64;
|
|
|
|
|
|
/****************************************************************************/
|
|
/* Pointers */
|
|
/****************************************************************************/
|
|
|
|
typedef S8 *PS8;
|
|
typedef U8 *PU8;
|
|
typedef S16 *PS16;
|
|
typedef U16 *PU16;
|
|
typedef S32 *PS32;
|
|
typedef U32 *PU32;
|
|
typedef S64 *PS64;
|
|
typedef U64 *PU64;
|
|
|
|
|
|
#endif
|
|
|