# Enable beta Vulkan extensions
target_compile_definitions(loader_common_options INTERFACE VK_ENABLE_BETA_EXTENSIONS)
+string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSTEM_PROCESSOR)
+
option(BUILD_WERROR "Enable warnings as errors")
# Set warnings as errors and the main diagnostic flags
# Prevent <windows.h> from polluting the code. guards against things like MIN and MAX
target_compile_definitions(loader_common_options INTERFACE WIN32_LEAN_AND_MEAN)
+
+ # For some reason Advapi32.lib needs to be explicitely linked to when building for Arm (32 bit) on Windows, but isn't required on any other architecture
+ if (SYSTEM_PROCESSOR MATCHES "arm" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+ target_link_libraries(loader_common_options INTERFACE Advapi32)
+ endif()
endif()
# DEBUG enables runtime loader ICD verification
set(ASM_FAILURE_MSG "Support for unknown physical device and device functions is disabled due to missing the required assembly support code. \
To support unknown functions, assembly must be added for the platform.\n")
+set(ARMASM_CMAKE_FAILURE_MSG "Support for unknown physical device and device functions is disabled due to the CMake version ${CMAKE_VERSION} \
+being older than 3.26. Please update CMake to version 3.26 or newer.\n")
# Check for assembler support
if(WIN32 AND NOT USE_GAS)
endif()
endif()
if (USE_MASM)
- enable_language(ASM_MASM)
+ if(SYSTEM_PROCESSOR MATCHES "arm")
+ if(CMAKE_VERSION VERSION_LESS "3.26.0")
+ set(ASM_FAILURE_MSG ${ARMASM_CMAKE_FAILURE_MSG})
+ else()
+ enable_language(ASM_MARMASM)
+ set(LOADER_ASM_DIALECT "MARMASM")
+ endif()
+ else()
+ enable_language(ASM_MASM)
+ set(LOADER_ASM_DIALECT "MASM")
+ endif()
endif()
+
# Test if the detected compiler actually works.
# Unfortunately, CMake's detection of ASM_MASM is not reliable, so we need to do this ourselves.
- if (CMAKE_SIZEOF_VOID_P EQUAL 4)
- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm [=[
+ if(SYSTEM_PROCESSOR MATCHES "arm")
+ if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm [=[
+test_func FUNCTION
+ mov r0, #0
+ bx lr
+ ENDFUNC
+ END
+]=])
+ else()
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm [=[
+test_func FUNCTION
+ mov x1, 26
+ ldr x0, [x0, x1]
+ ENDFUNC
+ END
+]=])
+ endif()
+ else()
+ if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm [=[
.model flat
.code
extrn _start:near
ret
end
]=])
- else()
- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm [=[
+ else()
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm [=[
.code
extrn start:near
xor rax, rax
ret
end
]=])
+ endif()
endif ()
+
if(MINGW)
set(CMAKE_ASM_MASM_FLAGS ${CMAKE_ASM_MASM_FLAGS} ${JWASM_FLAGS})
- elseif(NOT CMAKE_CL_64 AND NOT JWASM_FOUND AND CMAKE_SIZEOF_VOID_P EQUAL 4) # /safeseh is only needed in x86
- set(CMAKE_ASM_MASM_FLAGS ${CMAKE_ASM_MASM_FLAGS} /safeseh)
+ set(CMAKE_ASM_MARMASM_FLAGS ${CMAKE_ASM_MARMASM_FLAGS} ${JWASM_FLAGS})
+ elseif(NOT CMAKE_CL_64 AND NOT JWASM_FOUND AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(CMAKE_ASM_MASM_FLAGS ${CMAKE_ASM_MASM_FLAGS} /safeseh) # /safeseh is only needed in x86
endif()
+
# try_compile does not work here due to the same reasons as static above.
- execute_process(COMMAND ${CMAKE_ASM_MASM_COMPILER} ${CMAKE_ASM_MASM_FLAGS} -c -Fo ${CMAKE_CURRENT_BINARY_DIR}/masm_check.obj ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm
- RESULT_VARIABLE CMAKE_ASM_MASM_COMPILER_WORKS
- OUTPUT_QUIET ERROR_QUIET)
+ if(SYSTEM_PROCESSOR MATCHES "arm")
+ execute_process(COMMAND ${CMAKE_ASM_MARMASM_COMPILER} ${CMAKE_ASM_MARMASM_FLAGS} ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm
+ RESULT_VARIABLE ASM_COMPILER_WORKS
+ OUTPUT_QUIET ERROR_QUIET)
+ else()
+ execute_process(COMMAND ${CMAKE_ASM_MASM_COMPILER} ${CMAKE_ASM_MASM_FLAGS} -c -Fo ${CMAKE_CURRENT_BINARY_DIR}/masm_check.obj ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm
+ RESULT_VARIABLE ASM_COMPILER_WORKS
+ OUTPUT_QUIET ERROR_QUIET)
+ endif()
+
# Convert the return code to a boolean
- if(CMAKE_ASM_MASM_COMPILER_WORKS EQUAL 0)
- set(CMAKE_ASM_MASM_COMPILER_WORKS true)
+ if(ASM_COMPILER_WORKS EQUAL 0)
+ set(ASM_COMPILER_WORKS true)
else()
- set(CMAKE_ASM_MASM_COMPILER_WORKS false)
+ set(ASM_COMPILER_WORKS false)
endif()
- if(CMAKE_ASM_MASM_COMPILER_WORKS)
+
+ if(ASM_COMPILER_WORKS)
add_executable(asm_offset asm_offset.c)
target_link_libraries(asm_offset PRIVATE loader_specific_options)
# If am emulator is provided (Like Wine), or running on native, run asm_offset to generate gen_defines.asm
if (CMAKE_CROSSCOMPILING_EMULATOR OR NOT CMAKE_CROSSCOMPILING)
- add_custom_command(OUTPUT gen_defines.asm DEPENDS asm_offset COMMAND asm_offset MASM)
+ add_custom_command(OUTPUT gen_defines.asm DEPENDS asm_offset COMMAND asm_offset ${LOADER_ASM_DIALECT})
else()
# Forces compiler to write the intermediate asm file, needed so that we can get sizeof/offset of info out of it.
target_compile_options(asm_offset PRIVATE "/Fa$<TARGET_FILE_DIR:asm_offset>/asm_offset.asm" /FA)
# Run parse_asm_values.py on asm_offset's assembly file to generate the gen_defines.asm, which the asm code depends on
add_custom_command(TARGET asm_offset POST_BUILD
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/scripts/parse_asm_values.py "${CMAKE_CURRENT_BINARY_DIR}/gen_defines.asm"
- "$<TARGET_FILE_DIR:asm_offset>/asm_offset.asm" "MASM" "${CMAKE_C_COMPILER_ID}" "${CMAKE_SYSTEM_PROCESSOR}"
+ "$<TARGET_FILE_DIR:asm_offset>/asm_offset.asm" "${LOADER_ASM_DIALECT}" "${CMAKE_C_COMPILER_ID}" "${SYSTEM_PROCESSOR}"
BYPRODUCTS gen_defines.asm
)
endif()
add_custom_target(loader_asm_gen_files DEPENDS gen_defines.asm)
set_target_properties(loader_asm_gen_files PROPERTIES FOLDER ${LOADER_HELPER_FOLDER})
- add_library(loader-unknown-chain STATIC unknown_ext_chain_masm.asm)
+ if(SYSTEM_PROCESSOR MATCHES "arm")
+ add_library(loader-unknown-chain STATIC unknown_ext_chain_marmasm.asm)
+ else()
+ add_library(loader-unknown-chain STATIC unknown_ext_chain_masm.asm)
+ endif()
target_include_directories(loader-unknown-chain PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
add_dependencies(loader-unknown-chain loader_asm_gen_files)
set(UNKNOWN_FUNCTIONS_SUPPORTED ON)
set(CMAKE_ASM_MASM_CREATE_STATIC_LIBRARY "<CMAKE_AR> /OUT:<TARGET> <LINK_FLAGS> <OBJECTS>")
endif()
else()
- message(WARNING "Could not find working MASM assembler\n${ASM_FAILURE_MSG}")
+ message(WARNING "Could not find working ${} assembler\n${ASM_FAILURE_MSG}")
endif()
elseif(UNIX OR MINGW OR (WIN32 AND USE_GAS)) # i.e.: Linux & Apple & MinGW & Windows using Clang-CL
- string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSTEM_PROCESSOR)
-
option(USE_GAS "Use GAS" ON)
if(USE_GAS)
if (APPLE_UNIVERSAL_BINARY)
/*
- * Copyright (c) 2017-2021 The Khronos Group Inc.
- * Copyright (c) 2017-2021 Valve Corporation
- * Copyright (c) 2017-2021 LunarG, Inc.
+ * Copyright (c) 2017-2024 The Khronos Group Inc.
+ * Copyright (c) 2017-2024 Valve Corporation
+ * Copyright (c) 2017-2024 LunarG, Inc.
* Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
const char *comment;
};
+enum Assembler {
+ UNKNOWN = 0,
+ MASM = 1,
+ MARMASM = 2,
+ GAS = 3,
+};
+
// This file can both be executed to produce gen_defines.asm and contains all the relevant data which
// the parse_asm_values.py script needs to write gen_defines.asm, necessary for cross compilation
int main(int argc, char **argv) {
- const char *assembler = NULL;
+ enum Assembler assembler = UNKNOWN;
for (int i = 0; i < argc; ++i) {
if (!strcmp(argv[i], "MASM")) {
- assembler = "MASM";
+ assembler = MASM;
+ } else if (!strcmp(argv[i], "MARMASM")) {
+ assembler = MARMASM;
} else if (!strcmp(argv[i], "GAS")) {
- assembler = "GAS";
+ assembler = GAS;
}
}
- if (assembler == NULL) {
- return 1;
+ if (assembler == UNKNOWN) {
+ return -1;
}
struct ValueInfo values[] = {
{ .name = "VULKAN_LOADER_ERROR_BIT", .value = (size_t) VULKAN_LOADER_ERROR_BIT,
.comment = "The numerical value of the enum value 'VULKAN_LOADER_ERROR_BIT'" },
{ .name = "PTR_SIZE", .value = sizeof(void*),
- .comment = "The size of a pointer" },
+ .comment = "The size of a pointer" },
{ .name = "CHAR_PTR_SIZE", .value = sizeof(char *),
.comment = "The size of a 'const char *' struct" },
{ .name = "FUNCTION_OFFSET_INSTANCE", .value = offsetof(struct loader_instance, phys_dev_ext_disp_functions),
FILE *file = loader_fopen("gen_defines.asm", "w");
fprintf(file, "\n");
- if (!strcmp(assembler, "MASM")) {
+ if (assembler == MASM) {
for (size_t i = 0; i < sizeof(values) / sizeof(values[0]); ++i) {
fprintf(file, "%-32s equ " SIZE_T_FMT "; %s\n", values[i].name, values[i].value, values[i].comment);
}
- } else if (!strcmp(assembler, "GAS")) {
+ } else if (assembler == MARMASM) {
+ fprintf(file, " AREA loader_structs_details, DATA,READONLY\n");
+#if defined(__aarch64__) || defined(_M_ARM64)
+ fprintf(file, "AARCH_64 EQU 1\n");
+#else
+ fprintf(file, "AARCH_64 EQU 0\n");
+#endif
+ for (size_t i = 0; i < sizeof(values) / sizeof(values[0]); ++i) {
+ fprintf(file, "%-32s EQU " SIZE_T_FMT "; %s\n", values[i].name, values[i].value, values[i].comment);
+ }
+ fprintf(file, " END\n");
+ } else if (assembler == GAS) {
#if defined(__x86_64__) || defined(__i386__)
const char *comment_delimiter = "#";
#if defined(__x86_64__)
--- /dev/null
+;
+; Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+; Copyright (c) 2024 Valve Corporation
+; Copyright (c) 2024 LunarG, Inc.
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+; Author: Eric Sullivan <esullivan@nvidia.com>
+; Author: Charles Giessen <charles@lunarg.com>
+;
+
+; This code is used to pass on device (including physical device) extensions through the call chain. It must do this without
+; creating a stack frame, because the actual parameters of the call are not known. Since the first parameter is known to be a
+; VkPhysicalDevice or a dispatchable object it can unwrap the object, possibly overwriting the wrapped physical device, and then
+; jump to the next function in the call chain
+
+
+ GET gen_defines.asm
+
+ EXTERN loader_log_asm_function_not_supported
+
+ IF AARCH_64==1
+
+ MACRO
+ PhysDevExtTramp $num
+ ALIGN
+ EXPORT vkPhysDevExtTramp$num [FUNC]
+vkPhysDevExtTramp$num FUNCTION
+ ldr x9, [x0] ; Load the loader_instance_dispatch_table* into x9
+ ldr x0, [x0, PHYS_DEV_OFFSET_PHYS_DEV_TRAMP] ; Load the unwrapped VkPhysicalDevice into x0
+ mov x10, #(PHYS_DEV_OFFSET_INST_DISPATCH + (PTR_SIZE * $num)) ; Put the offset of the entry in the dispatch table for the function
+ ldr x11, [x9, x10] ; Load the address to branch to out of the dispatch table
+ br x11 ; Branch to the next member of the dispatch chain
+ ENDFUNC
+ MEND
+
+ MACRO
+$label PhysDevExtTermin $num
+ ALIGN
+ EXPORT vkPhysDevExtTermin$num [FUNC]
+vkPhysDevExtTermin$num FUNCTION
+ ldr x9, [x0, ICD_TERM_OFFSET_PHYS_DEV_TERM] // Load the loader_icd_term* in x9
+ mov x11, (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * $num)) // Put the offset into the dispatch table in x11
+ ldr x10, [x9, x11] // Load the address of the next function in the dispatch chain
+ cbz x10, terminError$num // Go to the error section if the next function in the chain is NULL
+ ldr x0, [x0, PHYS_DEV_OFFSET_PHYS_DEV_TERM] // Unwrap the VkPhysicalDevice in x0
+ br x10 // Jump to the next function in the chain
+terminError$num
+ mov x10, (FUNCTION_OFFSET_INSTANCE + (CHAR_PTR_SIZE * $num)) // Offset of the function name string in the instance
+ ldr x11, [x9, INSTANCE_OFFSET_ICD_TERM] // Load the instance pointer
+ mov x0, x11 // Vulkan instance pointer (first arg)
+ mov x1, VULKAN_LOADER_ERROR_BIT // The error logging bit (second arg)
+ mov x2, #0 // Zero (third arg)
+ ldr x3, [x11, x10] // The function name (fourth arg)
+ bl loader_log_asm_function_not_supported // Log the error message before we crash
+ mov x0, #0
+ br x0 // Crash intentionally by jumping to address zero
+ ENDFUNC
+ MEND
+
+ MACRO
+ DevExtTramp $num
+ ALIGN
+ EXPORT vkdev_ext$num [FUNC]
+vkdev_ext$num FUNCTION
+ ldr x9, [x0] // Load the loader_instance_dispatch_table* into x9
+ mov x10, (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * $num)) // Offset of the desired function in the dispatch table
+ ldr x11, [x9, x10] // Load the function address
+ br x11
+ ENDFUNC
+ MEND
+
+; 32 bit (armhf) assembly
+ ELSE
+
+ MACRO
+ PhysDevExtTramp $num
+ ALIGN
+ EXPORT vkPhysDevExtTramp$num [FUNC]
+vkPhysDevExtTramp$num FUNCTION
+ ldr r4, [r0] // Load the loader_instance_dispatch_table* into r4
+ ldr r0, [r0, #PHYS_DEV_OFFSET_PHYS_DEV_TRAMP] // Load the unwrapped VkPhysicalDevice into r0
+ mov r5, #(PHYS_DEV_OFFSET_INST_DISPATCH + (PTR_SIZE * $num)) // Put the offset of the entry in the dispatch table for the function
+ ldr r6, [r4, r5] // Load the address to branch to out of the dispatch table
+ bx r6 // Branch to the next member of the dispatch chain
+ ENDFUNC
+ MEND
+
+ MACRO
+$label PhysDevExtTermin $num
+ ALIGN
+ EXPORT vkPhysDevExtTermin$num [FUNC]
+vkPhysDevExtTermin$num FUNCTION
+ ldr r4, [r0, #ICD_TERM_OFFSET_PHYS_DEV_TERM] // Load the loader_icd_term* in r4
+ mov r6, #(DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * $num)) // Put the offset into the dispatch table in r6
+ ldr r5, [r4, r6] // Load the address of the next function in the dispatch chain
+ cbz r5, terminError$num // Go to the error section if the next function in the chain is NULL
+ ldr r0, [r0, #PHYS_DEV_OFFSET_PHYS_DEV_TERM] // Unwrap the VkPhysicalDevice in r0
+ bx r5 // Jump to the next function in the chain
+terminError$num
+ mov r5, #(FUNCTION_OFFSET_INSTANCE + (CHAR_PTR_SIZE * $num)) // Offset of the function name string in the instance
+ ldr r6, [r4, #INSTANCE_OFFSET_ICD_TERM] // Load the instance pointer
+ mov r0, r6 // Vulkan instance pointer (first arg)
+ mov r1, #VULKAN_LOADER_ERROR_BIT // The error logging bit (second arg)
+ mov r2, #0 // Zero (third arg)
+ ldr r3, [r6, r5] // The function name (fourth arg)
+ bl loader_log_asm_function_not_supported // Log the error message before we crash
+ mov r0, #0
+ bx r0 // Crash intentionally by jumping to address zero
+ ENDFUNC
+ MEND
+
+ MACRO
+ DevExtTramp $num
+ ALIGN
+ EXPORT vkdev_ext$num [FUNC]
+vkdev_ext$num FUNCTION
+ ldr r4, [r0] // Load the loader_instance_dispatch_table* into r4
+ mov r5, #(EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * $num)) // Offset of the desired function in the dispatch table
+ ldr r6, [r4, r5] // Load the function address
+ bx r6
+ ENDFUNC
+ MEND
+
+ ENDIF
+
+ AREA terminator_string_data, DATA, READONLY
+
+termin_error_string DCB "Function %s not supported for this physical device", 0
+
+ AREA UnknownFunctionImpl, CODE, READONLY
+
+ PhysDevExtTramp 0
+ PhysDevExtTramp 1
+ PhysDevExtTramp 2
+ PhysDevExtTramp 3
+ PhysDevExtTramp 4
+ PhysDevExtTramp 5
+ PhysDevExtTramp 6
+ PhysDevExtTramp 7
+ PhysDevExtTramp 8
+ PhysDevExtTramp 9
+ PhysDevExtTramp 10
+ PhysDevExtTramp 11
+ PhysDevExtTramp 12
+ PhysDevExtTramp 13
+ PhysDevExtTramp 14
+ PhysDevExtTramp 15
+ PhysDevExtTramp 16
+ PhysDevExtTramp 17
+ PhysDevExtTramp 18
+ PhysDevExtTramp 19
+ PhysDevExtTramp 20
+ PhysDevExtTramp 21
+ PhysDevExtTramp 22
+ PhysDevExtTramp 23
+ PhysDevExtTramp 24
+ PhysDevExtTramp 25
+ PhysDevExtTramp 26
+ PhysDevExtTramp 27
+ PhysDevExtTramp 28
+ PhysDevExtTramp 29
+ PhysDevExtTramp 30
+ PhysDevExtTramp 31
+ PhysDevExtTramp 32
+ PhysDevExtTramp 33
+ PhysDevExtTramp 34
+ PhysDevExtTramp 35
+ PhysDevExtTramp 36
+ PhysDevExtTramp 37
+ PhysDevExtTramp 38
+ PhysDevExtTramp 39
+ PhysDevExtTramp 40
+ PhysDevExtTramp 41
+ PhysDevExtTramp 42
+ PhysDevExtTramp 43
+ PhysDevExtTramp 44
+ PhysDevExtTramp 45
+ PhysDevExtTramp 46
+ PhysDevExtTramp 47
+ PhysDevExtTramp 48
+ PhysDevExtTramp 49
+ PhysDevExtTramp 50
+ PhysDevExtTramp 51
+ PhysDevExtTramp 52
+ PhysDevExtTramp 53
+ PhysDevExtTramp 54
+ PhysDevExtTramp 55
+ PhysDevExtTramp 56
+ PhysDevExtTramp 57
+ PhysDevExtTramp 58
+ PhysDevExtTramp 59
+ PhysDevExtTramp 60
+ PhysDevExtTramp 61
+ PhysDevExtTramp 62
+ PhysDevExtTramp 63
+ PhysDevExtTramp 64
+ PhysDevExtTramp 65
+ PhysDevExtTramp 66
+ PhysDevExtTramp 67
+ PhysDevExtTramp 68
+ PhysDevExtTramp 69
+ PhysDevExtTramp 70
+ PhysDevExtTramp 71
+ PhysDevExtTramp 72
+ PhysDevExtTramp 73
+ PhysDevExtTramp 74
+ PhysDevExtTramp 75
+ PhysDevExtTramp 76
+ PhysDevExtTramp 77
+ PhysDevExtTramp 78
+ PhysDevExtTramp 79
+ PhysDevExtTramp 80
+ PhysDevExtTramp 81
+ PhysDevExtTramp 82
+ PhysDevExtTramp 83
+ PhysDevExtTramp 84
+ PhysDevExtTramp 85
+ PhysDevExtTramp 86
+ PhysDevExtTramp 87
+ PhysDevExtTramp 88
+ PhysDevExtTramp 89
+ PhysDevExtTramp 90
+ PhysDevExtTramp 91
+ PhysDevExtTramp 92
+ PhysDevExtTramp 93
+ PhysDevExtTramp 94
+ PhysDevExtTramp 95
+ PhysDevExtTramp 96
+ PhysDevExtTramp 97
+ PhysDevExtTramp 98
+ PhysDevExtTramp 99
+ PhysDevExtTramp 100
+ PhysDevExtTramp 101
+ PhysDevExtTramp 102
+ PhysDevExtTramp 103
+ PhysDevExtTramp 104
+ PhysDevExtTramp 105
+ PhysDevExtTramp 106
+ PhysDevExtTramp 107
+ PhysDevExtTramp 108
+ PhysDevExtTramp 109
+ PhysDevExtTramp 110
+ PhysDevExtTramp 111
+ PhysDevExtTramp 112
+ PhysDevExtTramp 113
+ PhysDevExtTramp 114
+ PhysDevExtTramp 115
+ PhysDevExtTramp 116
+ PhysDevExtTramp 117
+ PhysDevExtTramp 118
+ PhysDevExtTramp 119
+ PhysDevExtTramp 120
+ PhysDevExtTramp 121
+ PhysDevExtTramp 122
+ PhysDevExtTramp 123
+ PhysDevExtTramp 124
+ PhysDevExtTramp 125
+ PhysDevExtTramp 126
+ PhysDevExtTramp 127
+ PhysDevExtTramp 128
+ PhysDevExtTramp 129
+ PhysDevExtTramp 130
+ PhysDevExtTramp 131
+ PhysDevExtTramp 132
+ PhysDevExtTramp 133
+ PhysDevExtTramp 134
+ PhysDevExtTramp 135
+ PhysDevExtTramp 136
+ PhysDevExtTramp 137
+ PhysDevExtTramp 138
+ PhysDevExtTramp 139
+ PhysDevExtTramp 140
+ PhysDevExtTramp 141
+ PhysDevExtTramp 142
+ PhysDevExtTramp 143
+ PhysDevExtTramp 144
+ PhysDevExtTramp 145
+ PhysDevExtTramp 146
+ PhysDevExtTramp 147
+ PhysDevExtTramp 148
+ PhysDevExtTramp 149
+ PhysDevExtTramp 150
+ PhysDevExtTramp 151
+ PhysDevExtTramp 152
+ PhysDevExtTramp 153
+ PhysDevExtTramp 154
+ PhysDevExtTramp 155
+ PhysDevExtTramp 156
+ PhysDevExtTramp 157
+ PhysDevExtTramp 158
+ PhysDevExtTramp 159
+ PhysDevExtTramp 160
+ PhysDevExtTramp 161
+ PhysDevExtTramp 162
+ PhysDevExtTramp 163
+ PhysDevExtTramp 164
+ PhysDevExtTramp 165
+ PhysDevExtTramp 166
+ PhysDevExtTramp 167
+ PhysDevExtTramp 168
+ PhysDevExtTramp 169
+ PhysDevExtTramp 170
+ PhysDevExtTramp 171
+ PhysDevExtTramp 172
+ PhysDevExtTramp 173
+ PhysDevExtTramp 174
+ PhysDevExtTramp 175
+ PhysDevExtTramp 176
+ PhysDevExtTramp 177
+ PhysDevExtTramp 178
+ PhysDevExtTramp 179
+ PhysDevExtTramp 180
+ PhysDevExtTramp 181
+ PhysDevExtTramp 182
+ PhysDevExtTramp 183
+ PhysDevExtTramp 184
+ PhysDevExtTramp 185
+ PhysDevExtTramp 186
+ PhysDevExtTramp 187
+ PhysDevExtTramp 188
+ PhysDevExtTramp 189
+ PhysDevExtTramp 190
+ PhysDevExtTramp 191
+ PhysDevExtTramp 192
+ PhysDevExtTramp 193
+ PhysDevExtTramp 194
+ PhysDevExtTramp 195
+ PhysDevExtTramp 196
+ PhysDevExtTramp 197
+ PhysDevExtTramp 198
+ PhysDevExtTramp 199
+ PhysDevExtTramp 200
+ PhysDevExtTramp 201
+ PhysDevExtTramp 202
+ PhysDevExtTramp 203
+ PhysDevExtTramp 204
+ PhysDevExtTramp 205
+ PhysDevExtTramp 206
+ PhysDevExtTramp 207
+ PhysDevExtTramp 208
+ PhysDevExtTramp 209
+ PhysDevExtTramp 210
+ PhysDevExtTramp 211
+ PhysDevExtTramp 212
+ PhysDevExtTramp 213
+ PhysDevExtTramp 214
+ PhysDevExtTramp 215
+ PhysDevExtTramp 216
+ PhysDevExtTramp 217
+ PhysDevExtTramp 218
+ PhysDevExtTramp 219
+ PhysDevExtTramp 220
+ PhysDevExtTramp 221
+ PhysDevExtTramp 222
+ PhysDevExtTramp 223
+ PhysDevExtTramp 224
+ PhysDevExtTramp 225
+ PhysDevExtTramp 226
+ PhysDevExtTramp 227
+ PhysDevExtTramp 228
+ PhysDevExtTramp 229
+ PhysDevExtTramp 230
+ PhysDevExtTramp 231
+ PhysDevExtTramp 232
+ PhysDevExtTramp 233
+ PhysDevExtTramp 234
+ PhysDevExtTramp 235
+ PhysDevExtTramp 236
+ PhysDevExtTramp 237
+ PhysDevExtTramp 238
+ PhysDevExtTramp 239
+ PhysDevExtTramp 240
+ PhysDevExtTramp 241
+ PhysDevExtTramp 242
+ PhysDevExtTramp 243
+ PhysDevExtTramp 244
+ PhysDevExtTramp 245
+ PhysDevExtTramp 246
+ PhysDevExtTramp 247
+ PhysDevExtTramp 248
+ PhysDevExtTramp 249
+
+ PhysDevExtTermin 0
+ PhysDevExtTermin 1
+ PhysDevExtTermin 2
+ PhysDevExtTermin 3
+ PhysDevExtTermin 4
+ PhysDevExtTermin 5
+ PhysDevExtTermin 6
+ PhysDevExtTermin 7
+ PhysDevExtTermin 8
+ PhysDevExtTermin 9
+ PhysDevExtTermin 10
+ PhysDevExtTermin 11
+ PhysDevExtTermin 12
+ PhysDevExtTermin 13
+ PhysDevExtTermin 14
+ PhysDevExtTermin 15
+ PhysDevExtTermin 16
+ PhysDevExtTermin 17
+ PhysDevExtTermin 18
+ PhysDevExtTermin 19
+ PhysDevExtTermin 20
+ PhysDevExtTermin 21
+ PhysDevExtTermin 22
+ PhysDevExtTermin 23
+ PhysDevExtTermin 24
+ PhysDevExtTermin 25
+ PhysDevExtTermin 26
+ PhysDevExtTermin 27
+ PhysDevExtTermin 28
+ PhysDevExtTermin 29
+ PhysDevExtTermin 30
+ PhysDevExtTermin 31
+ PhysDevExtTermin 32
+ PhysDevExtTermin 33
+ PhysDevExtTermin 34
+ PhysDevExtTermin 35
+ PhysDevExtTermin 36
+ PhysDevExtTermin 37
+ PhysDevExtTermin 38
+ PhysDevExtTermin 39
+ PhysDevExtTermin 40
+ PhysDevExtTermin 41
+ PhysDevExtTermin 42
+ PhysDevExtTermin 43
+ PhysDevExtTermin 44
+ PhysDevExtTermin 45
+ PhysDevExtTermin 46
+ PhysDevExtTermin 47
+ PhysDevExtTermin 48
+ PhysDevExtTermin 49
+ PhysDevExtTermin 50
+ PhysDevExtTermin 51
+ PhysDevExtTermin 52
+ PhysDevExtTermin 53
+ PhysDevExtTermin 54
+ PhysDevExtTermin 55
+ PhysDevExtTermin 56
+ PhysDevExtTermin 57
+ PhysDevExtTermin 58
+ PhysDevExtTermin 59
+ PhysDevExtTermin 60
+ PhysDevExtTermin 61
+ PhysDevExtTermin 62
+ PhysDevExtTermin 63
+ PhysDevExtTermin 64
+ PhysDevExtTermin 65
+ PhysDevExtTermin 66
+ PhysDevExtTermin 67
+ PhysDevExtTermin 68
+ PhysDevExtTermin 69
+ PhysDevExtTermin 70
+ PhysDevExtTermin 71
+ PhysDevExtTermin 72
+ PhysDevExtTermin 73
+ PhysDevExtTermin 74
+ PhysDevExtTermin 75
+ PhysDevExtTermin 76
+ PhysDevExtTermin 77
+ PhysDevExtTermin 78
+ PhysDevExtTermin 79
+ PhysDevExtTermin 80
+ PhysDevExtTermin 81
+ PhysDevExtTermin 82
+ PhysDevExtTermin 83
+ PhysDevExtTermin 84
+ PhysDevExtTermin 85
+ PhysDevExtTermin 86
+ PhysDevExtTermin 87
+ PhysDevExtTermin 88
+ PhysDevExtTermin 89
+ PhysDevExtTermin 90
+ PhysDevExtTermin 91
+ PhysDevExtTermin 92
+ PhysDevExtTermin 93
+ PhysDevExtTermin 94
+ PhysDevExtTermin 95
+ PhysDevExtTermin 96
+ PhysDevExtTermin 97
+ PhysDevExtTermin 98
+ PhysDevExtTermin 99
+ PhysDevExtTermin 100
+ PhysDevExtTermin 101
+ PhysDevExtTermin 102
+ PhysDevExtTermin 103
+ PhysDevExtTermin 104
+ PhysDevExtTermin 105
+ PhysDevExtTermin 106
+ PhysDevExtTermin 107
+ PhysDevExtTermin 108
+ PhysDevExtTermin 109
+ PhysDevExtTermin 110
+ PhysDevExtTermin 111
+ PhysDevExtTermin 112
+ PhysDevExtTermin 113
+ PhysDevExtTermin 114
+ PhysDevExtTermin 115
+ PhysDevExtTermin 116
+ PhysDevExtTermin 117
+ PhysDevExtTermin 118
+ PhysDevExtTermin 119
+ PhysDevExtTermin 120
+ PhysDevExtTermin 121
+ PhysDevExtTermin 122
+ PhysDevExtTermin 123
+ PhysDevExtTermin 124
+ PhysDevExtTermin 125
+ PhysDevExtTermin 126
+ PhysDevExtTermin 127
+ PhysDevExtTermin 128
+ PhysDevExtTermin 129
+ PhysDevExtTermin 130
+ PhysDevExtTermin 131
+ PhysDevExtTermin 132
+ PhysDevExtTermin 133
+ PhysDevExtTermin 134
+ PhysDevExtTermin 135
+ PhysDevExtTermin 136
+ PhysDevExtTermin 137
+ PhysDevExtTermin 138
+ PhysDevExtTermin 139
+ PhysDevExtTermin 140
+ PhysDevExtTermin 141
+ PhysDevExtTermin 142
+ PhysDevExtTermin 143
+ PhysDevExtTermin 144
+ PhysDevExtTermin 145
+ PhysDevExtTermin 146
+ PhysDevExtTermin 147
+ PhysDevExtTermin 148
+ PhysDevExtTermin 149
+ PhysDevExtTermin 150
+ PhysDevExtTermin 151
+ PhysDevExtTermin 152
+ PhysDevExtTermin 153
+ PhysDevExtTermin 154
+ PhysDevExtTermin 155
+ PhysDevExtTermin 156
+ PhysDevExtTermin 157
+ PhysDevExtTermin 158
+ PhysDevExtTermin 159
+ PhysDevExtTermin 160
+ PhysDevExtTermin 161
+ PhysDevExtTermin 162
+ PhysDevExtTermin 163
+ PhysDevExtTermin 164
+ PhysDevExtTermin 165
+ PhysDevExtTermin 166
+ PhysDevExtTermin 167
+ PhysDevExtTermin 168
+ PhysDevExtTermin 169
+ PhysDevExtTermin 170
+ PhysDevExtTermin 171
+ PhysDevExtTermin 172
+ PhysDevExtTermin 173
+ PhysDevExtTermin 174
+ PhysDevExtTermin 175
+ PhysDevExtTermin 176
+ PhysDevExtTermin 177
+ PhysDevExtTermin 178
+ PhysDevExtTermin 179
+ PhysDevExtTermin 180
+ PhysDevExtTermin 181
+ PhysDevExtTermin 182
+ PhysDevExtTermin 183
+ PhysDevExtTermin 184
+ PhysDevExtTermin 185
+ PhysDevExtTermin 186
+ PhysDevExtTermin 187
+ PhysDevExtTermin 188
+ PhysDevExtTermin 189
+ PhysDevExtTermin 190
+ PhysDevExtTermin 191
+ PhysDevExtTermin 192
+ PhysDevExtTermin 193
+ PhysDevExtTermin 194
+ PhysDevExtTermin 195
+ PhysDevExtTermin 196
+ PhysDevExtTermin 197
+ PhysDevExtTermin 198
+ PhysDevExtTermin 199
+ PhysDevExtTermin 200
+ PhysDevExtTermin 201
+ PhysDevExtTermin 202
+ PhysDevExtTermin 203
+ PhysDevExtTermin 204
+ PhysDevExtTermin 205
+ PhysDevExtTermin 206
+ PhysDevExtTermin 207
+ PhysDevExtTermin 208
+ PhysDevExtTermin 209
+ PhysDevExtTermin 210
+ PhysDevExtTermin 211
+ PhysDevExtTermin 212
+ PhysDevExtTermin 213
+ PhysDevExtTermin 214
+ PhysDevExtTermin 215
+ PhysDevExtTermin 216
+ PhysDevExtTermin 217
+ PhysDevExtTermin 218
+ PhysDevExtTermin 219
+ PhysDevExtTermin 220
+ PhysDevExtTermin 221
+ PhysDevExtTermin 222
+ PhysDevExtTermin 223
+ PhysDevExtTermin 224
+ PhysDevExtTermin 225
+ PhysDevExtTermin 226
+ PhysDevExtTermin 227
+ PhysDevExtTermin 228
+ PhysDevExtTermin 229
+ PhysDevExtTermin 230
+ PhysDevExtTermin 231
+ PhysDevExtTermin 232
+ PhysDevExtTermin 233
+ PhysDevExtTermin 234
+ PhysDevExtTermin 235
+ PhysDevExtTermin 236
+ PhysDevExtTermin 237
+ PhysDevExtTermin 238
+ PhysDevExtTermin 239
+ PhysDevExtTermin 240
+ PhysDevExtTermin 241
+ PhysDevExtTermin 242
+ PhysDevExtTermin 243
+ PhysDevExtTermin 244
+ PhysDevExtTermin 245
+ PhysDevExtTermin 246
+ PhysDevExtTermin 247
+ PhysDevExtTermin 248
+ PhysDevExtTermin 249
+
+ DevExtTramp 0
+ DevExtTramp 1
+ DevExtTramp 2
+ DevExtTramp 3
+ DevExtTramp 4
+ DevExtTramp 5
+ DevExtTramp 6
+ DevExtTramp 7
+ DevExtTramp 8
+ DevExtTramp 9
+ DevExtTramp 10
+ DevExtTramp 11
+ DevExtTramp 12
+ DevExtTramp 13
+ DevExtTramp 14
+ DevExtTramp 15
+ DevExtTramp 16
+ DevExtTramp 17
+ DevExtTramp 18
+ DevExtTramp 19
+ DevExtTramp 20
+ DevExtTramp 21
+ DevExtTramp 22
+ DevExtTramp 23
+ DevExtTramp 24
+ DevExtTramp 25
+ DevExtTramp 26
+ DevExtTramp 27
+ DevExtTramp 28
+ DevExtTramp 29
+ DevExtTramp 30
+ DevExtTramp 31
+ DevExtTramp 32
+ DevExtTramp 33
+ DevExtTramp 34
+ DevExtTramp 35
+ DevExtTramp 36
+ DevExtTramp 37
+ DevExtTramp 38
+ DevExtTramp 39
+ DevExtTramp 40
+ DevExtTramp 41
+ DevExtTramp 42
+ DevExtTramp 43
+ DevExtTramp 44
+ DevExtTramp 45
+ DevExtTramp 46
+ DevExtTramp 47
+ DevExtTramp 48
+ DevExtTramp 49
+ DevExtTramp 50
+ DevExtTramp 51
+ DevExtTramp 52
+ DevExtTramp 53
+ DevExtTramp 54
+ DevExtTramp 55
+ DevExtTramp 56
+ DevExtTramp 57
+ DevExtTramp 58
+ DevExtTramp 59
+ DevExtTramp 60
+ DevExtTramp 61
+ DevExtTramp 62
+ DevExtTramp 63
+ DevExtTramp 64
+ DevExtTramp 65
+ DevExtTramp 66
+ DevExtTramp 67
+ DevExtTramp 68
+ DevExtTramp 69
+ DevExtTramp 70
+ DevExtTramp 71
+ DevExtTramp 72
+ DevExtTramp 73
+ DevExtTramp 74
+ DevExtTramp 75
+ DevExtTramp 76
+ DevExtTramp 77
+ DevExtTramp 78
+ DevExtTramp 79
+ DevExtTramp 80
+ DevExtTramp 81
+ DevExtTramp 82
+ DevExtTramp 83
+ DevExtTramp 84
+ DevExtTramp 85
+ DevExtTramp 86
+ DevExtTramp 87
+ DevExtTramp 88
+ DevExtTramp 89
+ DevExtTramp 90
+ DevExtTramp 91
+ DevExtTramp 92
+ DevExtTramp 93
+ DevExtTramp 94
+ DevExtTramp 95
+ DevExtTramp 96
+ DevExtTramp 97
+ DevExtTramp 98
+ DevExtTramp 99
+ DevExtTramp 100
+ DevExtTramp 101
+ DevExtTramp 102
+ DevExtTramp 103
+ DevExtTramp 104
+ DevExtTramp 105
+ DevExtTramp 106
+ DevExtTramp 107
+ DevExtTramp 108
+ DevExtTramp 109
+ DevExtTramp 110
+ DevExtTramp 111
+ DevExtTramp 112
+ DevExtTramp 113
+ DevExtTramp 114
+ DevExtTramp 115
+ DevExtTramp 116
+ DevExtTramp 117
+ DevExtTramp 118
+ DevExtTramp 119
+ DevExtTramp 120
+ DevExtTramp 121
+ DevExtTramp 122
+ DevExtTramp 123
+ DevExtTramp 124
+ DevExtTramp 125
+ DevExtTramp 126
+ DevExtTramp 127
+ DevExtTramp 128
+ DevExtTramp 129
+ DevExtTramp 130
+ DevExtTramp 131
+ DevExtTramp 132
+ DevExtTramp 133
+ DevExtTramp 134
+ DevExtTramp 135
+ DevExtTramp 136
+ DevExtTramp 137
+ DevExtTramp 138
+ DevExtTramp 139
+ DevExtTramp 140
+ DevExtTramp 141
+ DevExtTramp 142
+ DevExtTramp 143
+ DevExtTramp 144
+ DevExtTramp 145
+ DevExtTramp 146
+ DevExtTramp 147
+ DevExtTramp 148
+ DevExtTramp 149
+ DevExtTramp 150
+ DevExtTramp 151
+ DevExtTramp 152
+ DevExtTramp 153
+ DevExtTramp 154
+ DevExtTramp 155
+ DevExtTramp 156
+ DevExtTramp 157
+ DevExtTramp 158
+ DevExtTramp 159
+ DevExtTramp 160
+ DevExtTramp 161
+ DevExtTramp 162
+ DevExtTramp 163
+ DevExtTramp 164
+ DevExtTramp 165
+ DevExtTramp 166
+ DevExtTramp 167
+ DevExtTramp 168
+ DevExtTramp 169
+ DevExtTramp 170
+ DevExtTramp 171
+ DevExtTramp 172
+ DevExtTramp 173
+ DevExtTramp 174
+ DevExtTramp 175
+ DevExtTramp 176
+ DevExtTramp 177
+ DevExtTramp 178
+ DevExtTramp 179
+ DevExtTramp 180
+ DevExtTramp 181
+ DevExtTramp 182
+ DevExtTramp 183
+ DevExtTramp 184
+ DevExtTramp 185
+ DevExtTramp 186
+ DevExtTramp 187
+ DevExtTramp 188
+ DevExtTramp 189
+ DevExtTramp 190
+ DevExtTramp 191
+ DevExtTramp 192
+ DevExtTramp 193
+ DevExtTramp 194
+ DevExtTramp 195
+ DevExtTramp 196
+ DevExtTramp 197
+ DevExtTramp 198
+ DevExtTramp 199
+ DevExtTramp 200
+ DevExtTramp 201
+ DevExtTramp 202
+ DevExtTramp 203
+ DevExtTramp 204
+ DevExtTramp 205
+ DevExtTramp 206
+ DevExtTramp 207
+ DevExtTramp 208
+ DevExtTramp 209
+ DevExtTramp 210
+ DevExtTramp 211
+ DevExtTramp 212
+ DevExtTramp 213
+ DevExtTramp 214
+ DevExtTramp 215
+ DevExtTramp 216
+ DevExtTramp 217
+ DevExtTramp 218
+ DevExtTramp 219
+ DevExtTramp 220
+ DevExtTramp 221
+ DevExtTramp 222
+ DevExtTramp 223
+ DevExtTramp 224
+ DevExtTramp 225
+ DevExtTramp 226
+ DevExtTramp 227
+ DevExtTramp 228
+ DevExtTramp 229
+ DevExtTramp 230
+ DevExtTramp 231
+ DevExtTramp 232
+ DevExtTramp 233
+ DevExtTramp 234
+ DevExtTramp 235
+ DevExtTramp 236
+ DevExtTramp 237
+ DevExtTramp 238
+ DevExtTramp 239
+ DevExtTramp 240
+ DevExtTramp 241
+ DevExtTramp 242
+ DevExtTramp 243
+ DevExtTramp 244
+ DevExtTramp 245
+ DevExtTramp 246
+ DevExtTramp 247
+ DevExtTramp 248
+ DevExtTramp 249
+
+ END
math(EXPR bitness "8 * ${CMAKE_SIZEOF_VOID_P}")
set(UPDATE_DEPS_DIR_SUFFIX "${UPDATE_DEPS_DIR_SUFFIX}/${bitness}")
endif()
- endif()
+ endif()
set(UPDATE_DEPS_DIR "${PROJECT_SOURCE_DIR}/external/${UPDATE_DEPS_DIR_SUFFIX}" CACHE PATH "Location where update_deps.py installs packages")
list(APPEND update_dep_command "--dir" )
list(APPEND update_dep_command "${UPDATE_DEPS_DIR}")
set(CMAKE_REQUIRE_FIND_PACKAGE_VulkanHeaders TRUE PARENT_SCOPE)
endif()
+set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
+
if (CMAKE_CROSSCOMPILING)
set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
-else()
- set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
endif()
destination_file = sys.argv[1]
# The location the build system puts the intermediate asm file which depends on the compiler
source_asm_file = sys.argv[2]
-# Whether we are using "MASM" or "GAS" for the assembler
+# Whether we are using "MASM", "MARMASM" or "GAS" for the assembler
assembler_type = sys.argv[3]
# Whether we are using gcc, clang, or msvc
compiler = sys.argv[4]
# taken from CMAKE_SYSTEM_PROCESSOR - x86_64, aarch64|arm64, x86, aarch32|armhf
-# Only used with GAS - MASM doesn't need this, as it has its own way to determine x86 vs x64
+# Only used with GAS/MARMASM - MASM doesn't need this, as it has its own way to determine x86 vs x64
arch = sys.argv[5]
POSIX_COMPILERS = ["GNU", "Clang", "AppleClang"]
sys.exit(1)
with open(destination_file, "w", encoding="utf-8") as dest:
+ # special case vulkan error bit due to it not appearing in the asm - its defined in the header as 8 so it shouldn't change
if assembler_type == "MASM":
- # special case vulkan error bit due to it not appearing in the asm - its defined in the header as 8 so it shouldn't change
dest.write("VULKAN_LOADER_ERROR_BIT equ 8;\n")
+ elif assembler_type == 'MARMASM':
+ dest.write(' AREA loader_structs_details, DATA,READONLY\n')
+ if arch == "aarch64" or arch == "arm64":
+ dest.write("AARCH_64 EQU 1\n")
+ elif arch in ["aarch32", "armhf", "arm"]:
+ dest.write("AARCH_64 EQU 0\n")
+ else:
+ print('The parameter "arch" has value of ', arch, ' which is not recognized')
+ dest.write("VULKAN_LOADER_ERROR_BIT EQU 8\n")
elif assembler_type == "GAS":
# let the assembler know which platform to use
if arch == "x86_64":
dest.write(".set X86_64, 1\n")
elif arch == "aarch64" or arch == "arm64":
dest.write(".set AARCH_64, 1\n")
- elif arch == "aarch32" or arch == "armhf":
+ elif arch in ["aarch32", "armhf", "arm"]:
dest.write(".set AARCH_64, 0\n")
+ else:
+ print('The parameter "arch" has value of ', arch, ' which is not recognized')
# Nothing to write in the x86 case
for d in defines:
if compiler == "MSVC":
if d == "VULKAN_LOADER_ERROR_BIT":
continue # skip due to special case
- match = re.search(d + " DD [ ]*([0-9a-f]+)H", asm_intermediate_file)
+ if 'arm' in arch.lower():
+ match = re.search('\\|'+ d + '\\| DCD[\t ]*0x([0-9a-f]+)', asm_intermediate_file)
+ else:
+ match = re.search(d + " DD [ ]*([0-9a-f]+)H", asm_intermediate_file)
elif compiler in POSIX_COMPILERS:
match = re.search(d + " = ([0-9]+)", asm_intermediate_file)
- if match:
+ if len(match.groups()) > 0:
if compiler == "MSVC":
value = str(int(match.group(1), 16))
elif compiler in POSIX_COMPILERS:
value = match.group(1)
- if assembler_type == "MASM":
+
# MASM uses hex values, decode them here
+ if assembler_type == "MASM":
dest.write(d + " equ " + value +";\n")
+ elif assembler_type == 'MARMASM':
+ dest.write(d + ' EQU ' + value +'\n')
elif assembler_type == "GAS":
dest.write(".set " + d + ", " + value + "\n")
else:
print("Couldn't find ", d)
sys.exit(1)
+ if assembler_type == 'MARMASM':
+ dest.write(" END\n")
endif()
if (MSVC)
-# silence hidden class member warnings in test framework
+ # silence hidden class member warnings in test framework
target_compile_options(testing_framework_util PUBLIC /wd4458)
+ # Make sure exception handling is enabled for the test framework
+ target_compile_options(testing_framework_util PUBLIC /EHsc)
endif()
function(AddSharedLibrary LIBRARY_NAME)