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/branches/SMLNJ/src/MLRISC/alpha/alpha.md
ViewVC logotype

Diff of /sml/branches/SMLNJ/src/MLRISC/alpha/alpha.md

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

revision 468, Wed Nov 10 22:42:52 1999 UTC revision 469, Wed Nov 10 22:42:52 1999 UTC
# Line 236  Line 236 
236        fun disp lab = itow(Label.addrOf lab - !loc - 4) ~>> 0w2        fun disp lab = itow(Label.addrOf lab - !loc - 4) ~>> 0w2
237     end     end
238    
239       structure Assembly =
240       struct
241          fun isZero(I.CONSTop c) = Constant.valueOf c = 0
242            | isZero _ = false
243       end
244    
245     (*     (*
246      * The main instruction set definition consists of the following:      * The main instruction set definition consists of the following:
247      *  1) constructor-like declaration defines the view of the instruction,      *  1) constructor-like declaration defines the view of the instruction,
# Line 253  Line 259 
259    
260     (* Load/Store *)     (* Load/Store *)
261     | LDA of {r: $GP, b: $GP, d:operand} (* use of REGop is illegal *)     | LDA of {r: $GP, b: $GP, d:operand} (* use of REGop is illegal *)
262       ``<(emit "lda\t"; emit_GP r; emit ", "; emit_operand d;       ``<(if isZero d andalso r = b then ()
263           if b=31 then () else (emit "("; emit_GP b; emit ")"))           else (emit "lda\t"; emit_GP r; emit ", "; emit_operand d;
264                   if b=31 then () else (emit "("; emit_GP b; emit ")")))
265         >''         >''
266       ILoadStore{opc=0w08,r,b,d}       ILoadStore{opc=0w08,r,b,d}
267    

Legend:
Removed from v.468  
changed lines
  Added in v.469

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