Jakob Stoklund Olesen | d950941 | 2009-08-02 17:32:10 +0000 | [diff] [blame] | 1 | //===- BlackfinSubtarget.cpp - BLACKFIN Subtarget Information -------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Evan Cheng | 5b1b4489 | 2011-07-01 21:01:15 +0000 | [diff] [blame] | 10 | // This file implements the blackfin specific subclass of TargetSubtargetInfo. |
Jakob Stoklund Olesen | d950941 | 2009-08-02 17:32:10 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "BlackfinSubtarget.h" |
Evan Cheng | ffc0e73 | 2011-07-09 05:47:46 +0000 | [diff] [blame] | 15 | #include "Blackfin.h" |
Evan Cheng | 3e74d6f | 2011-08-24 18:08:43 +0000 | [diff] [blame] | 16 | #include "llvm/Support/TargetRegistry.h" |
Evan Cheng | 9421470 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 17 | |
Evan Cheng | 9421470 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 18 | #define GET_SUBTARGETINFO_TARGET_DESC |
Evan Cheng | ebdeeab | 2011-07-08 01:53:10 +0000 | [diff] [blame] | 19 | #define GET_SUBTARGETINFO_CTOR |
Evan Cheng | 385e930 | 2011-07-01 22:36:09 +0000 | [diff] [blame] | 20 | #include "BlackfinGenSubtargetInfo.inc" |
Jakob Stoklund Olesen | d950941 | 2009-08-02 17:32:10 +0000 | [diff] [blame] | 21 | |
| 22 | using namespace llvm; |
| 23 | |
Daniel Dunbar | 3be0340 | 2009-08-02 22:11:08 +0000 | [diff] [blame] | 24 | BlackfinSubtarget::BlackfinSubtarget(const std::string &TT, |
Evan Cheng | 276365d | 2011-06-30 01:53:36 +0000 | [diff] [blame] | 25 | const std::string &CPU, |
Jakob Stoklund Olesen | 26a84d4 | 2009-08-02 18:27:36 +0000 | [diff] [blame] | 26 | const std::string &FS) |
Evan Cheng | 0ddff1b | 2011-07-07 07:07:08 +0000 | [diff] [blame] | 27 | : BlackfinGenSubtargetInfo(TT, CPU, FS), sdram(false), |
Jakob Stoklund Olesen | 26a84d4 | 2009-08-02 18:27:36 +0000 | [diff] [blame] | 28 | icplb(false), |
| 29 | wa_mi_shift(false), |
| 30 | wa_csync(false), |
| 31 | wa_specld(false), |
| 32 | wa_mmr_stall(false), |
| 33 | wa_lcregs(false), |
| 34 | wa_hwloop(false), |
| 35 | wa_ind_call(false), |
| 36 | wa_killed_mmr(false), |
| 37 | wa_rets(false) |
| 38 | { |
Evan Cheng | 276365d | 2011-06-30 01:53:36 +0000 | [diff] [blame] | 39 | std::string CPUName = CPU; |
| 40 | if (CPUName.empty()) |
| 41 | CPUName = "generic"; |
Jakob Stoklund Olesen | d950941 | 2009-08-02 17:32:10 +0000 | [diff] [blame] | 42 | // Parse features string. |
Evan Cheng | 0ddff1b | 2011-07-07 07:07:08 +0000 | [diff] [blame] | 43 | ParseSubtargetFeatures(CPUName, FS); |
Jakob Stoklund Olesen | d950941 | 2009-08-02 17:32:10 +0000 | [diff] [blame] | 44 | } |