flat assembler
Message board for the users of flat assembler.

Index > Main > How to search advanced info when i only get basics?

Author
Thread Post new topic Reply to topic
l4m2



Joined: 15 Jan 2015
Posts: 648
l4m2
I just make an easier-understood example though maybe not true.
Iwant to have the absolute value of eax and I search for it. And I get lots of information saying I should use
Code:
test eax, eax
jns  @f
neg  eax
@@:    
but what I want is
Code:
cdq
xor  eax, edx
sub  eax, edx    

____________________________
ps. i just want to know how to search advanced info when i only get basics, not trying to get |eax|
Post 21 Aug 2016, 01:45
View user's profile Send private message Reply with quote
El Tangas



Joined: 11 Oct 2003
Posts: 120
Location: Sunset Empire
El Tangas
Well, searching is an art... for your example, I tried in google:

x86 assembly optimized algorithm absolute value

and easily found the optimized version you gave as example. Even found this equivalent alternative:

Code:
cdq
add eax, edx
xor eax, edx    


But this is a simple example...
Other useful keywords:
branchless
parallel
SIMD
Post 03 Sep 2016, 19:09
View user's profile Send private message Reply with quote
l4m2



Joined: 15 Jan 2015
Posts: 648
l4m2
El Tangas wrote:
Well, searching is an art... for your example, I tried in google:

x86 assembly optimized algorithm absolute value

and easily found the optimized version you gave as example. Even found this equivalent alternative:

Code:
cdq
add eax, edx
xor eax, edx    


But this is a simple example...
Other useful keywords:
branchless
parallel
SIMD
It's just an example for understand, so it's not a good idea to test it (Even if I search for "x86 absolute value" directly some result fits). java random low level didn't give me anything about how it goes
Post 14 Sep 2016, 15:59
View user's profile Send private message Reply with quote
El Tangas



Joined: 11 Oct 2003
Posts: 120
Location: Sunset Empire
El Tangas
java? You mean you want to program in java bytecode?
Post 15 Sep 2016, 16:08
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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 cannot 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.