Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
0004  */
0005 
0006 #ifndef __ASM_LINKAGE_H
0007 #define __ASM_LINKAGE_H
0008 
0009 #include <asm/dwarf.h>
0010 
0011 #ifdef __ASSEMBLY__
0012 
0013 .macro ST2 e, o, off
0014 #ifdef CONFIG_ARC_HAS_LL64
0015     std \e, [sp, \off]
0016 #else
0017     st  \e, [sp, \off]
0018     st  \o, [sp, \off+4]
0019 #endif
0020 .endm
0021 
0022 .macro LD2 e, o, off
0023 #ifdef CONFIG_ARC_HAS_LL64
0024     ldd \e, [sp, \off]
0025 #else
0026     ld  \e, [sp, \off]
0027     ld  \o, [sp, \off+4]
0028 #endif
0029 .endm
0030 
0031 #define ASM_NL       `  /* use '`' to mark new line in macro */
0032 #define __ALIGN     .align 4
0033 #define __ALIGN_STR __stringify(__ALIGN)
0034 
0035 /* annotation for data we want in DCCM - if enabled in .config */
0036 .macro ARCFP_DATA nm
0037 #ifdef CONFIG_ARC_HAS_DCCM
0038     .section .data.arcfp
0039 #else
0040     .section .data
0041 #endif
0042     .global \nm
0043 .endm
0044 
0045 /* annotation for data we want in DCCM - if enabled in .config */
0046 .macro ARCFP_CODE
0047 #ifdef CONFIG_ARC_HAS_ICCM
0048     .section .text.arcfp, "ax",@progbits
0049 #else
0050     .section .text, "ax",@progbits
0051 #endif
0052 .endm
0053 
0054 #define ENTRY_CFI(name)     \
0055     .globl name ASM_NL  \
0056     ALIGN ASM_NL        \
0057     name: ASM_NL        \
0058     CFI_STARTPROC ASM_NL
0059 
0060 #define END_CFI(name)       \
0061     CFI_ENDPROC ASM_NL  \
0062     .size name, .-name
0063 
0064 #else   /* !__ASSEMBLY__ */
0065 
0066 #ifdef CONFIG_ARC_HAS_ICCM
0067 #define __arcfp_code __section(".text.arcfp")
0068 #else
0069 #define __arcfp_code __section(".text")
0070 #endif
0071 
0072 #ifdef CONFIG_ARC_HAS_DCCM
0073 #define __arcfp_data __section(".data.arcfp")
0074 #else
0075 #define __arcfp_data __section(".data")
0076 #endif
0077 
0078 #endif /* __ASSEMBLY__ */
0079 
0080 #endif