Commit 288a1e98 by Ben Clayton

Yarn: Remove BUILD_ASM define from build settings

This can be #defined in the assembly files, reducing per-build-system complexity. Bug: b/139010488 Change-Id: Ided03000dc5e93e4d1e04ce6f0b57c6e45565545 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35210 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 2bcadf49
......@@ -279,7 +279,7 @@ set(HELLO2_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/PowerVR_SDK/Examples/Begi
###########################################################
# Run assembly files through the C preprocessor.
SET(CMAKE_ASM_FLAGS "-x assembler-with-cpp -DBUILD_ASM=1")
SET(CMAKE_ASM_FLAGS "-x assembler-with-cpp")
# Flags for project code (non 3rd party)
set(SWIFTSHADER_COMPILE_OPTIONS "")
......
......@@ -515,10 +515,6 @@ cc_library_static {
cflags: [
"-Wno-unused-parameter",
],
asflags: [
"-DBUILD_ASM",
],
}
......
......@@ -14,6 +14,7 @@
#if defined(__aarch64__)
#define YARN_BUILD_ASM 1
#include "OSFiber_asm_aarch64.h"
// void yarn_fiber_swap(yarn_fiber_context* from, const yarn_fiber_context* to)
......
......@@ -44,7 +44,7 @@
#define YARN_ASM_SYMBOL(x) x
#endif
#ifndef BUILD_ASM
#ifndef YARN_BUILD_ASM
#include <stdint.h>
......@@ -115,4 +115,4 @@ static_assert(offsetof(yarn_fiber_context, SP) == YARN_REG_SP, "Bad register o
static_assert(offsetof(yarn_fiber_context, LR) == YARN_REG_LR, "Bad register offset");
#endif // __cplusplus
#endif // BUILD_ASM
#endif // YARN_BUILD_ASM
......@@ -14,6 +14,7 @@
#if defined(__arm__)
#define YARN_BUILD_ASM 1
#include "OSFiber_asm_arm.h"
// void yarn_fiber_swap(yarn_fiber_context* from, const yarn_fiber_context* to)
......
......@@ -34,7 +34,7 @@
#define YARN_REG_SP 0x4c
#define YARN_REG_LR 0x50
#ifndef BUILD_ASM
#ifndef YARN_BUILD_ASM
#include <stdint.h>
// Procedure Call Standard for the ARM 64-bit Architecture
......@@ -96,4 +96,4 @@ static_assert(offsetof(yarn_fiber_context, SP) == YARN_REG_SP, "Bad register o
static_assert(offsetof(yarn_fiber_context, LR) == YARN_REG_LR, "Bad register offset");
#endif // __cplusplus
#endif // BUILD_ASM
#endif // YARN_BUILD_ASM
......@@ -14,6 +14,7 @@
#if defined(__x86_64__)
#define YARN_BUILD_ASM 1
#include "OSFiber_asm_x64.h"
// void yarn_fiber_swap(yarn_fiber_context* from, const yarn_fiber_context* to)
......
......@@ -29,7 +29,7 @@
#define YARN_ASM_SYMBOL(x) x
#endif
#ifndef BUILD_ASM
#ifndef YARN_BUILD_ASM
#include <stdint.h>
......@@ -66,4 +66,4 @@ static_assert(offsetof(yarn_fiber_context, RSP) == YARN_REG_RSP, "Bad register o
static_assert(offsetof(yarn_fiber_context, RIP) == YARN_REG_RIP, "Bad register offset");
#endif // __cplusplus
#endif // BUILD_ASM
#endif // YARN_BUILD_ASM
......@@ -14,6 +14,7 @@
#if defined(__i386__)
#define YARN_BUILD_ASM 1
#include "OSFiber_asm_x86.h"
// void yarn_fiber_swap(yarn_fiber_context* from, const yarn_fiber_context* to)
......
......@@ -19,7 +19,7 @@
#define YARN_REG_ESP 0x10
#define YARN_REG_EIP 0x14
#ifndef BUILD_ASM
#ifndef YARN_BUILD_ASM
#include <stdint.h>
// Assumes cdecl calling convention.
......@@ -47,4 +47,4 @@ static_assert(offsetof(yarn_fiber_context, ESP) == YARN_REG_ESP, "Bad register o
static_assert(offsetof(yarn_fiber_context, EIP) == YARN_REG_EIP, "Bad register offset");
#endif // __cplusplus
#endif // BUILD_ASM
#endif // YARN_BUILD_ASM
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment