mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:56:05 +00:00
[UCRT] Add "aliases" for some hacked clang builtins
This commit is contained in:
parent
d74ab36324
commit
efe84ec41a
2 changed files with 39 additions and 0 deletions
32
sdk/lib/ucrt/stdlib/clang-hacks.s
Normal file
32
sdk/lib/ucrt/stdlib/clang-hacks.s
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
|
||||||
|
#include <asm.inc>
|
||||||
|
|
||||||
|
#ifdef _M_IX86
|
||||||
|
.code
|
||||||
|
#define SYM(name) _##name
|
||||||
|
#else
|
||||||
|
.code64
|
||||||
|
#define SYM(name) name
|
||||||
|
#endif
|
||||||
|
|
||||||
|
MACRO(CREATE_ALIAS, alias, target)
|
||||||
|
EXTERN SYM(&target):PROC
|
||||||
|
PUBLIC SYM(&alias)
|
||||||
|
SYM(&alias):
|
||||||
|
jmp SYM(&target)
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
#undef _lrotl
|
||||||
|
CREATE_ALIAS _lrotl, ___lrotl
|
||||||
|
#undef _lrotr
|
||||||
|
CREATE_ALIAS _lrotr, ___lrotr
|
||||||
|
#undef _rotl
|
||||||
|
CREATE_ALIAS _rotl, ___rotl
|
||||||
|
#undef _rotl64
|
||||||
|
CREATE_ALIAS _rotl64, ___rotl64
|
||||||
|
#undef _rotr
|
||||||
|
CREATE_ALIAS _rotr, ___rotr
|
||||||
|
#undef _rotr64
|
||||||
|
CREATE_ALIAS _rotr64, ___rotr64
|
||||||
|
|
||||||
|
END
|
|
@ -22,3 +22,10 @@ list(APPEND UCRT_STDLIB_SOURCES
|
||||||
stdlib/rotl.cpp
|
stdlib/rotl.cpp
|
||||||
stdlib/rotr.cpp
|
stdlib/rotr.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
|
add_asm_files(UCRT_STRING_ASM stdlib/clang-hacks.s)
|
||||||
|
list(APPEND UCRT_STDLIB_SOURCES
|
||||||
|
${UCRT_STRING_ASM}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue