asm_support_arm.S revision 5c1e4352614d61fed6868567e58b96682828cb4d
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_X86_ASM_SUPPORT_X86_S_
18#define ART_RUNTIME_ARCH_X86_ASM_SUPPORT_X86_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.cfi_sections   .debug_frame
30.syntax unified
31.arch armv7-a
32.thumb
33
34.macro ENTRY name
35    .thumb_func
36    .type \name, #function
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    .global \name
49    /* Cache alignment for function entry */
50    .balign 16
51\name:
52    .cfi_startproc
53     /* Ensure we get a sane starting CFA. */
54    .cfi_def_cfa sp,0
55    .fnstart
56.endm
57
58.macro END name
59    .fnend
60    .cfi_endproc
61    .size \name, .-\name
62.endm
63
64.macro UNIMPLEMENTED name
65    ENTRY \name
66    bkpt
67    bkpt
68    END \name
69.endm
70
71#endif  // ART_RUNTIME_ARCH_X86_ASM_SUPPORT_X86_S_
72