asm_support_arm.S revision 6f3dbbadf4ce66982eb3d400e0a74cb73eb034f3
1/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ART_RUNTIME_ARCH_ARM_ASM_SUPPORT_ARM_S_
18#define ART_RUNTIME_ARCH_ARM_ASM_SUPPORT_ARM_S_
19
20#include "asm_support_arm.h"
21
22// Define special registers.
23
24// Register holding suspend check count down.
25#define rSUSPEND r4
26// Register holding Thread::Current().
27#define rSELF r9
28
29.syntax unified
30.arch armv7-a
31.thumb
32
33.macro ENTRY name
34    .thumb_func
35    .type \name, #function
36    .hidden \name  // Hide this as a global symbol, so we do not incur plt calls.
37    .global \name
38    /* Cache alignment for function entry */
39    .balign 16
40\name:
41    .cfi_startproc
42    .fnstart
43.endm
44
45.macro ARM_ENTRY name
46    .arm
47    .type \name, #function
48    .hidden \name  // Hide this as a global symbol, so we do not incur plt calls.
49    .global \name
50    /* Cache alignment for function entry */
51    .balign 16
52\name:
53    .cfi_startproc
54     /* Ensure we get a sane starting CFA. */
55    .cfi_def_cfa sp,0
56    .fnstart
57.endm
58
59.macro END name
60    .fnend
61    .cfi_endproc
62    .size \name, .-\name
63.endm
64
65.macro UNIMPLEMENTED name
66    ENTRY \name
67    bkpt
68    bkpt
69    END \name
70.endm
71
72#endif  // ART_RUNTIME_ARCH_X86_ASM_SUPPORT_X86_S_
73