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