| Douglas Leung | 61b1a1a | 2017-11-08 10:53:53 +0100 | [diff] [blame] | 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 | 
|  | 34 | AsmGetRegs: | 
|  | 35 | .cfi_startproc | 
|  | 36 | .cfi_def_cfa $sp, 0 | 
|  | 37 | .set push | 
|  | 38 | .set noreorder | 
|  | 39 | .cpload $t9 | 
|  | 40 | sd   $zero, 0($a0) | 
|  | 41 | .set noat | 
|  | 42 | sd   $at, 8($a0) | 
|  | 43 | .set at | 
|  | 44 | sd   $v0, 16($a0) | 
|  | 45 | sd   $v1, 24($a0) | 
|  | 46 | sd   $a0, 32($a0) | 
|  | 47 | sd   $a1, 40($a0) | 
|  | 48 | sd   $a2, 48($a0) | 
|  | 49 | sd   $a3, 56($a0) | 
|  | 50 | sd   $a4, 64($a0) | 
|  | 51 | sd   $a5, 72($a0) | 
|  | 52 | sd   $a6, 80($a0) | 
|  | 53 | sd   $a7, 88($a0) | 
|  | 54 | sd   $t0, 96($a0) | 
|  | 55 | sd   $t1, 104($a0) | 
|  | 56 | sd   $t2, 112($a0) | 
|  | 57 | sd   $t3, 120($a0) | 
|  | 58 | sd   $s0, 128($a0) | 
|  | 59 | sd   $s1, 136($a0) | 
|  | 60 | sd   $s2, 144($a0) | 
|  | 61 | sd   $s3, 152($a0) | 
|  | 62 | sd   $s4, 160($a0) | 
|  | 63 | sd   $s5, 168($a0) | 
|  | 64 | sd   $s6, 176($a0) | 
|  | 65 | sd   $s7, 184($a0) | 
|  | 66 | sd   $t8, 192($a0) | 
|  | 67 | sd   $t9, 200($a0) | 
|  | 68 | sd   $k0, 208($a0) | 
|  | 69 | sd   $k1, 216($a0) | 
|  | 70 | sd   $gp, 224($a0) | 
|  | 71 | sd   $sp, 232($a0) | 
|  | 72 | sd   $s8, 240($a0) | 
|  | 73 | sd   $ra, 248($a0) | 
|  | 74 | jalr $zero, $ra | 
|  | 75 | sd   $ra, 256($a0)   // set PC to the calling function | 
|  | 76 |  | 
|  | 77 | .set pop | 
|  | 78 | .cfi_endproc | 
|  | 79 | .size AsmGetRegs, .-AsmGetRegs | 
|  | 80 | .end      AsmGetRegs |