12f6eb699f
ClobberAndCall was using an incorrect register for the first parameter on Windows (rdx instead of rcx). This caused crashes on vm-kernel-precomp-win-release-x64 bot after landing unrelated change (https://dart-review.googlesource.com/c/sdk/+/127381). Change-Id: I5a150ecc743abdb3e00c8afd0d1dd851b777f2e9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128009 Reviewed-by: Daco Harkes <dacoharkes@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
42 lines
606 B
ArmAsm
42 lines
606 B
ArmAsm
.code
|
|
|
|
ClobberAndCall proc
|
|
|
|
;; Clobber some significant registers and call the nullary function which is
|
|
;; passed in as the first argument.
|
|
|
|
;; Pool pointer register.
|
|
push r15
|
|
mov r15, 1
|
|
|
|
;; Thread register.
|
|
push r14
|
|
mov r14, 1
|
|
|
|
;; Code register.
|
|
push r12
|
|
mov r12, 1
|
|
|
|
;; Arguments descriptor register (volatile).
|
|
mov r10, 1
|
|
|
|
;; Clobber all other volatile registers (except the argument).
|
|
mov rax, 1
|
|
mov rdx, 1
|
|
mov r8, 1
|
|
mov r9, 1
|
|
mov r11, 1
|
|
|
|
;; Stack must be 16-byte aligned before the call. We save three registers above
|
|
;; to ensure this.
|
|
call rcx
|
|
|
|
pop r12
|
|
pop r14
|
|
pop r15
|
|
|
|
ret
|
|
ClobberAndCall endp
|
|
|
|
end
|