Home | History | Annotate | Line # | Download | only in gdb.arch
      1      1.1  christos /* This testcase is part of GDB, the GNU debugger.
      2      1.1  christos 
      3  1.1.1.4  christos    Copyright (C) 2019-2024 Free Software Foundation, Inc.
      4      1.1  christos 
      5      1.1  christos    This program is free software; you can redistribute it and/or modify
      6      1.1  christos    it under the terms of the GNU General Public License as published by
      7      1.1  christos    the Free Software Foundation; either version 3 of the License, or
      8      1.1  christos    (at your option) any later version.
      9      1.1  christos 
     10      1.1  christos    This program is distributed in the hope that it will be useful,
     11      1.1  christos    but WITHOUT ANY WARRANTY; without even the implied warranty of
     12      1.1  christos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13      1.1  christos    GNU General Public License for more details.
     14      1.1  christos 
     15      1.1  christos    You should have received a copy of the GNU General Public License
     16      1.1  christos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
     17      1.1  christos 
     18      1.1  christos /* Write bytes with values ranging from 0 to 31 to each byte of each
     19      1.1  christos    corresponding vector register.  */
     20      1.1  christos int main (void)
     21      1.1  christos {
     22      1.1  christos   asm volatile ("vspltisb 0, 0" : : : "v0");
     23      1.1  christos   asm volatile ("vspltisb 1, 1" : : : "v1");
     24      1.1  christos 
     25      1.1  christos   asm volatile ("vaddubm 2, 1, 1" : : : "v2");
     26      1.1  christos   asm volatile ("vaddubm 3, 2, 1" : : : "v3");
     27      1.1  christos   asm volatile ("vaddubm 4, 3, 1" : : : "v4");
     28      1.1  christos   asm volatile ("vaddubm 5, 4, 1" : : : "v5");
     29      1.1  christos   asm volatile ("vaddubm 6, 5, 1" : : : "v6");
     30      1.1  christos   asm volatile ("vaddubm 7, 6, 1" : : : "v7");
     31      1.1  christos   asm volatile ("vaddubm 8, 7, 1" : : : "v8");
     32      1.1  christos   asm volatile ("vaddubm 9, 8, 1" : : : "v9");
     33      1.1  christos   asm volatile ("vaddubm 10, 9, 1" : : : "v10");
     34      1.1  christos   asm volatile ("vaddubm 11, 10, 1" : : : "v11");
     35      1.1  christos   asm volatile ("vaddubm 12, 11, 1" : : : "v12");
     36      1.1  christos   asm volatile ("vaddubm 13, 12, 1" : : : "v13");
     37      1.1  christos   asm volatile ("vaddubm 14, 13, 1" : : : "v14");
     38      1.1  christos   asm volatile ("vaddubm 15, 14, 1" : : : "v15");
     39      1.1  christos   asm volatile ("vaddubm 16, 15, 1" : : : "v16");
     40      1.1  christos   asm volatile ("vaddubm 17, 16, 1" : : : "v17");
     41      1.1  christos   asm volatile ("vaddubm 18, 17, 1" : : : "v18");
     42      1.1  christos   asm volatile ("vaddubm 19, 18, 1" : : : "v19");
     43      1.1  christos   asm volatile ("vaddubm 20, 19, 1" : : : "v20");
     44      1.1  christos   asm volatile ("vaddubm 21, 20, 1" : : : "v21");
     45      1.1  christos   asm volatile ("vaddubm 22, 21, 1" : : : "v22");
     46      1.1  christos   asm volatile ("vaddubm 23, 22, 1" : : : "v23");
     47      1.1  christos   asm volatile ("vaddubm 24, 23, 1" : : : "v24");
     48      1.1  christos   asm volatile ("vaddubm 25, 24, 1" : : : "v25");
     49      1.1  christos   asm volatile ("vaddubm 26, 25, 1" : : : "v26");
     50      1.1  christos   asm volatile ("vaddubm 27, 26, 1" : : : "v27");
     51      1.1  christos   asm volatile ("vaddubm 28, 27, 1" : : : "v28");
     52      1.1  christos   asm volatile ("vaddubm 29, 28, 1" : : : "v29");
     53      1.1  christos   asm volatile ("vaddubm 30, 29, 1" : : : "v30");
     54      1.1  christos   asm volatile ("vaddubm 31, 30, 1" : : : "v31");
     55      1.1  christos 
     56      1.1  christos   asm volatile ("nop"); // marker
     57      1.1  christos 
     58      1.1  christos   return 0;
     59      1.1  christos }
     60