[Scummvm-cvs-logs] SF.net SVN: scummvm:[50010] tools/branches/gsoc2010-decompiler/decompiler/ doc

pidgeot at users.sourceforge.net pidgeot at users.sourceforge.net
Fri Jun 18 10:53:09 CEST 2010


Revision: 50010
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50010&view=rev
Author:   pidgeot
Date:     2010-06-18 08:53:09 +0000 (Fri, 18 Jun 2010)

Log Message:
-----------
Initial documentation on CFG analysis

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/decompiler/doc/doc.tex

Added Paths:
-----------
    tools/branches/gsoc2010-decompiler/decompiler/doc/cfg.tex

Added: tools/branches/gsoc2010-decompiler/decompiler/doc/cfg.tex
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/doc/cfg.tex	                        (rev 0)
+++ tools/branches/gsoc2010-decompiler/decompiler/doc/cfg.tex	2010-06-18 08:53:09 UTC (rev 50010)
@@ -0,0 +1,20 @@
+\section{Control flow analysis}
+
+The control flow analysis is a multi-step process:
+
+\begin{itemize}
+\item Create a graph with one instruction per vertex, and edges going from instructions to their possible successors
+\item Do a depth-first search to determine the expected stack level at each vertex
+\item Merge vertices to form groups
+\item Perform analysis on vertices
+\end{itemize}
+
+Groups are formed according to these rules:
+\begin{itemize}
+\item If the next instruction is a jump, end the group here.
+\item If the next instruction has multiple predecessors, end the group here.
+\item If the current instruction brings the stack to a lower level than the start of the current group, make the new level the expected stack level (to support clean-up after control structures).
+\item If the current instruction brings the stack level to the same as the start of the current group, end the group here.
+\end{itemize}
+
+\fxnote{Describe the actual analysis in more detail.}


Property changes on: tools/branches/gsoc2010-decompiler/decompiler/doc/cfg.tex
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Modified: tools/branches/gsoc2010-decompiler/decompiler/doc/doc.tex
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/doc/doc.tex	2010-06-18 08:45:57 UTC (rev 50009)
+++ tools/branches/gsoc2010-decompiler/decompiler/doc/doc.tex	2010-06-18 08:53:09 UTC (rev 50010)
@@ -10,6 +10,7 @@
 \newpage
 \input{overview}
 \input{disassembler}
+\input{cfg}
 
 \newpage\listoffixmes
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list