2006-05-15 06:18:28 +08:00
|
|
|
//===- ARM.td - Describe the ARM Target Machine -----------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-30 04:36:04 +08:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
2006-05-15 06:18:28 +08:00
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Target-independent interfaces which we are implementing
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2008-11-24 15:34:46 +08:00
|
|
|
include "llvm/Target/Target.td"
|
2006-05-15 06:18:28 +08:00
|
|
|
|
2007-01-19 15:51:42 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ARM Subtarget features.
|
|
|
|
//
|
|
|
|
|
|
|
|
def ArchV4T : SubtargetFeature<"v4t", "ARMArchVersion", "V4T",
|
|
|
|
"ARM v4T">;
|
|
|
|
def ArchV5T : SubtargetFeature<"v5t", "ARMArchVersion", "V5T",
|
|
|
|
"ARM v5T">;
|
|
|
|
def ArchV5TE : SubtargetFeature<"v5te", "ARMArchVersion", "V5TE",
|
|
|
|
"ARM v5TE, v5TEj, v5TExp">;
|
|
|
|
def ArchV6 : SubtargetFeature<"v6", "ARMArchVersion", "V6",
|
|
|
|
"ARM v6">;
|
2009-06-09 05:20:36 +08:00
|
|
|
def ArchV6T2 : SubtargetFeature<"v6t2", "ARMArchVersion", "V6T2",
|
|
|
|
"ARM v6t2">;
|
2009-05-24 03:51:43 +08:00
|
|
|
def ArchV7A : SubtargetFeature<"v7a", "ARMArchVersion", "V7A",
|
|
|
|
"ARM v7A">;
|
|
|
|
def FeatureVFP2 : SubtargetFeature<"vfp2", "ARMFPUType", "VFPv2",
|
2009-05-30 07:41:08 +08:00
|
|
|
"Enable VFP2 instructions">;
|
2009-05-24 03:51:43 +08:00
|
|
|
def FeatureVFP3 : SubtargetFeature<"vfp3", "ARMFPUType", "VFPv3",
|
2009-05-30 07:41:08 +08:00
|
|
|
"Enable VFP3 instructions">;
|
2009-05-24 03:51:43 +08:00
|
|
|
def FeatureNEON : SubtargetFeature<"neon", "ARMFPUType", "NEON",
|
2009-05-30 07:41:08 +08:00
|
|
|
"Enable NEON instructions">;
|
|
|
|
def FeatureThumb2 : SubtargetFeature<"thumb2", "ThumbMode", "Thumb2",
|
|
|
|
"Enable Thumb2 instructions">;
|
2010-03-15 02:42:38 +08:00
|
|
|
def FeatureFP16 : SubtargetFeature<"fp16", "HasFP16", "true",
|
|
|
|
"Enable half-precision floating point">;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
2010-03-26 07:11:16 +08:00
|
|
|
// Some processors have multiply-accumulate instructions that don't
|
|
|
|
// play nicely with other VFP instructions, and it's generally better
|
|
|
|
// to just not use them.
|
|
|
|
// FIXME: Currently, this is only flagged for Cortex-A8. It may be true for
|
|
|
|
// others as well. We should do more benchmarking and confirm one way or
|
|
|
|
// the other.
|
2010-03-26 07:34:05 +08:00
|
|
|
def HasSlowVMLx : SubtargetFeature<"vmlx", "SlowVMLx", "true",
|
|
|
|
"Disable VFP MAC instructions">;
|
2010-03-26 07:11:16 +08:00
|
|
|
|
2007-01-19 15:51:42 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ARM Processors supported.
|
|
|
|
//
|
|
|
|
|
2009-06-19 09:51:50 +08:00
|
|
|
include "ARMSchedule.td"
|
|
|
|
|
|
|
|
class ProcNoItin<string Name, list<SubtargetFeature> Features>
|
|
|
|
: Processor<Name, GenericItineraries, Features>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
|
|
|
// V4 Processors.
|
2009-06-19 09:51:50 +08:00
|
|
|
def : ProcNoItin<"generic", []>;
|
|
|
|
def : ProcNoItin<"arm8", []>;
|
|
|
|
def : ProcNoItin<"arm810", []>;
|
|
|
|
def : ProcNoItin<"strongarm", []>;
|
|
|
|
def : ProcNoItin<"strongarm110", []>;
|
|
|
|
def : ProcNoItin<"strongarm1100", []>;
|
|
|
|
def : ProcNoItin<"strongarm1110", []>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
|
|
|
// V4T Processors.
|
2009-06-19 09:51:50 +08:00
|
|
|
def : ProcNoItin<"arm7tdmi", [ArchV4T]>;
|
|
|
|
def : ProcNoItin<"arm7tdmi-s", [ArchV4T]>;
|
|
|
|
def : ProcNoItin<"arm710t", [ArchV4T]>;
|
|
|
|
def : ProcNoItin<"arm720t", [ArchV4T]>;
|
|
|
|
def : ProcNoItin<"arm9", [ArchV4T]>;
|
|
|
|
def : ProcNoItin<"arm9tdmi", [ArchV4T]>;
|
|
|
|
def : ProcNoItin<"arm920", [ArchV4T]>;
|
|
|
|
def : ProcNoItin<"arm920t", [ArchV4T]>;
|
|
|
|
def : ProcNoItin<"arm922t", [ArchV4T]>;
|
|
|
|
def : ProcNoItin<"arm940t", [ArchV4T]>;
|
|
|
|
def : ProcNoItin<"ep9312", [ArchV4T]>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
|
|
|
// V5T Processors.
|
2009-06-19 09:51:50 +08:00
|
|
|
def : ProcNoItin<"arm10tdmi", [ArchV5T]>;
|
|
|
|
def : ProcNoItin<"arm1020t", [ArchV5T]>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
|
|
|
// V5TE Processors.
|
2009-06-19 09:51:50 +08:00
|
|
|
def : ProcNoItin<"arm9e", [ArchV5TE]>;
|
|
|
|
def : ProcNoItin<"arm926ej-s", [ArchV5TE]>;
|
|
|
|
def : ProcNoItin<"arm946e-s", [ArchV5TE]>;
|
|
|
|
def : ProcNoItin<"arm966e-s", [ArchV5TE]>;
|
|
|
|
def : ProcNoItin<"arm968e-s", [ArchV5TE]>;
|
|
|
|
def : ProcNoItin<"arm10e", [ArchV5TE]>;
|
|
|
|
def : ProcNoItin<"arm1020e", [ArchV5TE]>;
|
|
|
|
def : ProcNoItin<"arm1022e", [ArchV5TE]>;
|
|
|
|
def : ProcNoItin<"xscale", [ArchV5TE]>;
|
|
|
|
def : ProcNoItin<"iwmmxt", [ArchV5TE]>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
|
|
|
// V6 Processors.
|
2009-11-19 02:39:57 +08:00
|
|
|
def : Processor<"arm1136j-s", ARMV6Itineraries, [ArchV6]>;
|
|
|
|
def : Processor<"arm1136jf-s", ARMV6Itineraries, [ArchV6, FeatureVFP2]>;
|
|
|
|
def : Processor<"arm1176jz-s", ARMV6Itineraries, [ArchV6]>;
|
|
|
|
def : Processor<"arm1176jzf-s", ARMV6Itineraries, [ArchV6, FeatureVFP2]>;
|
|
|
|
def : Processor<"mpcorenovfp", ARMV6Itineraries, [ArchV6]>;
|
|
|
|
def : Processor<"mpcore", ARMV6Itineraries, [ArchV6, FeatureVFP2]>;
|
2007-01-19 15:51:42 +08:00
|
|
|
|
2009-06-09 05:20:36 +08:00
|
|
|
// V6T2 Processors.
|
2009-11-19 02:39:57 +08:00
|
|
|
def : Processor<"arm1156t2-s", ARMV6Itineraries,
|
|
|
|
[ArchV6T2, FeatureThumb2]>;
|
|
|
|
def : Processor<"arm1156t2f-s", ARMV6Itineraries,
|
|
|
|
[ArchV6T2, FeatureThumb2, FeatureVFP2]>;
|
2009-05-30 07:41:08 +08:00
|
|
|
|
2009-06-09 05:20:36 +08:00
|
|
|
// V7 Processors.
|
2009-07-22 02:54:14 +08:00
|
|
|
def : Processor<"cortex-a8", CortexA8Itineraries,
|
2010-03-26 07:34:05 +08:00
|
|
|
[ArchV7A, FeatureThumb2, FeatureNEON, HasSlowVMLx]>;
|
2009-09-24 05:38:08 +08:00
|
|
|
def : ProcNoItin<"cortex-a9", [ArchV7A, FeatureThumb2, FeatureNEON]>;
|
2009-05-24 03:51:43 +08:00
|
|
|
|
2006-05-15 06:18:28 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Register File Description
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "ARMRegisterInfo.td"
|
|
|
|
|
2009-04-18 03:07:39 +08:00
|
|
|
include "ARMCallingConv.td"
|
|
|
|
|
2006-05-15 06:18:28 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Instruction Descriptions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "ARMInstrInfo.td"
|
|
|
|
|
|
|
|
def ARMInstrInfo : InstrInfo {
|
|
|
|
// Define how we want to layout our target-specific information field.
|
2007-01-19 15:51:42 +08:00
|
|
|
let TSFlagsFields = ["AddrModeBits",
|
|
|
|
"SizeFlag",
|
|
|
|
"IndexModeBits",
|
2009-07-08 09:46:35 +08:00
|
|
|
"Form",
|
2009-11-02 08:10:38 +08:00
|
|
|
"isUnaryDataProc",
|
|
|
|
"canXformTo16Bit",
|
|
|
|
"Dom"];
|
2007-01-19 15:51:42 +08:00
|
|
|
let TSFlagsShifts = [0,
|
|
|
|
4,
|
|
|
|
7,
|
2007-08-07 09:37:15 +08:00
|
|
|
9,
|
2009-11-02 08:10:38 +08:00
|
|
|
15,
|
|
|
|
16,
|
|
|
|
17];
|
2006-05-15 06:18:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Declare the target which we are implementing
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def ARM : Target {
|
|
|
|
// Pull in Instruction Info:
|
|
|
|
let InstructionSet = ARMInstrInfo;
|
|
|
|
}
|