This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re[2]: gas replaces instructions on sparc


>> 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.

I need to recreate the instruction that is disassembled by gdb like
this:
96 10 20 00    clr  %o3

But both "clr" and "or %g0,%g0" give me this:
96 10 00 00    mov  %g0, %o3


-- 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]