Path: blob/master/arch/mips/include/asm/asmmacro-32.h
17531 views
/*1* asmmacro.h: Assembler macros to make things easier to read.2*3* Copyright (C) 1996 David S. Miller ([email protected])4* Copyright (C) 1998, 1999, 2003 Ralf Baechle5*/6#ifndef _ASM_ASMMACRO_32_H7#define _ASM_ASMMACRO_32_H89#include <asm/asm-offsets.h>10#include <asm/regdef.h>11#include <asm/fpregdef.h>12#include <asm/mipsregs.h>1314.macro fpu_save_double thread status tmp1=t015cfc1 \tmp1, fcr3116sdc1 $f0, THREAD_FPR0(\thread)17sdc1 $f2, THREAD_FPR2(\thread)18sdc1 $f4, THREAD_FPR4(\thread)19sdc1 $f6, THREAD_FPR6(\thread)20sdc1 $f8, THREAD_FPR8(\thread)21sdc1 $f10, THREAD_FPR10(\thread)22sdc1 $f12, THREAD_FPR12(\thread)23sdc1 $f14, THREAD_FPR14(\thread)24sdc1 $f16, THREAD_FPR16(\thread)25sdc1 $f18, THREAD_FPR18(\thread)26sdc1 $f20, THREAD_FPR20(\thread)27sdc1 $f22, THREAD_FPR22(\thread)28sdc1 $f24, THREAD_FPR24(\thread)29sdc1 $f26, THREAD_FPR26(\thread)30sdc1 $f28, THREAD_FPR28(\thread)31sdc1 $f30, THREAD_FPR30(\thread)32sw \tmp1, THREAD_FCR31(\thread)33.endm3435.macro fpu_save_single thread tmp=t036cfc1 \tmp, fcr3137swc1 $f0, THREAD_FPR0(\thread)38swc1 $f1, THREAD_FPR1(\thread)39swc1 $f2, THREAD_FPR2(\thread)40swc1 $f3, THREAD_FPR3(\thread)41swc1 $f4, THREAD_FPR4(\thread)42swc1 $f5, THREAD_FPR5(\thread)43swc1 $f6, THREAD_FPR6(\thread)44swc1 $f7, THREAD_FPR7(\thread)45swc1 $f8, THREAD_FPR8(\thread)46swc1 $f9, THREAD_FPR9(\thread)47swc1 $f10, THREAD_FPR10(\thread)48swc1 $f11, THREAD_FPR11(\thread)49swc1 $f12, THREAD_FPR12(\thread)50swc1 $f13, THREAD_FPR13(\thread)51swc1 $f14, THREAD_FPR14(\thread)52swc1 $f15, THREAD_FPR15(\thread)53swc1 $f16, THREAD_FPR16(\thread)54swc1 $f17, THREAD_FPR17(\thread)55swc1 $f18, THREAD_FPR18(\thread)56swc1 $f19, THREAD_FPR19(\thread)57swc1 $f20, THREAD_FPR20(\thread)58swc1 $f21, THREAD_FPR21(\thread)59swc1 $f22, THREAD_FPR22(\thread)60swc1 $f23, THREAD_FPR23(\thread)61swc1 $f24, THREAD_FPR24(\thread)62swc1 $f25, THREAD_FPR25(\thread)63swc1 $f26, THREAD_FPR26(\thread)64swc1 $f27, THREAD_FPR27(\thread)65swc1 $f28, THREAD_FPR28(\thread)66swc1 $f29, THREAD_FPR29(\thread)67swc1 $f30, THREAD_FPR30(\thread)68swc1 $f31, THREAD_FPR31(\thread)69sw \tmp, THREAD_FCR31(\thread)70.endm7172.macro fpu_restore_double thread status tmp=t073lw \tmp, THREAD_FCR31(\thread)74ldc1 $f0, THREAD_FPR0(\thread)75ldc1 $f2, THREAD_FPR2(\thread)76ldc1 $f4, THREAD_FPR4(\thread)77ldc1 $f6, THREAD_FPR6(\thread)78ldc1 $f8, THREAD_FPR8(\thread)79ldc1 $f10, THREAD_FPR10(\thread)80ldc1 $f12, THREAD_FPR12(\thread)81ldc1 $f14, THREAD_FPR14(\thread)82ldc1 $f16, THREAD_FPR16(\thread)83ldc1 $f18, THREAD_FPR18(\thread)84ldc1 $f20, THREAD_FPR20(\thread)85ldc1 $f22, THREAD_FPR22(\thread)86ldc1 $f24, THREAD_FPR24(\thread)87ldc1 $f26, THREAD_FPR26(\thread)88ldc1 $f28, THREAD_FPR28(\thread)89ldc1 $f30, THREAD_FPR30(\thread)90ctc1 \tmp, fcr3191.endm9293.macro fpu_restore_single thread tmp=t094lw \tmp, THREAD_FCR31(\thread)95lwc1 $f0, THREAD_FPR0(\thread)96lwc1 $f1, THREAD_FPR1(\thread)97lwc1 $f2, THREAD_FPR2(\thread)98lwc1 $f3, THREAD_FPR3(\thread)99lwc1 $f4, THREAD_FPR4(\thread)100lwc1 $f5, THREAD_FPR5(\thread)101lwc1 $f6, THREAD_FPR6(\thread)102lwc1 $f7, THREAD_FPR7(\thread)103lwc1 $f8, THREAD_FPR8(\thread)104lwc1 $f9, THREAD_FPR9(\thread)105lwc1 $f10, THREAD_FPR10(\thread)106lwc1 $f11, THREAD_FPR11(\thread)107lwc1 $f12, THREAD_FPR12(\thread)108lwc1 $f13, THREAD_FPR13(\thread)109lwc1 $f14, THREAD_FPR14(\thread)110lwc1 $f15, THREAD_FPR15(\thread)111lwc1 $f16, THREAD_FPR16(\thread)112lwc1 $f17, THREAD_FPR17(\thread)113lwc1 $f18, THREAD_FPR18(\thread)114lwc1 $f19, THREAD_FPR19(\thread)115lwc1 $f20, THREAD_FPR20(\thread)116lwc1 $f21, THREAD_FPR21(\thread)117lwc1 $f22, THREAD_FPR22(\thread)118lwc1 $f23, THREAD_FPR23(\thread)119lwc1 $f24, THREAD_FPR24(\thread)120lwc1 $f25, THREAD_FPR25(\thread)121lwc1 $f26, THREAD_FPR26(\thread)122lwc1 $f27, THREAD_FPR27(\thread)123lwc1 $f28, THREAD_FPR28(\thread)124lwc1 $f29, THREAD_FPR29(\thread)125lwc1 $f30, THREAD_FPR30(\thread)126lwc1 $f31, THREAD_FPR31(\thread)127ctc1 \tmp, fcr31128.endm129130.macro cpu_save_nonscratch thread131LONG_S s0, THREAD_REG16(\thread)132LONG_S s1, THREAD_REG17(\thread)133LONG_S s2, THREAD_REG18(\thread)134LONG_S s3, THREAD_REG19(\thread)135LONG_S s4, THREAD_REG20(\thread)136LONG_S s5, THREAD_REG21(\thread)137LONG_S s6, THREAD_REG22(\thread)138LONG_S s7, THREAD_REG23(\thread)139LONG_S sp, THREAD_REG29(\thread)140LONG_S fp, THREAD_REG30(\thread)141.endm142143.macro cpu_restore_nonscratch thread144LONG_L s0, THREAD_REG16(\thread)145LONG_L s1, THREAD_REG17(\thread)146LONG_L s2, THREAD_REG18(\thread)147LONG_L s3, THREAD_REG19(\thread)148LONG_L s4, THREAD_REG20(\thread)149LONG_L s5, THREAD_REG21(\thread)150LONG_L s6, THREAD_REG22(\thread)151LONG_L s7, THREAD_REG23(\thread)152LONG_L sp, THREAD_REG29(\thread)153LONG_L fp, THREAD_REG30(\thread)154LONG_L ra, THREAD_REG31(\thread)155.endm156157#endif /* _ASM_ASMMACRO_32_H */158159160