From 656823944e979e01edd70843a174fa9e4d67e12d Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Sat, 21 Jul 2001 12:42:19 +0000 Subject: Description of the SPARC as a target architecture. llvm-svn: 233 --- llvm/lib/CodeGen/TargetMachine/Sparc/Sparc.cpp | 56 ++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 llvm/lib/CodeGen/TargetMachine/Sparc/Sparc.cpp (limited to 'llvm/lib/CodeGen/TargetMachine/Sparc/Sparc.cpp') diff --git a/llvm/lib/CodeGen/TargetMachine/Sparc/Sparc.cpp b/llvm/lib/CodeGen/TargetMachine/Sparc/Sparc.cpp new file mode 100644 index 00000000000..08e12ff99a3 --- /dev/null +++ b/llvm/lib/CodeGen/TargetMachine/Sparc/Sparc.cpp @@ -0,0 +1,56 @@ +// $Id$ +//*************************************************************************** +// File: +// Sparc.cpp +// +// Purpose: +// +// History: +// 7/15/01 - Vikram Adve - Created +//**************************************************************************/ + + +//************************** System Include Files **************************/ + +//*************************** User Include Files ***************************/ + +#include "llvm/DerivedTypes.h" +#include "llvm/Codegen/Sparc.h" + + +//************************ Exported Constants ******************************/ + + +// Set external object describing the machine instructions +// +const MachineInstrInfo* TargetMachineInstrInfo = SparcMachineInstrInfo; + + +//************************ Class Implementations **************************/ + + +//--------------------------------------------------------------------------- +// class UltraSparcMachine +// +// Purpose: +// Machine description. +// +//--------------------------------------------------------------------------- + +UltraSparc::UltraSparc() + : TargetMachine() +{ + optSizeForSubWordData = 4; + intSize = 4; + floatSize = 4; + longSize = 8; + doubleSize = 8; + longDoubleSize = 16; + pointerSize = 8; + minMemOpWordSize = 8; + maxAtomicMemOpWordSize = 8; + machineInstrInfo = SparcMachineInstrInfo; + zeroRegNum = 0; // %g0 always gives 0 on Sparc +} + +//**************************************************************************/ -- cgit v1.2.3