blob: ac0141bcb17880d4b78d0002114a2c4333f78bc5 [file] [log] [blame]
Chris Lattner762fb5f2003-08-03 15:47:49 +00001//===- X86.td - Target definition file for the Intel X86 arch ---*- C++ -*-===//
John Criswell856ba762003-10-21 15:17:13 +00002//
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//===----------------------------------------------------------------------===//
Chris Lattner762fb5f2003-08-03 15:47:49 +00009//
10// This is a target description file for the Intel i386 architecture, refered to
11// here as the "X86" architecture.
12//
13//===----------------------------------------------------------------------===//
14
Chris Lattnerc8f45872003-08-04 04:59:56 +000015// Get the target-independent interfaces which we are implementing...
Chris Lattner762fb5f2003-08-03 15:47:49 +000016//
17include "../Target.td"
18
19//===----------------------------------------------------------------------===//
20// Register File Description
21//===----------------------------------------------------------------------===//
22
23include "X86RegisterInfo.td"
24
Chris Lattnerb77eb782003-08-03 18:19:37 +000025//===----------------------------------------------------------------------===//
26// Instruction Descriptions
27//===----------------------------------------------------------------------===//
28
Chris Lattner1cca5e32003-08-03 21:54:21 +000029include "X86InstrInfo.td"
30
Chris Lattnerb77eb782003-08-03 18:19:37 +000031def X86InstrInfo : InstrInfo {
Chris Lattnerc8f45872003-08-04 04:59:56 +000032 let PHIInst = PHI;
Chris Lattner1cca5e32003-08-03 21:54:21 +000033
34 // Define how we want to layout our TargetSpecific information field... This
35 // should be kept up-to-date with the fields in the X86InstrInfo.h file.
John Criswell4ffff9e2004-04-08 20:31:47 +000036 let TSFlagsFields = ["FormBits",
37 "hasOpSizePrefix",
38 "Prefix",
39 "MemTypeBits",
40 "ImmTypeBits",
41 "FPFormBits",
42 "printImplicitUsesAfter",
43 "printImplicitUsesBefore",
Chris Lattner26653832004-04-13 17:18:39 +000044 "printImplicitDefsBefore",
John Criswell4ffff9e2004-04-08 20:31:47 +000045 "printImplicitDefsAfter",
46 "Opcode"];
47 let TSFlagsShifts = [0,
48 5,
49 6,
50 10,
51 13,
52 15,
53 18,
54 19,
55 20,
Chris Lattner26653832004-04-13 17:18:39 +000056 21,
57 22];
Chris Lattnerb77eb782003-08-03 18:19:37 +000058}
59
60def X86 : Target {
61 // Specify the callee saved registers.
Chris Lattnerc8f45872003-08-04 04:59:56 +000062 let CalleeSavedRegisters = [ESI, EDI, EBX, EBP];
Chris Lattnerb77eb782003-08-03 18:19:37 +000063
64 // Yes, pointers are 32-bits in size.
Chris Lattnerc8f45872003-08-04 04:59:56 +000065 let PointerType = i32;
Chris Lattnerb77eb782003-08-03 18:19:37 +000066
67 // Information about the instructions...
Chris Lattnerc8f45872003-08-04 04:59:56 +000068 let InstructionSet = X86InstrInfo;
Chris Lattnerb77eb782003-08-03 18:19:37 +000069}