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/x86/instructions/x86Props.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/x86/instructions/x86Props.sml

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

revision 744, Fri Dec 8 04:11:42 2000 UTC revision 775, Fri Jan 12 01:17:51 2001 UTC
# Line 8  Line 8 
8    structure I = X86Instr    structure I = X86Instr
9    structure C = I.C    structure C = I.C
10    structure LE = I.LabelExp    structure LE = I.LabelExp
11      structure T = I.T
12    
13    exception NegateConditional    exception NegateConditional
14    
# Line 72  Line 73 
73    fun branchTargets(I.JMP(_, [])) = [ESCAPES]    fun branchTargets(I.JMP(_, [])) = [ESCAPES]
74      | branchTargets(I.JMP(_, labs)) = map LABELLED labs      | branchTargets(I.JMP(_, labs)) = map LABELLED labs
75      | branchTargets(I.RET _) = [ESCAPES]      | branchTargets(I.RET _) = [ESCAPES]
76      | branchTargets(I.JCC{opnd=I.ImmedLabel(LE.LABEL(lab)), ...}) =      | branchTargets(I.JCC{opnd=I.ImmedLabel(T.LABEL(lab)), ...}) =
77          [FALLTHROUGH, LABELLED lab]          [FALLTHROUGH, LABELLED lab]
78      | branchTargets(I.ANNOTATION{i,...}) = branchTargets i      | branchTargets(I.ANNOTATION{i,...}) = branchTargets i
79      | branchTargets _ = error "branchTargets"      | branchTargets _ = error "branchTargets"
80    
81    fun jump label = I.JMP (I.ImmedLabel(LE.LABEL label), [label])    fun jump label = I.JMP (I.ImmedLabel(T.LABEL label), [label])
82    
83    exception NotImplemented    exception NotImplemented
84    fun setTargets(I.JMP(I.ImmedLabel _,_),[l]) = jump l    fun setTargets(I.JMP(I.ImmedLabel _,_),[l]) = jump l
85      | setTargets(I.JMP(opnd,_),_) = error "setTargets"      | setTargets(I.JMP(opnd,_),_) = error "setTargets"
86      | setTargets(I.JCC{cond,opnd=I.ImmedLabel _},[f,t]) =      | setTargets(I.JCC{cond,opnd=I.ImmedLabel _},[f,t]) =
87          I.JCC{cond=cond,opnd=I.ImmedLabel(LE.LABEL t)}          I.JCC{cond=cond,opnd=I.ImmedLabel(T.LABEL t)}
88      | setTargets(I.JCC _,_) = error "setTargets"      | setTargets(I.JCC _,_) = error "setTargets"
89      | setTargets(I.ANNOTATION{i,a},l) = I.ANNOTATION{i=setTargets(i,l),a=a}      | setTargets(I.ANNOTATION{i,a},l) = I.ANNOTATION{i=setTargets(i,l),a=a}
90      | setTargets(i,_) = i      | setTargets(i,_) = i

Legend:
Removed from v.744  
changed lines
  Added in v.775

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