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 29 .text 30 .type AsmGetRegs, %function 31 .globl AsmGetRegs 32 .ent AsmGetRegs 33 .balign 16 34AsmGetRegs: 35 .cfi_startproc 36 .cfi_def_cfa $sp, 0 37 .set push 38 .set noreorder 39 .cpload $t9 40 sw $zero, 0($a0) 41 .set noat 42 sw $at, 4($a0) 43 .set at 44 sw $v0, 8($a0) 45 sw $v1, 12($a0) 46 sw $a0, 16($a0) 47 sw $a1, 20($a0) 48 sw $a2, 24($a0) 49 sw $a3, 28($a0) 50 sw $t0, 32($a0) 51 sw $t1, 36($a0) 52 sw $t2, 40($a0) 53 sw $t3, 44($a0) 54 sw $t4, 48($a0) 55 sw $t5, 52($a0) 56 sw $t6, 56($a0) 57 sw $t7, 60($a0) 58 sw $s0, 64($a0) 59 sw $s1, 68($a0) 60 sw $s2, 72($a0) 61 sw $s3, 76($a0) 62 sw $s4, 80($a0) 63 sw $s5, 84($a0) 64 sw $s6, 88($a0) 65 sw $s7, 92($a0) 66 sw $t8, 96($a0) 67 sw $t9, 100($a0) 68 sw $k0, 104($a0) 69 sw $k1, 108($a0) 70 sw $gp, 112($a0) 71 sw $sp, 116($a0) 72 sw $s8, 120($a0) 73 sw $ra, 124($a0) 74 jalr $zero, $ra 75 sw $ra, 128($a0) // set PC to the calling function 76 77 .set pop 78 .cfi_endproc 79 .size AsmGetRegs, .-AsmGetRegs 80 .end AsmGetRegs 81