On 12/02/15 17:44, Michael Zimmermann wrote: > Hi, > > sorry if this is documented somewhere but I've always wondered what this > whole assembler file situation in EDKII is about. > What I mean is that there are two versions of every assembler file - for VS > and GCC compilers I guess. > > What I've noticed though is that most of these files are almost identical > except for minor differences like different export macros and comment > characters. > > I think (I hope I'm wrong) that there even are some projects where one > version of these files is outdated/not maintained. > > If I'm right and the differences really are that small, couldn't we just > write some kind of converter so we can remove all this duplicate code?
The duplication exists because the Microsoft toolchains and the gcc (GNU binutils) toolchains use different assembly syntaxes. A few months (?) back Jordan (and others?) added support for NASM. (Can't recall the minimum required version; it is documented somewhere.) NASM is available on both Windows and GNU/Linux, so it enables us to unify the assembly sources (there's also a new set of file suffixes for NASM source files, *.nasm* as I recall). It's just that the existing files have not yet been unified. NASM brings other benefits too; for example it allows one to write mixed-mode code (16-bit, 32-bit, 64-bit) within the same source file, without ugly DB macros. This is useful for mode switching. Thanks Laszlo > > Michael > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

