OSDN Git Service

radeonsi: initial WIP SI code
[android-x86/external-mesa.git] / src / gallium / drivers / radeon / AMDILCodeEmitter.h
1 //                     The LLVM Compiler Infrastructure
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 //===-- AMDILCodeEmitter.h - TODO: Add brief description -------===//
9 //===-- AMDILCodeEmitter.h - TODO: Add brief description -------===//
10 //===-- AMDILCodeEmitter.h - TODO: Add brief description -------===//
11 //
12 //                     The LLVM Compiler Infrastructure
13 //
14
15 #ifndef AMDILCODEEMITTER_H
16 #define AMDILCODEEMITTER_H
17
18 namespace llvm {
19
20   /* XXX: Temp HACK to work around tablegen name generation */
21   class AMDILCodeEmitter {
22   public:
23     uint64_t getBinaryCodeForInstr(const MachineInstr &MI) const;
24     virtual uint64_t getMachineOpValue(const MachineInstr &MI,
25                                    const MachineOperand &MO) const { return 0; }
26     virtual unsigned GPR4AlignEncode(const MachineInstr  &MI,
27                                      unsigned OpNo) const {
28       return 0;
29     }
30     virtual unsigned GPR2AlignEncode(const MachineInstr &MI,
31                                      unsigned OpNo) const {
32       return 0;
33     }
34     virtual uint64_t VOPPostEncode(const MachineInstr &MI,
35                                    uint64_t Value) const {
36       return Value;
37     }
38     virtual uint64_t i32LiteralEncode(const MachineInstr &MI,
39                                       unsigned OpNo) const {
40       return 0;
41     }
42   };
43
44 } // End namespace llvm
45
46 #endif // AMDILCODEEMITTER_H