summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/i386
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/cpu/i386')
-rw-r--r--cpukit/score/cpu/i386/Makefile.am15
-rw-r--r--cpukit/score/cpu/i386/headers.am20
-rw-r--r--cpukit/score/cpu/i386/include/machine/elf_machdep.h63
-rw-r--r--cpukit/score/cpu/i386/include/rtems/asm.h (renamed from cpukit/score/cpu/i386/rtems/asm.h)0
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/cpu.h (renamed from cpukit/score/cpu/i386/rtems/score/cpu.h)0
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/cpuatomic.h (renamed from cpukit/score/cpu/i386/rtems/score/cpuatomic.h)0
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/cpuimpl.h (renamed from cpukit/score/cpu/i386/rtems/score/cpuimpl.h)0
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/i386.h (renamed from cpukit/score/cpu/i386/rtems/score/i386.h)0
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/idtr.h (renamed from cpukit/score/cpu/i386/rtems/score/idtr.h)0
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/interrupts.h (renamed from cpukit/score/cpu/i386/rtems/score/interrupts.h)0
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/registers.h (renamed from cpukit/score/cpu/i386/rtems/score/registers.h)0
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/types.h (renamed from cpukit/score/cpu/i386/rtems/score/types.h)0
-rw-r--r--cpukit/score/cpu/i386/preinstall.am61
13 files changed, 84 insertions, 75 deletions
diff --git a/cpukit/score/cpu/i386/Makefile.am b/cpukit/score/cpu/i386/Makefile.am
index 7fb2a081b6..fe7fa5582c 100644
--- a/cpukit/score/cpu/i386/Makefile.am
+++ b/cpukit/score/cpu/i386/Makefile.am
@@ -1,22 +1,9 @@
include $(top_srcdir)/automake/compile.am
-include_rtemsdir = $(includedir)/rtems
-include_rtems_HEADERS= rtems/asm.h
-
-include_rtems_scoredir = $(includedir)/rtems/score
-include_rtems_score_HEADERS = rtems/score/cpu.h
-include_rtems_score_HEADERS += rtems/score/cpuimpl.h
-include_rtems_score_HEADERS += rtems/score/i386.h
-include_rtems_score_HEADERS += rtems/score/types.h
-include_rtems_score_HEADERS += rtems/score/interrupts.h
-include_rtems_score_HEADERS += rtems/score/registers.h
-include_rtems_score_HEADERS += rtems/score/idtr.h
-include_rtems_score_HEADERS += rtems/score/cpuatomic.h
-
noinst_LIBRARIES = libscorecpu.a
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
-include $(srcdir)/preinstall.am
include $(top_srcdir)/automake/local.am
+include $(srcdir)/headers.am
diff --git a/cpukit/score/cpu/i386/headers.am b/cpukit/score/cpu/i386/headers.am
new file mode 100644
index 0000000000..ea07edcbd4
--- /dev/null
+++ b/cpukit/score/cpu/i386/headers.am
@@ -0,0 +1,20 @@
+## This file was generated by "./boostrap -H".
+
+include_machinedir = $(includedir)/machine
+include_machine_HEADERS =
+include_machine_HEADERS += include/machine/elf_machdep.h
+
+include_rtemsdir = $(includedir)/rtems
+include_rtems_HEADERS =
+include_rtems_HEADERS += include/rtems/asm.h
+
+include_rtems_scoredir = $(includedir)/rtems/score
+include_rtems_score_HEADERS =
+include_rtems_score_HEADERS += include/rtems/score/cpu.h
+include_rtems_score_HEADERS += include/rtems/score/cpuatomic.h
+include_rtems_score_HEADERS += include/rtems/score/cpuimpl.h
+include_rtems_score_HEADERS += include/rtems/score/i386.h
+include_rtems_score_HEADERS += include/rtems/score/idtr.h
+include_rtems_score_HEADERS += include/rtems/score/interrupts.h
+include_rtems_score_HEADERS += include/rtems/score/registers.h
+include_rtems_score_HEADERS += include/rtems/score/types.h
diff --git a/cpukit/score/cpu/i386/include/machine/elf_machdep.h b/cpukit/score/cpu/i386/include/machine/elf_machdep.h
new file mode 100644
index 0000000000..442c561a9c
--- /dev/null
+++ b/cpukit/score/cpu/i386/include/machine/elf_machdep.h
@@ -0,0 +1,63 @@
+/* $NetBSD: elf_machdep.h,v 1.10 2009/05/30 05:56:52 skrll Exp $ */
+
+#define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB
+#define ELF32_MACHDEP_ID_CASES \
+ case EM_386: \
+ case EM_486: \
+ break;
+
+#define ELF64_MACHDEP_ENDIANNESS XXX /* break compilation */
+#define ELF64_MACHDEP_ID_CASES \
+ /* no 64-bit ELF machine types supported */
+
+#define ELF32_MACHDEP_ID EM_386
+
+#define ARCH_ELFSIZE 32 /* MD native binary size */
+
+/* i386 relocations */
+#define R_386_NONE 0
+#define R_386_32 1
+#define R_386_PC32 2
+#define R_386_GOT32 3
+#define R_386_PLT32 4
+#define R_386_COPY 5
+#define R_386_GLOB_DAT 6
+#define R_386_JMP_SLOT 7
+#define R_386_RELATIVE 8
+#define R_386_GOTOFF 9
+#define R_386_GOTPC 10
+
+/* TLS relocations */
+#define R_386_TLS_TPOFF 14
+#define R_386_TLS_IE 15
+#define R_386_TLS_GOTIE 16
+#define R_386_TLS_LE 17
+#define R_386_TLS_GD 18
+#define R_386_TLS_LDM 19
+
+/* The following relocations are GNU extensions. */
+#define R_386_16 20
+#define R_386_PC16 21
+#define R_386_8 22
+#define R_386_PC8 23
+
+/* More TLS relocations */
+#define R_386_TLS_GD_32 24
+#define R_386_TLS_GD_PUSH 25
+#define R_386_TLS_GD_CALL 26
+#define R_386_TLS_GD_POP 27
+#define R_386_TLS_LDM_32 28
+#define R_386_TLS_LDM_PUSH 29
+#define R_386_TLS_LDM_CALL 30
+#define R_386_TLS_LDM_POP 31
+#define R_386_TLS_LDO_32 32
+#define R_386_TLS_IE_32 33
+#define R_386_TLS_LE_32 34
+#define R_386_TLS_DTPMOD32 35
+#define R_386_TLS_DTPOFF32 36
+#define R_386_TLS_TPOFF32 37
+#define R_386_TLS_GOTDESC 39
+#define R_386_TLS_DESC_CALL 40
+#define R_386_TLS_DESC 41
+
+#define R_TYPE(name) __CONCAT(R_386_,name)
diff --git a/cpukit/score/cpu/i386/rtems/asm.h b/cpukit/score/cpu/i386/include/rtems/asm.h
index 50b0fd71a0..50b0fd71a0 100644
--- a/cpukit/score/cpu/i386/rtems/asm.h
+++ b/cpukit/score/cpu/i386/include/rtems/asm.h
diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
index f78149c24b..f78149c24b 100644
--- a/cpukit/score/cpu/i386/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
diff --git a/cpukit/score/cpu/i386/rtems/score/cpuatomic.h b/cpukit/score/cpu/i386/include/rtems/score/cpuatomic.h
index 598ee76b20..598ee76b20 100644
--- a/cpukit/score/cpu/i386/rtems/score/cpuatomic.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/i386/rtems/score/cpuimpl.h b/cpukit/score/cpu/i386/include/rtems/score/cpuimpl.h
index 789f2badd9..789f2badd9 100644
--- a/cpukit/score/cpu/i386/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/cpuimpl.h
diff --git a/cpukit/score/cpu/i386/rtems/score/i386.h b/cpukit/score/cpu/i386/include/rtems/score/i386.h
index 2555d13b8b..2555d13b8b 100644
--- a/cpukit/score/cpu/i386/rtems/score/i386.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/i386.h
diff --git a/cpukit/score/cpu/i386/rtems/score/idtr.h b/cpukit/score/cpu/i386/include/rtems/score/idtr.h
index a79af40792..a79af40792 100644
--- a/cpukit/score/cpu/i386/rtems/score/idtr.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/idtr.h
diff --git a/cpukit/score/cpu/i386/rtems/score/interrupts.h b/cpukit/score/cpu/i386/include/rtems/score/interrupts.h
index 3a7971c1ff..3a7971c1ff 100644
--- a/cpukit/score/cpu/i386/rtems/score/interrupts.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/interrupts.h
diff --git a/cpukit/score/cpu/i386/rtems/score/registers.h b/cpukit/score/cpu/i386/include/rtems/score/registers.h
index 254fef701b..254fef701b 100644
--- a/cpukit/score/cpu/i386/rtems/score/registers.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/registers.h
diff --git a/cpukit/score/cpu/i386/rtems/score/types.h b/cpukit/score/cpu/i386/include/rtems/score/types.h
index 00555d41b5..00555d41b5 100644
--- a/cpukit/score/cpu/i386/rtems/score/types.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/types.h
diff --git a/cpukit/score/cpu/i386/preinstall.am b/cpukit/score/cpu/i386/preinstall.am
deleted file mode 100644
index 6eda753836..0000000000
--- a/cpukit/score/cpu/i386/preinstall.am
+++ /dev/null
@@ -1,61 +0,0 @@
-## Automatically generated by ampolish3 - Do not edit
-
-if AMPOLISH3
-$(srcdir)/preinstall.am: Makefile.am
- $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
-endif
-
-PREINSTALL_DIRS =
-DISTCLEANFILES = $(PREINSTALL_DIRS)
-
-all-am: $(PREINSTALL_FILES)
-
-PREINSTALL_FILES =
-CLEANFILES = $(PREINSTALL_FILES)
-
-$(PROJECT_INCLUDE)/rtems/$(dirstamp):
- @$(MKDIR_P) $(PROJECT_INCLUDE)/rtems
- @: > $(PROJECT_INCLUDE)/rtems/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp)
-
-$(PROJECT_INCLUDE)/rtems/asm.h: rtems/asm.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/asm.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/asm.h
-
-$(PROJECT_INCLUDE)/rtems/score/$(dirstamp):
- @$(MKDIR_P) $(PROJECT_INCLUDE)/rtems/score
- @: > $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
-
-$(PROJECT_INCLUDE)/rtems/score/cpu.h: rtems/score/cpu.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpu.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpu.h
-
-$(PROJECT_INCLUDE)/rtems/score/cpuimpl.h: rtems/score/cpuimpl.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuimpl.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuimpl.h
-
-$(PROJECT_INCLUDE)/rtems/score/i386.h: rtems/score/i386.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/i386.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/i386.h
-
-$(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
-
-$(PROJECT_INCLUDE)/rtems/score/interrupts.h: rtems/score/interrupts.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/interrupts.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/interrupts.h
-
-$(PROJECT_INCLUDE)/rtems/score/registers.h: rtems/score/registers.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/registers.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/registers.h
-
-$(PROJECT_INCLUDE)/rtems/score/idtr.h: rtems/score/idtr.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/idtr.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/idtr.h
-
-$(PROJECT_INCLUDE)/rtems/score/cpuatomic.h: rtems/score/cpuatomic.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
-