1 /* Tests the find instructions.
3 Copyright (C) 2017-2024 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/>. */
19 # output: report(0x00000001);\n
20 # output: report(0x00000001);\n
22 # output: report(0x80000000);\n
23 # output: report(0x00000020);\n
25 # output: report(0x55555555);\n
26 # output: report(0x00000001);\n
28 # output: report(0xaaaaaaaa);\n
29 # output: report(0x00000002);\n
31 # output: report(0x00018000);\n
32 # output: report(0x00000010);\n
34 # output: report(0xc0000000);\n
35 # output: report(0x0000001f);\n
37 # output: report(0x00000000);\n
38 # output: report(0x00000000);\n
40 # output: report(0x00000001);\n
41 # output: report(0x00000001);\n
43 # output: report(0x80000000);\n
44 # output: report(0x00000020);\n
46 # output: report(0x55555555);\n
47 # output: report(0x0000001f);\n
49 # output: report(0xaaaaaaaa);\n
50 # output: report(0x00000020);\n
52 # output: report(0x00018000);\n
53 # output: report(0x00000011);\n
55 # output: report(0xc0000000);\n
56 # output: report(0x00000020);\n
58 # output: report(0x00000000);\n
59 # output: report(0x00000000);\n
63 #include "or1k-asm-test-helpers.h"
65 .macro TEST_FIND opcode, operand
66 LOAD_IMMEDIATE r5, \operand
67 REPORT_REG_TO_CONSOLE r5
69 REPORT_REG_TO_CONSOLE r4
70 PRINT_NEWLINE_TO_CONSOLE
73 STANDARD_TEST_ENVIRONMENT
81 TEST_FIND l.ff1, 0x00000001
82 TEST_FIND l.ff1, 0x80000000
83 TEST_FIND l.ff1, 0x55555555
84 TEST_FIND l.ff1, 0xaaaaaaaa
85 TEST_FIND l.ff1, 0x00018000
86 TEST_FIND l.ff1, 0xc0000000
87 TEST_FIND l.ff1, 0x00000000
91 TEST_FIND l.fl1, 0x00000001
92 TEST_FIND l.fl1, 0x80000000
93 TEST_FIND l.fl1, 0x55555555
94 TEST_FIND l.fl1, 0xaaaaaaaa
95 TEST_FIND l.fl1, 0x00018000
96 TEST_FIND l.fl1, 0xc0000000
97 TEST_FIND l.fl1, 0x00000000
100 RETURN_TO_LINK_REGISTER_R9