x86: split ABI related files

Move the files that *know* about the calling convention in use by the
compiler. The routines exposed by the files moved to the i386_sysV_abi
directory follow the C calling convention specified by the
i386_sysV_abi which is the default for GCC. The upstream GCC has been
enhanced to support the iamcu_ABI that is optimized for processors
that implement the IA MCU instruction set. This new ABI provides code,
data and stack size improvements on IA MCU based systems.

This change is the first step in adding support for the IA MCU
optimized toolchains to Zephyr OS

Change-Id: I13bffee8007fb3f82aa31389b2c241065e8e315d
Original-work-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2015-11-17 13:31:42 -05:00 committed by Anas Nashif
commit 4c57acb883
7 changed files with 20 additions and 11 deletions

View file

@ -10,13 +10,13 @@ else
KBUILD_AFLAGS += -Wa,--divide KBUILD_AFLAGS += -Wa,--divide
endif endif
obj-y = i386_sysV_abi/
obj-y = gdt.o thread.o fatal.o cpuhalt.o \ obj-y += gdt.o fatal.o cpuhalt.o \
excstub.o swap.o msr.o dynamic.o \ msr.o dynamic.o \
excconnect.o sys_fatal_error_handler.o \ excconnect.o sys_fatal_error_handler.o \
crt0.o driver_static_irq_stubs.o \ crt0.o driver_static_irq_stubs.o \
atomic.o cache_s.o cache.o intconnect.o \ atomic.o cache_s.o cache.o
intstub.o
obj-$(CONFIG_FP_SHARING) += float.o obj-$(CONFIG_FP_SHARING) += float.o
obj-$(CONFIG_MICROKERNEL) += strtask.o obj-$(CONFIG_MICROKERNEL) += strtask.o

View file

@ -0,0 +1,11 @@
ccflags-y += -I$(srctree)/kernel/nanokernel/include
ccflags-y += -I$(srctree)/kernel/microkernel/include
# see explanation for flags in arch/x86/core/Makefile
ifeq ($(COMPILER),clang)
KBUILD_AFLAGS += -no-integrated-as -Wa,--divide
else
KBUILD_AFLAGS += -Wa,--divide
endif
obj-y = excstub.o intconnect.o intstub.o swap.o thread.o

View file

@ -441,4 +441,3 @@ SECTION_FUNC(TEXT, _DynExcStubsNoErrBegin)
#endif /* CONFIG_NUM_DYNAMIC_EXC_NOERR_STUBS */ #endif /* CONFIG_NUM_DYNAMIC_EXC_NOERR_STUBS */
#endif /* ALL_DYN_EXC_STUBS */ #endif /* ALL_DYN_EXC_STUBS */

View file

@ -22,7 +22,7 @@ This module implements assembly routines to manage interrupts on
the Intel IA-32 architecture. More specifically, the interrupt (asynchronous the Intel IA-32 architecture. More specifically, the interrupt (asynchronous
exception) stubs are implemented in this module. The stubs are invoked when exception) stubs are implemented in this module. The stubs are invoked when
entering and exiting a C interrupt handler. entering and exiting a C interrupt handler.
*/ */
#define _ASMLANGUAGE #define _ASMLANGUAGE
@ -41,7 +41,7 @@ entering and exiting a C interrupt handler.
GTEXT(_SpuriousIntHandler) GTEXT(_SpuriousIntHandler)
GTEXT(_DynIntStubsBegin) GTEXT(_DynIntStubsBegin)
/* externs */ /* externs */
GTEXT(_Swap) GTEXT(_Swap)
@ -271,7 +271,7 @@ SECTION_FUNC(TEXT, _IntExit)
* debug tools that a preemptive context switch has occurred. * debug tools that a preemptive context switch has occurred.
* *
* Setting the NO_METRICS bit tells _Swap() that the per-execution context * Setting the NO_METRICS bit tells _Swap() that the per-execution context
* [totalRunTime] calculation has already been performed and that * [totalRunTime] calculation has already been performed and that
* there is no need to do it again. * there is no need to do it again.
*/ */
@ -290,7 +290,7 @@ SECTION_FUNC(TEXT, _IntExit)
popl %esp /* switch back to kernel stack */ popl %esp /* switch back to kernel stack */
pushfl /* push KERNEL_LOCK_KEY argument */ pushfl /* push KERNEL_LOCK_KEY argument */
call _Swap call _Swap
/* /*
* The interrupted thread has now been scheduled, * The interrupted thread has now been scheduled,

View file

@ -146,7 +146,7 @@ SECTION_FUNC(TEXT, _Swap)
jmp restoreContext jmp restoreContext
/* /*
* There are no fiber in the run queue, thus swap in the task * There are no fiber in the run queue, thus swap in the task
* (_nanokernel.task). The 'task' field will _never_ be NULL. * (_nanokernel.task). The 'task' field will _never_ be NULL.
*/ */
@ -376,4 +376,3 @@ BRANCH_LABEL(skipIntLatencyStop)
#endif #endif
popfl popfl
ret ret