Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/hppa/hppaAsm.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/hppa/hppaAsm.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 93, Tue May 12 21:56:22 1998 UTC revision 127, Mon Sep 7 19:06:29 1998 UTC
# Line 57  Line 57 
57        | cond I.GTU = ">>"        | cond I.GTU = ">>"
58        | cond I.GEU = ">>="        | cond I.GEU = ">>="
59    
60      fun fcond I.==   = "=="      fun fcond I.?    = "?"
61        | fcond I.!=   = "!="        | fcond I.!<=> = "!<=>"
62        | fcond I.?    = "?"        | fcond I.==   = "=="
63        | fcond I.<=>  = "<=>"        | fcond I.?=   = "?="
64          | fcond I.!<>  = "!<>"
65          | fcond I.!?>= = "!?>="
66          | fcond I.<    = "<"
67          | fcond I.?<   = "?<"
68          | fcond I.!>=  = "!>="
69          | fcond I.!?>  = "!?>"
70          | fcond I.<=   = "<="
71          | fcond I.?<=  = "?<+"
72          | fcond I.!>   = "!>"
73          | fcond I.!?<= = "!?<="
74        | fcond I.>    = ">"        | fcond I.>    = ">"
       | fcond I.>=   = ">= "  
75        | fcond I.?>   = "?>"        | fcond I.?>   = "?>"
76          | fcond I.!<=  = "!<="
77          | fcond I.!?<  = "!?<"
78          | fcond I.>=   = ">="
79        | fcond I.?>=  = "?>= "        | fcond I.?>=  = "?>= "
80        | fcond I.<    = "<"        | fcond I.!<   = "!<"
81        | fcond I.<=   = "<= "        | fcond I.!?=  = "!?="
       | fcond I.?<   = "?<"  
       | fcond I.?<=  = "?<= "  
82        | fcond I.<>   = "<>"        | fcond I.<>   = "<>"
83        | fcond I.?=   = "?= "        | fcond I.!=   = "!="
84          | fcond I.!?   = "!?"
85          | fcond I.<=>  = "<=>"
86    
87      fun emitFieldSel fs =      fun emitFieldSel fs =
88        emit(case fs        emit(case fs
# Line 138  Line 150 
150        | nullify false = ()        | nullify false = ()
151      fun bcond{cmp, bc, r1, r2, t, f, n} =      fun bcond{cmp, bc, r1, r2, t, f, n} =
152        (emitCmp cmp;  emit (cond bc); nullify n; emit "\t";        (emitCmp cmp;  emit (cond bc); nullify n; emit "\t";
153         eReg r1; comma(); eReg r2; comma(); eLabel t         eReg r1; comma(); eReg r2; comma(); eLabel t;
154         (* emit "\n\tNOP" *))         emit "\n\tNOP" )
155      fun bcondi{cmpi, bc, i, r2, t, f, n} =      fun bcondi{cmpi, bc, i, r2, t, f, n} =
156        (emitCmpi cmpi; emit (cond bc); nullify n; emit "\t";        (emitCmpi cmpi; emit (cond bc); nullify n; emit "\t";
157         emit(ms i); comma(); eReg r2; comma(); eLabel t         emit(ms i); comma(); eReg r2; comma(); eLabel t;
158         (* emit "\n\tNOP" *))         emit "\n\tNOP")
159    
160      fun farith{fa, r1, r2, t} = let      fun farith{fa, r1, r2, t} = let
161        val oper = case fa of I.FADD => "\tFADD\t" | I.FSUB => "\tFSUB\t"        val oper = case fa of I.FADD => "\tFADD\t" | I.FSUB => "\tFSUB\t"
# Line 194  Line 206 
206        | I.BCOND arg                     => bcond arg        | I.BCOND arg                     => bcond arg
207        | I.BCONDI arg                    => bcondi arg        | I.BCONDI arg                    => bcondi arg
208        | I.B{lab,n}                      => (emit "\tB"; nullify n;        | I.B{lab,n}                      => (emit "\tB"; nullify n;
209                                              emit "\t"; eLabel lab                                              emit "\t"; eLabel lab;
210                                              (* emit "\n\tNOP" *))                                              emit "\n\tNOP" )
211        | I.FBCC{t,n, ...}                => (emit "\tFBCC"; nullify n;        | I.FBCC{t,n, ...}                => (emit "\tFBCC"; nullify n;
212                                              emit "\t"; eLabel t                                              emit "\t"; eLabel t;
213                                              (* emit "\n\tNOP" *))                                              emit "\n\tNOP")
214    
215        | I.BLE{d, sr, b, t, ...} =>        | I.BLE{d, sr, b, t, ...} =>
216            (emit "\tBLE\t"; eOperand d;            (emit "\tBLE\t"; eOperand d;
# Line 206  Line 218 
218             emit "\n\tCOPY %r31,"; eReg t)             emit "\n\tCOPY %r31,"; eReg t)
219        | I.BL{x=I.LabExp(LE.LABEL lab, fs), t, n, ...} =>        | I.BL{x=I.LabExp(LE.LABEL lab, fs), t, n, ...} =>
220            (emit "\tBL"; nullify n;            (emit "\tBL"; nullify n;
221             emit "\t"; emitFieldSel fs; eLabel lab; comma(); eReg t             emit "\t"; emitFieldSel fs; eLabel lab; comma(); eReg t;
222             (* emit "\n\tNOP" *))             emit "\n\tNOP" )
223        | I.BL _ => error "emitInstr:bl"        | I.BL _ => error "emitInstr:bl"
224        | I.BV{x, b, n, ...} =>        | I.BV{x, b, n, ...} =>
225            (emit "\tBV"; nullify n; emit "\t"; eReg x; paren(fn () => eReg b)            (emit "\tBV"; nullify n; emit "\t"; eReg x; paren(fn () => eReg b);
226            (* ; emit "\n\tNOP" *))             emit "\n\tNOP" )
227        | I.LDIL{i, t} => (emit "\tLDIL\t"; eOperand i; comma(); eReg t)        | I.LDIL{i, t} => (emit "\tLDIL\t"; eOperand i; comma(); eReg t)
228        | I.LDO{i,b,t} =>        | I.LDO{i,b,t} =>
229            (emit "\tLDO\t";  eOperand i; paren(fn () => eReg b);            (emit "\tLDO\t";  eOperand i; paren(fn () => eReg b);
# Line 252  Line 264 
264  end  end
265    
266    
 (*  
  * $Log: hppaAsm.sml,v $  
  * Revision 1.1.1.1  1998/04/08 18:39:01  george  
  * Version 110.5  
  *  
  *)  

Legend:
Removed from v.93  
changed lines
  Added in v.127

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0