|
-
January 9th, 2013, 10:11 PM
#12
Re: Representing and dynamically creating a managed object in assembly
Code:
mov rax, BI ptr [r11]._sign
but that may be x64 assembly language details I'm not aware of.
ya, in x64 the only way I could get it to work was:
Code:
mov rax, [r11].BI._sign
I actually got that out of "The art of assembly language" in the section on variables that talked about pointers to structures.
And we're still not covering how to wrap the objects to make them .NET-friendly, but as you seem to be testing your code in a .NET environment all the way, you already must have done that somehow.
ya, and this is the biggest bottleneck to performance using structures in the assembly code. I have code translating the .net object to native c++, the from native c++ to assembly, then translating from assembly to native c++, and from native to managed c++. as the code stands right now, using structures is taking some 4 to 5 times longer then when I was just passing the arrays in. I believe I see how to improve that. Ive been toying with the idea of making this mainly a native c++ class for a while, and if I can figure out how to pass the return values from the assembly routines back to the native code as a native object that would improve it quite a bit I am just trying to figure out why they pass the object as a "this" pointer and exactly what the "this" pointer is. If it is just a pointer to the pointer of the object being passed then I could easily change the CreateBI routine to reflect this, but that seems like an unnecessary level of abstraction and leaves me wondering if it has some other meaning/purpose.
Ive been sick with the flu the last few days and havent been awake long enough to actually try anything out, at least I know what direction to try now. To my way of thinking, since I was having to do some of the pre-calculation logic in .NET if I can get this running correctly, I should see a performance boost over what I currently have without using the structures.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|