blob: c4f68afbb6088e50d9e5186e22bd6cfa4320cde5 [file] [log] [blame]
Ian Rogers7655f292013-07-29 11:07:13 -07001/*
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
Andreas Gampe5c1e4352014-04-21 19:28:24 -070022// 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
Ian Rogers637859c2013-08-27 14:35:54 -070029.syntax unified
30.arch armv7-a
31.thumb
32
Ian Rogers7655f292013-07-29 11:07:13 -070033.macro ENTRY name
Ian Rogers637859c2013-08-27 14:35:54 -070034 .thumb_func
35 .type \name, #function
36 .global \name
37 /* Cache alignment for function entry */
38 .balign 16
39\name:
40 .cfi_startproc
41 .fnstart
42.endm
43
44.macro ARM_ENTRY name
45 .arm
Ian Rogers7655f292013-07-29 11:07:13 -070046 .type \name, #function
47 .global \name
48 /* Cache alignment for function entry */
49 .balign 16
50\name:
Ian Rogersc6651292014-03-11 16:29:07 -070051 .cfi_startproc
52 /* Ensure we get a sane starting CFA. */
53 .cfi_def_cfa sp,0
Ian Rogers7655f292013-07-29 11:07:13 -070054 .fnstart
55.endm
56
57.macro END name
58 .fnend
59 .cfi_endproc
60 .size \name, .-\name
61.endm
62
Ian Rogers468532e2013-08-05 10:56:33 -070063.macro UNIMPLEMENTED name
64 ENTRY \name
65 bkpt
66 bkpt
67 END \name
68.endm
69
Ian Rogers7655f292013-07-29 11:07:13 -070070#endif // ART_RUNTIME_ARCH_X86_ASM_SUPPORT_X86_S_