Quantcast

Transform output assembly instruction to equivalent one

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Transform output assembly instruction to equivalent one

illera88
This post has NOT been accepted by the mailing list yet.
Hi,

Let's say that I want clang to produce equivalent code for a specific instruction. For example:
using mov eax,0 instead of xor eax, eax.


I know the compilers will use the first one for performance purposes but I need to use an equivalent one or a set of other instructions. Is there any easy way to override specific assembly instructions. If not: where should I check in the codebase to make some changes to do so?

Thank you very much
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Transform output assembly instruction to equivalent one

illera88
This post has NOT been accepted by the mailing list yet.
What about using passes. Can I control and replace the emitted instruction?
Loading...