freebsd-dev/sys/amd64/amd64
Tom Rhodes a122cca953 These are changes to allow to use the Intel C/C++ compiler (lang/icc)
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
2004-03-12 21:45:33 +00:00
..
amd64_mem.c Various whitespace and cosmetic sync-up's with i386. 2003-12-06 23:19:47 +00:00
amd64-gdbstub.c Various whitespace and cosmetic sync-up's with i386. 2003-12-06 23:19:47 +00:00
apic_vector.S Various whitespace and cosmetic sync-up's with i386. 2003-12-06 23:19:47 +00:00
atomic.c Use __FBSDID(). 2003-07-25 21:19:19 +00:00
autoconf.c Cosmetic and/or trivial sync up with i386. 2003-11-21 03:02:00 +00:00
bios.c Don't probe PnP BIOS devices for PICs for now to avoid problems with those 2003-11-03 22:22:04 +00:00
busdma_machdep.c MFi386 rev 1.51 by scottl: make dflt_lock() always panic. 2003-09-22 23:11:42 +00:00
cpu_switch.S Remove the badsw* INVARIANTS checks. The events that this attempts 2004-02-06 20:38:39 +00:00
critical.c MFi386: (all: keep a comment in sync with code, and don't depend on 2004-03-05 14:31:21 +00:00
db_disasm.c Use __FBSDID(). 2003-07-25 21:19:19 +00:00
db_interface.c Rename cn_unavailable to cnunavailable for little more consistency. 2004-02-05 17:35:28 +00:00
db_trace.c Un-stub the hardware debug register stuff. 2004-01-28 23:57:40 +00:00
dump_machdep.c Use __FBSDID(). 2003-07-25 21:19:19 +00:00
elf_machdep.c Add an additional field to the elf brandinfo structure to support 2003-12-23 02:42:39 +00:00
exception.S Initial landing of SMP support for FreeBSD/amd64. 2003-11-17 08:58:16 +00:00
fpu.c We can simplify a lot of things now that we don't have to worry about 2004-01-28 23:55:58 +00:00
genassym.c Export PCB_DR* symbols 2004-01-28 23:57:02 +00:00
identcpu.c When faced with a "GenuineIntel", we know what they call it now. Replace 2004-03-06 00:51:30 +00:00
in_cksum.c Use __FBSDID(). 2003-07-25 21:19:19 +00:00
initcpu.c Cosmetic and/or trivial sync up with i386. 2003-11-21 03:02:00 +00:00
intr_machdep.c Widen the enable/disable helper function's argument in line with the 2003-11-17 06:10:15 +00:00
io_apic.c Initial landing of SMP support for FreeBSD/amd64. 2003-11-17 08:58:16 +00:00
legacy.c Cosmetic and/or trivial sync up with i386. 2003-11-21 03:02:00 +00:00
local_apic.c MFi386: wait for local apic to become free before using it 2004-03-08 00:15:29 +00:00
locore.S Have hammer_time() return the proc0 stack location, and have locore 2003-05-31 06:54:29 +00:00
machdep.c MFi386: set initial curpcb pcpu variable at startup time rather than 2004-03-08 00:16:52 +00:00
mem.c Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
mp_machdep.c Stop depending on #include pollution from cpufunc.h 2004-03-08 00:25:03 +00:00
mpboot.S Since we don't use PG_NX yet, don't turn on EFER_NXE quite yet. This needs 2004-02-25 23:12:39 +00:00
mptable_pci.c Add the MP Table APIC enumerator. This code uses the BIOS MP Table to 2003-11-03 22:12:37 +00:00
mptable.c MFi386: (jhb): Deal with MAXCPU etc correctly 2003-12-11 02:47:35 +00:00
nexus.c Various whitespace and cosmetic sync-up's with i386. 2003-12-06 23:19:47 +00:00
pmap.c Retire pmap_pinit2(). Alpha was the last platform that used it. However, 2004-03-07 21:06:48 +00:00
prof_machdep.c These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
sigtramp.S Commit MD parts of a loosely functional AMD64 port. This is based on 2003-05-01 01:05:25 +00:00
support.S Fix i386 apic support merge botch. sizeof(long) is 8, not 4. This fixes 2003-11-27 17:20:44 +00:00
sys_machdep.c Cosmetic and/or trivial sync up with i386. 2003-11-21 03:02:00 +00:00
trap.c Remove stale or broken call to kdb_trap() and protected by the non- 2004-03-11 00:17:45 +00:00
tsc.c Initial landing of SMP support for FreeBSD/amd64. 2003-11-17 08:58:16 +00:00
uma_machdep.c MFia64 2003-10-14 05:51:31 +00:00
vm_machdep.c deal with dbregs for fork etc 2004-01-28 23:58:55 +00:00