Home | History | Annotate | Download | only in arm
      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 ENTRY_NO_HIDE name
     46     .thumb_func
     47     .type \name, #function
     48     .global \name
     49     /* Cache alignment for function entry */
     50     .balign 16
     51 \name:
     52     .cfi_startproc
     53     .fnstart
     54 .endm
     55 
     56 
     57 .macro ARM_ENTRY name
     58     .arm
     59     .type \name, #function
     60     .hidden \name  // Hide this as a global symbol, so we do not incur plt calls.
     61     .global \name
     62     /* Cache alignment for function entry */
     63     .balign 16
     64 \name:
     65     .cfi_startproc
     66      /* Ensure we get a sane starting CFA. */
     67     .cfi_def_cfa sp,0
     68     .fnstart
     69 .endm
     70 
     71 .macro ARM_ENTRY_NO_HIDE name
     72     .arm
     73     .type \name, #function
     74     .global \name
     75     /* Cache alignment for function entry */
     76     .balign 16
     77 \name:
     78     .cfi_startproc
     79      /* Ensure we get a sane starting CFA. */
     80     .cfi_def_cfa sp,0
     81     .fnstart
     82 .endm
     83 
     84 .macro END name
     85     .fnend
     86     .cfi_endproc
     87     .size \name, .-\name
     88 .endm
     89 
     90 .macro UNIMPLEMENTED name
     91     ENTRY \name
     92     bkpt
     93     bkpt
     94     END \name
     95 .endm
     96 
     97 #endif  // ART_RUNTIME_ARCH_X86_ASM_SUPPORT_X86_S_
     98