blob: ddcd12e0dc00c30b7b6fa6f6ff4c34adb5afc2d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
;; Licensed to the .NET Foundation under one or more agreements.
;; The .NET Foundation licenses this file to you under the MIT license.
;; See the LICENSE file in the project root for more information.
include AsmMacros.inc
;; WARNING: Code in EHHelpers.cpp makes assumptions about this helper, in particular:
;; - Function "InWriteBarrierHelper" assumes an AV due to passed in null pointer will happen at RhpLockCmpXchg32AVLocation
;; - Function "UnwindWriteBarrierToCaller" assumes the stack contains just the pushed return address
LEAF_ENTRY RhpLockCmpXchg32, _TEXT
mov rax, r8
ALTERNATE_ENTRY RhpLockCmpXchg32AVLocation
lock cmpxchg [rcx], edx
ret
LEAF_END RhpLockCmpXchg32, _TEXT
;; WARNING: Code in EHHelpers.cpp makes assumptions about this helper, in particular:
;; - Function "InWriteBarrierHelper" assumes an AV due to passed in null pointer will happen at RhpLockCmpXchg64AVLocation
;; - Function "UnwindWriteBarrierToCaller" assumes the stack contains just the pushed return address
LEAF_ENTRY RhpLockCmpXchg64, _TEXT
mov rax, r8
ALTERNATE_ENTRY RhpLockCmpXchg64AVLocation
lock cmpxchg [rcx], rdx
ret
LEAF_END RhpLockCmpXchg64, _TEXT
end
|