File: md.tex

package info (click to toggle)
mlton 20210117%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 58,464 kB
  • sloc: ansic: 27,682; sh: 4,455; asm: 3,569; lisp: 2,879; makefile: 2,347; perl: 1,169; python: 191; pascal: 68; javascript: 7
file content (444 lines) | stat: -rw-r--r-- 19,879 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
\section{The MLRISC Machine Description Language}

\subsection{ Overview }

\newdef{MDGen} is a machine description language 
is designed to automate
various mundane and error prone tasks in developing a back-end for 
MLRISC.  Currently, to target a new
architecture the programmer must provide the following set of modules
written in Standard ML:

\begin{itemize}
  \item \codehref{instructions/cells.sig}{CELLS} -- 
   the properties of the register set and (some part of) memory hierarchy. 
  \item \codehref{instructions/instructions.sig}{INSTRUCTIONS} -- 
   the concrete instruction set representation.
  \item \codehref{instructions/insnProps.sig}{INSNS_PROPERTIES}  --
   properties of the instructions.
  \item \codehref{instructions/shuffle.sig}{SHUFFLE} --
   methods to emit linearized code from parallel copies.
  \item \codehref{emit/instruction-emitter.sig}{ASSEMBLER} --
   the assembler
  \item \codehref{emit/instruction-emitter.sig}{MC} --
   the machine code emitter
  \item \codehref{../backpatch/sdi-jumps.sig}{ SDI_JUMPS } --
   methods for resolving span-dependent instructions. 
  \item <a href="../backpatch/delaySlotProps.sig" target=code> DELAY_SLOTS_PROPERTIES 
        </a> -- machine properties for delay slot filling, if a machine 
    architecture contains branch delay slots or load delay slots.
  \item \codehref{../SSA/ssaProps.sig}{ SSA_PROPERTIES } --
    semantics properties for performing optimizations in Static Single
  Assignment form.
\end{itemize}

In general, writing a backend is tedious even with  
SML's abstraction capabilities. 
Furthermore, the machine description is procedural in natural 
and must be checked by hand.  

\subsection{ What is in MDGen? }
The MDGen tool simplifies the process of developing a new MLRISC backend.  
MDGen provides the following:
\begin{itemize}
   \item A representation description language for specifying the
     machine encoding of the instruction set,
     using an extension of ML's algebraic datatype facility.
   \item A semantics description language for specifying the abstract semantics
      of the instructions.
\end{itemize}

Both sub-languages are based on ML's syntax and semantics, so
they should be readily familiar to all MLRISC users.

A backend developer can specify a new machine architecture using the MDGen 
language, and in turn, the MDGen tool generates ML modules that are
required by the MLRISC system.

The basic concepts of MDGen are inspired largely from 
Norman Ramsey's <a href="www.cs.virginia.edu/~nr/toolkit">
New Jersey Machine Code Tool Kit </a> and 
Ramsey and Davidson's
<a href="http://www.cs.virginia.edu/zephyr/csdl/lrtlindex.html">
Lambda RTL </a>

\subsection{A Sample Description}

Here we present a sample MDGen description, using the Alpha as an example.
We highlight all keywords in the MDGen language 
in.  A typical machine description
is structured as follows:

