AsmGetRegsMips64.S 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * Copyright (C) 2017 The Android Open Source Project
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * * Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in
  12. * the documentation and/or other materials provided with the
  13. * distribution.
  14. *
  15. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  16. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  17. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  18. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  19. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  20. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  21. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  22. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  23. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  24. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  25. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  26. * SUCH DAMAGE.
  27. */
  28. .text
  29. .type AsmGetRegs, %function
  30. .globl AsmGetRegs
  31. .ent AsmGetRegs
  32. .balign 16
  33. AsmGetRegs:
  34. .cfi_startproc
  35. .cfi_def_cfa $sp, 0
  36. .set push
  37. .set noreorder
  38. .cpload $t9
  39. sd $zero, 0($a0)
  40. .set noat
  41. sd $at, 8($a0)
  42. .set at
  43. sd $v0, 16($a0)
  44. sd $v1, 24($a0)
  45. sd $a0, 32($a0)
  46. sd $a1, 40($a0)
  47. sd $a2, 48($a0)
  48. sd $a3, 56($a0)
  49. sd $a4, 64($a0)
  50. sd $a5, 72($a0)
  51. sd $a6, 80($a0)
  52. sd $a7, 88($a0)
  53. sd $t0, 96($a0)
  54. sd $t1, 104($a0)
  55. sd $t2, 112($a0)
  56. sd $t3, 120($a0)
  57. sd $s0, 128($a0)
  58. sd $s1, 136($a0)
  59. sd $s2, 144($a0)
  60. sd $s3, 152($a0)
  61. sd $s4, 160($a0)
  62. sd $s5, 168($a0)
  63. sd $s6, 176($a0)
  64. sd $s7, 184($a0)
  65. sd $t8, 192($a0)
  66. sd $t9, 200($a0)
  67. sd $k0, 208($a0)
  68. sd $k1, 216($a0)
  69. sd $gp, 224($a0)
  70. sd $sp, 232($a0)
  71. sd $s8, 240($a0)
  72. sd $ra, 248($a0)
  73. jalr $zero, $ra
  74. sd $ra, 256($a0) // set PC to the calling function
  75. .set pop
  76. .cfi_endproc
  77. .size AsmGetRegs, .-AsmGetRegs
  78. .end AsmGetRegs