2 * Copyright © 2020 Valve Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
31 fprintf(output
, "woops!\n");
34 BEGIN_TEST_FAIL(expect_fail
)
36 fprintf(output
, "woops!\n");
40 //! s_buffer_load_dwordx2 @s64(a)
41 fprintf(output
, "s_buffer_load_dwordx2 s[6:7]\n");
42 //! s_add_u32 s#b0, s#a, 1
43 //! s_addc_u32 s#b1, s#a1, 0
44 //; success = int(b0) == 8
45 fprintf(output
, "s_add_u32 s8, s6, 1\n");
46 fprintf(output
, "s_addc_u32 s9, s7, 0\n");
47 //! s_buffer_store_dwordx2 @s64(b)
48 fprintf(output
, "s_buffer_store_dwordx2 s[8:9]\n");
52 //~gfx[67]! test gfx67
56 for (int cls
= GFX6
; cls
<= GFX7
; cls
++) {
57 if (!set_variant((enum chip_class
)cls
))
59 fprintf(output
, "test gfx67\n");
60 fprintf(output
, "test all\n");
63 if (set_variant("gfx8")) {
64 fprintf(output
, "test gfx8\n");
65 fprintf(output
, "test all\n");
68 if (set_variant("gfx9")) {
69 fprintf(output
, "test gfx9\n");
70 fprintf(output
, "test all\n");
75 //; funcs['test'] = lambda a: a
76 //! @test(s_buffer_load_dwordx2) @s64(a)
77 fprintf(output
, "s_buffer_load_dwordx2 s[6:7]\n");