123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- .module hardfloat
- .module doublefloat
- MIPS_NOMIPS16
- LEAF(_fpctx_save)
- move a1, a0
- PTR_S zero, LINKCTX_NEXT(a1)
- mfc0 t0, C0_STATUS
- li t1, SR_CU1
- and t1, t0, t1
- bnez t1, 1f
-
- move va0, zero
- jr ra
- 1:
- li t1, SR_FR
- and t0, t0, t1
- cfc1 t2, $31
- REG_S t2, FP32CTX_CSR(a1)
- sdc1 $f0, FP32CTX_0(a1)
- sdc1 $f2, FP32CTX_2(a1)
- sdc1 $f4, FP32CTX_4(a1)
- sdc1 $f6, FP32CTX_6(a1)
- sdc1 $f8, FP32CTX_8(a1)
- sdc1 $f10, FP32CTX_10(a1)
- sdc1 $f12, FP32CTX_12(a1)
- sdc1 $f14, FP32CTX_14(a1)
- sdc1 $f16, FP32CTX_16(a1)
- sdc1 $f18, FP32CTX_18(a1)
- sdc1 $f20, FP32CTX_20(a1)
- sdc1 $f22, FP32CTX_22(a1)
- sdc1 $f24, FP32CTX_24(a1)
- sdc1 $f26, FP32CTX_26(a1)
- sdc1 $f28, FP32CTX_28(a1)
- sdc1 $f30, FP32CTX_30(a1)
- bnez t0, 2f
- li va0, LINKCTX_TYPE_FP32
- REG_S va0, LINKCTX_ID(a1)
- jr ra
- 2:
- .set push
- .set fp=64
- sdc1 $f1, FP64CTX_1(a1)
- sdc1 $f3, FP64CTX_3(a1)
- sdc1 $f5, FP64CTX_5(a1)
- sdc1 $f7, FP64CTX_7(a1)
- sdc1 $f9, FP64CTX_9(a1)
- sdc1 $f11, FP64CTX_11(a1)
- sdc1 $f13, FP64CTX_13(a1)
- sdc1 $f15, FP64CTX_15(a1)
- sdc1 $f17, FP64CTX_17(a1)
- sdc1 $f19, FP64CTX_19(a1)
- sdc1 $f21, FP64CTX_21(a1)
- sdc1 $f23, FP64CTX_23(a1)
- sdc1 $f25, FP64CTX_25(a1)
- sdc1 $f27, FP64CTX_27(a1)
- sdc1 $f29, FP64CTX_29(a1)
- sdc1 $f31, FP64CTX_31(a1)
- .set pop
- li va0, LINKCTX_TYPE_FP64
- REG_S va0, LINKCTX_ID(a0)
- jr ra
- END(_fpctx_save)
- LEAF(_fpctx_load)
- move a1, a0
- REG_L va0, LINKCTX_ID(a1)
-
- li t0, LINKCTX_TYPE_FP64
- li t1, LINKCTX_TYPE_FP32
- li t2, SR_CU1
- beq va0, t0, 0f
- beq va0, t1, 1f
-
- move va0, zero
- jr ra
- 0:
- di t3
- ehb
- or t3, t3, t2
- mtc0 t3, C0_STATUS
- ehb
-
- .set push
- .set fp=64
- ldc1 $f1, FP64CTX_1(a1)
- ldc1 $f3, FP64CTX_3(a1)
- ldc1 $f5, FP64CTX_5(a1)
- ldc1 $f7, FP64CTX_7(a1)
- ldc1 $f9, FP64CTX_9(a1)
- ldc1 $f11, FP64CTX_11(a1)
- ldc1 $f13, FP64CTX_13(a1)
- ldc1 $f15, FP64CTX_15(a1)
- ldc1 $f17, FP64CTX_17(a1)
- ldc1 $f19, FP64CTX_19(a1)
- ldc1 $f21, FP64CTX_21(a1)
- ldc1 $f23, FP64CTX_23(a1)
- ldc1 $f25, FP64CTX_25(a1)
- ldc1 $f27, FP64CTX_27(a1)
- ldc1 $f29, FP64CTX_29(a1)
- ldc1 $f31, FP64CTX_31(a1)
- .set pop
- 1:
- di t3
- ehb
- or t3, t3, t2
- mtc0 t3, C0_STATUS
- ehb
-
- REG_L t1, FP32CTX_CSR(a1)
- ctc1 t1, $31
- ldc1 $f0, FP32CTX_0(a1)
- ldc1 $f2, FP32CTX_2(a1)
- ldc1 $f4, FP32CTX_4(a1)
- ldc1 $f6, FP32CTX_6(a1)
- ldc1 $f8, FP32CTX_8(a1)
- ldc1 $f10, FP32CTX_10(a1)
- ldc1 $f12, FP32CTX_12(a1)
- ldc1 $f14, FP32CTX_14(a1)
- ldc1 $f16, FP32CTX_16(a1)
- ldc1 $f18, FP32CTX_18(a1)
- ldc1 $f20, FP32CTX_20(a1)
- ldc1 $f22, FP32CTX_22(a1)
- ldc1 $f24, FP32CTX_24(a1)
- ldc1 $f26, FP32CTX_26(a1)
- ldc1 $f28, FP32CTX_28(a1)
- ldc1 $f30, FP32CTX_30(a1)
-
- jr ra
- END(_fpctx_load)
|