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
> An example of an unspec_volatile instruction pattern in
> config/i386/i386.md
> is "cld".
I ran across that, your hints should give me some information to chew on for
the next hours. Currently I am compiling with this code to see what happens:
(define_insn "movnop"
[(unspec_volatile [(const_int 0)] UNSPECV_MOVNOP)]
""
"movl.r\t%edi,%edi"
[(set_attr "length" "2")
(set_attr "length_immediate" "0")
(set_attr "modrm" "0")])
and then a gen_movnop(/* better name anyone? */) to use it. Lets see what
happens
> 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. However,
from looking at the gcc code it seems that this is the best option to
generate Win32-friendly code everywhere. I'll look at your other suggestions
and talk to Alexandre again.