blob: 5844621b836887fe7e533223298b36826af19ec5 [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",
John Criswell4ffff9e2004-04-08 20:31:47 +000039 "ImmTypeBits",
40 "FPFormBits",
John Criswell4ffff9e2004-04-08 20:31:47 +000041 "Opcode"];
42 let TSFlagsShifts = [0,
43 5,
44 6,
45 10,
Chris Lattnerc96bb812004-08-11 07:12:04 +000046 12,
47 16];
Chris Lattnerb77eb782003-08-03 18:19:37 +000048}
49
50def X86 : Target {
51 // Specify the callee saved registers.
Chris Lattnerc8f45872003-08-04 04:59:56 +000052 let CalleeSavedRegisters = [ESI, EDI, EBX, EBP];
Chris Lattnerb77eb782003-08-03 18:19:37 +000053
54 // Yes, pointers are 32-bits in size.
Chris Lattnerc8f45872003-08-04 04:59:56 +000055 let PointerType = i32;
Chris Lattnerb77eb782003-08-03 18:19:37 +000056
57 // Information about the instructions...
Chris Lattnerc8f45872003-08-04 04:59:56 +000058 let InstructionSet = X86InstrInfo;
Chris Lattnerb77eb782003-08-03 18:19:37 +000059}