X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-mips%2Fasmmacro-64.h;h=bbed35511f5a79d61b22437de45d6a1c96a86ca4;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=10b71cc877bc1711dddfae0b35187f38402b4b44;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-mips/asmmacro-64.h b/include/asm-mips/asmmacro-64.h index 10b71cc87..bbed35511 100644 --- a/include/asm-mips/asmmacro-64.h +++ b/include/asm-mips/asmmacro-64.h @@ -15,6 +15,7 @@ .macro fpu_save_16even thread tmp=t0 cfc1 \tmp, fcr31 + sdc1 $f0, THREAD_FPR0(\thread) sdc1 $f2, THREAD_FPR2(\thread) sdc1 $f4, THREAD_FPR4(\thread) sdc1 $f6, THREAD_FPR6(\thread) @@ -52,6 +53,14 @@ sdc1 $f31, THREAD_FPR31(\thread) .endm + .macro fpu_save_double thread status tmp1 tmp2 + sll \tmp2, \tmp1, 5 + bgez \tmp2, 2f + fpu_save_16odd \thread +2: + fpu_save_16even \thread \tmp1 # clobbers t1 + .endm + .macro fpu_restore_16even thread tmp=t0 lw \tmp, THREAD_FCR31(\thread) ldc1 $f0, THREAD_FPR0(\thread) @@ -92,6 +101,15 @@ ldc1 $f31, THREAD_FPR31(\thread) .endm + .macro fpu_restore_double thread tmp + mfc0 t0, CP0_STATUS + sll t1, t0, 5 + bgez t1, 1f # 16 register mode? + + fpu_restore_16odd a0 +1: fpu_restore_16even a0, t0 # clobbers t0 + .endm + .macro cpu_save_nonscratch thread LONG_S s0, THREAD_REG16(\thread) LONG_S s1, THREAD_REG17(\thread)