Ian Rogers | 7655f29 | 2013-07-29 11:07:13 -0700 | [diff] [blame] | 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 | |
Andreas Gampe | 5c1e435 | 2014-04-21 19:28:24 -0700 | [diff] [blame] | 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 | |
Ian Rogers | 637859c | 2013-08-27 14:35:54 -0700 | [diff] [blame] | 29 | .syntax unified |
| 30 | .arch armv7-a |
| 31 | .thumb |
| 32 | |
Ian Rogers | 7655f29 | 2013-07-29 11:07:13 -0700 | [diff] [blame] | 33 | .macro ENTRY name |
Ian Rogers | 637859c | 2013-08-27 14:35:54 -0700 | [diff] [blame] | 34 | .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 Rogers | 7655f29 | 2013-07-29 11:07:13 -0700 | [diff] [blame] | 46 | .type \name, #function |
| 47 | .global \name |
| 48 | /* Cache alignment for function entry */ |
| 49 | .balign 16 |
| 50 | \name: |
Ian Rogers | c665129 | 2014-03-11 16:29:07 -0700 | [diff] [blame] | 51 | .cfi_startproc |
| 52 | /* Ensure we get a sane starting CFA. */ |
| 53 | .cfi_def_cfa sp,0 |
Ian Rogers | 7655f29 | 2013-07-29 11:07:13 -0700 | [diff] [blame] | 54 | .fnstart |
| 55 | .endm |
| 56 | |
| 57 | .macro END name |
| 58 | .fnend |
| 59 | .cfi_endproc |
| 60 | .size \name, .-\name |
| 61 | .endm |
| 62 | |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 63 | .macro UNIMPLEMENTED name |
| 64 | ENTRY \name |
| 65 | bkpt |
| 66 | bkpt |
| 67 | END \name |
| 68 | .endm |
| 69 | |
Ian Rogers | 7655f29 | 2013-07-29 11:07:13 -0700 | [diff] [blame] | 70 | #endif // ART_RUNTIME_ARCH_X86_ASM_SUPPORT_X86_S_ |