//===-- WDC65816Subtarget.h - Define Subtarget for the WDC65816 -*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file declares the WDC65816 specific subclass of TargetSubtargetInfo. // //===----------------------------------------------------------------------===// #ifndef WDC65816_SUBTARGET_H #define WDC65816_SUBTARGET_H #include "llvm/Target/TargetSubtargetInfo.h" #include #define GET_SUBTARGETINFO_HEADER #include "WDC65816GenSubtargetInfo.inc" namespace llvm { class StringRef; class WDC65816Subtarget : public WDC65816GenSubtargetInfo { virtual void anchor(); public: WDC65816Subtarget(const std::string &TT, const std::string &CPU, const std::string &FS); /// ParseSubtargetFeatures - Parses features string setting specified /// subtarget options. Definition of function is auto generated by tblgen. void ParseSubtargetFeatures(StringRef CPU, StringRef FS); bool is64Bit() const { return false; } std::string getDataLayout() const { return std::string("e-p:32:8:8-i16:8:8-f32:8:8-f68:8:8-n16"); } #if 0 // WDC_TODO - do I need any of this? /// The 64-bit ABI uses biased stack and frame pointers, so the stack frame /// of the current function is the area from [%sp+BIAS] to [%fp+BIAS]. int64_t getStackPointerBias() const { return is64Bit() ? 2047 : 0; } /// Given a actual stack size as determined by FrameInfo, this function /// returns adjusted framesize which includes space for register window /// spills and arguments. int getAdjustedFrameSize(int stackSize) const; #endif }; } // end namespace llvm #endif