https://github.com/akkartik/mu/blob/master/subx/073next-token.subx
1 == code
2
3
4
5
6
7
8
9
10
11
12
13
14
15 next-token:
16
17 55/push-EBP
18 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
19
20 50/push-EAX
21 51/push-ECX
22 56/push-ESI
23 57/push-EDI
24
25 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 8/disp8 .
26
27 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 7/r32/EDI 0x10/disp8 .
28
29
30 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
31 56/push-ESI
32
33 e8/call skip-chars-matching/disp32
34
35 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
36
37 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
38 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/EAX 0xc/disp8 .
39 89/copy 0/mod/indirect 7/rm32/EDI . . . 0/r32/EAX . .
40
41
42 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
43 56/push-ESI
44
45 e8/call skip-chars-not-matching/disp32
46
47 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
48
49 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
50 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/EAX 0xc/disp8 .
51 89/copy 1/mod/*+disp8 7/rm32/EDI . . . 0/r32/EAX 4/disp8 .
52
53 5f/pop-to-EDI
54 5e/pop-to-ESI
55 59/pop-to-ECX
56 58/pop-to-EAX
57
58 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
59 5d/pop-to-EBP
60 c3/return
61
62 test-next-token:
63
64 55/push-EBP
65 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
66
67
68
69 68/push _test-stream/imm32
70
71 e8/call clear-stream/disp32
72
73 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
74
75 68/push 0/imm32/end
76 68/push 0/imm32/start
77 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
78
79
80 68/push " ab"/imm32
81 68/push _test-stream/imm32
82
83 e8/call write/disp32
84
85 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
86
87
88 51/push-ECX
89 68/push 0x20/imm32
90 68/push _test-stream/imm32
91
92 e8/call next-token/disp32
93
94 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
95
96
97
98 68/push "F - test-next-token: start"/imm32
99 68/push 0xe/imm32
100
101 8b/copy 0/mod/indirect 1/rm32/ECX . . . 0/r32/EAX . .
102 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-stream/imm32
103 50/push-EAX
104
105 e8/call check-ints-equal/disp32
106
107 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
108
109
110
111 68/push "F - test-next-token: end"/imm32
112 68/push 0x10/imm32
113
114 8b/copy 1/mod/*+disp8 1/rm32/ECX . . . 0/r32/EAX 4/disp8 .
115 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-stream/imm32
116 50/push-EAX
117
118 e8/call check-ints-equal/disp32
119
120 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
121
122 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
123 5d/pop-to-EBP
124 c3/return
125
126 test-next-token-Eof:
127
128 55/push-EBP
129 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
130
131
132
133 68/push _test-stream/imm32
134
135 e8/call clear-stream/disp32
136
137 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
138
139 68/push 0/imm32/end
140 68/push 0/imm32/start
141 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
142
143
144
145 51/push-ECX
146 68/push 0x20/imm32
147 68/push _test-stream/imm32
148
149 e8/call next-token/disp32
150
151 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
152
153
154 68/push "F - test-next-token-Eof"/imm32
155 ff 6/subop/push 1/mod/*+disp8 1/rm32/ECX . . . . 4/disp8 .
156 ff 6/subop/push 0/mod/indirect 1/rm32/ECX . . . . . .
157
158 e8/call check-ints-equal/disp32
159
160 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
161
162 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
163 5d/pop-to-EBP
164 c3/return
165
166
167
168 next-token-from-slice:
169
170 55/push-EBP
171 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
172
173 50/push-EAX
174 51/push-ECX
175 52/push-EDX
176 57/push-EDI
177
178 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 1/r32/ECX 0xc/disp8 .
179
180 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 2/r32/EDX 0x10/disp8 .
181
182 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 7/r32/EDI 0x14/disp8 .
183
184
185 52/push-EDX
186 51/push-ECX
187 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
188
189 e8/call skip-chars-matching-in-slice/disp32
190
191 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
192
193 89/copy 0/mod/indirect 7/rm32/EDI . . . 0/r32/EAX . .
194
195
196 52/push-EDX
197 51/push-ECX
198 50/push-EAX
199
200 e8/call skip-chars-not-matching-in-slice/disp32
201
202 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
203
204 89/copy 1/mod/*+disp8 7/rm32/EDI . . . 0/r32/EAX 4/disp8 .
205
206 5f/pop-to-EDI
207 5a/pop-to-EDX
208 59/pop-to-ECX
209 58/pop-to-EAX
210
211 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
212 5d/pop-to-EBP
213 c3/return
214
215 test-next-token-from-slice:
216
217 55/push-EBP
218 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
219
220 b8/copy-to-EAX " ab"/imm32
221 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
222 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
223 05/add-to-EAX 4/imm32
224
225 68/push 0/imm32/end
226 68/push 0/imm32/start
227 89/copy 3/mod/direct 7/rm32/EDI . . . 4/r32/ESP . .
228
229
230 57/push-EDI
231 68/push 0x20/imm32
232 51/push-ECX
233 50/push-EAX
234
235 e8/call next-token-from-slice/disp32
236
237 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x10/imm32
238
239
240
241 68/push "F - test-next-token-from-slice: start"/imm32
242 68/push 2/imm32
243
244 8b/copy 0/mod/indirect 7/rm32/EDI . . . 1/r32/ECX . .
245 2b/subtract 3/mod/direct 0/rm32/EAX . . . 1/r32/ECX . .
246 51/push-ECX
247
248 e8/call check-ints-equal/disp32
249
250 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
251
252
253
254 68/push "F - test-next-token-from-slice: end"/imm32
255 68/push 4/imm32
256
257 8b/copy 1/mod/*+disp8 7/rm32/EDI . . . 1/r32/ECX 4/disp8 .
258 2b/subtract 3/mod/direct 0/rm32/EAX . . . 1/r32/ECX . .
259 51/push-ECX
260
261 e8/call check-ints-equal/disp32
262
263 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
264
265 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
266 5d/pop-to-EBP
267 c3/return
268
269 test-next-token-from-slice-Eof:
270
271 55/push-EBP
272 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
273
274 68/push 0/imm32/end
275 68/push 0/imm32/start
276 89/copy 3/mod/direct 7/rm32/EDI . . . 4/r32/ESP . .
277
278
279 57/push-EDI
280 68/push 0x20/imm32
281 68/push 0/imm32
282 68/push 0/imm32
283
284 e8/call next-token-from-slice/disp32
285
286 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x10/imm32
287
288
289
290 68/push "F - test-next-token-from-slice-Eof"/imm32
291 68/push 0/imm32
292
293 8b/copy 1/mod/*+disp8 7/rm32/EDI . . . 1/r32/ECX 4/disp8 .
294 2b/subtract 0/mod/indirect 7/rm32/EDI . . . 1/r32/ECX . .
295 51/push-ECX
296
297 e8/call check-ints-equal/disp32
298
299 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
300
301 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
302 5d/pop-to-EBP
303 c3/return
304
305 test-next-token-from-slice-nothing:
306
307 55/push-EBP
308 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
309
310 b8/copy-to-EAX " "/imm32
311 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
312 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
313 05/add-to-EAX 4/imm32
314
315 68/push 0/imm32/end
316 68/push 0/imm32/start
317 89/copy 3/mod/direct 7/rm32/EDI . . . 4/r32/ESP . .
318
319
320 57/push-EDI
321 68/push 0x20/imm32
322 51/push-ECX
323 50/push-EAX
324
325 e8/call next-token-from-slice/disp32
326
327 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x10/imm32
328
329
330
331 68/push "F - test-next-token-from-slice-Eof"/imm32
332 68/push 0/imm32
333
334 8b/copy 1/mod/*+disp8 7/rm32/EDI . . . 1/r32/ECX 4/disp8 .
335 2b/subtract 0/mod/indirect 7/rm32/EDI . . . 1/r32/ECX . .
336 51/push-ECX
337
338 e8/call check-ints-equal/disp32
339
340 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
341
342 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
343 5d/pop-to-EBP
344 c3/return
345
346 skip-chars-matching:
347
348 55/push-EBP
349 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
350
351 50/push-EAX
352 51/push-ECX
353 52/push-EDX
354 53/push-EBX
355 56/push-ESI
356
357 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 8/disp8 .
358
359 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
360
361 8b/copy 0/mod/indirect 6/rm32/ESI . . . 3/r32/EBX . .
362
363 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 2/r32/EDX 0xc/disp8 .
364 $skip-chars-matching:loop:
365
366 39/compare 3/mod/direct 1/rm32/ECX . . . 3/r32/EBX . .
367 7d/jump-if-greater-or-equal $skip-chars-matching:end/disp8
368
369 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
370 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/AL 0xc/disp8 .
371
372 39/compare 3/mod/direct 0/rm32/EAX . . . 2/r32/EDX . .
373 75/jump-if-not-equal $skip-chars-matching:end/disp8
374
375 41/inc-ECX
376 eb/jump $skip-chars-matching:loop/disp8
377 $skip-chars-matching:end:
378
379 89/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
380
381 5e/pop-to-ESI
382 5b/pop-to-EBX
383 5a/pop-to-EDX
384 59/pop-to-ECX
385 58/pop-to-EAX
386
387 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
388 5d/pop-to-EBP
389 c3/return
390
391 test-skip-chars-matching:
392
393
394
395 68/push _test-stream/imm32
396
397 e8/call clear-stream/disp32
398
399 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
400
401
402 68/push " ab"/imm32
403 68/push _test-stream/imm32
404
405 e8/call write/disp32
406
407 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
408
409
410 68/push 0x20/imm32
411 68/push _test-stream/imm32
412
413 e8/call skip-chars-matching/disp32
414
415 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
416
417
418 68/push "F - test-skip-chars-matching"/imm32
419 68/push 2/imm32
420
421 b8/copy-to-EAX _test-stream/imm32
422 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 4/disp8 .
423
424 e8/call check-ints-equal/disp32
425
426 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
427
428 c3/return
429
430 test-skip-chars-matching-none:
431
432
433
434 68/push _test-stream/imm32
435
436 e8/call clear-stream/disp32
437
438 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
439
440
441 68/push "ab"/imm32
442 68/push _test-stream/imm32
443
444 e8/call write/disp32
445
446 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
447
448
449 68/push 0x20/imm32
450 68/push _test-stream/imm32
451
452 e8/call skip-chars-matching/disp32
453
454 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
455
456
457 68/push "F - test-skip-chars-matching-none"/imm32
458 68/push 0/imm32
459
460 b8/copy-to-EAX _test-stream/imm32
461 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 4/disp8 .
462
463 e8/call check-ints-equal/disp32
464
465 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
466
467 c3/return
468
469
470 skip-chars-not-matching:
471
472 55/push-EBP
473 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
474
475 50/push-EAX
476 51/push-ECX
477 52/push-EDX
478 53/push-EBX
479 56/push-ESI
480
481 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 8/disp8 .
482
483 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
484
485 8b/copy 0/mod/indirect 6/rm32/ESI . . . 3/r32/EBX . .
486
487 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 2/r32/EDX 0xc/disp8 .
488 $skip-chars-not-matching:loop:
489
490 39/compare 3/mod/direct 1/rm32/ECX . . . 3/r32/EBX . .
491 7d/jump-if-greater-or-equal $skip-chars-not-matching:end/disp8
492
493 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
494 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/AL 0xc/disp8 .
495
496 39/compare 3/mod/direct 0/rm32/EAX . . . 2/r32/EDX . .
497 74/jump-if-equal $skip-chars-not-matching:end/disp8
498
499 41/inc-ECX
500 eb/jump $skip-chars-not-matching:loop/disp8
501 $skip-chars-not-matching:end:
502
503 89/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
504
505 5e/pop-to-ESI
506 5b/pop-to-EBX
507 5a/pop-to-EDX
508 59/pop-to-ECX
509 58/pop-to-EAX
510
511 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
512 5d/pop-to-EBP
513 c3/return
514
515 test-skip-chars-not-matching:
516
517
518
519 68/push _test-stream/imm32
520
521 e8/call clear-stream/disp32
522
523 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
524
525
526 68/push "ab "/imm32
527 68/push _test-stream/imm32
528
529 e8/call write/disp32
530
531 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
532
533
534 68/push 0x20/imm32
535 68/push _test-stream/imm32
536
537 e8/call skip-chars-not-matching/disp32
538
539 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
540
541
542 68/push "F - test-skip-chars-not-matching"/imm32
543 68/push 2/imm32
544
545 b8/copy-to-EAX _test-stream/imm32
546 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 4/disp8 .
547
548 e8/call check-ints-equal/disp32
549
550 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
551
552 c3/return
553
554 test-skip-chars-not-matching-none:
555
556
557
558 68/push _test-stream/imm32
559
560 e8/call clear-stream/disp32
561
562 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
563
564
565 68/push " ab"/imm32
566 68/push _test-stream/imm32
567
568 e8/call write/disp32
569
570 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
571
572
573 68/push 0x20/imm32
574 68/push _test-stream/imm32
575
576 e8/call skip-chars-not-matching/disp32
577
578 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
579
580
581 68/push "F - test-skip-chars-not-matching-none"/imm32
582 68/push 0/imm32
583
584 b8/copy-to-EAX _test-stream/imm32
585 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 4/disp8 .
586
587 e8/call check-ints-equal/disp32
588
589 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
590
591 c3/return
592
593 test-skip-chars-not-matching-all:
594
595
596
597 68/push _test-stream/imm32
598
599 e8/call clear-stream/disp32
600
601 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
602
603
604 68/push "ab"/imm32
605 68/push _test-stream/imm32
606
607 e8/call write/disp32
608
609 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
610
611
612 68/push 0x20/imm32
613 68/push _test-stream/imm32
614
615 e8/call skip-chars-not-matching/disp32
616
617 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
618
619
620 68/push "F - test-skip-chars-not-matching-all"/imm32
621 68/push 2/imm32
622
623 b8/copy-to-EAX _test-stream/imm32
624 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 4/disp8 .
625
626 e8/call check-ints-equal/disp32
627
628 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
629
630 c3/return
631
632 skip-chars-not-matching-whitespace:
633
634 55/push-EBP
635 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
636
637 50/push-EAX
638 51/push-ECX
639 53/push-EBX
640 56/push-ESI
641
642 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 8/disp8 .
643
644 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
645
646 8b/copy 0/mod/indirect 6/rm32/ESI . . . 3/r32/EBX . .
647 $skip-chars-not-matching-whitespace:loop:
648
649 39/compare 3/mod/direct 1/rm32/ECX . . . 3/r32/EBX . .
650 7d/jump-if-greater-or-equal $skip-chars-not-matching-whitespace:end/disp8
651
652 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
653 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/AL 0xc/disp8 .
654
655 3d/compare-with-EAX 0x20/imm32/space
656 74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
657
658 3d/compare-with-EAX 0x0a/imm32/newline
659 74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
660
661 3d/compare-with-EAX 0x09/imm32/tab
662 74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
663
664 3d/compare-with-EAX 0x0d/imm32/cr
665 74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
666
667 41/inc-ECX
668 eb/jump $skip-chars-not-matching-whitespace:loop/disp8
669 $skip-chars-not-matching-whitespace:end:
670
671 89/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
672
673 5e/pop-to-ESI
674 5b/pop-to-EBX
675 59/pop-to-ECX
676 58/pop-to-EAX
677
678 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
679 5d/pop-to-EBP
680 c3/return
681
682 skip-chars-matching-in-slice:
683
684 55/push-EBP
685 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
686
687 51/push-ECX
688 52/push-EDX
689 53/push-EBX
690
691 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 0/r32/EAX 8/disp8 .
692
693 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 1/r32/ECX 0xc/disp8 .
694
695 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 2/r32/EDX 0x10/disp8 .
696
697 31/xor 3/mod/direct 3/rm32/EBX . . . 3/r32/EBX . .
698 $skip-chars-matching-in-slice:loop:
699
700 39/compare 3/mod/direct 0/rm32/EAX . . . 1/r32/ECX . .
701 7d/jump-if-greater-or-equal $skip-chars-matching-in-slice:end/disp8
702
703 8a/copy-byte 0/mod/indirect 0/rm32/EAX . . . 3/r32/BL . .
704 39/compare 3/mod/direct 3/rm32/EBX . . . 2/r32/EDX . .
705 75/jump-if-not-equal $skip-chars-matching-in-slice:end/disp8
706
707 40/inc-EAX
708 eb/jump $skip-chars-matching-in-slice:loop/disp8
709 $skip-chars-matching-in-slice:end:
710
711 5b/pop-to-EBX
712 5a/pop-to-EDX
713 59/pop-to-ECX
714
715 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
716 5d/pop-to-EBP
717 c3/return
718
719 test-skip-chars-matching-in-slice:
720
721 b8/copy-to-EAX " ab"/imm32
722 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
723 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
724 05/add-to-EAX 4/imm32
725
726
727 68/push 0x20/imm32
728 51/push-ECX
729 50/push-EAX
730
731 e8/call skip-chars-matching-in-slice/disp32
732
733 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
734
735
736 68/push "F - test-skip-chars-matching-in-slice"/imm32
737 68/push 2/imm32
738
739 29/subtract 3/mod/direct 1/rm32/ECX . . . 0/r32/EAX . .
740 51/push-ECX
741
742 e8/call check-ints-equal/disp32
743
744 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
745
746 c3/return
747
748 test-skip-chars-matching-in-slice-none:
749
750 b8/copy-to-EAX "ab"/imm32
751 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
752 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
753 05/add-to-EAX 4/imm32
754
755
756 68/push 0x20/imm32
757 51/push-ECX
758 50/push-EAX
759
760 e8/call skip-chars-matching-in-slice/disp32
761
762 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
763
764
765 68/push "F - test-skip-chars-matching-in-slice-none"/imm32
766 68/push 2/imm32
767
768 29/subtract 3/mod/direct 1/rm32/ECX . . . 0/r32/EAX . .
769 51/push-ECX
770
771 e8/call check-ints-equal/disp32
772
773 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
774
775 c3/return
776
777
778 skip-chars-not-matching-in-slice:
779
780 55/push-EBP
781 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
782
783 51/push-ECX
784 52/push-EDX
785 53/push-EBX
786
787 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 0/r32/EAX 8/disp8 .
788
789 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 1/r32/ECX 0xc/disp8 .
790
791 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 2/r32/EDX 0x10/disp8 .
792
793 31/xor 3/mod/direct 3/rm32/EBX . . . 3/r32/EBX . .
794 $skip-chars-not-matching-in-slice:loop:
795
796 39/compare 3/mod/direct 0/rm32/EAX . . . 1/r32/ECX . .
797 7d/jump-if-greater-or-equal $skip-chars-not-matching-in-slice:end/disp8
798
799 8a/copy-byte 0/mod/indirect 0/rm32/EAX . . . 3/r32/BL . .
800 39/compare 3/mod/direct 3/rm32/EBX . . . 2/r32/EDX . .
801 74/jump-if-equal $skip-chars-not-matching-in-slice:end/disp8
802
803 40/inc-EAX
804 eb/jump $skip-chars-not-matching-in-slice:loop/disp8
805 $skip-chars-not-matching-in-slice:end:
806
807 5b/pop-to-EBX
808 5a/pop-to-EDX
809 59/pop-to-ECX
810
811 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
812 5d/pop-to-EBP
813 c3/return
814
815 test-skip-chars-not-matching-in-slice:
816
817 b8/copy-to-EAX "ab "/imm32
818 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
819 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
820 05/add-to-EAX 4/imm32
821
822
823 68/push 0x20/imm32
824 51/push-ECX
825 50/push-EAX
826
827 e8/call skip-chars-not-matching-in-slice/disp32
828
829 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
830
831
832 68/push "F - test-skip-chars-not-matching-in-slice"/imm32
833 68/push 1/imm32
834
835 29/subtract 3/mod/direct 1/rm32/ECX . . . 0/r32/EAX . .
836 51/push-ECX
837
838 e8/call check-ints-equal/disp32
839
840 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
841
842 c3/return
843
844 test-skip-chars-not-matching-in-slice-none:
845
846 b8/copy-to-EAX " ab"/imm32
847 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
848 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
849 05/add-to-EAX 4/imm32
850
851
852 68/push 0x20/imm32
853 51/push-ECX
854 50/push-EAX
855
856 e8/call skip-chars-not-matching-in-slice/disp32
857
858 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
859
860
861 68/push "F - test-skip-chars-not-matching-in-slice-none"/imm32
862 68/push 3/imm32
863
864 29/subtract 3/mod/direct 1/rm32/ECX . . . 0/r32/EAX . .
865 51/push-ECX
866
867 e8/call check-ints-equal/disp32
868
869 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
870
871 c3/return
872
873 test-skip-chars-not-matching-in-slice-all:
874
875 b8/copy-to-EAX "ab"/imm32
876 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
877 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
878 05/add-to-EAX 4/imm32
879
880
881 68/push 0x20/imm32
882 51/push-ECX
883 50/push-EAX
884
885 e8/call skip-chars-not-matching-in-slice/disp32
886
887 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
888
889
890 68/push "F - test-skip-chars-not-matching-in-slice-all"/imm32
891 68/push 0/imm32
892
893 29/subtract 3/mod/direct 1/rm32/ECX . . . 0/r32/EAX . .
894 51/push-ECX
895
896 e8/call check-ints-equal/disp32
897
898 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
899
900 c3/return
901
902