summaryrefslogtreecommitdiff
path: root/src/vm/arm64/crthelpers.S
blob: c0317edf579978c59c48378ca56816830b0b5db5 (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
// 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 "unixasmmacros.inc"

// JIT_MemSet/JIT_MemCpy
//
// It is IMPORTANT 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
    cbz x2, LOCAL_LABEL(JIT_MemSet_ret)

    strb w1, [x0]

    b C_PLTFUNC(memset)

LOCAL_LABEL(JIT_MemSet_ret):
    ret         lr
LEAF_END_MARKED JIT_MemSet, _TEXT

LEAF_ENTRY JIT_MemCpy, _TEXT
    cbz x2, LOCAL_LABEL(JIT_MemCpy_ret)

    strb wzr, [x0]
    ldrb wzr, [x1]

    b C_PLTFUNC(memcpy)

LOCAL_LABEL(JIT_MemCpy_ret):
    ret         lr
LEAF_END_MARKED JIT_MemCpy, _TEXT