edA-qa mort-ora-y
2013-May-04 14:37 UTC
[LLVMdev] A C function which accepts a large integer type?
On 04/05/13 13:51, Óscar Fuentes wrote:> What's wrong with passing the address of the integer?Yes, that idea came to me also shortly after pressing "Send". ;) I assume the data is simply ordered like a native integer. So on little-endian it is lowest byte first. -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130504/ae19b2ce/attachment.sig>
Duncan Sands
2013-May-04 14:50 UTC
[LLVMdev] A C function which accepts a large integer type?
Hi edA-qa mort-ora-y, On 04/05/13 16:37, edA-qa mort-ora-y wrote:> On 04/05/13 13:51, Óscar Fuentes wrote: >> What's wrong with passing the address of the integer? > > Yes, that idea came to me also shortly after pressing "Send". ;) > > I assume the data is simply ordered like a native integer. So on > little-endian it is lowest byte first.correct. Things are a little more complicated if the integer size is not a multiple of 8, but I don't think you are interested in this case. Ciao, Duncan.
edA-qa mort-ora-y
2013-May-04 14:57 UTC
[LLVMdev] A C function which accepts a large integer type?
On 04/05/13 16:50, Duncan Sands wrote:> correct. Things are a little more complicated if the integer size is not a > multiple of 8, but I don't think you are interested in this case.Actually I would also like to know that case (as I support odd sizes). If this is too complicated though I would just extend them to the next power of 2 before calling the function. -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130504/b4874d8f/attachment.sig>
Possibly Parallel Threads
- [LLVMdev] A C function which accepts a large integer type?
- [LLVMdev] A C function which accepts a large integer type?
- [LLVMdev] A C function which accepts a large integer type?
- [LLVMdev] A C function which accepts a large integer type?
- [LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!