4 ms·
Register variables are idiomatic when you're locking down every single register anyway, which is always the case for system calls. If you're writing assembly wh
by fwsgonzo 2y ago
Register variables are idiomatic when you're locking down every single register anyway, which is always the case for system calls. If you're writing assembly where you want the register allocators help, by all means use regular inline assembly.
- Joker_vD 2y agoDoesn't GCC have long-standing bugs where it a) doesn't support assigning some select registers, and b) when you try to use them anyway, it instead completely ignores your annotations with no diagnostics, and c) when it gets reported on GCC's bug tracker, a maintainer would reply with "well, it's always been like that and everyone knows you can't use this register like that anyway" and close it as WONTFIX? I distinctly remember reading about something like that...
- fwsgonzo 2y agoPerhaps, but I can't imagine its buggy for general registers like those used in system calls. I haven't seen that bug, but I don't doubt it. There's many obscure registers for various architectures that could bug out.