1/* 2 * test helper assembly functions 3 * 4 * Copyright (C) 2016 Simon Guo, IBM Corporation. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version 9 * 2 of the License, or (at your option) any later version. 10 */ 11#include <ppc-asm.h> 12#include "reg.h" 13 14 15/* Non volatile GPR - unsigned long buf[18] */ 16FUNC_START(load_gpr) 17 ld 14, 0*8(3) 18 ld 15, 1*8(3) 19 ld 16, 2*8(3) 20 ld 17, 3*8(3) 21 ld 18, 4*8(3) 22 ld 19, 5*8(3) 23 ld 20, 6*8(3) 24 ld 21, 7*8(3) 25 ld 22, 8*8(3) 26 ld 23, 9*8(3) 27 ld 24, 10*8(3) 28 ld 25, 11*8(3) 29 ld 26, 12*8(3) 30 ld 27, 13*8(3) 31 ld 28, 14*8(3) 32 ld 29, 15*8(3) 33 ld 30, 16*8(3) 34 ld 31, 17*8(3) 35 blr 36FUNC_END(load_gpr) 37 38FUNC_START(store_gpr) 39 std 14, 0*8(3) 40 std 15, 1*8(3) 41 std 16, 2*8(3) 42 std 17, 3*8(3) 43 std 18, 4*8(3) 44 std 19, 5*8(3) 45 std 20, 6*8(3) 46 std 21, 7*8(3) 47 std 22, 8*8(3) 48 std 23, 9*8(3) 49 std 24, 10*8(3) 50 std 25, 11*8(3) 51 std 26, 12*8(3) 52 std 27, 13*8(3) 53 std 28, 14*8(3) 54 std 29, 15*8(3) 55 std 30, 16*8(3) 56 std 31, 17*8(3) 57 blr 58FUNC_END(store_gpr) 59 60/* Single Precision Float - float buf[32] */ 61FUNC_START(load_fpr_single_precision) 62 lfs 0, 0*4(3) 63 lfs 1, 1*4(3) 64 lfs 2, 2*4(3) 65 lfs 3, 3*4(3) 66 lfs 4, 4*4(3) 67 lfs 5, 5*4(3) 68 lfs 6, 6*4(3) 69 lfs 7, 7*4(3) 70 lfs 8, 8*4(3) 71 lfs 9, 9*4(3) 72 lfs 10, 10*4(3) 73 lfs 11, 11*4(3) 74 lfs 12, 12*4(3) 75 lfs 13, 13*4(3) 76 lfs 14, 14*4(3) 77 lfs 15, 15*4(3) 78 lfs 16, 16*4(3) 79 lfs 17, 17*4(3) 80 lfs 18, 18*4(3) 81 lfs 19, 19*4(3) 82 lfs 20, 20*4(3) 83 lfs 21, 21*4(3) 84 lfs 22, 22*4(3) 85 lfs 23, 23*4(3) 86 lfs 24, 24*4(3) 87 lfs 25, 25*4(3) 88 lfs 26, 26*4(3) 89 lfs 27, 27*4(3) 90 lfs 28, 28*4(3) 91 lfs 29, 29*4(3) 92 lfs 30, 30*4(3) 93 lfs 31, 31*4(3) 94 blr 95FUNC_END(load_fpr_single_precision) 96 97/* Single Precision Float - float buf[32] */ 98FUNC_START(store_fpr_single_precision) 99 stfs 0, 0*4(3) 100 stfs 1, 1*4(3) 101 stfs 2, 2*4(3) 102 stfs 3, 3*4(3) 103 stfs 4, 4*4(3) 104 stfs 5, 5*4(3) 105 stfs 6, 6*4(3) 106 stfs 7, 7*4(3) 107 stfs 8, 8*4(3) 108 stfs 9, 9*4(3) 109 stfs 10, 10*4(3) 110 stfs 11, 11*4(3) 111 stfs 12, 12*4(3) 112 stfs 13, 13*4(3) 113 stfs 14, 14*4(3) 114 stfs 15, 15*4(3) 115 stfs 16, 16*4(3) 116 stfs 17, 17*4(3) 117 stfs 18, 18*4(3) 118 stfs 19, 19*4(3) 119 stfs 20, 20*4(3) 120 stfs 21, 21*4(3) 121 stfs 22, 22*4(3) 122 stfs 23, 23*4(3) 123 stfs 24, 24*4(3) 124 stfs 25, 25*4(3) 125 stfs 26, 26*4(3) 126 stfs 27, 27*4(3) 127 stfs 28, 28*4(3) 128 stfs 29, 29*4(3) 129 stfs 30, 30*4(3) 130 stfs 31, 31*4(3) 131 blr 132FUNC_END(store_fpr_single_precision) 133