bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Is this a gas bug?


From: Gan, George
Subject: RE: Is this a gas bug?
Date: Thu, 20 May 2004 22:35:53 +0800

Hi,

Thank you very much! Here I have another question.

Occasionally, I wrote an instruction: "mov.i ar.unat=r2".
After I assembled it with gas and objdump it, I got almost the same
instruction.
However, as the IA64 SDM,1:24 says, ar.unat can't be accessed by I unit.
Why gas don't raise a warning this time? I think "mov.i ar.unat=.." is
more 
dangerous than accessing memory immediately after an instruction that
modify
region register.


Sincerely yours,
George Gan
 
SW Engineer, Intel China Ltd.
Intel China Software Center 
Tel: 021-52574545 ext.1775
 
 
 

>-----Original Message-----
>From: Jie Zhang [mailto:address@hidden
>Sent: Thursday, May 20, 2004 10:25 PM
>To: Gan, George
>Cc: address@hidden
>Subject: Re: Is this a gas bug?
>
>>  When I was using gas(Ver: 2.15.90.0.1.1, ia64-suse-linux), I met a
very
>
>>  strange problem. I'm not sure whether it is a bug.
>
>Yes, I think it is a bug.
>
>
>>  I have an assembly file, named, foo.S. It contains only two lines:
>
>>  mov rr[r3]=r7
>
>>  ld8 r39 = [r35]
>
>>  I assembled it with the command: /as -xauto foo.S -o foo.o./
>
>>  As I dump the object file, I got:
>
>>
>
>>  6 0000000000000000 <.text>:
>
>>  7 [MMI] mov rr[r3]=r7;;
>
>>  8 srlz.d
>
>>  9 nop.i 0x0
>
>>  10 [MFB] ld8 r0=[r0]
>
>>  11 nop.f 0x0
>
>>  12 nop.b 0x0;;
>
>>
>
>>  Do you know where does the "ld8 r0=[r0]" comes from?
>
>Because of -xauto option, the srlz.d instruction is inserted before the
>ld8 instruction. This is done by remove_marked_resource () in
tc-ia64.c.
>In parse_operands (), the operands of ld8 instruction is parsed and
>saved into the slot for it. When srlz.d is inserted before it, ld8 is
>copied to the next slot. But the operands of ld8 is not copied along
>with qp_regno and idesc. So the original operands is lost.
>
>>  Is it a mechanism that used by gas to indicate a piece of dangerous
code?
>
>>  If I substitute "ld8.." with a br, mov, or something else that is
not
>"ld..",
>
>>  it will be OK. The same problem occurs when I replace "rr" with
"pkr".
>
>>  And if I remove "-xauto" from the command line, it will be OK.
>
>Without -xauto option, gas will not do dependence ananlysis and
>serialization instruction is not inserted.
>
>
>Jie Zhang





reply via email to

[Prev in Thread] Current Thread [Next in Thread]