Janne Grunau <[email protected]> writes: > If anyone has a good idea how the support for different > target assemblers could be made more modular without requiring > all the ifs scattered through the source it would be welcome.
I'm afraid this is not very helpful for refactoring gas-preprocessor.pl, but I'll jump in none the less. In GMP and Nettle, assembly files are preprocessed using m4 (I know some people prefer cpp, but imho, it's a mistake to use cpp for preprocessing anything but C source code, it's too tied to C tokenization. And some advanced m4 features like diversions also come in handy when generating pic references on some platforms). And then the definitions of some m4 macros depend on configure checks. The configure related m4 macros are not mainly to support lot of different assemblers, it's mostly used for ABI-dependent issues, like how to do pic references, label prefixes, and the different x86_64 calling conventions between windows and everything else. But in some places they're used also to work around assembler bugs, like generating certain instructions as .byte directives. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
