Bartosz Wójcik Posted April 22, 2008 Report Share Posted April 22, 2008 Natrafiłeś kiedyś na jakiś bezsensowny fragment kodu assemblera analizując jakiś program? Może była to dziwna optymalizacja, nielogiczna sekwencja instrukcji, która sprawiła, że poczułeś się jakbyś ogłądał Monty Pythona pod debuggerem? Jeśli tak - zamieść go tutaj i daj się pośmiać się innym :P 1 Quote Link to comment Share on other sites More sharing options...
divine Posted April 22, 2008 Report Share Posted April 22, 2008 Raz pisalem prace w GCC pod linuxem, exek mial niezla optymalizacje 300kb :D, pod debugerem znalazlem takie cos na poczatku kazdej funkcji: push ebp pop ebp mov ebp, esp Niezla optymalizacja :D, ten sam kod naklepalem w konsoli asma o zawartosci 4 kb :), dostalem piatke za to :), ale niestety nie spodobalo to sie naszemu doktorkowi, ktory zawsze sieje propagande Linux zamiast Windows :P Quote Link to comment Share on other sites More sharing options...
deus Posted April 24, 2008 Report Share Posted April 24, 2008 3 kawałki kodu, na które ostatnio natrafiłem podczas zabawy, z Visuala: .text:0042B185 xor edx, edx .text:0042B187 mov dh, [eax] .text:0042B189 xor ecx, edx ... .text:0042B176 mov edx, eax .text:0042B178 dec eax .text:0042B179 test edx, edx .text:0042B17B jz short loc_42B1A9 .text:0042B17D push esi .text:0042B17E lea esi, [eax+1] .text:0042B181 mov eax, [esp+4+arg_0] ... .text:0044C2DA xor ecx, ecx .text:0044C2DC mov cl, [esi+edi] .text:0044C2DF mov edx, ecx .text:0044C2E1 mov ecx, [esp+8+arg_4] ...jak zwykle Bozia za mało rejestrów dała... o jakieś 1024 za mało. Quote Link to comment Share on other sites More sharing options...
Bartosz Wójcik Posted October 11, 2015 Author Report Share Posted October 11, 2015 Cały zestaw "cudownie zoptymalizowanych" instrukcji oferuje kompilator Go:http://www.secnews.pl/2014/09/05/technologiczna-bieda-kompilatora-go/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.