On Sunday, 17 July 2016 at 06:27:46 UTC, Adam Sansier wrote:
On Sunday, 17 July 2016 at 06:23:34 UTC, Walter Bright wrote:
On 7/16/2016 11:10 PM, Adam Sansier wrote:
D is not consistent with C++ in asm and calling convention.
In general, it is a *lot* easier to debug inline asm issues if
you're willing to run obj2asm on the output and compare. No
need to run a debugger on a crashing program.
And you're right that D has a different calling convention
than C++. The solution to that is declare the function in the
D code as 'extern (C++)'.
I did that. That's been that way from the get go. Are you going
Oh, if you mean the asm function, then yes, maybe, but that is
besides the point. I created the asm function to deal with the
original direct call not working that is calling the interface
that is extern(C++). I don't remember if the params were
backwards or not but it too crashes. It maybe not have anything
to do with the params or whatever but something is totally fried
in D.
If I simply mark the asm function extern C++ it is even worse.