blob: 36dc1641d7b2961243f0ba8844c1ef54388012ac [file] [log] [blame]
Chris Lattner4c7b43b2005-10-14 23:37:35 +00001//===- PPC.td - Describe the PowerPC Target Machine --------*- tablegen -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by the LLVM research group and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This is the top level entry point for the PowerPC target.
11//
12//===----------------------------------------------------------------------===//
13
14// Get the target-independent interfaces which we are implementing.
15//
16include "../Target.td"
17
18//===----------------------------------------------------------------------===//
19// Register File Description
20//===----------------------------------------------------------------------===//
21
Chris Lattnerf3799972005-10-14 23:40:39 +000022include "PPCRegisterInfo.td"
Jim Laskey53842142005-10-19 19:51:16 +000023include "PPCSchedule.td"
Chris Lattnerf3799972005-10-14 23:40:39 +000024include "PPCInstrInfo.td"
Chris Lattner4c7b43b2005-10-14 23:37:35 +000025
Jim Laskey53842142005-10-19 19:51:16 +000026
27
28//===----------------------------------------------------------------------===//
29// PowerPC Subtarget features.
30//
31
32def F64Bit : SubtargetFeature<"64bit",
33 "Should 64 bit instructions be used">;
34def F64BitRegs : SubtargetFeature<"64bitregs",
35 "Should 64 bit registers be used">;
36def FAltivec : SubtargetFeature<"altivec",
37 "Should Altivec instructions be used">;
38def FGPUL : SubtargetFeature<"gpul",
39 "Should GPUL instructions be used">;
40def FFSQRT : SubtargetFeature<"fsqrt",
41 "Should the fsqrt instruction be used">;
42
43//===----------------------------------------------------------------------===//
44// PowerPC chips sets supported
45//
46
47def : Processor<"601", G3Itineraries, []>;
48def : Processor<"602", G3Itineraries, []>;
49def : Processor<"603", G3Itineraries, []>;
50def : Processor<"604", G3Itineraries, []>;
51def : Processor<"750", G3Itineraries, []>;
52def : Processor<"7400", G4Itineraries, [FAltivec]>;
53def : Processor<"g4", G4Itineraries, [FAltivec]>;
54def : Processor<"7450", G4PlusItineraries, [FAltivec]>;
55def : Processor<"g4+", G4PlusItineraries, [FAltivec]>;
56def : Processor<"970", G5Itineraries,
57 [FAltivec, FGPUL, FFSQRT, F64Bit, F64BitRegs]>;
58def : Processor<"g5", G5Itineraries,
59 [FAltivec, FGPUL, FFSQRT, F64Bit, F64BitRegs]>;
60
61
Chris Lattner4c7b43b2005-10-14 23:37:35 +000062def PPC : Target {
63 // Pointers on PPC are 32-bits in size.
64 let PointerType = i32;
65
66 // According to the Mach-O Runtime ABI, these regs are nonvolatile across
67 // calls
68 let CalleeSavedRegisters = [R1, R13, R14, R15, R16, R17, R18, R19,
69 R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, R30, R31, F14, F15,
70 F16, F17, F18, F19, F20, F21, F22, F23, F24, F25, F26, F27, F28, F29,
71 F30, F31, CR2, CR3, CR4, LR];
72
73 // Pull in Instruction Info:
74 let InstructionSet = PowerPCInstrInfo;
75}