1# Copyright (c) 2019 Intel Corp.
2# SPDX-License-Identifier: Apache-2.0
3
4if (CMAKE_C_COMPILER_ID STREQUAL "Clang"
5  OR CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM")
6  # We rely on GAS for assembling, so don't use the integrated assembler
7  zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:-no-integrated-as>)
8elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
9  zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--divide>)
10endif()
11
12zephyr_library_sources(
13  ia32/crt0.S
14  ia32/excstub.S
15  ia32/intstub.S
16  ia32/irq_manage.c
17  ia32/swap.S
18  ia32/thread.c
19  )
20
21zephyr_library_sources_ifdef(CONFIG_IRQ_OFFLOAD		ia32/irq_offload.c)
22zephyr_library_sources_ifdef(CONFIG_X86_USERSPACE	ia32/userspace.S)
23zephyr_library_sources_ifdef(CONFIG_LAZY_FPU_SHARING	ia32/float.c)
24zephyr_library_sources_ifdef(CONFIG_GDBSTUB		ia32/gdbstub.c)
25
26zephyr_library_sources_ifdef(CONFIG_DEBUG_COREDUMP	ia32/coredump.c)
27
28zephyr_library_sources_ifdef(
29  CONFIG_X86_USE_THREAD_LOCAL_STORAGE
30  ia32/tls.c
31)
32
33# Last since we declare default exception handlers here
34zephyr_library_sources(ia32/fatal.c)
35
36zephyr_library_sources_ifdef(
37  CONFIG_X86_FP_USE_SOFT_FLOAT
38  ia32/soft_float_stubs.c
39)
40