简体   繁体   中英

x86 inline yasm convert to x64

I have project used inline yasm to implement. Now, the project use openMP to parallel task getting better performance. At x86 platform, The openMP can't run, the reason is that x86 environment have no enough memory. So I use x64 environment compile it and it can running. but when I use yasm code to optimize performance, it doesn't work as well.(the code of yasm is written by x86 environment.)

I searched all about it, but I cannot find any useful information to solve this problem.

Who can tell me the way to solve the problem. I want to see that some document with relation information.

Thank you for your help.

Without your code my best guess is you should read this for AMD64 ABI and see calling convention standard in x64 platform. I think this should work for you. As on that document says you must pass parameter as follow (please note that you must classified your arguments first with method describing in ABI standard) :

  1. If the class is MEMORY, pass the argument on the stack.
  2. If the class is INTEGER, the next available register of the sequence %rdi , %rsi , %rdx , %rcx , %r8 and %r9 is used.
  3. If the class is SSE, the next available vector register is used, the registers are taken in the order from %xmm0 to %xmm7 .

...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM