[PATCH 7/57][Arm][GAS] Add support for MVE instructions: vstr/vldr
[binutils-gdb.git] / gdb / testsuite / gdb.reverse / insn-reverse-arm.c
blob5244c56c83140f3cfab137312356bfe93192f8c3
1 /* This testcase is part of GDB, the GNU debugger.
3 Copyright 2015-2019 Free Software Foundation, Inc.
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.
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.
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/>. */
18 static void
19 ext_reg_load (void)
21 char in[8];
23 asm ("vldr d0, [%0]" : : "r" (in));
24 asm ("vldr s3, [%0]" : : "r" (in));
26 asm ("vldm %0, {d3-d4}" : : "r" (in));
27 asm ("vldm %0, {s9-s11}" : : "r" (in));
30 static void
31 ext_reg_mov (void)
33 int i, j;
34 double d;
36 i = 1;
37 j = 2;
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));
44 asm ("vmov %P2, %0, %1" : "=r" (i), "=r" (j): "w" (d));
45 asm ("vmov %1, %2, %P0" : "=w" (d) : "r" (i), "r" (j));
48 static void
49 ext_reg_push_pop (void)
51 double d;
53 asm ("vpush {%P0}" : : "w" (d));
54 asm ("vpop {%P0}" : : "w" (d));
57 /* Initialize arch-specific bits. */
59 static void initialize (void)
61 /* ARM doesn't currently use this function. */
64 /* Functions testing instruction decodings. GDB will test all of these. */
65 static testcase_ftype testcases[] =
67 ext_reg_load,
68 ext_reg_mov,
69 ext_reg_push_pop,