9
9
< link rel ="stylesheet " href ="reveal.js/css/reveal.css ">
10
10
< link rel ="stylesheet " href ="drw.css ">
11
11
12
+ < style >
13
+ td .reg {
14
+ background-color : # 333 ;
15
+ text-align : center !important
16
+ }
17
+ </ style >
18
+
12
19
<!-- Theme used for syntax highlighting of code -->
13
20
< link rel ="stylesheet " href ="reveal.js/lib/css/zenburn.css ">
14
21
@@ -36,8 +43,103 @@ <h1>Compiler Explorer</h1>
36
43
< br >
37
44
< em > < a href ="https://drw.com/ "> drw.com</ a > </ em >
38
45
</ section >
39
- < section > Slide 1</ section >
40
- < section > Slide 2</ section >
46
+ < section >
47
+ < h3 > Backstory</ h3 >
48
+ < pre > < code data-trim class ="cpp ">
49
+ void foreach(const vector<int> &v) {
50
+ for (size_t i = 0; i < v .size(); ++i)
51
+ doSomething(v[i]);
52
+ } </ code > </ pre >
53
+ < pre > < code data-trim class ="cpp ">
54
+ void foreach(const vector<int> &v) {
55
+ for (int x : v)
56
+ doSomething(x);
57
+ }</ code > </ pre >
58
+ </ section >
59
+ < section >
60
+ < h3 > Compiler Explorer v1</ h3 >
61
+ < pre > < code class ="bash "> $ watch 'g++ -O2 -S /tmp/test.cc -o - | c++filt'</ code > </ pre >
62
+ < a href ="http://localhost:10240/#z:OYLghAFBqd5TKALEBjA9gEwKYFFMCWALugE4A0BIEAZugHZEDKqAhgDbYgCMAdABwBWAOyCATAAYAnGIBsw7lKVTh5AFY9yAZ3QBXUqi4ByAKRiAzAXqp2unAGoT5gMKotRTOwIAjJ7hMSAIJmlta2Dk7OAG7YqCSkfgHBQdgAHkTYpPT2UegEmPaY6EzoALbYREhWwBBWRACUTgBCSUm5%2BfZ0pNisqEgQGPTu9u6YICAxcWSRdX6OclH1jsItQfadZPYQWgQAXtgA%2BkT2BI7mACL2Es0nZ845vDv7EI3mTfMtYk0EjWvrhcUyhUqvQalETIJvhDzq9VsFhOcjPVyOwQEZBEZyPQ0RJMeg0c4zJ93jp9IZ5uZuJiiDikciANYgQQSFFogAsmNKTJZ2KMuPI%2BKMmK0IBZNL5SPIcFgKAwpQADgROBQqAMyorlSAAPS6LSkLXeKxa4BEonkGhKjKkEUQby08hy8qMADy9HYAE97YRunECDERRLKIxsKiJci6IwWBwuHwhKJJDJ5IplKp0PKiAQGAGALTOsTCvQGGPI0MYrH2wU6vUGo0mr5Erb4YibELccj2ZzqpWZCncerU2n1ZFIHo4UjUBnc1lGDnlwOC4Wi8ji3FD6f58hc5lz/kL5eDqWIaXINBYPCEeKUagR5hsTg8AQicTSOQKZQqdQgMTaQuGNEhKwbDsbA7jcDwvF8cx/CCACwmAu5JniRIYJSdJMmydoCiKEpykqapakYWFWiCTCNm6Xp%2BkGYZRnGRDphcWYoPmWRFmWOF1i6LY6nsVJ7BAHJfkCf4ARw4F8NSIiYIRSVS0xXldwJU0vhGX8QJCDcVzpcgR1YMcJ3IRlt1DWctx5Cs0UXMUD2PCBZS7ZUrzVBVu3HKt9UNehjSUppzUtTIbTtQNHWwF03U9QNvViDN/XtOoQwPG8o3vWMnwTV9kyUVN00zIY0VzDdSSLL8SzRMt5LxNE3JrTy62JRsLxbCxvw7eye3U/t9zDYdR0yfTDJZYy5PMoVtCXTS11DDdTJ3CqRvGyduAkAa0XMIb5wszrV2RGJrRykA2SAA%3D%3D "> Or
63
+ here</ a >
64
+ </ section >
65
+ < section >
66
+ < h3 > Some assembly</ h3 >
67
+ < iframe width ="1000px " height ="300px "
68
+ src ="http://localhost:10240/e#g:!((g:!((g:!((h:codeEditor,i:(fontScale:1.5479341055999998,j:1,source:'int+square(int+num)+%7B%0A++++return+num+*+num%3B%0A%7D'),l:'5',n:'0',o:'C%2B%2B+source+%231',t:'0')),k:50,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:compiler,i:(compiler:/usr/bin/g%2B%2B,filters:(b:'0',commentOnly:'0',directives:'0',intel:'0'),fontScale:1.5479341055999998,options:'',source:1),l:'5',n:'0',o:'/usr/bin/g%2B%2B+(Editor+%231,+Compiler+%231)',t:'0')),k:50,l:'4',n:'0',o:'',s:0,t:'0')),l:'2',n:'0',o:'',t:'0')),version:4 "> </ iframe >
69
+ </ section >
70
+ < section >
71
+ < h3 > Intel asm 101</ h3 >
72
+ < pre > < code data-trim class ="asm ">
73
+ mov dest, src
74
+ add dest, arg
75
+ cmp reg, arg
76
+ jmp dest
77
+ </ code > </ pre >
78
+ </ section >
79
+ < section >
80
+ < h3 > Intel registers</ h3 >
81
+ < ul >
82
+ < li > rax</ li >
83
+ < li > rcx</ li >
84
+ < li > rdx</ li >
85
+ < li > rbx</ li >
86
+ < li > rsp</ li >
87
+ < li > rbp</ li >
88
+ < li > rsi</ li >
89
+ < li > rdi</ li >
90
+ < li > r8-r15</ li >
91
+ </ ul >
92
+ </ section >
93
+ < section >
94
+ < h3 > Intel registers</ h3 >
95
+ < table class ="reg ">
96
+ < tr >
97
+ < td colspan ="8 " class ="reg "> rax</ td >
98
+ </ tr >
99
+ < tr >
100
+ < td colspan ="4 "> </ td >
101
+ < td colspan ="4 " class ="reg "> eax</ td >
102
+ </ tr >
103
+ < tr >
104
+ < td colspan ="6 "> </ td >
105
+ < td colspan ="2 " class ="reg "> ax</ td >
106
+ </ tr >
107
+ < tr >
108
+ < td colspan ="6 "> </ td >
109
+ < td colspan ="1 " class ="reg "> ah</ td >
110
+ < td colspan ="1 " class ="reg "> al</ td >
111
+ </ tr >
112
+ < tr >
113
+ < td > ...</ td >
114
+ < td > ...</ td >
115
+ < td > ...</ td >
116
+ < td > ...</ td >
117
+ < td > ...</ td >
118
+ < td > ...</ td >
119
+ < td > ...</ td >
120
+ < td > ...</ td >
121
+ </ tr >
122
+ </ table >
123
+ </ section >
124
+ < section >
125
+ < h3 > Intel registers</ h3 >
126
+ < pre > < code data-trim class ="cpp ">
127
+ union {
128
+ struct {
129
+ uint8_t al;
130
+ uint8_t ah;
131
+ };
132
+ uint16_t ax;
133
+ uint32_t eax;
134
+ uint64_t rax;
135
+ };
136
+ </ code > </ pre >
137
+ </ section >
138
+ < section >
139
+ < h3 > Cleverness</ h3 >
140
+ < iframe width ="1000px " height ="300px "
141
+ src ="http://localhost:10240/e#g:!((g:!((g:!((h:codeEditor,i:(fontScale:1.2899450879999999,j:1,source:'int+times9(int+num)+%7B%0A++++return+num+*+9%3B%0A%7D'),l:'5',n:'0',o:'C%2B%2B+source+%231',t:'0')),k:50,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:compiler,i:(compiler:/usr/bin/g%2B%2B,filters:(b:'0',commentOnly:'0',directives:'0',intel:'0'),fontScale:1.2899450879999999,options:'-O1',source:1),l:'5',n:'0',o:'/usr/bin/g%2B%2B+(Editor+%231,+Compiler+%231)',t:'0')),k:50,l:'4',n:'0',o:'',s:0,t:'0')),l:'2',n:'0',o:'',t:'0')),version:4 "> </ iframe >
142
+ </ section >
41
143
< div class ="footer ">
42
144
< hr >
43
145
< img src ="DRWSmallLogo.png " width ="50 " height ="16 ">
@@ -51,6 +153,7 @@ <h1>Compiler Explorer</h1>
51
153
< script >
52
154
Reveal . initialize ( {
53
155
transition : 'none' ,
156
+ history : true ,
54
157
dependencies : [
55
158
{ src : 'reveal.js/plugin/markdown/marked.js' } ,
56
159
{ src : 'reveal.js/plugin/markdown/markdown.js' } ,
0 commit comments