mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-19 21:32:23 +00:00
Add __x86.get_pc_thunk.bx to avoid dependency (#9955)
This commit is contained in:
parent
a7f649db7c
commit
f60a287a64
2 changed files with 44 additions and 0 deletions
|
|
@ -355,6 +355,16 @@ else()
|
|||
${mlas_platform_srcs_sse2}
|
||||
${mlas_platform_srcs_avx}
|
||||
)
|
||||
|
||||
# In r23, NDK remove __x86.get_pc_thunk.* from libatomic. Add our own
|
||||
# implementation to avoid external dependency.
|
||||
if(ANDROID)
|
||||
set(mlas_platform_srcs
|
||||
${mlas_platform_srcs}
|
||||
${MLAS_SRC_DIR}/x86/x86.get_pc_thunk.S
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT ONNXRUNTIME_MLAS_MULTI_ARCH)
|
||||
set(MLAS_SOURCE_IS_NOT_SET 0)
|
||||
endif()
|
||||
|
|
|
|||
34
onnxruntime/core/mlas/lib/x86/x86.get_pc_thunk.S
Normal file
34
onnxruntime/core/mlas/lib/x86/x86.get_pc_thunk.S
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Licensed under the MIT License.
|
||||
|
||||
Module Name:
|
||||
|
||||
x86.get_pc_thunk.S
|
||||
|
||||
Abstract:
|
||||
|
||||
This module implements __x86.get_pc_thunk.* to avoid external dependency.
|
||||
|
||||
--*/
|
||||
|
||||
|
||||
#include "asmmacro.h"
|
||||
|
||||
.intel_syntax noprefix
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
The routine loads its return address -- which is the address of the
|
||||
instruction that immediately follows -- into the ebx register.
|
||||
|
||||
--*/
|
||||
|
||||
FUNCTION_ENTRY __x86.get_pc_thunk.bx
|
||||
|
||||
mov ebx, [esp]
|
||||
ret
|
||||
Loading…
Reference in a new issue