changeset 7:5f0a5e8cb3cc

change style
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 09 Feb 2016 17:40:53 +0900
parents 7feb530077af
children e9a6d390a401
files paper/chapter5.tex paper/master_paper.pdf
diffstat 2 files changed, 48 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/paper/chapter5.tex	Tue Feb 09 17:19:52 2016 +0900
+++ b/paper/chapter5.tex	Tue Feb 09 17:40:53 2016 +0900
@@ -1,6 +1,54 @@
 \chapter{評価・考察}
 今回の研究により実装した LLVM/clang 上での CbC コンパイラの評価を試みる. 評価は, コンパイルして出力されたアセンブリコードの確認と, CbC プログラムを Micro-C, GCC, LLVM でコンパイルして得られたプログラムの実行速度を計測により行う. 
 \section{アセンブリコードの評価}
+以下のリスト \ref{evalCbC},\ref{evalAsmB}, \ref{evalAsmA} はそれぞれコンパイル前の CbC の code segment とコンパイル後のアセンブリコードを示している. \ref{evalAsmB} は omit leaf frame pointer 強制前のアセンブリコード, \ref{evalAsmA} は omit leaf frame pointer 強制後のアセンブリコードである. 
+\begin{lstlisting}[frame=lrbt,label=evalCbC,caption={コンパイル前}]
+__code f(int i,stack sp) {
+  int k,j;
+  k = 3+i;
+  goto f_g0(i,k,sp);
+}
+\end{lstlisting}
+
+\begin{lstlisting}[frame=lrbt,label=evalAsmB,caption={omit leaf frame pointer 強制前}]
+_f:                                     ## @f
+	.cfi_startproc
+## BB#0:                                ## %entry
+	pushq	%rbp
+Ltmp9:
+	.cfi_def_cfa_offset 16
+Ltmp10:
+	.cfi_offset %rbp, -16
+	movq	%rsp, %rbp
+Ltmp11:
+	.cfi_def_cfa_register %rbp
+	movl	%edi, %eax
+	addl	$3, %eax
+	movq	%rsi, -8(%rbp)          ## 8-byte Spill
+	movl	%eax, %esi
+	movq	-8(%rbp), %rdx          ## 8-byte Reload
+	popq	%rbp
+	jmp	_f_g0                   ## TAILCALL
+	.cfi_endproc
+\end{lstlisting}
+
+\begin{lstlisting}[frame=lrbt,label=evalAsmB,caption={omit leaf frame pointer 強制後}]
+_f:                                     ## @f
+	.cfi_startproc
+## BB#0:                                ## %entry
+	subq	$24, %rsp
+Ltmp9:
+	.cfi_def_cfa_offset 32
+	movl	%edi, %eax
+	addl	$3, %eax
+	movq	%rsi, 16(%rsp)          ## 8-byte Spill
+	movl	%eax, %esi
+	movq	16(%rsp), %rdx          ## 8-byte Reload
+	addq	$24, %rsp
+	jmp	_f_g0                   ## TAILCALL
+	.cfi_endproc
+\end{lstlisting}
+
 \section{性能評価}
 \section{LLVM, clangの利点}
 
Binary file paper/master_paper.pdf has changed