Chris Lattner | 25c29d1 | 2004-07-16 06:29:19 +0000 | [diff] [blame] | 1 | //===- SkeletonInstrInfo.td - Describe the Instruction Set ------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file was developed by the LLVM research group and is distributed under |
| 6 | // the University of Illinois Open Source License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // Skeleton instruction information. Fill in stuff here. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | class Format<bits<4> val> { |
| 15 | bits<4> Value = val; |
| 16 | } |
| 17 | |
Chris Lattner | 5ad021c | 2004-07-16 07:11:15 +0000 | [diff] [blame] | 18 | // Some of the powerpc instruction formats, plus a pseudo-instruction format: |
Chris Lattner | 25c29d1 | 2004-07-16 06:29:19 +0000 | [diff] [blame] | 19 | def Pseudo : Format<0>; |
| 20 | def IForm : Format<1>; |
| 21 | def BForm : Format<2>; |
| 22 | |
| 23 | // Look at how other targets factor commonality between instructions. |
Chris Lattner | 8cbee4e | 2004-09-21 17:30:54 +0000 | [diff] [blame] | 24 | class SkelInst<string nm, bits<6> opcd, dag ops, Format f> : Instruction { |
Chris Lattner | 25c29d1 | 2004-07-16 06:29:19 +0000 | [diff] [blame] | 25 | let Namespace = "Skeleton"; |
| 26 | |
| 27 | let Name = nm; |
Chris Lattner | 8cbee4e | 2004-09-21 17:30:54 +0000 | [diff] [blame] | 28 | let OperandList = ops; |
Chris Lattner | 25c29d1 | 2004-07-16 06:29:19 +0000 | [diff] [blame] | 29 | bits<6> Opcode = opcd; |
| 30 | Format Form = f; |
| 31 | bits<4> FormBits = Form.Value; |
| 32 | } |
| 33 | |
| 34 | // Pseudo-instructions: |
Chris Lattner | 8cbee4e | 2004-09-21 17:30:54 +0000 | [diff] [blame] | 35 | def PHI : SkelInst<"PHI", 0, (ops), Pseudo>; // PHI node... |
| 36 | def NOP : SkelInst<"NOP", 0, (ops), Pseudo>; // No-op |
| 37 | def ADJCALLSTACKDOWN : SkelInst<"ADJCALLSTACKDOWN", 0, (ops), Pseudo>; |
| 38 | def ADJCALLSTACKUP : SkelInst<"ADJCALLSTACKUP", 0, (ops), Pseudo>; |
Chris Lattner | 25c29d1 | 2004-07-16 06:29:19 +0000 | [diff] [blame] | 39 | |
| 40 | |