1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00
freebsd/sys/i386/include
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
..
pc Removed bits related to MBRs now that they have a proper home in 2002-10-02 03:29:00 +00:00
_inttypes.h Since printf(3) now supports the `j' conversion specifier, use that 2002-06-30 05:48:03 +00:00
_limits.h sys/sys/limits.h: 2003-05-19 20:29:07 +00:00
_stdint.h Create a new header <machine/_stdint.h> for storing MD parts of 2002-07-29 17:41:23 +00:00
_types.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
acpica_machdep.h Add a acpi_SetDefaultIntrModel() method to allow drivers to set the 2003-09-10 01:14:42 +00:00
apicreg.h Delete old and unused APIC_IRQ defines. 2003-12-10 21:33:07 +00:00
apicvar.h Whitespace nit (sorry, couldn't help it) 2003-11-14 22:21:30 +00:00
apm_bios.h Remove __P. 2002-03-20 05:48:58 +00:00
apm_segments.h
asc_ioctl.h
asm.h Remove _ARCH_INDIRECT, it was the glue to enable having both hardware 2003-07-23 04:28:51 +00:00
asmacros.h Define IDTVEC() and TRAP() assembly macros so that they can be shared 2003-11-03 21:09:17 +00:00
atomic.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
bootinfo.h Libdisk does not need to include <sys/diskslice.h> any more. 2003-04-04 16:35:16 +00:00
bus_at386.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
bus_dma.h Document the lockfunc and lockfuncarg arguments to bus_dma_tag_create() in 2003-11-07 23:29:42 +00:00
bus_memio.h
bus_pc98.h Implement the bus_space_map() function to allocate resources and initialize 2003-09-23 08:22:34 +00:00
bus_pio.h
bus.h Add the following functions/macros to support byte order conversions and 2002-02-27 17:16:18 +00:00
cdk.h
clock.h - Move manipulation of td_intr_nesting_level out of assembly interrupt 2003-11-12 18:13:57 +00:00
comstats.h
cpu.h Hey, how about we NOT make modules crash 486s? 2003-12-17 00:51:47 +00:00
cpufunc.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
cputypes.h Move a prototype to the least wrong place. 2002-08-02 18:45:43 +00:00
critical.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
cserial.h Updated cx driver commit part 1: bring in the new kernel driver. 2003-12-03 07:29:38 +00:00
db_machdep.h Fill out some gaps in ia64 DDB support. This involves generalising DDB's 2001-09-15 11:06:07 +00:00
dvcfg.h Remove __P. 2002-03-20 05:48:58 +00:00
elan_mmcr.h Add struct definition of the Elan MMCR registers (from jb@) 2004-01-05 12:00:59 +00:00
elf.h Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bit 2003-09-25 01:10:26 +00:00
endian.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
exec.h
float.h Implement fpclassify(): 2003-02-08 20:37:55 +00:00
floatingpoint.h o Move the contents of <machine/floatingpoint.h> over to 2003-01-19 06:01:33 +00:00
frame.h Initiate de-orbit burn for fpu-less operation. 386+387 is still 2003-07-22 08:11:17 +00:00
gsc.h
i4b_cause.h Clean up the i4b kernel part: remove unmaintained #if(def)s for NetBSD, 2002-03-17 09:33:15 +00:00
i4b_debug.h Clean up the i4b kernel part: remove unmaintained #if(def)s for NetBSD, 2002-03-17 09:33:15 +00:00
i4b_ioctl.h add support properly displaying and logging incoming telephone numbers (MSNs) 2002-08-12 07:53:55 +00:00
i4b_rbch_ioctl.h Clean up the i4b kernel part: remove unmaintained #if(def)s for NetBSD, 2002-03-17 09:33:15 +00:00
i4b_tel_ioctl.h Clean up the i4b kernel part: remove unmaintained #if(def)s for NetBSD, 2002-03-17 09:33:15 +00:00
i4b_trace.h Clean up the i4b kernel part: remove unmaintained #if(def)s for NetBSD, 2002-03-17 09:33:15 +00:00
ieeefp.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
if_wl_wavelan.h Fix typo in the BSD copyright: s/withough/without/ 2002-06-02 20:05:59 +00:00
in_cksum.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
intr_machdep.h Shuffle the APIC interrupt vectors around a bit: 2003-11-14 19:10:13 +00:00
ioctl_bt848.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
ioctl_ctx.h
ioctl_meteor.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
legacyvar.h - Rename nexus_pcib to legacy_pcib. I've been meaning to do this for a 2003-06-06 17:56:30 +00:00
limits.h sys/sys/limits.h: 2003-05-19 20:29:07 +00:00
md_var.h Add struct definition of the Elan MMCR registers (from jb@) 2004-01-05 12:00:59 +00:00
metadata.h Slight reorg and added AMD64 support. A couple of the MODINFOMD_* values 2003-05-01 03:31:18 +00:00
mpapic.h Remove the old APIC I/O higher level IPI API in favor of the newer MI 2001-04-10 22:18:21 +00:00
mptable.h Convert a couple of pointers to integers for source compatability with 2003-11-14 22:23:30 +00:00
mtpr.h
mutex.h GC #if 0'd assembly mutex micro operations. If someone wants to bring 2002-03-28 15:14:23 +00:00
npx.h At great personal risk, add a __packed and __aligned(x) define that 2002-09-23 05:55:10 +00:00
param.h Migrate the thread stack management functions from the machine-dependent 2003-06-14 23:23:55 +00:00
pcaudioio.h
pcb_ext.h Remove __P. 2002-03-20 05:48:58 +00:00
pcb.h - On my Pentium4-M laptop, invalpg takes ~1100 cycles if the page is found in 2003-09-30 08:11:36 +00:00
pci_cfgreg.h Switch to using the new $PIR interrupt routing code and remove the old 2004-02-18 22:41:53 +00:00
pcpu.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
pcvt_ioctl.h Add just enough of i386/include/pcvt_ioctl.h to amd64/include/pcvt_ioctl.h 2003-12-10 02:49:17 +00:00
pecoff_machdep.h
perfmon.h Remove __P. 2002-03-20 05:48:58 +00:00
physio_proc.h Don't include <sys/buf.h> needlessly. 2003-04-01 09:02:58 +00:00
pmap.h Remove unused declarations. (Some time ago, these variables became fields 2004-03-07 07:13:15 +00:00
privatespace.h Overhaul the per-CPU support a bit: 2001-12-11 23:33:44 +00:00
proc.h Add a per-thread variable for saving the state of eflags to support the 2003-11-03 21:30:00 +00:00
profile.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
psl.h Allow bit 21 of EFLAGS register (PSL_ID) be changed in the use-mode without 2001-11-15 23:01:29 +00:00
ptrace.h Move the definition of PT_[GS]ET{,DB,FP}REGS from the MD ptrace.h to the 2002-03-16 00:25:53 +00:00
reg.h Properly parenthesize the DBREG_DRX macro's variables to allow for 2002-11-07 22:42:31 +00:00
reloc.h
resource.h
runq.h Move the "- 1" into the RQB_FFS(mask) macro itself so that 2002-06-20 06:21:20 +00:00
segments.h - Always use 256 IDT entries since it is now a runtime decison as to how 2003-11-03 21:12:04 +00:00
setjmp.h Fix namespace issues by using visibility conditionals from 2002-10-05 05:47:56 +00:00
sf_buf.h Don't remove the virtual-to-physical mapping when an sf_buf is freed. 2003-12-07 22:49:25 +00:00
sigframe.h Split 4.x and 5.x signal handling so that we can keep 4.x signal 2002-10-25 19:10:58 +00:00
signal.h Align the FPU state in the ucontext and sigcontext to 16 bytes 2002-12-02 19:58:55 +00:00
smapi.h Use __packed; 2003-03-24 20:44:39 +00:00
smp.h - Add the mp_topology() function to mp_machdep.c. This function builds up 2003-12-11 03:48:31 +00:00
smptests.h Localized the cy driver's locking. 2003-11-16 00:55:54 +00:00
speaker.h Very minor whitespace/style nit. 2002-10-23 10:14:30 +00:00
specialreg.h Add new CPU_ENABLE_TCC option, from NOTES: 2004-01-18 21:18:00 +00:00
spigot.h
stdarg.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
sysarch.h Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'm 2004-01-09 16:52:09 +00:00
trap.h Activate SSE/SIMD. This is the extra context switching support that 2001-07-12 06:32:51 +00:00
tss.h Delete a whole bunch of compatability defines that we dont use anymore. 2002-09-23 05:04:05 +00:00
ucontext.h Align the FPU state in the ucontext and sigcontext to 16 bytes 2002-12-02 19:58:55 +00:00
varargs.h Standardize idempotentcy ifdefs. Consistently use _MACHINE_VARARGS_H_ 2003-09-01 03:01:45 +00:00
vm86.h 1.Fix smp race between kernel vm86 BIOS calling and userland vm86 mode code, 2002-11-07 01:34:23 +00:00
vmparam.h Commit Bosko's patch to clean up the PSE/PG_G initialization to and 2003-10-01 23:46:08 +00:00
wtio.h