OSDN Git Service

radeonsi: initial WIP SI code
[android-x86/external-mesa.git] / src / gallium / drivers / radeon / AMDGPUGenShaderPatterns.pl
1 #===-- AMDGPUGenShaderPatterns.pl - TODO: Add brief description -------===#
2 #
3 #                     The LLVM Compiler Infrastructure
4 #
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
7 #
8 #===----------------------------------------------------------------------===#
9 #
10 # TODO: Add full description
11 #
12 #===----------------------------------------------------------------------===#
13
14 use strict;
15 use warnings;
16
17 use AMDGPUConstants;
18
19 my $reg_prefix = $ARGV[0];
20
21 for (my $i = 0; $i < CONST_REG_COUNT * 4; $i++) {
22   my $index = get_hw_index($i);
23   my $chan = get_chan_str($i);
24 print <<STRING;
25 def : Pat <
26   (int_AMDGPU_load_const $i),
27   (f32 (MOV (f32 $reg_prefix$index\_$chan)))
28 >;
29 STRING
30 }