flat assembler
Message board for the users of flat assembler.

Index > Heap > Most common instructions?

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
alessandro95



Joined: 24 Mar 2013
Posts: 62
alessandro95
I think I read something about this in the board, but I cannot find it anymore with the search functions so I'll ask again.

After a discussion in an italian forum I was wondering what are the most common instructions used in assembly programs, but I cannot find any data online, anyone knows where to find some information? In the forum I mentioned the only data that where posted are from 1992...!

Also, I'm curios to compare the most used instructions by compilers and humans, I think they are pretty much the same but who knows Razz!
Post 02 Jun 2013, 09:01
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17350
Location: In your JS exploiting you and your system
revolution
Please define common.

Most used in source code? Most used during runtime? Most used across different CPUs? Most used since 1970? Although I suspect the answer to all of these would be MOV.

As for comparisons of human vs compiler: I would suspect that humans use a wider range of instructions simply because compilers are not taught how to use the full range of available instructions. Have you ever seen a compiler use "SFENCE"?
Post 02 Jun 2013, 09:23
View user's profile Send private message Visit poster's website Reply with quote
alessandro95



Joined: 24 Mar 2013
Posts: 62
alessandro95
The discussion was restricted to the x86 instruction set (including various extensions), and most common meant the instructions that appear more often in the source code.

I agree with you on the compiler vs human, what I meant is that the most used instructions are probablythe same.

anyway I had no idea of what SFENCE is D:
Post 02 Jun 2013, 09:50
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 20:14; edited 1 time in total
Post 02 Jun 2013, 15:03
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
alessandro95 wrote:
Most common instruction


BVC of course Smile
Post 02 Jun 2013, 16:32
View user's profile Send private message Reply with quote
Walter



Joined: 26 Jan 2013
Posts: 143
Walter
x86 Machine Code Statistics

Which instruction is the most common one in your code?
Three popular open-source applications were disassembled and analysed.

http://www.strchr.com/x86_machine_code_statistics
Post 02 Jun 2013, 16:52
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 20:15; edited 1 time in total
Post 02 Jun 2013, 17:26
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2917
Location: [RSP+8*5]
bitRAKE
Size optimization changes things quite a bit. Download all the Hugi Size Coding compo's, and analyse them. Very Happy

http://www.hugi.scene.org/compo/
Post 03 Jun 2013, 06:49
View user's profile Send private message Visit poster's website Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr
my most common instruction is: "fuck this stupid ass architecture"
Post 03 Jun 2013, 07:06
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 20:14; edited 1 time in total
Post 03 Jun 2013, 17:15
View user's profile Send private message Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr
most common is mov of course on many platforms and thingies. other then tis shit and lea can be fairly common or or.
Post 03 Jun 2013, 17:49
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 20:14; edited 1 time in total
Post 03 Jun 2013, 17:57
View user's profile Send private message Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr
seriously who tha fuck realy wanna impress people?
Post 03 Jun 2013, 19:41
View user's profile Send private message Reply with quote
Bob++



Joined: 12 Feb 2013
Posts: 92
Bob++
I'm surprise: call is most common(used) than jmp.
Post 03 Jun 2013, 19:51
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 20:14; edited 1 time in total
Post 03 Jun 2013, 20:07
View user's profile Send private message Reply with quote
Coty



Joined: 17 May 2010
Posts: 548
Location: ␀
Coty
Bob++ wrote:
I'm surprise: call is most common(used) than jmp.

I'm not, I don't know how much code I've written like this:

Code:
mov eax, 7
call somethingorother

jnc somewhere

call somethingesle
mov ecx, %somenumber%

call yetagainsomethingesle
je somewhereelse

jmp away
    

_________________
http://codercat.org/
Post 03 Jun 2013, 20:29
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr
i dont wanna impress people y would i wanna impress people?
Post 03 Jun 2013, 20:48
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 20:16; edited 2 times in total
Post 03 Jun 2013, 22:14
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2917
Location: [RSP+8*5]
bitRAKE
It's fun to apply artificial constraints to ones coding style. Like only using PUSHAD/POPAD instead of individual PUSH/POP. Or, no CALL instructions. I've got some code where I only use RET, but I keep changing ESP to pre-packaged stack. My latest "invoke" macro uses PUSH/POP pairs instead of MOV - on x64 this often produces smaller code (not the goal just a nice side effect). Also, trace through some BIOS code for more ideas. Wink

_________________
¯\(°_o)/¯ unlicense.org
Post 04 Jun 2013, 04:19
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
most used?

dd of course.

and @@: also.

ho, they are not instructions... Wink

we need an instruction counter in fasm.

something like a result in console to tell the usages statistics of every intel mnemonics.

and then, make a big campain about the statistics of every instructions in any language for any processor.

it is certainly an interresting thing to do?

maybe ollydbg can still do that?
Post 04 Jun 2013, 20:53
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.