2 * Copyright(c) 2022 Qualcomm Innovation Center, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
22 void sig_user(int sig
, siginfo_t
*info
, void *puc
)
29 : : : "r7", "p0", "p1", "p2", "p3");
35 unsigned int i
= 100000;
41 act
.sa_sigaction
= sig_user
;
42 sigemptyset(&act
.sa_mask
);
43 act
.sa_flags
= SA_SIGINFO
;
44 sigaction(SIGUSR1
, &act
, NULL
);
45 sev
.sigev_notify
= SIGEV_SIGNAL
;
46 sev
.sigev_signo
= SIGUSR1
;
47 sev
.sigev_value
.sival_ptr
= &tid
;
48 timer_create(CLOCK_REALTIME
, &sev
, &tid
);
49 it
.it_interval
.tv_sec
= 0;
50 it
.it_interval
.tv_nsec
= 100000;
51 it
.it_value
.tv_sec
= 0;
52 it
.it_value
.tv_nsec
= 100000;
53 timer_settime(tid
, 0, &it
, NULL
);
55 asm("loop0(1f, %1)\n\t"
62 "2: memb(%0) = #1\n\t"
66 " p0 = cmp.eq(r8, #0xff)\n\t"
67 " if (!p0) jump 2b\n\t"
69 " p0 = cmp.eq(r8, #0xff)\n\t"
70 " if (!p0) jump 2b\n\t"
72 " p0 = cmp.eq(r8, #0xff)\n\t"
73 " if (!p0) jump 2b\n\t"
75 " p0 = cmp.eq(r8, #0xff)\n\t"
76 " if (!p0) jump 2b\n\t"
80 : "memory", "r8", "p0", "p1", "p2", "p3");
82 puts(err
? "FAIL" : "PASS");