Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 2009 Matthew Fluet. |
2 | * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh | |
3 | * Jagannathan, and Stephen Weeks. | |
4 | * Copyright (C) 1997-2000 NEC Research Institute. | |
5 | * | |
6 | * MLton is released under a BSD-style license. | |
7 | * See the file MLton-LICENSE for details. | |
8 | *) | |
9 | ||
10 | signature X86_MLTON_BASIC_STRUCTS = | |
11 | sig | |
12 | structure Machine: MACHINE | |
13 | structure x86: X86_PSEUDO | |
14 | sharing x86.CFunction = Machine.CFunction | |
15 | sharing x86.CType = Machine.CType | |
16 | sharing x86.Label = Machine.Label | |
17 | sharing x86.ProfileLabel = Machine.ProfileLabel | |
18 | sharing x86.RepType = Machine.Type | |
19 | sharing x86.Runtime = Machine.Runtime | |
20 | sharing x86.WordSize = Machine.WordSize | |
21 | sharing x86.WordX = Machine.WordX | |
22 | end | |
23 | ||
24 | signature X86_MLTON_BASIC = | |
25 | sig | |
26 | include X86_MLTON_BASIC_STRUCTS | |
27 | ||
28 | structure CFunction: C_FUNCTION | |
29 | structure CType: C_TYPE | |
30 | structure RepType: REP_TYPE | |
31 | sharing CFunction = RepType.CFunction | |
32 | sharing CType = RepType.CType | |
33 | sharing RepType = Machine.Type | |
34 | ||
35 | val init : unit -> unit | |
36 | ||
37 | (* | |
38 | * x86.Size.t equivalents | |
39 | *) | |
40 | val wordBytes : int | |
41 | val wordSize : x86.Size.t | |
42 | val wordScale : x86.Scale.t | |
43 | val pointerBytes : int | |
44 | val pointerSize : x86.Size.t | |
45 | ||
46 | (* | |
47 | * Memory classes | |
48 | *) | |
49 | structure Classes : | |
50 | sig | |
51 | val Heap : x86.MemLoc.Class.t | |
52 | val Stack : x86.MemLoc.Class.t | |
53 | val Locals : x86.MemLoc.Class.t | |
54 | val Globals : x86.MemLoc.Class.t | |
55 | ||
56 | val Temp : x86.MemLoc.Class.t | |
57 | val StaticTemp : x86.MemLoc.Class.t | |
58 | val CStack : x86.MemLoc.Class.t | |
59 | val Code : x86.MemLoc.Class.t | |
60 | ||
61 | val CStatic : x86.MemLoc.Class.t | |
62 | val StaticNonTemp : x86.MemLoc.Class.t | |
63 | ||
64 | val GCState : x86.MemLoc.Class.t | |
65 | val GCStateHold : x86.MemLoc.Class.t | |
66 | val GCStateVolatile : x86.MemLoc.Class.t | |
67 | ||
68 | val allClasses : x86.ClassSet.t ref | |
69 | val livenessClasses : x86.ClassSet.t ref | |
70 | val holdClasses : x86.ClassSet.t ref | |
71 | val volatileClasses : x86.ClassSet.t ref | |
72 | val runtimeClasses : x86.ClassSet.t ref | |
73 | val heapClasses : x86.ClassSet.t ref | |
74 | val cstaticClasses : x86.ClassSet.t ref | |
75 | end | |
76 | ||
77 | (* CStack locations *) | |
78 | val c_stackP : x86.Label.t | |
79 | val c_stackPContents : x86.MemLoc.t | |
80 | val c_stackPContentsOperand : x86.Operand.t | |
81 | val c_stackPDerefDoubleOperand : x86.Operand.t | |
82 | val c_stackPDerefFloatOperand : x86.Operand.t | |
83 | ||
84 | (* Global offset table (GOT) *) | |
85 | val globalOffsetTable : x86.Label.t | |
86 | val globalOffsetTableContents : x86.MemLoc.t | |
87 | ||
88 | (* Static temps defined in x86-main.h *) | |
89 | val applyFFTempFunContentsOperand : x86.Operand.t | |
90 | val applyFFTempArgContentsOperand : x86.Operand.t | |
91 | val realTemp1ContentsOperand : x86.Size.t -> x86.Operand.t | |
92 | val realTemp2ContentsOperand : x86.Size.t -> x86.Operand.t | |
93 | val realTemp3ContentsOperand : x86.Size.t -> x86.Operand.t | |
94 | val fildTempContentsOperand : x86.Operand.t | |
95 | val fpswTempContentsOperand : x86.Operand.t | |
96 | val wordTemp1ContentsOperand : x86.Size.t -> x86.Operand.t | |
97 | ||
98 | (* Static arrays defined in main.h and x86-main.h *) | |
99 | val local_base : x86.CType.t -> x86.Label.t | |
100 | val global_base : x86.CType.t -> x86.Label.t | |
101 | val globalObjptrNonRoot_base : x86.Label.t | |
102 | ||
103 | (* gcState relative locations defined in gc.h *) | |
104 | val gcState_label: x86.Label.t | |
105 | val gcState_offset: {offset: int, ty: x86.CType.t} -> x86.Operand.t | |
106 | val gcState_exnStackContents: unit -> x86.MemLoc.t | |
107 | val gcState_exnStackContentsOperand: unit -> x86.Operand.t | |
108 | val gcState_frontierContents: unit -> x86.MemLoc.t | |
109 | val gcState_frontierContentsOperand: unit -> x86.Operand.t | |
110 | val gcState_stackBottomContents: unit -> x86.MemLoc.t | |
111 | val gcState_stackBottomContentsOperand: unit -> x86.Operand.t | |
112 | val gcState_stackTopContents: unit -> x86.MemLoc.t | |
113 | val gcState_stackTopContentsOperand: unit -> x86.Operand.t | |
114 | val gcState_stackTopMinusWordDeref: unit -> x86.MemLoc.t | |
115 | val gcState_stackTopMinusWordDerefOperand: unit -> x86.Operand.t | |
116 | ||
117 | val stackTopTempContentsOperand: unit -> x86.Operand.t | |
118 | val stackTopTempMinusWordDeref: unit -> x86.MemLoc.t | |
119 | val stackTopTempMinusWordDerefOperand: unit -> x86.Operand.t | |
120 | end |