Path: blob/master/arch/xtensa/variants/fsf/include/variant/tie-asm.h
10821 views
/*1* This header file contains assembly-language definitions (assembly2* macros, etc.) for this specific Xtensa processor's TIE extensions3* and options. It is customized to this Xtensa processor configuration.4*5* This file is subject to the terms and conditions of the GNU General Public6* License. See the file "COPYING" in the main directory of this archive7* for more details.8*9* Copyright (C) 1999-2008 Tensilica Inc.10*/1112#ifndef _XTENSA_CORE_TIE_ASM_H13#define _XTENSA_CORE_TIE_ASM_H1415/* Selection parameter values for save-area save/restore macros: */16/* Option vs. TIE: */17#define XTHAL_SAS_TIE 0x0001 /* custom extension or coprocessor */18#define XTHAL_SAS_OPT 0x0002 /* optional (and not a coprocessor) */19/* Whether used automatically by compiler: */20#define XTHAL_SAS_NOCC 0x0004 /* not used by compiler w/o special opts/code */21#define XTHAL_SAS_CC 0x0008 /* used by compiler without special opts/code */22/* ABI handling across function calls: */23#define XTHAL_SAS_CALR 0x0010 /* caller-saved */24#define XTHAL_SAS_CALE 0x0020 /* callee-saved */25#define XTHAL_SAS_GLOB 0x0040 /* global across function calls (in thread) */26/* Misc */27#define XTHAL_SAS_ALL 0xFFFF /* include all default NCP contents */28293031/* Macro to save all non-coprocessor (extra) custom TIE and optional state32* (not including zero-overhead loop registers).33* Save area ptr (clobbered): ptr (1 byte aligned)34* Scratch regs (clobbered): at1..at4 (only first XCHAL_NCP_NUM_ATMPS needed)35*/36.macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL37xchal_sa_start \continue, \ofs38.ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select39xchal_sa_align \ptr, 0, 1024-4, 4, 440rur \at1, THREADPTR // threadptr option41s32i \at1, \ptr, .Lxchal_ofs_ + 042.set .Lxchal_ofs_, .Lxchal_ofs_ + 443.endif44.endm // xchal_ncp_store4546/* Macro to save all non-coprocessor (extra) custom TIE and optional state47* (not including zero-overhead loop registers).48* Save area ptr (clobbered): ptr (1 byte aligned)49* Scratch regs (clobbered): at1..at4 (only first XCHAL_NCP_NUM_ATMPS needed)50*/51.macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL52xchal_sa_start \continue, \ofs53.ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select54xchal_sa_align \ptr, 0, 1024-4, 4, 455l32i \at1, \ptr, .Lxchal_ofs_ + 056wur \at1, THREADPTR // threadptr option57.set .Lxchal_ofs_, .Lxchal_ofs_ + 458.endif59.endm // xchal_ncp_load60616263#define XCHAL_NCP_NUM_ATMPS 1646566#define XCHAL_SA_NUM_ATMPS 16768#endif /*_XTENSA_CORE_TIE_ASM_H*/69707172