blob: 5183e307ef85fc6a20f86445c74002c68822b9c0 (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
//
// Copyright (c) Microsoft. All rights reserved.
// Copyright (c) Geoff Norton. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
.intel_syntax noprefix
#include "unixasmmacros.inc"
#include "asmconstants.h"
// JIT_MemSet/JIT_MemCpy
//
// It is IMPORANT that the exception handling code is able to find these guys
// on the stack, but on non-windows platforms we can just defer to the platform
// implementation.
//
LEAF_ENTRY JIT_MemSet, _TEXT
test rdx, rdx
jz Exit_MemSet
cmp byte ptr [rdi], 0
jmp C_PLTFUNC(memset)
Exit_MemSet:
ret
LEAF_END_MARKED JIT_MemSet, _TEXT
LEAF_ENTRY JIT_MemCpy, _TEXT
test rdx, rdx
jz Exit_MemCpy
cmp byte ptr [rdi], 0
cmp byte ptr [rsi], 0
jmp C_PLTFUNC(memcpy)
Exit_MemCpy:
ret
LEAF_END_MARKED JIT_MemCpy, _TEXT
|