\begin{SML}
architecture Alpha =
   struct

   name "Alpha"

   superscalar

   little endian

   <font color=#FF0000>lowercase assembly</font>

   \href{#cells}{Storage cells and locations}
   \href{#encoding}{Instruction encoding formats specification}
   \href{#instruction}{Instruction definition}
<font color=#FF0000>end</font>
\end{SML}

Here, we declare that the Alpha is a superscalar machine using
little endian encoding.  Furthermore, assembly output should be displayed
in lowercase-- this is for personal esthetic reasons only; most assemblers
are case insensitive.



\subsubsection{ <a name="cells">Specifying Storage Cells and Locations </a>}

A <font color="#ff0000">cell</font> is an abstract resource location 
for holding data values.  On typical machines, the types of
cells include general purpose registers, floating point registers,
and condition code registers.

The \sml{storage} declaration defines different 
<font color="#ff0000">cellkinds</font>.  MLRISC requires the
cellkinds \sml{GP}, \sml{FP}, \sml{CC} to be defined.
These are the cellkinds for general purpose registers, floating point
registers and condition code registers.

In the following sequence of declarations, a few things are defined:
\begin{itemize}
  \item The cellkinds \sml{GP, FP, CC} are defined.
        Furthermore, the cellkinds \sml{MEM, CTRL}, which stand
        for memory and control (dependence), are also implicitly defined.
  \item The \sml{assembly as} clauses specify how a specific cell type is
       to be displayed.    Here, we specify that register 30, the
       stack pointer, should be displayed specially as \sml{$sp}.
  \item The \sml{in cellset} clause, when attached, tells MDGen that
       the associated cellkind should be part of the 
       \href{cellset.html}{ cellset }.  The clause \sml{in cellset GP}
       tells MDGen that the a cell of type \sml{CC} should be treated
       the same as a \sml{GP}
  \item The \sml{locations} declarations define a few abbreviations:
        \sml{stackptrR} is the stack pointer, \sml{asmTmpR} is
       the assembly temporary, \sml{fasmTmp} is the floating point
       assembly temporary etc.
\end{itemize}

<tt>
\begin{SML}
   <font color=#FF0000>storage</font>
     GP = 32 <font color=#FF0000>cells <font color=#FF0000>of</font> 64 bits in cellset called</font> "register" 
       	<font color=#FF0000>assembly as</font> (fn 30 => "$sp"
                      | r => "$"^Int.toString r)
   | FP = 32 <font color=#FF0000>cells <font color=#FF0000>of</font> 64 bits in cellset called</font> "floating point register" 
       	<font color=#FF0000>assembly as</font> (fn f => "f"^Int.toString f)
   | CC = <font color=#FF0000>cells <font color=#FF0000>of</font> 64 bits in cellset GP called</font> "condition code register"
                <font color=#FF0000>assembly as</font> "cc"
   <font color=#FF0000>locations</font>
       stackptrR = <font color=#008800>$</font>GP[30]
   <font color=#FF0000>and</font> asmTmpR   = <font color=#008800>$</font>GP[28]
   <font color=#FF0000>and</font> fasmTmp   = <font color=#008800>$</font>FP[30]
   <font color=#FF0000>and</font> GPReg r   = <font color=#008800>$</font>GP[r]
   <font color=#FF0000>and</font> FPReg f   = <font color=#008800>$</font>GP[f]
\end{SML}

<h3> <a name="instruction">
     Specifying the Representation of Instructions</a></h3> 
\begin{SML}
   <font color=#FF0000>structure</font> Instruction = 
   <font color=#FF0000>struct</font>
   <font color=#FF0000>datatype</font> ea = 
       Direct <font color=#FF0000>of</font> <font color=#008800>$</font>GP 
     | FDirect <font color=#FF0000>of</font> <font color=#008800>$</font>FP        
     | Displace <font color=#FF0000>of</font> {base: <font color=#008800>$</font>GP, disp:int}
 
   <font color=#FF0000>datatype</font> operand = 
       REGop <font color=#FF0000>of</font> <font color=#008800>$</font>GP       		``<GP>'' (GP)
     | IMMop <font color=#FF0000>of</font> int       		``<int>''
     | HILABop <font color=#FF0000>of</font> LabelExp.labexp       ``hi(<emit_labexp labexp>)''
     | LOLABop <font color=#FF0000>of</font> LabelExp.labexp       ``lo(<emit_labexp labexp>)''
     | LABop <font color=#FF0000>of</font> LabelExp.labexp       	``<emit_labexp labexp>''
     | CONSTop <font color=#FF0000>of</font> Constant.const       ``<emit_const const>''

   (* 
    * When I say ! after the datatype</font> name XXX, it means generate a
    * function emit_XXX that converts the constructors into the corresponding
    * assembly text.  By default, it uses the same name as the constructor,
    * but may be modified by the lowercase/uppercase assembly directive.
    * 
    *)
   <font color=#FF0000>datatype</font> branch! = 
      BR  0x30  
                | BSR 0x34  
                           | BLBC 0x3
    | BEQ  0x39 | BLT 0x3a | BLE  0x3b
    | BLBS 0x3c | BNE 0x3d | BGE  0x3e 
    | BGT  0x3f

   <font color=#FF0000>datatype</font> fbranch! =
                  FBEQ 0x31 | FBLT 0x32
    | FBLE 0x33             | FBNE 0x35
    | FBGE 0x36 | FBGT 0x37 
 
   <font color=#FF0000>datatype</font> load! = LDL 0x28 | LDL_L 0x2A | LDQ 0x29 | LDQ_L 0x2B | LDQ_U 0x0B
   <font color=#FF0000>datatype</font> store! = STL 0x2C | STQ 0x2D | STQ_U 0x0F
   <font color=#FF0000>datatype</font> fload[0x20..0x23]! = LDF | LDG | LDS | LDT 
   <font color=#FF0000>datatype</font> fstore[0x24..0x27]! = STF | STG | STS | STT 

   (* non-trapping opcodes *) 
   <font color=#FF0000>datatype</font> operate! = (* table C-5 *)
       ADDL  (0wx10,0wx00)                       | ADDQ (0wx10,0wx20) 
                           | CMPBGE(0wx10,0wx0f) | CMPEQ (0wx10,0wx2d) 
     | CMPLE (0wx10,0wx6d) | CMPLT (0wx10,0wx4d) | CMPULE (0wx10,0wx3d) 
     | CMPULT(0wx10,0wx1d) | SUBL  (0wx10,0wx09) 
     | SUBQ  (0wx10,0wx29) 
     | S4ADDL(0wx10,0wx02) | S4ADDQ (0wx10,0wx22) | S4SUBL (0wx10,0wx0b)
     | S4SUBQ(0wx10,0wx2b) | S8ADDL (0wx10,0wx12) | S8ADDQ (0wx10,0wx32)
     | S8SUBL(0wx10,0wx1b) | S8SUBQ (0wx10,0wx3b) 

     | AND   (0wx11,0wx00) | BIC    (0wx11,0wx08) | BIS    (0wx11,0wx20)
     | CMOVEQ(0wx11,0wx24) | CMOVLBC(0wx11,0wx16) | CMOVLBS(0wx11,0wx14)
     | CMOVGE(0wx11,0wx46) | CMOVGT (0wx11,0wx66) | CMOVLE (0wx11,0wx64)
     | CMOVLT(0wx11,0wx44) | CMOVNE (0wx11,0wx26) | EQV (0wx11,0wx48)
     | ORNOT (0wx11,0wx28) | XOR    (0wx11,0wx40)

     | EXTBL (0wx12,0wx06) | EXTLH  (0wx12,0wx6a) | EXTLL(0wx12,0wx26)
     | EXTQH (0wx12,0wx7a) | EXTQL  (0wx12,0wx36) | EXTWH(0wx12,0wx5a)
     | EXTWL (0wx12,0wx16) | INSBL  (0wx12,0wx0b) | INSLH(0wx12,0wx67)
     | INSLL (0wx12,0wx2b) | INSQH  (0wx12,0wx77) | INSQL(0wx12,0wx3b)
     | INSWH (0wx12,0wx57) | INSWL  (0wx12,0wx1b) | MSKBL(0wx12,0wx02)
     | MSKLH (0wx12,0wx62) | MSKLL  (0wx12,0wx22) | MSKQH(0wx12,0wx72)
     | MSKQL (0wx12,0wx32) | MSKWH  (0wx12,0wx52) | MSKWL(0wx12,0wx12)
     | SLL   (0wx12,0wx39) | SRA    (0wx12,0wx3c) | SRL  (0wx12,0wx34)
     | ZAP   (0wx12,0wx30) | ZAPNOT (0wx12,0wx31)
     | MULL  (0wx13,0wx00)                        | MULQ (0wx13,0wx20)
                           | UMULH  (0wx13,0wx30) 
     | SGNXL "addl" (0wx10,0wx00) (* same as ADDL *)

   (* conditional moves *) 
 
   <font color=#FF0000>datatype</font> pseudo_op! = DIVL | DIVLU
 
   <font color=#FF0000>datatype</font> operateV! = (* table C-5 opc/func *)
        ADDLV (0wx10,0wx40) | ADDQV (0wx10,0wx60)
      | SUBLV (0wx10,0wx49) | SUBQV (0wx10,0wx69) 
      | MULLV (0wx13,0wx00) | MULQV (0wx13,0wx60)
 
   <font color=#FF0000>datatype</font> foperate! =   (* table C-6 *)
      CPYS    (0wx17,0wx20)  | CPYSE (0wx17,0wx022)    | CPYSN   (0wx17,0wx021)
    | CVTLQ   (0wx17,0wx010) | CVTQL (0wx17,0wx030)    | CVTQLSV (0wx17,0wx530)
    | CVTQLV  (0wx17,0wx130)
    | FCMOVEQ (0wx17,0wx02a) | FCMOVEGE (0wx17,0wx02d) | FCMOVEGT (0wx17,0wx02f)
    | FCMOVLE (0wx17,0wx02e) | FCMOVELT (0wx17,0wx02c) | FCMOVENE (0wx17,0wx02b)
    | MF_FPCR (0wx17,0wx025) | MT_FPCR  (0wx17,0wx024)

                         (* table C-7 *)
    | CMPTEQ  (0wx16,0wx0a5) | CMPTLT (0wx16,0wx0a6)   | CMPTLE  (0wx16,0wx0a7)
    | CMPTUN  (0wx16,0wx0a4)

   <font color=#FF0000>datatype</font> foperateV! = 
          ADDSSUD  0wx5c0
        | ADDTSUD  0wx5e0
        | CVTQSC   0wx3c
        | CVTQTC   0wx3e
        | CVTTSC   0wx2c
        | CVTTQC   0wx2f
        | DIVSSUD  0wx5ec
        | DIVTSUD  0wx5c3
        | MULSSUD  0wx5c2
        | MULTSUD  0wx5e2
        | SUBSSUD  0wx5c1
        | SUBTSUD  0wx5e1
 
   <font color=#FF0000>datatype</font> osf_user_palcode! = 
      BPT 0x80 | BUGCHK 0x81 | CALLSYS 0x83 
    | GENTRAP 0xaa | IMB 0x86 | RDUNIQUE 0x9e | WRUNIQUE 0x9f

   end (* Instruction *)
\end{SML}

<h3> <a name="encoding">
     Specifying the Instruction Encoding Formats </a></h3>

    The Alpha has very simple instruction encoding formats.

<tt>
\begin{SML}
   <font color=#FF0000>instruction formats 32 bits</font>
     Memory{opc:6, ra:5, rb:GP 5, disp: signed 16} (* p3-9 *)
      (* derived from Memory *) 
   | LoadStore{opc,ra,rb,disp} =
       <font color=#FF00000>let val</font> disp = 
           <font color=#FF00000>case</font> disp <font color=#FF0000>of</font>
             I.REGop rb => emit_GP rb
           | I.IMMop i  => itow i
           | I.HILABop le => itow(LabelExp.valueOf le)
           | I.LOLABop le => itow(LabelExp.valueOf le)
           | I.LABop le => itow(LabelExp.valueOf le)
           | I.CONSTop c => itow(Constant.valueOf c)
       in  Memory{opc,ra,rb,disp}
       end
   | ILoadStore{opc,r:GP,b,d} = LoadStore{opc,ra=r,rb=b,disp=d}
   | FLoadStore{opc,r:FP,b,d} = LoadStore{opc,ra=r,rb=b,disp=d}

   | Jump{opc:6,ra:GP 5,rb:GP 5,h:2,disp:int signed 14}   (* table C-3 *)
   | Memory_fun{opc:6, ra:GP 5, rb:GP 5, func:16}     (* p3-9 *)
   | Branch{opc:branch 6, ra:GP 5, disp:signed 21}           (* p3-10 *)
   | Fbranch{opc:fbranch 6, ra:FP 5, disp:signed 21}          (* p3-10 *)
        (* p3-11 *)
   | Operate0{opc:6,ra:GP 5,rb:GP 5,sbz:13..15,_:1=0,func:5..11,rc:GP 5} 
        (* p3-11 *)
   | Operate1{opc:6,ra:GP 5,lit:signed 13..20,_:1=1,func:5..11,rc:GP 5} 
   | Operate{opc,ra,rb,func,rc} =
        (<font color=#FF00000>case</font> rb <font color=#FF0000>of</font>
          I.REGop rb => Operate0{opc,ra,rb,func,rc,sbz=0w0}
        | I.IMMop i  => Operate1{opc,ra,lit=itow i,func,rc}
        | I.HILABop le => Operate1{opc,ra,lit=itow(LabelExp.valueOf le),func,rc}
        | I.LOLABop le => Operate1{opc,ra,lit=itow(LabelExp.valueOf le),func,rc}
        | I.LABop le => Operate1{opc,ra,lit=itow(LabelExp.valueOf le),func,rc}
        | I.CONSTop c => Operate1{opc,ra,lit=itow(Constant.valueOf c),func,rc}
        )
   | Foperate{opc:6,fa:FP 5,fb:FP 5,func:5..15,fc:FP 5}
   | Pal{opc:6=0,func:26}
\end{SML}
</tt>

\subsubsection{ Specifying the instruction set }
<tt>
\begin{SML}
   <font color=#FF0000>structure</font> MC =
   <font color=#FF0000>struct</font>
      (* compute displacement address *)
      <font color=#FF0000>fun</font> disp lab = itow(Label.addrOf lab - !loc - 4) ~>> 0w2
   <font color=#FF0000>end</font>

   (*
    * The main instruction set definition consists <font color=#FF0000>of</font> the following:
    *  1) constructor-like declaration defines the view <font color=#FF0000>of</font> the instruction,
    *  2) assembly directive in funny quotes `` '',
    *  3) machine encoding expression,
    *  4) semantics expression in [[ ]],
    *  5) delay slot directives etc (not necessary in this architecture!)
    *) 
   <font color=#FF0000>instruction</font>
     DEFFREG <font color=#FF0000>of</font> <font color=#008800>$</font>FP       (* define a floating point register *)
       ``deffreg <FP>''
        (* Pseudo instruction for the register allocator *)
 
   (* Load/Store *)
   | LDA <font color=#FF0000>of</font> {r: <font color=#008800>$</font>GP, b: <font color=#008800>$</font>GP, d:operand}       (* use of REGop is illegal *)
     ``lda\t<r>, <d>()''
     ILoadStore{opc=0w08,r,b,d}

   | LDAH <font color=#FF0000>of</font> {r: <font color=#008800>$</font>GP, b: <font color=#008800>$</font>GP, d:operand} (* use of REGop is illegal *)
     ``ldah\t<r>, <d>()''
     ILoadStore{opc=0w09,r,b,d}

   | LOAD <font color=#FF0000>of</font> {ldOp:load, r: <font color=#008800>$</font>GP, b: <font color=#008800>$</font>GP, d:operand, mem:Region.region}
     ``<ldOp>\t<r>, <d>()''
     ILoadStore{opc=emit_load ldOp,r,b,d}

   | STORE <font color=#FF0000>of</font> {stOp:store, r: <font color=#008800>$</font>GP, b: <font color=#008800>$</font>GP, d:operand, mem:Region.region}
     ``<stOp>\t<r>, <d>()''
     ILoadStore{opc=emit_store stOp,r,b,d}

   | FLOAD <font color=#FF0000>of</font> {ldOp:fload, r: <font color=#008800>$</font>FP, b: <font color=#008800>$</font>GP, d:operand, mem:Region.region}
     ``<ldOp>\t<r>, <d>()''
     FLoadStore{opc=emit_fload ldOp,r,b,d}

   | FSTORE <font color=#FF0000>of</font> {stOp:fstore, r: <font color=#008800>$</font>FP, b: <font color=#008800>$</font>GP, d:operand, mem:Region.region}
     ``<stOp>\t<r>, <d>()''
     FLoadStore{opc=emit_fstore stOp,r,b,d}
 
   (* Control Instructions *)
   | JMPL <font color=#FF0000>of</font> {r: <font color=#008800>$</font>GP, b: <font color=#008800>$</font>GP, d:int} * Label.label list
     ``jmpl\t<r>, <d>()''
     Jump{opc=0wx1a,h=0w0,ra=r,rb=b,disp=d}   (* table C-3 *)

   | JSR <font color=#FF0000>of</font> {r: <font color=#008800>$</font>GP, b: <font color=#008800>$</font>GP, d:int} * C.cellset * C.cellset
     ``jsr\t<r>, <d>()''
     Jump{opc=0wx1a,h=0w1,ra=r,rb=b,disp=d}

   | RET <font color=#FF0000>of</font> {r: <font color=#008800>$</font>GP, b: <font color=#008800>$</font>GP, d:int} 
     ``ret\t<r>, <d>()''
     Jump{opc=0wx1a,h=0w2,ra=r,rb=b,disp=d}

   | BRANCH <font color=#FF0000>of</font> branch * <font color=#008800>$</font>GP * Label.label   
     ``<branch> <GP>, <label>''
     Branch{opc=branch,ra=GP,disp=disp label}

   | FBRANCH <font color=#FF0000>of</font> fbranch * <font color=#008800>$</font>FP * Label.label  
     ``<fbranch> <FP>, <label>''
     Fbranch{opc=fbranch,ra=FP,disp=disp label}
 
   (* Integer Operate *)
   | OPERATE <font color=#FF0000>of</font> {oper:operate, ra: <font color=#008800>$</font>GP, rb:operand, rc: <font color=#008800>$</font>GP}
       ``<oper>\t<ra>, <rb>, <rc>''
        (let val (opc,func) = emit_operate oper
         in  Operate{opc,func,ra,rb,rc} 
         end)

   | OPERATEV <font color=#FF0000>of</font> {oper:operateV, ra: <font color=#008800>$</font>GP, rb:operand, rc: <font color=#008800>$</font>GP}
       ``<oper>\t<ra>, <rb>, <rc>''
        (let val (opc,func) = emit_operateV oper
         in  Operate{opc,func,ra,rb,rc} 
         end)

   | PSEUDOARITH <font color=#FF0000>of</font> {oper: pseudo_op, ra: <font color=#008800>$</font>GP, rb:operand, rc: <font color=#008800>$</font>GP, 
       	     tmps: C.cellset}
       ``<oper>\t<ra>, <rb>, <rc>''
 
   (* Copy instructions *)
   | COPY <font color=#FF0000>of</font> {dst: <font color=#008800>$</font>GP list, src: <font color=#008800>$</font>GP list, 
              impl:instruction list option ref, tmp: ea option}
       ``<app emitInstr (Shuffle.shuffle{regmap,tmp,dst,src})>''
   | FCOPY <font color=#FF0000>of</font> {dst: <font color=#008800>$</font>FP list, src: <font color=#008800>$</font>FP list, 
               impl:instruction list option ref, tmp: ea option}
       ``<app emitInstr (Shuffle.shufflefp{regmap,tmp,dst,src})>''
 
   (* Floating Point Operate *)
   | FOPERATE <font color=#FF0000>of</font> {oper:foperate, fa: <font color=#008800>$</font>FP, fb: <font color=#008800>$</font>FP, fc: <font color=#008800>$</font>FP}
       ``<oper>\t<fa>, <fb>, <fc>''
       (let val (opc,func) = emit_foperate oper
        in  Foperate{opc,func,fa,fb,fc}
        end)

   (* Trapping versions <font color=#FF0000>of</font> the above *)
   | FOPERATEV <font color=#FF0000>of</font> {oper:foperateV, fa: <font color=#008800>$</font>FP, fb: <font color=#008800>$</font>FP, fc: <font color=#008800>$</font>FP}
       ``<oper>\t<fa>, <fb>, <fc>''
        Foperate{opc=0wx16,func=emit_foperateV oper,fa,fb,fc}
 
   (* Misc *)
   | TRAPB       			(* Trap barrier *)
       ``trapb''
        Memory_fun{opc=0wx18,ra=31,rb=31,func=0wx0}
 
   | CALL_PAL <font color=#FF0000>of</font> {code:osf_user_palcode, def: <font color=#008800>$</font>GP list, use: <font color=#008800>$</font>GP list}
       ``call_pal <code>''
        Pal{func=emit_osf_user_palcode code}
 end
\end{SML}
</tt>


\subsection{ 4 Machine Descriptions }
Here are some machine descriptions in varing degree of completion.

\begin{itemize}
 \item \codehref{../sparc/sparc.mdl}{ Sparc } 
 \item \codehref{../hppa/hppa.mdl}{ Hppa } 
 \item \codehref{../alpha/alpha.mdl}{ Alpha }
 \item \codehref{../ppc/ppc.mdl}{ PowerPC } 
 \item \codehref{../x86/x86.mdl}{ X86 } 
\end{itemize}

\subsection{ Syntax Highlighting Macros }

\begin{itemize}
  \item \href{md.vim}{ For vim 5.3 }
\end{itemize}

</body>
</html>