comparison slides/2018/05/14/zip.txt @ 44:8c7be076e6e6

auto-Update generated slides by script
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 15 May 2018 19:22:22 +0900
parents
children
comparison
equal deleted inserted replaced
43:fc5259b6167e 44:8c7be076e6e6
1 2018-05-08----
2 今日の進捗
3
4 - MoarVMの資料を読み解く
5 - CbCで実装するべき場所を考察する
6
7 ----------
8 2018-05-14----
9 今日の進捗
10
11 # MoarVMのJIT
12 * [Docs](https://github.com/MoarVM/MoarVM/tree/master/docs)を見る
13
14 # Lego
15 * MoarMVのJITはLegoと呼ばれているらしい
16
17 # DynASM
18 * Dynamic Assemler
19 * http://luajit.org/dynasm.html
20 * [luajit](http://luajit.org/)プロジェクトで作られているもの
21 * MoarVMには `3rdparty`ディレクトリ以下に展開されている
22 * x86アーキテクチャのJITコンパイル用のアセンブラのようなものらしい
23 * luaが`dasc`と呼ばれるCに近いアセンブラをCを出力する前に実行
24 * Cのヘッダーの `#include` している部分を機械語にランタイムで翻訳
25 * [GitHubのcommit](https://github.com/MoarVM/MoarVM/commit/372d0582ab90d4ddfc43553bbebe4e553a42278d)
26
27 # DynASM
28
29
30 - To get you started, here is a simple code snippet to be pre-processed. The lines starting with '|' (the pipe symbol) are for DynASM:
31
32 ```
33 if (ptr != NULL) {
34 | mov eax, foo+17
35 | mov edx, [eax+esi*2+0x20]
36 | add ebx, [ecx+bar(ptr, 9)]
37 }
38 ```
39
40 - After pre-processing you get:
41
42 ```
43 if (ptr != NULL) {
44 dasm_put(Dst, 123, foo+17, bar(ptr, 9));
45 }
46 ```
47
48
49
50 ----------