This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Feature request concerning opcodes in the function prolog
Quoting Stefan Dösinger <stefan@codeweavers.com>:
But since you have to have a new gas anyway, wouldn't it be simpler to
have
a new option for gas to instruct it to choose the opcodes that are
expected
by the win32 applications?
This was my first idea, but Alexandre Julliard(the Wine maintainer) disliked
it and prefered a function attribute to turn it on per-function.
P.S.:
I see now that translation unit granularity may have problems when different
parts / versions of the windows dlls are built with different tools having
different ideas what opcodes to pick for polymorphic instructions, and then
you want to provide compatible functions for different such 'standards'
in the same translation unit.
Instead of changing every instruction, you could pass the information from the
attribute to the assembler by issuing a new pseudo-op in the function header.
A possible place to output the pseudo-op is ASM_DECLARE_FUNCTION_NAME .
config/bfin/bfin.h has an example of emitting extra assembler statements in
this macro.