Commit 6767563f authored by Charles E. Youse's avatar Charles E. Youse Committed by Anas Nashif
Browse files

arch/x86: remove support for IAMCU ABI



This ABI is no longer required by any targets and is deprecated.

Signed-off-by: default avatarCharles E. Youse <charles.youse@intel.com>
parent 37929b34
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -114,16 +114,6 @@ config X86_BOUNDS_CHECK_BYPASS_MITIGATION

menu "Processor Capabilities"

config X86_IAMCU
	bool "IAMCU calling convention"
	help
	  The IAMCU calling convention changes the X86 C calling convention to
	  pass some arguments via registers allowing for code size and performance
	  improvements.  Great care needs to be taken if you have assembly code
	  that will be called from C or C code called from assembly code, the
	  assembly code will need to be updated to conform to the new calling
	  convention.  If in doubt say N

config X86_MMU
	bool "Enable Memory Management Unit"
	select MEMORY_PROTECTION
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@

if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
  # We rely on GAS for assembling, so don't use the integrated assembler
  zephyr_compile_options_ifndef(CONFIG_X86_IAMCU $<$<COMPILE_LANGUAGE:ASM>:-no-integrated-as>)
  zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:-no-integrated-as>)
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
  zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--divide>)
endif()
+0 −7
Original line number Diff line number Diff line
@@ -161,16 +161,9 @@ SECTION_FUNC(TEXT, _exception_enter)
	sti

allDone:
#if CONFIG_X86_IAMCU
	movl	%esp, %eax		/* z_arch_esf_t * parameter */
#else
	pushl	%esp			/* push z_arch_esf_t * parameter */
#endif
	INDIRECT_CALL(%ecx)		/* call exception handler */

#ifndef CONFIG_X86_IAMCU
	addl	$0x4, %esp
#endif

#if defined(CONFIG_LAZY_FP_SHARING)

+0 −4
Original line number Diff line number Diff line
@@ -105,12 +105,8 @@ static void unwind_stack(u32_t base_ptr, u16_t cs)
		if (frame->ret_addr == 0U) {
			break;
		}
#ifdef CONFIG_X86_IAMCU
		z_fatal_print("     0x%08x", frame->ret_addr);
#else
		z_fatal_print("     0x%08x (0x%x)", frame->ret_addr,
			      frame->args);
#endif
		base_ptr = frame->next;
	}
}
+5 −29
Original line number Diff line number Diff line
@@ -178,12 +178,8 @@ SECTION_FUNC(TEXT, _interrupt_enter)

alreadyOnIntStack:

#ifndef CONFIG_X86_IAMCU
	/* EAX has the interrupt handler argument, needs to go on
	 * stack for sys V calling convention
	 */
	push	%eax
#endif
	push	%eax	/* interrupt handler argument */

#ifdef CONFIG_EXECUTION_BENCHMARKING
	/* Save the eax and edx registers before reading the time stamp
	* once done pop the values
@@ -202,10 +198,8 @@ alreadyOnIntStack:
#endif
	/* Now call the interrupt handler */
	INDIRECT_CALL(%edx)
#ifndef CONFIG_X86_IAMCU
	/* Discard ISR argument */
	addl	$0x4, %esp
#endif
#ifdef CONFIG_NESTED_INTERRUPTS
	cli			/* disable interrupts again */
#endif
@@ -255,16 +249,9 @@ alreadyOnIntStack:
	call	z_check_stack_sentinel
#endif
	pushfl			/* push KERNEL_LOCK_KEY argument */
#ifdef CONFIG_X86_IAMCU
	/* IAMCU first argument goes into a register, not the stack.
	 */
	popl	%eax
#endif
	call	__swap

#ifndef CONFIG_X86_IAMCU
	addl 	$4, %esp	/* pop KERNEL_LOCK_KEY argument */
#endif

	/*
	 * The interrupted thread has now been scheduled,
	 * as the result of a _later_ invocation of __swap().
@@ -331,12 +318,7 @@ handle_idle:
	pushl	%eax
	pushl	%edx
	/* Populate 'ticks' argument to z_sys_power_save_idle_exit */
#ifdef CONFIG_X86_IAMCU
	movl	_kernel_offset_to_idle(%ecx), %eax
#else
	/* SYS V calling convention */
	push	_kernel_offset_to_idle(%ecx)
#endif
	/* Zero out _kernel.idle */
	movl	$0, _kernel_offset_to_idle(%ecx)

@@ -348,10 +330,8 @@ handle_idle:
	 */

	call	z_sys_power_save_idle_exit
#ifndef CONFIG_X86_IAMCU
	/* SYS V: discard 'ticks' argument passed on the stack */
	/* discard 'ticks' argument passed on the stack */
	add	$0x4, %esp
#endif
	popl	%edx
	popl	%eax
	jmp	alreadyOnIntStack
@@ -409,11 +389,7 @@ SECTION_FUNC(TEXT, z_SpuriousIntHandler)
	leal	44(%esp), %ecx   /* Calculate ESP before exception occurred */
	pushl	%ecx             /* Save calculated ESP */

#ifndef CONFIG_X86_IAMCU
	pushl	%esp		/* push cur stack pointer: pEsf arg */
#else
	mov	%esp, %eax
#endif

	/* re-enable interrupts */
	sti
Loading