Vikram S. Adve | a21cf20 | 2001-07-21 12:42:19 +0000 | [diff] [blame] | 1 | // $Id$ |
| 2 | //*************************************************************************** |
| 3 | // File: |
| 4 | // Sparc.cpp |
| 5 | // |
| 6 | // Purpose: |
| 7 | // |
| 8 | // History: |
| 9 | // 7/15/01 - Vikram Adve - Created |
| 10 | //**************************************************************************/ |
| 11 | |
Chris Lattner | 7e583cf | 2001-07-21 20:58:30 +0000 | [diff] [blame] | 12 | #include "llvm/CodeGen/Sparc.h" |
Vikram S. Adve | a21cf20 | 2001-07-21 12:42:19 +0000 | [diff] [blame] | 13 | |
Vikram S. Adve | a21cf20 | 2001-07-21 12:42:19 +0000 | [diff] [blame] | 14 | //************************ Class Implementations **************************/ |
| 15 | |
| 16 | |
Vikram S. Adve | 3c3b713 | 2001-07-28 04:19:10 +0000 | [diff] [blame] | 17 | |
Vikram S. Adve | a21cf20 | 2001-07-21 12:42:19 +0000 | [diff] [blame] | 18 | //--------------------------------------------------------------------------- |
| 19 | // class UltraSparcMachine |
| 20 | // |
| 21 | // Purpose: |
Vikram S. Adve | 3c3b713 | 2001-07-28 04:19:10 +0000 | [diff] [blame] | 22 | // Primary interface to machine description for the UltraSPARC. |
| 23 | // Primarily just initializes machine-dependent parameters in |
| 24 | // class TargetMachine, and creates machine-dependent subclasses |
| 25 | // for classes such as MachineInstrInfo. |
Vikram S. Adve | a21cf20 | 2001-07-21 12:42:19 +0000 | [diff] [blame] | 26 | // |
| 27 | //--------------------------------------------------------------------------- |
| 28 | |
| 29 | UltraSparc::UltraSparc() |
Vikram S. Adve | 3c3b713 | 2001-07-28 04:19:10 +0000 | [diff] [blame] | 30 | : TargetMachine(new UltraSparcInstrInfo) |
Vikram S. Adve | a21cf20 | 2001-07-21 12:42:19 +0000 | [diff] [blame] | 31 | { |
| 32 | optSizeForSubWordData = 4; |
| 33 | intSize = 4; |
| 34 | floatSize = 4; |
| 35 | longSize = 8; |
| 36 | doubleSize = 8; |
| 37 | longDoubleSize = 16; |
| 38 | pointerSize = 8; |
| 39 | minMemOpWordSize = 8; |
| 40 | maxAtomicMemOpWordSize = 8; |
Vikram S. Adve | a21cf20 | 2001-07-21 12:42:19 +0000 | [diff] [blame] | 41 | zeroRegNum = 0; // %g0 always gives 0 on Sparc |
| 42 | } |
| 43 | |
Vikram S. Adve | 3c3b713 | 2001-07-28 04:19:10 +0000 | [diff] [blame] | 44 | UltraSparc::~UltraSparc() |
| 45 | { |
| 46 | delete (UltraSparcInstrInfo*) machineInstrInfo; |
| 47 | } |
| 48 | |
Vikram S. Adve | a21cf20 | 2001-07-21 12:42:19 +0000 | [diff] [blame] | 49 | //**************************************************************************/ |