blob: 9f64b1a687704d042679c084f1cf3b5153504cb2 [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",
John Criswell4ffff9e2004-04-08 20:31:47 +000043 "Opcode"];
44 let TSFlagsShifts = [0,
45 5,
46 6,
47 10,
48 13,
49 15,
50 18,
Chris Lattnera35ce872004-08-01 08:23:17 +000051 19];
Chris Lattnerb77eb782003-08-03 18:19:37 +000052}
53
54def X86 : Target {
55 // Specify the callee saved registers.
Chris Lattnerc8f45872003-08-04 04:59:56 +000056 let CalleeSavedRegisters = [ESI, EDI, EBX, EBP];
Chris Lattnerb77eb782003-08-03 18:19:37 +000057
58 // Yes, pointers are 32-bits in size.
Chris Lattnerc8f45872003-08-04 04:59:56 +000059 let PointerType = i32;
Chris Lattnerb77eb782003-08-03 18:19:37 +000060
61 // Information about the instructions...
Chris Lattnerc8f45872003-08-04 04:59:56 +000062 let InstructionSet = X86InstrInfo;
Chris Lattnerb77eb782003-08-03 18:19:37 +000063}