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

Diff of /sml/trunk/NOTES/HISTORY

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

revision 1115, Sun Mar 3 18:16:31 2002 UTC revision 1116, Tue Mar 5 23:17:18 2002 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Lal George
17    Date: 2002/03/05 17:24:48 EST
18    Tag: george-20020305-linkage-cluster
19    
20    In order to support the block placement optimization, the first
21    cluster that is generated (called the linkage cluster) contains a jump
22    to the entry point for the compilation unit. The linkage cluster
23    contains only one function, so block placement will have no effect on
24    the linkage cluster itself, but all the other clusters have full
25    freedom in the manner in which they reorder blocks or functions.
26    
27    On the x86 the typical linkage code that is generated is:
28       ----------------------
29            .align 2
30       L0:
31            addl    $L1-L0, 72(%esp)
32            jmp     L0
33    
34    
35            .align  2
36       L1:
37       ----------------------
38    
39    72(%esp) is the memory location for the stdlink register. This
40    must contain the address of the CPS function being called. In the
41    above example, it contains the address of memory for  L0; before
42    calling L1 (the real entry point for the compilation unit), it
43    must contain the address for L1, and hence
44    
45            addl $L1-L0, 72(%esp)
46    
47    I have tested this on all architectures except the hppa.
48    
49    ----------------------------------------------------------------------
50  Name: Allen Leung  Name: Allen Leung
51  Date: 2002/03/03 13:20:00 EST  Date: 2002/03/03 13:20:00 EST
52  Tag: leunga-20020303-mlrisc-tools  Tag: leunga-20020303-mlrisc-tools

Legend:
Removed from v.1115  
changed lines
  Added in v.1116

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