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 /MLRISC/trunk/hppa/emit/hppaMC.sml
ViewVC logotype

Diff of /MLRISC/trunk/hppa/emit/hppaMC.sml

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

revision 5235, Fri May 31 13:06:20 2019 UTC revision 5236, Fri May 31 14:55:47 2019 UTC
# Line 37  Line 37 
37         fun emit_label l = itow(Label.addrOf l)         fun emit_label l = itow(Label.addrOf l)
38         fun emit_labexp le = itow(MLTreeEval.valueOf le)         fun emit_labexp le = itow(MLTreeEval.valueOf le)
39         fun emit_const c = itow(Constant.valueOf c)         fun emit_const c = itow(Constant.valueOf c)
40           val w32ToByte = Word8.fromLarge o Word32.toLarge
41         val loc = ref 0         val loc = ref 0
42    
43         (* emit a byte *)         (* emit a byte *)
# Line 47  Line 48 
48         (* note: fromLargeWord strips the high order bits! *)         (* note: fromLargeWord strips the high order bits! *)
49         fun eByteW w =         fun eByteW w =
50         let val i = !loc         let val i = !loc
51         in loc := i + 1; CodeString.update(i,Word8.fromLargeWord w) end         in loc := i + 1; CodeString.update(i, w32ToByte w) end
52    
53         fun doNothing _ = ()         fun doNothing _ = ()
54         fun fail _ = raise Fail "MCEmitter"         fun fail _ = raise Fail "MCEmitter"

Legend:
Removed from v.5235  
changed lines
  Added in v.5236

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