Path: blob/master/arch/mips/include/asm/asmmacro.h
17386 views
/*1* This file is subject to the terms and conditions of the GNU General Public2* License. See the file "COPYING" in the main directory of this archive3* for more details.4*5* Copyright (C) 2003 Ralf Baechle6*/7#ifndef _ASM_ASMMACRO_H8#define _ASM_ASMMACRO_H910#include <asm/hazards.h>1112#ifdef CONFIG_32BIT13#include <asm/asmmacro-32.h>14#endif15#ifdef CONFIG_64BIT16#include <asm/asmmacro-64.h>17#endif18#ifdef CONFIG_MIPS_MT_SMTC19#include <asm/mipsmtregs.h>20#endif2122#ifdef CONFIG_MIPS_MT_SMTC23.macro local_irq_enable reg=t024mfc0 \reg, CP0_TCSTATUS25ori \reg, \reg, TCSTATUS_IXMT26xori \reg, \reg, TCSTATUS_IXMT27mtc0 \reg, CP0_TCSTATUS28_ehb29.endm3031.macro local_irq_disable reg=t032mfc0 \reg, CP0_TCSTATUS33ori \reg, \reg, TCSTATUS_IXMT34mtc0 \reg, CP0_TCSTATUS35_ehb36.endm37#elif defined(CONFIG_CPU_MIPSR2)38.macro local_irq_enable reg=t039ei40irq_enable_hazard41.endm4243.macro local_irq_disable reg=t044di45irq_disable_hazard46.endm47#else48.macro local_irq_enable reg=t049mfc0 \reg, CP0_STATUS50ori \reg, \reg, 151mtc0 \reg, CP0_STATUS52irq_enable_hazard53.endm5455.macro local_irq_disable reg=t056mfc0 \reg, CP0_STATUS57ori \reg, \reg, 158xori \reg, \reg, 159mtc0 \reg, CP0_STATUS60irq_disable_hazard61.endm62#endif /* CONFIG_MIPS_MT_SMTC */6364/*65* Temporary until all gas have MT ASE support66*/67.macro DMT reg=068.word 0x41600bc1 | (\reg << 16)69.endm7071.macro EMT reg=072.word 0x41600be1 | (\reg << 16)73.endm7475.macro DVPE reg=076.word 0x41600001 | (\reg << 16)77.endm7879.macro EVPE reg=080.word 0x41600021 | (\reg << 16)81.endm8283.macro MFTR rt=0, rd=0, u=0, sel=084.word 0x41000000 | (\rt << 16) | (\rd << 11) | (\u << 5) | (\sel)85.endm8687.macro MTTR rt=0, rd=0, u=0, sel=088.word 0x41800000 | (\rt << 16) | (\rd << 11) | (\u << 5) | (\sel)89.endm9091#endif /* _ASM_ASMMACRO_H */929394