Closed rempas closed 1 year ago
For this particular code example, we also need the specific template instantiation code. Something where you actually call the syscall
template.
Please reproduce the problem here: https://d.godbolt.org/z/nxzb4fPPc
couldn't allocate input reg for constraint '{dx}'
All I can say at this point is that {dx}
is the LLVM translation of the gcc d
constraint. So maybe a type of some 3rd argument is unexpected.
All I can say at this point is that
{dx}
is the LLVM translation of the gccd
constraint. So maybe a type of some 3rd argument is unexpected.
Thank you! This itself say a lot! Could I ask if there is documentation about LLVM translations?
For this particular code example, we also need the specific template instantiation code. Something where you actually call the
syscall
template. Please reproduce the problem here: https://d.godbolt.org/z/nxzb4fPPc
Like I said, the problem is that, this error happens only in my code project and I wasn't able to reproduce it in a smaller code example...
I think that I should probably close the issue. If I end up finding the what's wrong (@kinke gave me an idea), I will reply!
Could I ask if there is documentation about LLVM translations?
Well, not docs, but code: https://github.com/ldc-developers/ldc/blob/1a93fc75b454d8d3e164067ff6d6beb5313ce84a/gen/asm-gcc.cpp#L95-L122
Could I ask if there is documentation about LLVM translations?
Well, not docs, but code:
Thank you! I'll fix it quickly now that I know what causes it! Probably I'm messing a pointer...
Have a nice day!
I do have the following function to implement and do system calls:
This seems to be working great but for some reason, it seems to be having a problem when I'm trying to implement the "exec" system call in ONE specific case. So yeah, I do have a very specific problem...
What's worse is that I'm not even able to reproduce it in a smaller code example. So, could you at least give me info on when this problem may occur so I can at least get an idea of what MIGHT be causing it?
System information: OS: Arch Linux output of
ldc2 --version
: