Misha Brukman | bb053ce | 2003-05-29 18:48:17 +0000 | [diff] [blame] | 1 | //===- Sparc.td - Target Description for Sparc V9 Target --------*- C++ -*-===// |
| 2 | // vim:ft=cpp |
| 3 | //===----------------------------------------------------------------------===// |
| 4 | |
| 5 | //===----------------------------------------------------------------------===// |
| 6 | // Target-Independent interface |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
Chris Lattner | 845ed84 | 2003-07-28 04:24:59 +0000 | [diff] [blame] | 9 | |
| 10 | // Value types - These values correspond to the register types defined in the |
Chris Lattner | 6a561be | 2003-07-29 23:02:49 +0000 | [diff] [blame^] | 11 | // ValueTypes.h file. |
| 12 | class ValueType { string Namespace = "MVT"; } |
Chris Lattner | 845ed84 | 2003-07-28 04:24:59 +0000 | [diff] [blame] | 13 | def i1 : ValueType; // One bit boolean value |
| 14 | def i8 : ValueType; // 8-bit integer value |
| 15 | def i16 : ValueType; // 16-bit integer value |
| 16 | def i32 : ValueType; // 32-bit integer value |
| 17 | def i64 : ValueType; // 64-bit integer value |
| 18 | def i128 : ValueType; // 128-bit integer value |
| 19 | def f32 : ValueType; // 32-bit floating point value |
| 20 | def f64 : ValueType; // 64-bit floating point value |
| 21 | def f80 : ValueType; // 80-bit floating point value |
| 22 | def f128 : ValueType; // 128-bit floating point value |
| 23 | |
Misha Brukman | bb053ce | 2003-05-29 18:48:17 +0000 | [diff] [blame] | 24 | class Register { |
| 25 | string Namespace = ""; |
Chris Lattner | 845ed84 | 2003-07-28 04:24:59 +0000 | [diff] [blame] | 26 | ValueType RegType; |
Misha Brukman | bb053ce | 2003-05-29 18:48:17 +0000 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | class Instruction { |
| 30 | string Name; // The opcode string for this instruction |
| 31 | string Namespace = ""; |
| 32 | |
| 33 | list<Register> Uses = []; // Default to using no non-operand registers |
| 34 | list<Register> Defs = []; // Default to modifying no non-operand registers |
| 35 | |
| 36 | // These bits capture information about the high-level semantics of the |
| 37 | // instruction. |
Chris Lattner | 6a561be | 2003-07-29 23:02:49 +0000 | [diff] [blame^] | 38 | bit isReturn = 0; // Is this instruction a return instruction? |
| 39 | bit isBranch = 0; // Is this instruction a branch instruction? |
| 40 | bit isCall = 0; // Is this instruction a call instruction? |
| 41 | bit isTwoAddress = 0; // Is this a two address instruction? |
| 42 | bit isTerminator = 0; // Is this part of the terminator for a basic block? |
Misha Brukman | bb053ce | 2003-05-29 18:48:17 +0000 | [diff] [blame] | 43 | } |