annotate presen/presentation.html @ 39:a6540714dda9 draft

modify presen
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 28 Feb 2012 20:01:28 +0900
parents bbebd829c423
children ad0ab1378ae6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 <!DOCTYPE html>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 <!--
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 Copyright 2010 Google Inc.
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 Licensed under the Apache License, Version 2.0 (the "License");
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 you may not use this file except in compliance with the License.
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 You may obtain a copy of the License at
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 http://www.apache.org/licenses/LICENSE-2.0
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 Unless required by applicable law or agreed to in writing, software
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 distributed under the License is distributed on an "AS IS" BASIS,
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 See the License for the specific language governing permissions and
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 limitations under the License.
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 Original slides: Marcin Wichary (mwichary@google.com)
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 Modifications: Ernest Delgado (ernestd@google.com)
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 Alex Russell (slightlyoff@chromium.org)
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 landslide modifications: Adam Zapletal (adamzap@gmail.com)
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 Nicolas Perriault (nperriault@gmail.com)
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 -->
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 <html>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 <head>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 <meta http-equiv="X-UA-Compatible" content="chrome=1">
28
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
28 <title>Continuation based C の <br> GCC 4.6による実装</title>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 <!-- Styles -->
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
31 <link rel="stylesheet" media="print" href="theme/css/print.css">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
32 <link rel="stylesheet" media="screen, projection" href="theme/css/screen.css">
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 <!-- /Styles -->
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 <!-- Javascripts -->
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
38 <script type="text/javascript" src="theme/js/slides.js"></script>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 <!-- /Javascripts -->
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 </head>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 <body>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 <div id="blank"></div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 <div class="presentation">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 <div id="current_presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 <div id="presenter_note"></div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 <div class="slides">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
51 <!-- slide source: cbc.md -->
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 <div class="slide-wrapper">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 <div class="slide">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 <div class="inner">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55
28
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
56 <header><h1>Continuation based C の <br> GCC 4.6による実装</h1></header>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 <div class="presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 <header><h1>Presenter Notes</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 <section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 </section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 <footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
69 Source: <a href="cbc.md">cbc.md</a>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
73 1/24
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 </footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
79 <!-- slide source: cbc.md -->
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 <div class="slide-wrapper">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 <div class="slide has_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 <div class="inner">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
84 <header><h2>研究目的</h2></header>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
87 <section><p class="notes"></p>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
88 <li><font color=red size=5em>状態遷移記述をベースとしたより細かい単位でのプログラミングを実現する</font></li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
89
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 <ul>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
91 <li>組込みソフト、Real-time処理、通信プロトコル記述、どれも状態遷移ベース</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
92 <li>現存する記述言語は状態遷移の記述に向いていない</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
93 <li>スタックが状態を隠蔽するため、分割しにくい、検証が難しい</li>
38
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 37
diff changeset
94 <li>本研究室ではコードセグメント単位で記述するプログラミング言語Continuation based C (以下CbC)という言語を提案している。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 37
diff changeset
95 <li>CbC のコンパイラは Micro-C 版 と GCC 版(以下 CbC-GCC) が開発されている。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 37
diff changeset
96 <li>しかし, CbC-GCC はいくつかのバグがあり機能に修正の余地があった。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 37
diff changeset
97 <li>また、GCC の最新の機能を利用するためにも CbC-GCC は GCC のアップデートに合わせていく必要がある。</li>
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
98 </ul>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
99 <h2>本研究では CbC-GCC のアップデートを行い、より良いコードを生成する CbC の処理系を開発した。</h2></section>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 <div class="presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 <header><h1>Presenter Notes</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 <section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 </section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 <footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
111 Source: <a href="cbc.md">cbc.md</a>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
115 2/24
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 </footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
121 <!-- slide source: cbc.md -->
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 <div class="slide-wrapper">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 <div class="slide">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 <div class="inner">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
125
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 <header><h1>Continuation based C</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 <section><h2>コードセグメント単位での記述と継続を基本としたプログラミング言語</h2>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 <li>コーセグメント:CbC におけるプログラムの基本単位</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 <ul>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 <li>C の関数よりも細かな単位</li>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
134 <li>構文は C と同じだが、C から関数コールとループ制御が取り除かれた形</li>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 <li>コードセグメントの末尾処理で別のコードセグメントへ継続(goto)することで CbC のプログラムは続いていく。</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 </ul>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
138 <table width=100% border=1>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
139 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
140 <td style="margin-left:auto; margin-right: auto; text-align: center; width:50%" >
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
141 <img src="./pix/codesegment.png" style="width:100%">
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 </td>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
143 <td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
144 <pre style="margin-left:5%">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
145 __code cs_a(int num) {
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
146 :
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
147 :
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
148 goto cs_b();
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
149 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
150 </pre>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
151 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
152 </tr>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 </table></section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
154
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 <div class="presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 <header><h1>Presenter Notes</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 <section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 </section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 <footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
165 Source: <a href="cbc.md">cbc.md</a>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
167
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
169 3/24
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 </footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
175 <!-- slide source: cbc.md -->
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 <div class="slide-wrapper">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 <div class="slide">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 <div class="inner">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
179
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 <header><h1>Continuation based C</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
181
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
182
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 <section><h2>継続:現在の処理を実行していく為の情報</h2>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 <p><table width=100% border=1>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 <td><h2>Cの継続</h2></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 <td><h2>CbCの継続(軽量継続)</h2></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 <td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 <ul>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 <li>続く命令のアドレス</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 <li>命令に必要なデータ</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
194 <li>スタックに積まれている値(環境)</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 </ul>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
196 </td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 <td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 <ul>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 <li>Cの継続から環境を除外</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 <li>続く命令とその命令に必要なデータのみ</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 </ul>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 </td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 <t>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 <td style="margin-left:auto; margin-right: auto; text-align: center;">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
206 <img class="scale" src="./pix/func_call.png" style="height: 18em;">
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 </td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 <td style="margin-left:auto; margin-right: auto; text-align: center;">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 <img class="scale" src="./pix/cs_stack.png" style="height: 18em;">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 </td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 </table></p></section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 <div class="presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 <header><h1>Presenter Notes</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 <section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 </section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
220 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 <footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
224 Source: <a href="cbc.md">cbc.md</a>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
226
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
228 4/24
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 </footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
232 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
233
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
234 <!-- slide source: cbc.md -->
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 <div class="slide-wrapper">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
236 <div class="slide">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
237 <div class="inner">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
238
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 <header><h1>Continuation based C</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
240
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
241
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 <section><p><table width=100% border=1>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 <caption>階乗を求める CbC のプログラム</caption>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
244 <td width=50%>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
245 <pre style="margin-left:5%">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
246 __code print_factorial(int prod)
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
247 {
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
248 printf("factorial = %d\n",prod);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
249 exit(0);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
250 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
251 __code factorial0(int prod, int x)
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
252 {
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
253 if ( x &gt;= 1) {
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
254 goto factorial0(prod*x, x-1);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
255 }else{
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
256 goto print_factorial(prod);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
257 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
258 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
259 __code factorial(int x)
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
260 {
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
261 goto factorial0(1, x);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
262 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
263 int main(int argc, char **argv)
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
264 {
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
265 int i;
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
266 i = atoi(argv[1]);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
267 goto factorial(i);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
268 }
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
269 </pre>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
270 </td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 <td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
272 <li>__code によるコードセグメントの宣言</li>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
273 <li>引数付きの goto でコードセグメントを呼び出すことができる</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
274 <li>内部では call ではなく jmp 命令でコードセグメントの処理が遷移している</li>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
275 </td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 </table></p></section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
277
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 <div class="presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
280 <header><h1>Presenter Notes</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
281 <section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
282
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 </section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
285 <footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
286
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
287 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
288 Source: <a href="cbc.md">cbc.md</a>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
289 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
290
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
292 5/24
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
294 </footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
296 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
297
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
298 <!-- slide source: cbc.md -->
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
299 <div class="slide-wrapper">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
300 <div class="slide">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 <div class="inner">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
302
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
303 <header><h1>Gnu Compiler Collection (GCC)</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
304
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
305
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
306 <section><p><li>GCC: オープンソースのコンパイラ群</li>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
307 <li>ここで扱う GCC はソースコードをアセンブラに変換する『cc1』のことを指す。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
308 <li>GCC がソースコードを読み込みアセンブラ言語を出力するまでの流れは以下の図のようになる。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
309 <table width=100%>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
310 <caption>GCC のアセンブラ言語出力までの流れ</caption>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
311 <td style="margin:auto; text-align:center;">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
312 <img src="./pix/ir.png" style="height:15em">
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
313 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
314 </table>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
315 <li>ソースコードはアセンブラに変換される間に 4 つのデータ構造に変換される。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
316 <li>この中でも CbC の実装では Parser と RTL の生成部分に手が加えられている。</li></p></section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
317
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
318 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
319 <div class="presenter_notes">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
320 <header><h1>Presenter Notes</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
321 <section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
322
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
323 </section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
324 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
325 <footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
326
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
327 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
328 Source: <a href="cbc.md">cbc.md</a>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
329 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
330
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
331 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
332 6/24
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
333 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
334 </footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
335 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
336 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
337
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
338 <!-- slide source: cbc.md -->
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
339 <div class="slide-wrapper">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
340 <div class="slide">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
341 <div class="inner">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
342
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
343 <header><h1>CbC の実装 : 軽量継続</h1></header>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
344
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
345
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
346 <section><p><li>CbC-GCC の軽量継続は最適化の1つ, <font color=red>Tail Call Elimination(末尾除去)</font>により実装されている.</li></p>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
347 <h2>Tail Call Elimination</h2>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
348 <p><li>関数呼び出しを call ではなく jmp 命令で行う最適化</li>
31
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 30
diff changeset
349 <li>例えば、以下の場合関数 g は jmp 命令で関数 f へと処理が移る</li></p>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 30
diff changeset
350 <table width=100% border=1>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
351 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
352 <td width=50%>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
353 <pre>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
354 void f(int a, int b) {
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
355 printf("f: a=%d b=%d\n",a,b);
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
356 return ;
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
357 }
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
358
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 void g(int a, int b){
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
360 printf("g: a=%d b=%d\n",a,b);
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
361 f(a,b);
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
362 return;
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
363 }
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
364
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
365 int main() {
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
366 g(3,4);
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 return 0;
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
368 }</pre>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
369 </td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
370 <td>
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
371 <img src="./pix/continuation.png" style="height:80%;">
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
372 </td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
373 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
374 </table></section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
375
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
376 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
377 <div class="presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
378 <header><h1>Presenter Notes</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
379 <section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
380
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
381 </section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
382 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
383 <footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
384
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
385 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
386 Source: <a href="cbc.md">cbc.md</a>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
387 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
388
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
389 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
390 7/24
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
391 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
392 </footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
393 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
394 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
395
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
396 <!-- slide source: cbc.md -->
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
397 <div class="slide-wrapper">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
398 <div class="slide">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
399 <div class="inner">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
400
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
401 <header><h1>CbC の実装: Tail Call Elimination</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
402
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
403
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
404 <section><h2>Tail Call Elimination の条件</h2>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
405 <p><ul>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
406 <li>関数を呼び出す側(caller)と呼び出される側(callee)の戻値の型が一致している。</li>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
407 <li>関数呼び出しがリターン直前に行われている。</li>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
408 <li>呼び出される関数(callee)の引数に用いられるスタックサイズが呼出元(caller)のそれより少ない。</li>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
409 <li>引数の並びのコピーに上書きがない。</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
410 </ul></p>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
411 <h2>条件回避の為の実装</h2>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
412 <p><ul>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
413 <li>コードセグメントの型はvoid型で統一する。</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
414 <li>gotoの直後に自動で return を置く。</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
415 <li>スタックサイズは固定にする。</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
416 <li>引数は一旦、一時変数にコピーする。</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
417 </ul></p></section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
418
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
419 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
420 <div class="presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
421 <header><h1>Presenter Notes</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
422 <section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
423
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
424 </section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
425 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
426 <footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
427
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
428 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
429 Source: <a href="cbc.md">cbc.md</a>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
430 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
431
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
432 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
433 8/24
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
434 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
435 </footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
436 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
437 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
438
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
439 <!-- slide source: cbc.md -->
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
440 <div class="slide-wrapper">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
441 <div class="slide">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
442 <div class="inner">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
443
28
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
444 <header><h1>CbC の実装: Tail Call Elimination</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
445
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
446
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
447 <section><h2>Tail Call Elimination の条件をチェックする関数</h2>
28
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
448 <ul>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
449 <li>今までの実装では Tail Call Elimination の条件をクリアする為に専用の関数を用意していた。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
450 <li>この専用関数は元々ある GCC コードを元に作成している為, アップデートに合わせて修正していく
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
451 必要があった。</li>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
452 </ul>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
453 <h2>実装の修正とその利点</h2>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
454 <ul>
28
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
455 <li>しかし, 今回の実装でその関数を無くし, Tail Call Elimination のフラグを強制的に立たせる実装に変更。</li>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
456 <li>専用関数がなくなったことで、今後より楽なアップデートを行なっていくことができるようになった。</li>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
457 <li>また、コードセグメントへの継続が jmp ではなく call 命令で行われるバグがあったが修正できた。</li>
28
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
458 </ul></section>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
459
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
460 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
461 <div class="presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
462 <header><h1>Presenter Notes</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
463 <section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
464
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
465 </section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
466 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
467 <footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
468
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
469 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
470 Source: <a href="cbc.md">cbc.md</a>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
471 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
472
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
473 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
474 9/24
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
475 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
476 </footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
477 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
478 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
479
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
480 <!-- slide source: cbc.md -->
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
481 <div class="slide-wrapper">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
482 <div class="slide">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
483 <div class="inner">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
484
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
485 <header><h1>GCC-4.5, GCC-4.6 の性能比較</h1></header>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
486
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
487
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
488 <section><p><li><font color=red size=5em>本研究では GCC-4.5 から GCC-4.6 へのアップデートを行った。</font></li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
489 <li>この 2 つのバージョンを用いて生成したプログラムの速度比較を行った。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
490 <li>conv1: 加算と継続を交互に繰り返すプログラム</li></p>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
491 <table width=100% border=1>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
492 <caption>各コンパイラにより生成されたプログラムの速度比較</caption>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
493 <tr>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
494 <td style="margin:auto; text-align:center;">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
495 <img src="./pix/conv1_for_resume.png" style="height:15em">
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
496 </td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
497 <td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
498 <img src="./pix/conv1_mac_for_presen.png" style="height:15em">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
499 </td>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
500 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
501 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
502 <td style="text-align:center;">x86/Linux</td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
503 <td style="text-align:center;">x86/OS X (10.7)</td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
504 </tr>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
505 </table>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
506
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
507 <li>Mac の GCC-4.5 では動かなかった 32bit のプログラムが GCC-4.6 では問題なく動いている。</li>
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
508
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
509 <li>引数 2、3 の結果はほぼ同じ</li>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
510
31
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 30
diff changeset
511 <li>引数 1 の結果では 32bit, 64bit 共に GCC-4.6 の方が 1.5倍以上早い</li></section>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
512
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
513 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
514 <div class="presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
515 <header><h1>Presenter Notes</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
516 <section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
517
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
518 </section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
519 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
520 <footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
521
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
522 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
523 Source: <a href="cbc.md">cbc.md</a>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
524 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
525
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
526 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
527 10/24
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
528 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
529 </footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
530 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
531 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
532
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
533 <!-- slide source: cbc.md -->
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
534 <div class="slide-wrapper">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
535 <div class="slide">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
536 <div class="inner">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
537
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
538 <header><h1>GCC-4.6 の最適化</h1></header>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
539
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
540
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
541 <section><ul>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
542 <li>GCC-4.6 では最適化の 1つ『インライン展開』が強化されている。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
543 </ul>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
544 <h2>インライン展開</h2>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
545 <ul>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
546 <li>関数の処理をそのまま関数呼び出し部に展開することで call を省略できる最適化</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
547 </ul>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
548 <table width=100% border=1>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
549 <caption><h3>インライン展開の例</h3></caption>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
550 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
551 <td width=50%>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
552 <pre style="margin-left:5%">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
553 void func_b(){
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
554 A;
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
555 B;
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
556 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
557
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
558 void func_a() {
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
559 func_b();
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
560 func_b();
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
561 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
562 </pre>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
563 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
564 <td>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
565 <pre style="margin-left:5%">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
566 void func_a() {
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
567 A;
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
568 B;
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
569 A;
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
570 B;
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
571 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
572 </pre>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
573 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
574 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
575 </table>
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
576 <li>func_b の呼び出しがなくなっている。</li></section>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
577
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
578 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
579 <div class="presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
580 <header><h1>Presenter Notes</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
581 <section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
582
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
583 </section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
584 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
585 <footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
586
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
587 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
588 Source: <a href="cbc.md">cbc.md</a>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
589 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
590
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
591 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
592 11/24
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
593 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
594 </footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
595 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
596 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
597
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
598 <!-- slide source: cbc.md -->
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
599 <div class="slide-wrapper">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
600 <div class="slide">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
601 <div class="inner">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
602
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
603 <header><h1>最適化の比較</h1></header>
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
604
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
605
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
606 <section><table width=100% border=1>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
607 <caption><h3>それぞれの最適化にかかった conv1プログラムの挙動(引数 1)</h3></caption>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
608 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
609 <td width=30%>最適化なし</td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
610 <td width=30%>GCC-4.5の最適化(-O2)</td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
611 <td width=30%>GCC-4.6の最適化(-O2)</td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
612 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
613 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
614 <td style="margin:auto; text-align:center;">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
615 <img src="./pix/state_conv1_noopt.png" style="width:65%;">
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
616 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
617 <td style="margin:auto; text-align:center;">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
618 <img src="./pix/state_conv1_45.png" style="width:65%;">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
619 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
620 <td style="margin:auto; text-align:center;">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
621 <img src="./pix/state_conv1_46.png" style="width:65%;">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
622 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
623 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
624 </table>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
625
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
626 <ul>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
627 <li>最適化無しに比べると GCC-4.5、 GGC-4.6 共にコードセグメントの数が減っている。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
628 <li>GCC-4.5 でもインライン展開はされているが、GCC-4.6 はより良い最適化がかけられている。</li>
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
629 </ul></section>
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
630
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
631 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
632 <div class="presenter_notes">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
633 <header><h1>Presenter Notes</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
634 <section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
635
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
636 </section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
637 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
638 <footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
639
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
640 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
641 Source: <a href="cbc.md">cbc.md</a>
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
642 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
643
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
644 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
645 12/24
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
646 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
647 </footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
648 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
649 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
650
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
651 <!-- slide source: cbc.md -->
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
652 <div class="slide-wrapper">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
653 <div class="slide">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
654 <div class="inner">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
655
38
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 37
diff changeset
656 <header><h1>最新バージョンに合わせる有用性</h1></header>
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
657
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
658
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
659 <section><ul>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
660 <li>今回の『インライン展開』のように GCC の最適化は日々改良されている。</li>
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
661 <li>また、既存の最適化の改良だけでなく新たな最適化の追加等も行われていく。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
662 <li>それらの恩恵を受ける為にも GCC のアップデートに合わせていく事は今後も重要である。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
663 </ul></section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
664
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
665 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
666 <div class="presenter_notes">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
667 <header><h1>Presenter Notes</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
668 <section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
669
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
670 </section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
671 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
672 <footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
673
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
674 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
675 Source: <a href="cbc.md">cbc.md</a>
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
676 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
677
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
678 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
679 13/24
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
680 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
681 </footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
682 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
683 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
684
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
685 <!-- slide source: cbc.md -->
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
686 <div class="slide-wrapper">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
687 <div class="slide">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
688 <div class="inner">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
689
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
690 <header><h1>まとめ</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
691
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
692
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
693 <section><ul>
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
694 <li>今回 CbC-GCC を GCC-4.6 へとアップデートを行った。</li>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
695 <li>アップデートにより、よりよいコードを生成する CbC のコンパイラを用意することができた。</li>
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
696 <li>また、最適化の強制付与といった実装の修正も行えた。</li>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
697 <li>細かな実装を除けば, CbC-GCC は今後 GCC のアップデートに合わせていくだけとなる。</li>
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
698 </ul>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
699 <h2>今後の課題</h2>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
700 <ul>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
701 <li>LLVM ベースの CbC コンパイラの開発</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
702 <li>google Go 言語への実装の検討</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
703 </ul></section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
704
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
705 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
706 <div class="presenter_notes">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
707 <header><h1>Presenter Notes</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
708 <section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
709
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
710 </section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
711 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
712 <footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
713
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
714 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
715 Source: <a href="cbc.md">cbc.md</a>
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
716 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
717
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
718 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
719 14/24
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
720 </aside>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
721 </footer>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
722 </div>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
723 </div>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
724
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
725 <!-- slide source: cbc.md -->
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
726 <div class="slide-wrapper">
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
727 <div class="slide">
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
728 <div class="inner">
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
729
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
730 <header><h1>jmp と call</h1></header>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
731
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
732
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
733 <section><p><table width=100%>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
734 <caption>インライン展開無しの conv1 プログラム実行結果</caption>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
735 <td style="text-align:center;">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
736 <img src="./pix/fno_inline.png">
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
737 </td>
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
738 </table></p></section>
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
739
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
740 </div>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
741 <div class="presenter_notes">
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
742 <header><h1>Presenter Notes</h1></header>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
743 <section>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
744
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
745 </section>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
746 </div>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
747 <footer>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
748
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
749 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
750 Source: <a href="cbc.md">cbc.md</a>
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
751 </aside>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
752
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
753 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
754 15/24
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
755 </aside>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
756 </footer>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
757 </div>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
758 </div>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
759
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
760 <!-- slide source: cbc.md -->
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
761 <div class="slide-wrapper">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
762 <div class="slide">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
763 <div class="inner">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
764
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
765 <header><h1>conv1 プログラム</h1></header>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
766
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
767
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
768 <section><p><li>性能評価で用いた conv1 プログラムの C 版</li>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
769 <pre style="width:5%;" border=1>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
770 f0(int i) {
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
771 int k,j;
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
772 k = 3+i;
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
773 j = g0(i+3);
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
774 return k+4+j;
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
775 }
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
776 g0(int i) {
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
777 return h0(i+4)+i;
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
778 }
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
779 h0(int i) {
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
780 return i+4;
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
781 }</pre>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
782 <li>性能評価はこのプログラムを CbC へと書き換えて行なっている。</li></p></section>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
783
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
784 </div>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
785 <div class="presenter_notes">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
786 <header><h1>Presenter Notes</h1></header>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
787 <section>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
788
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
789 </section>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
790 </div>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
791 <footer>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
792
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
793 <aside class="source">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
794 Source: <a href="cbc.md">cbc.md</a>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
795 </aside>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
796
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
797 <aside class="page_number">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
798 16/24
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
799 </aside>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
800 </footer>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
801 </div>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
802 </div>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
803
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
804 <!-- slide source: cbc.md -->
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
805 <div class="slide-wrapper">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
806 <div class="slide">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
807 <div class="inner">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
808
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
809 <header><h1>CbC-GCC のアップデート手法</h1></header>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
810
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
811
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
812 <section><ol>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
813 <li>GCC のソースを入れるリポジトリを用意する。</li>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
814 <li>GCC のリポジトリの中身を全て消し、新しい GCC を入れて新しいファイルは追加、消えたファイルは削除する。</li>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
815 <li>コミット</li>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
816 </ol>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
817
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
818 <h2>CbC-GCC のリポジトリ</h2>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
819 <p><ol>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
820 <li>GCC のソースから pull</li>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
821 <li>merge を行う</li>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
822 <li>衝突のあったファイルを手動でマージする</li>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
823 <li>コミット</li>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
824 </ol></p></section>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
825
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
826 </div>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
827 <div class="presenter_notes">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
828 <header><h1>Presenter Notes</h1></header>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
829 <section>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
830
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
831 </section>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
832 </div>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
833 <footer>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
834
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
835 <aside class="source">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
836 Source: <a href="cbc.md">cbc.md</a>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
837 </aside>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
838
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
839 <aside class="page_number">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
840 17/24
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
841 </aside>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
842 </footer>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
843 </div>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
844 </div>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
845
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
846 <!-- slide source: cbc.md -->
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
847 <div class="slide-wrapper">
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
848 <div class="slide">
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
849 <div class="inner">
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
850
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
851 <header><h1>構文の追加</h1></header>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
852
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
853
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
854 <section><h2>リカーシブタイプの宣言に使う"__rectype"</h2>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
855 <ul>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
856 <li>関数宣言時、以下のように引数に自分自身を指す型を入れたい。
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
857 <pre>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
858 __code func(int, func*);
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
859 <pre></li>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
860 <li>上記の宣言ではエラーがでる。その為、以下のような宣言になる。
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
861 <pre>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
862 __code func(int, __code (*)());
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
863 </pre></li>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
864 <li>しかし、これでは正しい情報をコンパイラに渡せていない。関数ポインタの引数に型情報が入っていないからである。
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
865 <pre>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
866 __code func(int, __code (<em>)(int, __code(</em>)(int, __code(*)(int, ...))))
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
867 </pre></li>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
868 <li>だが、正しい情報を渡そうとすると上記のように再帰してしまい、宣言できない。</li>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
869 <li>そこで __rectype という構文を追加して宣言中の関数自身を指すようにした。
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
870 <pre>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
871 __code func(int, rectype*);
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
872 </pre></li>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
873 </ul></section>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
874
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
875 </div>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
876 <div class="presenter_notes">
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
877 <header><h1>Presenter Notes</h1></header>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
878 <section>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
879
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
880 </section>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
881 </div>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
882 <footer>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
883
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
884 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
885 Source: <a href="cbc.md">cbc.md</a>
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
886 </aside>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
887
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
888 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
889 18/24
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
890 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
891 </footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
892 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
893 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
894
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
895 <!-- slide source: cbc.md -->
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
896 <div class="slide-wrapper">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
897 <div class="slide">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
898 <div class="inner">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
899
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
900 <header><h1>conv1 プログラム</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
901
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
902
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
903 <section><ul>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
904 <li>conv1 プログラムでは計算と継続を交互に繰り返し行なう。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
905 <li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
906 <p>しかし状態のいくつかへは関数ポインタとして保存させておき継続を行う。
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
907 <pre>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
908 __code g(int i,stack sp) { // Caller
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
909 struct f_g0_interface <em>c =
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
910 (struct f_g0_interface </em>)(sp -= sizeof(struct f_g0_interface));
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
911 c-&gt;ret = g_h1;
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
912 c-&gt;i_ = i;
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
913 goto h(i+3,sp);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
914 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
915 __code h(int i,stack sp) {
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
916 struct f_g0_interface <em>c = (struct f_g0_interface </em>)sp;
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
917 goto (c-&gt;ret)(i+4,sp);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
918 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
919 </pre></p>
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
920 </li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
921 <li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
922 <p>関数ポインタへの継続はインライン展開されない。</p>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
923 </li>
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
924 </ul></section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
925
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
926 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
927 <div class="presenter_notes">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
928 <header><h1>Presenter Notes</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
929 <section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
930
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
931 </section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
932 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
933 <footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
934
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
935 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
936 Source: <a href="cbc.md">cbc.md</a>
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
937 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
938
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
939 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
940 19/24
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
941 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
942 </footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
943 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
944 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
945
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
946 <!-- slide source: cbc.md -->
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
947 <div class="slide-wrapper">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
948 <div class="slide">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
949 <div class="inner">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
950
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
951 <header><h1>CbC の実装: 環境付き継続</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
952
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
953
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
954 <section><ul>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
955 <li>環境付き継続: C との互換を取るための機能。継続を行った C の関数に戻ることができる。 </li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
956 <li>_CbC_return、 _CbC_environment キーワードを使うことで使える。</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
957 <li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
958 <p>以下の使い方の場合、戻値 1 を返す。
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
959 <pre>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
960 <strong>code c1(</strong>code ret(int,void <em>),void </em>env) {
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
961 goto ret(1,env);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
962 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
963 int main() {
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
964 goto c1(<strong>return, </strong>environment);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
965 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
966 </pre></p>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
967 </li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
968 <li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
969 <p>今回この環境付き継続をスレッドセーフの実装へと修正した。</p>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
970 </li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
971 </ul></section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
972
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
973 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
974 <div class="presenter_notes">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
975 <header><h1>Presenter Notes</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
976 <section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
977
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
978 </section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
979 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
980 <footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
981
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
982 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
983 Source: <a href="cbc.md">cbc.md</a>
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
984 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
985
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
986 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
987 20/24
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
988 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
989 </footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
990 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
991 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
992
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
993 <!-- slide source: cbc.md -->
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
994 <div class="slide-wrapper">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
995 <div class="slide">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
996 <div class="inner">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
997
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
998 <header><h1>CbC 引数渡し</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
999
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1000
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1001 <section><p><li>CbC では引数渡しにできるだけレジスタを用いるようにしている.</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1002 <table border=1 width=100%>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1003 <caption><small>fastcall属性有・無の実行速度</small></caption>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1004 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1005 <td width=50% style="text-align:center;">fastcall無し</td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1006 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1007 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1008 <td style="margin:auto; text-align:center;">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1009 <img src="./pix/linux_conv_nofastcall.png" style="height:15em;">
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1010 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1011 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1012 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1013 <td width=50% style="text-align:center;">fastcall有り</td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1014 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1015 <td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1016 <img src="./pix/linux_conv_fastcall.png" style="height:15em;">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1017 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1018 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1019 </table></p></section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1020
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1021 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1022 <div class="presenter_notes">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1023 <header><h1>Presenter Notes</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1024 <section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1025
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1026 </section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1027 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1028 <footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1029
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1030 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1031 Source: <a href="cbc.md">cbc.md</a>
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1032 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1033
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1034 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1035 21/24
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1036 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1037 </footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1038 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1039 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1040
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1041 <!-- slide source: cbc.md -->
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1042 <div class="slide-wrapper">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1043 <div class="slide">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1044 <div class="inner">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1045
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1046 <header><h1>引数の並びに上書きコピー</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1047
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1048
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1049 <section><p><li>以下の呼び出しを行うと、スタックの書き換えがおこる</li>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1050 <pre>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1051 void funcA(int a, int b) {
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1052 funcB(b, a);
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1053 }
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1054 </pre></p>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1055 <table width=100%>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1056 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1057 <td style="margin:auto; text-align:center;">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1058 <img src="./pix/cs_prog.png">
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1059 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1060 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1061 </table></section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1062
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1063 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1064 <div class="presenter_notes">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1065 <header><h1>Presenter Notes</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1066 <section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1067
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1068 </section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1069 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1070 <footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1071
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1072 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1073 Source: <a href="cbc.md">cbc.md</a>
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1074 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1075
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1076 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1077 22/24
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1078 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1079 </footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1080 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1081 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1082
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1083 <!-- slide source: cbc.md -->
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1084 <div class="slide-wrapper">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1085 <div class="slide">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1086 <div class="inner">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1087
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1088 <header><h1>最適化の比較</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1089
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1090
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1091 <section><table width=100% border=1>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1092 <caption>各コンパイラにより生成されたコードの速度比較</caption>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1093 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1094 <td style="margin:auto; text-align:center;">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1095 <img src="./pix/O3_conv1_linux.png" style="height:15em">
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1096 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1097 <td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1098 <img src="./pix/O3_conv1_mac.png" style="height:15em">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1099 </td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1100 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1101 <tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1102 <td style="text-align:center;">x86/Linux</td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1103 <td style="text-align:center;">x86/OS X (10.7)</td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1104 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1105 </table></section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1106
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1107 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1108 <div class="presenter_notes">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1109 <header><h1>Presenter Notes</h1></header>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1110 <section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1111
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1112 </section>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1113 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1114 <footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1115
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1116 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1117 Source: <a href="cbc.md">cbc.md</a>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1118 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1119
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1120 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1121 23/24
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1122 </aside>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1123 </footer>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1124 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1125 </div>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1126
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1127 <!-- slide source: cbc.md -->
29
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1128 <div class="slide-wrapper">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1129 <div class="slide">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1130 <div class="inner">
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
1131
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1132 <header><h1>最適化の比較</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1133
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1134
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1135 <section><table width=100% border=1>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1136 <caption>それぞれの最適化により吐かれたアセンブラコード</caption>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1137 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1138 <td width=50% style="text-align:center;">CbC-GCC-4.5</td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1139 <td width=50% style="text-align:center;">CbC-GCC-4.6</td>
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1140 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1141
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1142 <tr>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1143 <td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1144 <pre>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1145 main:
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1146 call f
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1147 :
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1148 jmp f_g0
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1149 :
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1150 movq $f_g1, -24(%rdx)
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1151 addl $10, %edi
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1152 movq $g_h1, -48(%rdx)
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1153 jmp g_h1
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1154 :
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1155 movq 24(%rsi), %rdx
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1156 movq %rax, %rsi
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1157 :
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1158 jmp *%rdx
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1159 :
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1160 movq 24(%rsi), %rdx
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1161 :
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1162 jmp *%rdx
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1163 </pre>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1164 </td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1165 <td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1166 <pre>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1167 main:
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1168 movq $f_g1, main_stack+2000(%rip)
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1169 :
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1170 call g_h1
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1171 :
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1172 movq 24(%rax), %rdx
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1173 :
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1174 jmp *%rdx
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1175 :
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1176 movq 24(%rax), %rdx
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1177 :
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1178 jmp *%rdx
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1179 </pre>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1180 </td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1181 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1182 <!--
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1183 <tr>
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1184 <td></td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1185 <td></td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1186 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1187 -->
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1188
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1189 </table>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1190 <li>関数を展開してその場で計算する『インライン展開』がより強力になっているのが確認できる</li>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1191 <!--
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1192 <li>保存していた関数ポインタへの継続はインライン展開は行われない</li>
32
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1193 -->
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1194
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 31
diff changeset
1195 ---</section>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1196
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1197 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1198 <div class="presenter_notes">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1199 <header><h1>Presenter Notes</h1></header>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1200 <section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1201
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1202 </section>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1203 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1204 <footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1205
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1206 <aside class="source">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1207 Source: <a href="cbc.md">cbc.md</a>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1208 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1209
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1210 <aside class="page_number">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1211 24/24
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1212 </aside>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1213 </footer>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1214 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1215 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1216
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1217 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1218 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1219
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1220 <div id="toc" class="sidebar hidden">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1221 <h2>Table of Contents</h2>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1222 <table>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1223 <caption>Table of Contents</caption>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1224
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1225 <tr id="toc-row-1">
28
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
1226 <th><a href="#slide1">Continuation based C の <br> GCC 4.6による実装</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1227 <td><a href="#slide1">1</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1228 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1229
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1230
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1231 <tr id="toc-row-2" class="sub">
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
1232 <th><a href="#slide2">研究目的</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1233 <td><a href="#slide2">2</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1234 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1235
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1236
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1237
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
1238 <tr id="toc-row-3">
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
1239 <th><a href="#slide3">Continuation based C</a></th>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
1240 <td><a href="#slide3">3</a></td>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
1241 </tr>
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
1242
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
1243
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1244 <tr id="toc-row-4">
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
1245 <th><a href="#slide4">Continuation based C</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1246 <td><a href="#slide4">4</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1247 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1248
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1249
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1250 <tr id="toc-row-5">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1251 <th><a href="#slide5">Continuation based C</a></th>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1252 <td><a href="#slide5">5</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1253 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1254
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1255
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1256 <tr id="toc-row-6">
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1257 <th><a href="#slide6">Gnu Compiler Collection (GCC)</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1258 <td><a href="#slide6">6</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1259 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1260
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1261
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1262 <tr id="toc-row-7">
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1263 <th><a href="#slide7">CbC の実装 : 軽量継続</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1264 <td><a href="#slide7">7</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1265 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1266
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1267
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1268 <tr id="toc-row-8">
34
3922a95e99a8 commit presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
1269 <th><a href="#slide8">CbC の実装: Tail Call Elimination</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1270 <td><a href="#slide8">8</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1271 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1272
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1273
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1274 <tr id="toc-row-9">
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1275 <th><a href="#slide9">CbC の実装: Tail Call Elimination</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1276 <td><a href="#slide9">9</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1277 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1278
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1279
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1280 <tr id="toc-row-10">
37
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 35
diff changeset
1281 <th><a href="#slide10">GCC-4.5, GCC-4.6 の性能比較</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1282 <td><a href="#slide10">10</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1283 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1284
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1285
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1286 <tr id="toc-row-11">
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1287 <th><a href="#slide11">GCC-4.6 の最適化</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1288 <td><a href="#slide11">11</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1289 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1290
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1291
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1292 <tr id="toc-row-12">
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1293 <th><a href="#slide12">最適化の比較</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1294 <td><a href="#slide12">12</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1295 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1296
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1297
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1298 <tr id="toc-row-13">
38
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 37
diff changeset
1299 <th><a href="#slide13">最新バージョンに合わせる有用性</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1300 <td><a href="#slide13">13</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1301 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1302
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1303
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1304 <tr id="toc-row-14">
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1305 <th><a href="#slide14">まとめ</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1306 <td><a href="#slide14">14</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1307 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1308
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1309
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1310 <tr id="toc-row-15">
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1311 <th><a href="#slide15">jmp と call</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1312 <td><a href="#slide15">15</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1313 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1314
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1315
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1316 <tr id="toc-row-16">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1317 <th><a href="#slide16">conv1 プログラム</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1318 <td><a href="#slide16">16</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1319 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1320
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1321
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1322 <tr id="toc-row-17">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1323 <th><a href="#slide17">CbC-GCC のアップデート手法</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1324 <td><a href="#slide17">17</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1325 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1326
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1327
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1328 <tr id="toc-row-18">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1329 <th><a href="#slide18">構文の追加</a></th>
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1330 <td><a href="#slide18">18</a></td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1331 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1332
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1333
28
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
1334 <tr id="toc-row-19">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1335 <th><a href="#slide19">conv1 プログラム</a></th>
28
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
1336 <td><a href="#slide19">19</a></td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
1337 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
1338
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
1339
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
1340 <tr id="toc-row-20">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1341 <th><a href="#slide20">CbC の実装: 環境付き継続</a></th>
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
1342 <td><a href="#slide20">20</a></td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
1343 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
1344
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
1345
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
1346 <tr id="toc-row-21">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1347 <th><a href="#slide21">CbC 引数渡し</a></th>
30
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
1348 <td><a href="#slide21">21</a></td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
1349 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
1350
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 29
diff changeset
1351
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1352 <tr id="toc-row-22">
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1353 <th><a href="#slide22">引数の並びに上書きコピー</a></th>
35
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1354 <td><a href="#slide22">22</a></td>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1355 </tr>
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1356
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 34
diff changeset
1357
39
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1358 <tr id="toc-row-23">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1359 <th><a href="#slide23">最適化の比較</a></th>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1360 <td><a href="#slide23">23</a></td>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1361 </tr>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1362
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1363
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1364 <tr id="toc-row-24">
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1365 <th><a href="#slide24">最適化の比較</a></th>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1366 <td><a href="#slide24">24</a></td>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1367 </tr>
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1368
a6540714dda9 modify presen
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 38
diff changeset
1369
27
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1370 </table>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1371 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1372
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1373 <div id="help" class="sidebar hidden">
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1374 <h2>Help</h2>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1375 <table>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1376 <caption>Help</caption>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1377 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1378 <th>Table of Contents</th>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1379 <td>t</td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1380 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1381 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1382 <th>Exposé</th>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1383 <td>ESC</td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1384 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1385 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1386 <th>Full screen slides</th>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1387 <td>e</td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1388 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1389 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1390 <th>Presenter View</th>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1391 <td>p</td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1392 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1393 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1394 <th>Source Files</th>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1395 <td>s</td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1396 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1397 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1398 <th>Slide Numbers</th>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1399 <td>n</td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1400 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1401 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1402 <th>Toggle screen blanking</th>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1403 <td>b</td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1404 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1405 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1406 <th>Show/hide slide context</th>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1407 <td>c</td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1408 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1409 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1410 <th>Notes</th>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1411 <td>2</td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1412 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1413 <tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1414 <th>Help</th>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1415 <td>h</td>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1416 </tr>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1417 </table>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1418 </div>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1419 <script>main()</script>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1420 </body>
45369b0cbcd1 add some files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1421 </html>