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/primop-branch-3/NOTES/HISTORY
ViewVC logotype

Diff of /sml/branches/primop-branch-3/NOTES/HISTORY

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

revision 1171, Fri Mar 22 20:41:43 2002 UTC revision 1203, Sat May 18 18:21:53 2002 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Allen Leung
17    Date: 2002/05/18 14:20:00 EDT
18    Tag: leunga-20020518-mdl
19    Description:
20    
21    o Made the mdl tool stuff compile and run again.
22    o I've disabled all the stuff that depends on RTL specifications; they
23      are all badly broken anyway.
24    
25    ----------------------------------------------------------------------
26    Name: Matthias Blume
27    Date: 2002/05/17 16:49:00 EDT
28    Tag: blume-20020517-controls
29    Description:
30    
31    0. John Reppy made several modifications to the SML/NJ library.
32       In particular, there is a shiny new controls-lib.cm.
33    
34    1. Pushed new controls interface through compiler so that everything
35       compiles again.
36    
37    2. Added FormatComb and FORMAT_COMB to the CML version of the
38       SML/NJ library (so that CML compiles again).
39    
40    3. Modified init scripts because XXX_DEFAULT environment variables
41       are no longer with us.  (Boot-time initialization is now done
42       using the same environment variables that are also used for
43       startup-time initialization of controls.)
44    
45    ----------------------------------------------------------------------
46    Name: Lal George
47    Date: 2002/05/15 09:20:10 EDT
48    Tag: george-20020515-pseudo-op-decls
49    Description:
50    
51            All pseudo-ops emitted before the first segment declaration
52    such as TEXT, DATA, and BSS directives are assumed to be global
53    declarations and are emitted first in the assembly file. This is
54    useful in a number of situations where one has pseudo-ops that are not
55    specific to any segment, and also works around the constraint that one
56    cannot have client pseudo-ops in the TEXT segment.
57    
58            Because no segment is associated with these declarations it is
59    an error to allocate any space or objects before the first segment
60    directive and an exception will be raised. However, we cannot make
61    this check for client pseudo-ops.
62    
63            These top level declarations are a field in the CFG graph_info.
64    In theory you can continue to add to this field after the CFG has been
65    built -- provided you know what you are doing;-)
66    
67    ----------------------------------------------------------------------
68    Name: Matthias Blume
69    Date: 2002/05/13 16:40:00 EDT
70    Tag: blume-20020513-pp-etc
71    Description:
72    
73    A few minor bugfixes:
74    
75      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
76        (Bogus printouts for redefined bindings still occur.  Compiler
77        bug should no longer occur now.  We need to redo the prettyprinter
78        from scratch.)
79    
80      - CM pathname printer now also adds escape sequences for ( and )
81    
82      - commend and docu fixes for ml-nlffi
83    
84    ----------------------------------------------------------------------
85    Name: Matthias Blume
86    Date: 2002/05/10 16:40:00 EDT
87    Tag: blume-20020510-erg-textio
88    Description:
89    
90    Applied the following bugfix provided by Emden Gansner:
91    
92        Output is corrupted when outputSubstr is used rather than output.
93    
94        The problem occurs when a substring
95    
96            ss = (s, dataStart, dataLen)
97    
98        where dataStart > 0, fills a stream buffer with avail bytes left.
99        avail bytes of s, starting at index dataStart, are copied into the
100        buffer, the buffer is flushed, and then the remaining dataLen-avail
101        bytes of ss are copied into the beginning of the buffer. Instead of
102        starting this copy at index dataStart+avail in s, the current code
103        starts the copy at index avail.
104    
105        Fix:
106        In text-io-fn.sml, change line 695 from
107             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
108        to
109             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
110    
111    ----------------------------------------------------------------------
112    Name: Matthias Blume
113    Date: 2002/04/12 13:55:00 EDT
114    Tag: blume-20020412-assyntax
115    Description:
116    
117    1. Grabbed newer assyntax.h from the XFree86 project.
118    2. Fiddled with how to compile X86.prim.asm without warnings.
119    3. (Very) Minor cleanup in CM.
120    
121    ----------------------------------------------------------------------
122    Name: Matthias Blume
123    Date: 2002/04/01 (no joke!) 17:07:00 EST
124    Tag: blume-20020401-x86div
125    Description:
126    
127    Added full support for div/mod/rem/quot on the x86, using the machine
128    instruction's two results (without clumsily recomputing the remainder)
129    directly where appropriate.
130    
131    Some more extensive power-of-two support was added to the x86 instruction
132    selector (avoiding expensive divs, mods, and muls where they can be
133    replaced with cheaper shifts and masks).  However, this sort of thing
134    ought to be done earlier, e.g., within the CPS optimizer so that
135    all architectures benefit from it.
136    
137    The compiler compiles to a fixed point, but changes might be somewhat
138    fragile nevertheless.  Please, report any strange things that you might
139    see wrt. div/mod/quot/rem...
140    
141    ----------------------------------------------------------------------
142    Name: Matthias Blume
143    Date: 2002/03/29 17:22:00
144    Tag: blume-20020329-div
145    Description:
146    
147    Fixed my broken div/mod logic.  Unfortunately, this means that the
148    inline code for div/mod now has one more comparison than before.
149    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
150    The problem was with quotient = 0, because that alone does not tell
151    us which way the rounding went.  One then has to look at whether
152    remainder and divisor have the same sign...  :(
153    
154    Anyway, I replaced the bootfiles with fresh ones...
155    
156    ----------------------------------------------------------------------
157    Name: Matthias Blume
158    Date: 2002/03/29 14:10:00 EST
159    Tag: blume-20020329-inlprims
160    Description:
161    
162    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
163    
164    Primops have changed. This means that the bin/boot-file formats have
165    changed as well.
166    
167    To make sure that there is no confusion, I made a new version.
168    
169    
170    CHANGES:
171    
172    * removed REMT from mltree (remainder should never overflow).
173    
174    * added primops to deal with divisions of all flavors to the frontend
175    
176    * handled these primops all the way through so they map to their respective
177      MLRISC support
178    
179    * used these primops in the implementation of Int, Int32, Word, Word32
180    
181    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
182    
183    * parameterized INLMIN, INLMAX, and INLABS by a numkind
184    
185    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
186      floating point
187    
188    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
189      and Real (but Real.abs maps to a separate floating-point-only primop)
190    
191    
192    TODO items:
193    
194    * Hacked Alpha32 instruction selection, disabling the selection of REMx
195      instructions because the machine instruction encoder cannot handle
196      them.  (Hppa, PPC, and Sparc instruction selection did not handle
197      REM in the first place, and REM is supported by the x86 machine coder.)
198    
199    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
200      selection phase.  (The two can be streamlined because the hardware
201      delivers both quotient and remainder at the same time anyway.)
202    
203    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
204      (Currently the behavior is inconsistent both across architectures and
205      wrt. the draft Basis spec.)
206    
207    * Word8 should eventually be handled natively, too.
208    
209    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
210      as if there currently is no execution path that could trigger it in
211      SML/NJ.  (The assumptions underlying functions arith and promotable do not
212      hold for things like multiplication and division.)
213    
214    ----------------------------------------------------------------------
215    Name: Matthias Blume
216    Date: 2002/03/27 16:27:00 EST
217    Tag: blume-20020327-mlrisc-divisions
218    Description:
219    
220    Added support for all four division operations (ML's div, mod, quot,
221    and rem) to MLRISC.  In the course of doing so, I also rationalized
222    the naming (no more annoying switch-around of DIV and QUOT), by
223    parameterizing the operation by div_rounding_mode (which can be either
224    DIV_TO_ZERO or DIV_TO_NEGINF).
225    
226    The generic MLTreeGen functor takes care of compiling all four
227    operations down to only round-to-zero div.
228    
229    Missing pieces:
230    
231      * Doing something smarter than relying on MLTreeGen on architectures
232        like, e.g., the x86 where hardware division delivers both quotient and
233        remainder at the same time.  With this, the implementation of the
234        round-to-neginf operations could be further streamlined.
235    
236      * Remove inlining support for div/mod/rem from the frontend and replace it
237        with primops that get carried through to the backend.  Do this for all
238        int and word types.
239    
240    ----------------------------------------------------------------------
241    Name: Matthias Blume
242    Date: 2002/03/25 17:25:00 EST
243    Tag: blume-20020325-divmod
244    Description:
245    
246    I improved (hopefully without breaking them) the implementation of Int.div,
247    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
248    advantage of the following observations:
249    
250      Let  q = x quot y      r = x rem y
251           d = x div  y      m = x mod y
252    
253    where "quot" is the round-to-zero version of integer division that
254    hardware usually provides.  Then we have:
255    
256         r = x - q * y        where neither the * nor the - will overflow
257         d = if q >= 0 orelse x = q * y then q else q - 1
258                              where neither the * nor the - will overflow
259         m = if q >= 0 orelse r = 0 then r else r + y
260                              where the + will not overflow
261    
262    This results in substantial simplification of the generated code.
263    The following table shows the number of CFG nodes and edges generated
264    for
265            fun f (x, y) = x OPER y
266            (* with OPER \in div, mod, quot, rem *)
267    
268    
269        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
270        --------------------------------------------------------
271         div |         24 |         39 |         12 |         16
272         mod |         41 |         71 |         12 |         16
273        quot |          8 |         10 |          8 |         10
274         rem |         10 |         14 |          8 |         10
275    
276    
277    ----------------------------------------------------------------------
278    Name: Matthias Blume
279    Date: 2002/03/25 22:06:00 EST
280    Tag: blume-20020325-cprotobug
281    Description:
282    
283    Fixed a bug in cproto (c prototype decoder).
284    
285    ----------------------------------------------------------------------
286    Name: Matthias Blume
287    Date: 2002/03/25 16:00:00 EST
288    Tag: blume-20020325-raw-primops
289    Description:
290    
291    I did some cleanup to Allen's new primop code and
292    replaced yesterday's bootfiles with new ones.
293    (But they are stored in the same place.)
294    
295    ----------------------------------------------------------------------
296    Name: Matthias Blume
297    Date: 2002/03/24 22:40:00 EST
298    Tag: blume-20020324-bootfiles
299    Description:
300    
301    Made the bootfiles that Allen asked for.
302    
303    ----------------------------------------------------------------------
304    Name: Allen Leung
305    Date: 2002/03/23 15:50:00 EST
306    Tag: leunga-20020323-flint-cps-rcc-primops
307    Description:
308    
309      1. Changes to FLINT primops:
310    
311        (* make a call to a C-function;
312         * The primop carries C function prototype information and specifies
313         * which of its (ML-) arguments are floating point. C prototype
314         * information is for use by the backend, ML information is for
315         * use by the CPS converter. *)
316      | RAW_CCALL of { c_proto: CTypes.c_proto,
317                       ml_args: ccall_type list,
318                       ml_res_opt: ccall_type option,
319                       reentrant : bool
320                     } option
321       (* Allocate uninitialized storage on the heap.
322        * The record is meant to hold short-lived C objects, i.e., they
323        * are not ML pointers.  With the tag, the representation is
324        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
325        *)
326      | RAW_RECORD of {tag:bool,sz:int}
327      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
328    
329      2.  These CPS primops are now overloaded:
330    
331           rawload of {kind:numkind}
332           rawstore of {kind:numkind}
333    
334          The one argument form is:
335    
336             rawload {kind} address
337    
338          The two argument form is:
339    
340             rawload {kind} [ml object, byte-offset]
341    
342      3. RAW_CCALL/RCC now takes two extra arguments:
343    
344         a. The first is whether the C call is reentrant, i.e., whether
345            ML state should be saved and restored.
346         b. The second argument is a string argument specifying the name of
347            library and the C function.
348    
349         These things are currently not handled in the code generator, yet.
350    
351      4. In CProto,
352    
353         An encoding type of "bool" means "ml object" and is mapped into
354         C prototype of PTR.  Note that "bool" is different than "string",
355         even though "string" is also mapped into PTR, because "bool"
356         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
357    
358      5. Pickler/unpicker
359    
360         Changed to handle RAW_RECORD and newest RAW_CCALL
361    
362      6. MLRiscGen,
363    
364         1. Changed to handle the new rawload/rawstore/rawrecord operators.
365         2. Code for handling C Calls has been moved to a new module CPSCCalls,
366            in the file CodeGen/cpscompile/cps-c-calls.sml
367    
368      7. Added the conditional move operator
369    
370             condmove of branch
371    
372         to cps.  Generation of this is still buggy so it is currently
373         disabled.
374    
375    ----------------------------------------------------------------------
376  Name: Lal George  Name: Lal George
377  Date: 2002/03/22 14:18:25 EST  Date: 2002/03/22 14:18:25 EST
378  Tag: george-20020322-cps-branch-prob  Tag: george-20020322-cps-branch-prob

Legend:
Removed from v.1171  
changed lines
  Added in v.1203

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