1/* This testcase is part of GDB, the GNU debugger. 2 3 Copyright 2015-2023 Free Software Foundation, Inc. 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 17 18static void 19ext_reg_load (void) 20{ 21 char in[8]; 22 23 asm ("vldr d0, [%0]" : : "r" (in)); 24 asm ("vldr s3, [%0]" : : "r" (in)); 25 26 asm ("vldm %0, {d3-d4}" : : "r" (in)); 27 asm ("vldm %0, {s9-s11}" : : "r" (in)); 28} 29 30static void 31ext_reg_mov (void) 32{ 33 int i, j; 34 double d; 35 36 i = 1; 37 j = 2; 38 39 asm ("vmov s4, s5, %0, %1" : "=r" (i), "=r" (j): ); 40 asm ("vmov s7, s8, %0, %1" : "=r" (i), "=r" (j): ); 41 asm ("vmov %0, %1, s10, s11" : : "r" (i), "r" (j)); 42 asm ("vmov %0, %1, s1, s2" : : "r" (i), "r" (j)); 43 44 asm ("vmov %P2, %0, %1" : "=r" (i), "=r" (j): "w" (d)); 45 asm ("vmov %1, %2, %P0" : "=w" (d) : "r" (i), "r" (j)); 46} 47 48static void 49ext_reg_push_pop (void) 50{ 51 double d; 52 53 asm ("vpush {%P0}" : : "w" (d)); 54 asm ("vpop {%P0}" : : "w" (d)); 55} 56 57/* Initialize arch-specific bits. */ 58 59static void initialize (void) 60{ 61 /* ARM doesn't currently use this function. */ 62} 63 64/* Functions testing instruction decodings. GDB will test all of these. */ 65static testcase_ftype testcases[] = 66{ 67 ext_reg_load, 68 ext_reg_mov, 69 ext_reg_push_pop, 70}; 71