|
@@ -1,5 +1,6 @@
|
|
|
//-------------------------------------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------------------------------------
|
|
|
// Copyright (C) Microsoft. All rights reserved.
|
|
// Copyright (C) Microsoft. All rights reserved.
|
|
|
|
|
+// Copyright (c) ChakraCore Project Contributors. All rights reserved.
|
|
|
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
|
|
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
|
|
|
//-------------------------------------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------------------------------------
|
|
|
#pragma once
|
|
#pragma once
|
|
@@ -388,6 +389,18 @@ typedef union _SLIST_HEADER {
|
|
|
} DUMMYSTRUCTNAME;
|
|
} DUMMYSTRUCTNAME;
|
|
|
} SLIST_HEADER, *PSLIST_HEADER;
|
|
} SLIST_HEADER, *PSLIST_HEADER;
|
|
|
|
|
|
|
|
|
|
+#elif defined(_ARM64_)
|
|
|
|
|
+
|
|
|
|
|
+typedef union _SLIST_HEADER {
|
|
|
|
|
+ ULONGLONG Alignment;
|
|
|
|
|
+ struct {
|
|
|
|
|
+ SLIST_ENTRY Next;
|
|
|
|
|
+ WORD Depth;
|
|
|
|
|
+ WORD Reserved;
|
|
|
|
|
+ } DUMMYSTRUCTNAME;
|
|
|
|
|
+} SLIST_HEADER, *PSLIST_HEADER;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
PALIMPORT VOID PALAPI InitializeSListHead(IN OUT PSLIST_HEADER ListHead);
|
|
PALIMPORT VOID PALAPI InitializeSListHead(IN OUT PSLIST_HEADER ListHead);
|
|
@@ -663,7 +676,7 @@ namespace PlatformAgnostic
|
|
|
{
|
|
{
|
|
|
__forceinline unsigned char _BitTestAndSet(LONG *_BitBase, int _BitPos)
|
|
__forceinline unsigned char _BitTestAndSet(LONG *_BitBase, int _BitPos)
|
|
|
{
|
|
{
|
|
|
-#if defined(__clang__) && !defined(_ARM_)
|
|
|
|
|
|
|
+#if defined(__clang__) && !defined(_ARM_) && !defined(_ARM64_)
|
|
|
// Clang doesn't expand _bittestandset intrinic to bts, and it's implemention also doesn't work for _BitPos >= 32
|
|
// Clang doesn't expand _bittestandset intrinic to bts, and it's implemention also doesn't work for _BitPos >= 32
|
|
|
unsigned char retval = 0;
|
|
unsigned char retval = 0;
|
|
|
asm(
|
|
asm(
|
|
@@ -681,7 +694,7 @@ namespace PlatformAgnostic
|
|
|
|
|
|
|
|
__forceinline unsigned char _BitTest(LONG *_BitBase, int _BitPos)
|
|
__forceinline unsigned char _BitTest(LONG *_BitBase, int _BitPos)
|
|
|
{
|
|
{
|
|
|
-#if defined(__clang__) && !defined(_ARM_)
|
|
|
|
|
|
|
+#if defined(__clang__) && !defined(_ARM_) && !defined(_ARM64_)
|
|
|
// Clang doesn't expand _bittest intrinic to bt, and it's implemention also doesn't work for _BitPos >= 32
|
|
// Clang doesn't expand _bittest intrinic to bt, and it's implemention also doesn't work for _BitPos >= 32
|
|
|
unsigned char retval;
|
|
unsigned char retval;
|
|
|
asm(
|
|
asm(
|
|
@@ -699,7 +712,7 @@ namespace PlatformAgnostic
|
|
|
|
|
|
|
|
__forceinline unsigned char _InterlockedBitTestAndSet(volatile LONG *_BitBase, int _BitPos)
|
|
__forceinline unsigned char _InterlockedBitTestAndSet(volatile LONG *_BitBase, int _BitPos)
|
|
|
{
|
|
{
|
|
|
-#if defined(__clang__) && !defined(_ARM_)
|
|
|
|
|
|
|
+#if defined(__clang__) && !defined(_ARM_) && !defined(_ARM64_)
|
|
|
// Clang doesn't expand _interlockedbittestandset intrinic to lock bts, and it's implemention also doesn't work for _BitPos >= 32
|
|
// Clang doesn't expand _interlockedbittestandset intrinic to lock bts, and it's implemention also doesn't work for _BitPos >= 32
|
|
|
unsigned char retval;
|
|
unsigned char retval;
|
|
|
asm(
|
|
asm(
|
|
@@ -717,7 +730,7 @@ namespace PlatformAgnostic
|
|
|
|
|
|
|
|
__forceinline unsigned char _InterlockedBitTestAndReset(volatile LONG *_BitBase, int _BitPos)
|
|
__forceinline unsigned char _InterlockedBitTestAndReset(volatile LONG *_BitBase, int _BitPos)
|
|
|
{
|
|
{
|
|
|
-#if defined(__clang__) && !defined(_ARM_)
|
|
|
|
|
|
|
+#if defined(__clang__) && !defined(_ARM_) && !defined(_ARM64_)
|
|
|
// Clang doesn't expand _interlockedbittestandset intrinic to lock btr, and it's implemention also doesn't work for _BitPos >= 32
|
|
// Clang doesn't expand _interlockedbittestandset intrinic to lock btr, and it's implemention also doesn't work for _BitPos >= 32
|
|
|
unsigned char retval;
|
|
unsigned char retval;
|
|
|
asm(
|
|
asm(
|