This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re[3]: gas replaces instructions on sparc
- From: Ilya Basin <basinilya at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: binutils at sourceware dot org
- Date: Sun, 7 Jul 2013 20:51:49 +0400
- Subject: Re[3]: gas replaces instructions on sparc
- References: <1944513181 dot 20130707192759 at gmail dot com> <1465694 dot fLtieGh2Cl at polaris> <555928570 dot 20130707204629 at gmail dot com>
- Reply-to: Ilya Basin <basinilya at gmail dot com>
>>> I have this in my .S file:
>>> clr %o3
>>> but in the compiled .o file I have:
>>> mov %g0, %o3
>>> Why does it happen?
EB>> Because clr isn't a SPARC instruction, it's a "synthethic" instruction which
EB>> is a "or %g0,%g0," under the hood. And mov isn't a SPARC instruction either,
EB>> it's also a "synthethic" instruction which is a "or %g0," under the hood.
IB> I need to recreate the instruction that is disassembled by gdb like
IB> this:
IB> 96 10 20 00 clr %o3
IB> But both "clr" and "or %g0,%g0" give me this:
IB> 96 10 00 00 mov %g0, %o3
By the analogy with this:
96 10 20 d2 mov 0xd2, %o3
I figured out that I need to write: mov 0,%o3
--