Well, I don't have enough parts my next gun, so I decided to do some programming this time. Where was I with my programming project? Ah, right. Custom parameter order for dynamic library loading. I found out how GCC supports different calling conventions but no way of passing them in custom order. By default, should also be available since it can fuck up stack management. So that's left then? Right, assembler coding. Really not likely to me. I'm glad it's possible to do all this inline and it seems to be the only way to not start an endless journey. But geez, why is it so hard then? Actually... if I think about, it shouldn't be to hard. I assume that void functions only push their address on the stack, hm... Pushing parameters on the stack and mixing it with the functions adress can already fuck up the system. So better create a function taking a complete calling profile, pushing them on the stack and then calling it internally. So I guess this would generate a complete function call - leaving it to me choose the same push/pop commands like GCC uses, and ordering them correctly depending on the calling convention. Yeah, that's a good idea I think. So what I ultimately need is a custom runtime function call with flexible parameters and calling convention. Hm, not too bad! A single function with set functionality. I must admit, that's the most defined setup I've had since... um... Yeah, let's just say it's rare for me to have a 100% fixed functionality I need to implement. If everything turns out well, I can start writing the bytecode executer. I think a variadic function is the best, as I only need to pass the calling profile and the values. Yeah, that's it.

No comments: