You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.1 KiB

  1. --- a/libs/context/src/asm/jump_mips64_n64_elf_gas.S
  2. +++ b/libs/context/src/asm/jump_mips64_n64_elf_gas.S
  3. @@ -67,7 +67,7 @@ jump_fcontext:
  4. sd $ra, 144($sp) # save RA
  5. sd $ra, 152($sp) # save RA as PC
  6. -
  7. +#if defined(__mips_hard_float)
  8. s.d $f24, 0($sp) # save F24
  9. s.d $f25, 8($sp) # save F25
  10. s.d $f26, 16($sp) # save F26
  11. @@ -76,6 +76,7 @@ jump_fcontext:
  12. s.d $f29, 40($sp) # save F29
  13. s.d $f30, 48($sp) # save F30
  14. s.d $f31, 56($sp) # save F31
  15. +#endif
  16. # store SP (pointing to old context-data) in v0 as return
  17. move $v0, $sp
  18. @@ -83,6 +84,7 @@ jump_fcontext:
  19. # get SP (pointing to new context-data) from a0 param
  20. move $sp, $a0
  21. +#if defined(__mips_hard_float)
  22. l.d $f24, 0($sp) # restore F24
  23. l.d $f25, 8($sp) # restore F25
  24. l.d $f26, 16($sp) # restore F26
  25. @@ -91,6 +93,7 @@ jump_fcontext:
  26. l.d $f29, 40($sp) # restore F29
  27. l.d $f30, 48($sp) # restore F30
  28. l.d $f31, 56($sp) # restore F31
  29. +#endif
  30. ld $s0, 64($sp) # restore S0
  31. ld $s1, 72($sp) # restore S1
  32. --- a/libs/context/src/asm/ontop_mips64_n64_elf_gas.S
  33. +++ b/libs/context/src/asm/ontop_mips64_n64_elf_gas.S
  34. @@ -67,7 +67,7 @@ ontop_fcontext:
  35. sd $ra, 144($sp) # save RA
  36. sd $ra, 152($sp) # save RA as PC
  37. -
  38. +#if defined(__mips_hard_float)
  39. s.d $f24, 0($sp) # save F24
  40. s.d $f25, 8($sp) # save F25
  41. s.d $f26, 16($sp) # save F26
  42. @@ -76,6 +76,7 @@ ontop_fcontext:
  43. s.d $f29, 40($sp) # save F29
  44. s.d $f30, 48($sp) # save F30
  45. s.d $f31, 56($sp) # save F31
  46. +#endif
  47. # store SP (pointing to context-data) in t0
  48. move $t0, $sp
  49. @@ -83,6 +84,7 @@ ontop_fcontext:
  50. # restore SP (pointing to context-data) from a0
  51. move $sp, $a0
  52. +#if defined(__mips_hard_float)
  53. l.d $f24, 0($sp) # restore F24
  54. l.d $f25, 8($sp) # restore F25
  55. l.d $f26, 16($sp) # restore F26
  56. @@ -91,6 +93,7 @@ ontop_fcontext:
  57. l.d $f29, 40($sp) # restore F29
  58. l.d $f30, 48($sp) # restore F30
  59. l.d $f31, 56($sp) # restore F31
  60. +#endif
  61. ld $s0, 64($sp) # restore S0
  62. ld $s1, 72($sp) # restore S1