aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/asmmacro.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/asmmacro.h')
-rw-r--r--arch/mips/include/asm/asmmacro.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h
index 935543f14538..cd9a98bc8f60 100644
--- a/arch/mips/include/asm/asmmacro.h
+++ b/arch/mips/include/asm/asmmacro.h
@@ -10,6 +10,7 @@
10 10
11#include <asm/hazards.h> 11#include <asm/hazards.h>
12#include <asm/asm-offsets.h> 12#include <asm/asm-offsets.h>
13#include <asm/msa.h>
13 14
14#ifdef CONFIG_32BIT 15#ifdef CONFIG_32BIT
15#include <asm/asmmacro-32.h> 16#include <asm/asmmacro-32.h>
@@ -378,9 +379,19 @@
378 st_d 29, THREAD_FPR29, \thread 379 st_d 29, THREAD_FPR29, \thread
379 st_d 30, THREAD_FPR30, \thread 380 st_d 30, THREAD_FPR30, \thread
380 st_d 31, THREAD_FPR31, \thread 381 st_d 31, THREAD_FPR31, \thread
382 .set push
383 .set noat
384 cfcmsa $1, MSA_CSR
385 sw $1, THREAD_MSA_CSR(\thread)
386 .set pop
381 .endm 387 .endm
382 388
383 .macro msa_restore_all thread 389 .macro msa_restore_all thread
390 .set push
391 .set noat
392 lw $1, THREAD_MSA_CSR(\thread)
393 ctcmsa MSA_CSR, $1
394 .set pop
384 ld_d 0, THREAD_FPR0, \thread 395 ld_d 0, THREAD_FPR0, \thread
385 ld_d 1, THREAD_FPR1, \thread 396 ld_d 1, THREAD_FPR1, \thread
386 ld_d 2, THREAD_FPR2, \thread 397 ld_d 2, THREAD_FPR2, \thread
@@ -415,4 +426,24 @@
415 ld_d 31, THREAD_FPR31, \thread 426 ld_d 31, THREAD_FPR31, \thread
416 .endm 427 .endm
417 428
429 .macro msa_init_upper wd
430#ifdef CONFIG_64BIT
431 insert_d \wd, 1
432#else
433 insert_w \wd, 2
434 insert_w \wd, 3
435#endif
436 .if 31-\wd
437 msa_init_upper (\wd+1)
438 .endif
439 .endm
440
441 .macro msa_init_all_upper
442 .set push
443 .set noat
444 not $1, zero
445 msa_init_upper 0
446 .set pop
447 .endm
448
418#endif /* _ASM_ASMMACRO_H */ 449#endif /* _ASM_ASMMACRO_H */