Port-vax archive

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

Re: Building current

On 2013-04-08 00:17, Martin Husemann wrote:
On Sun, Apr 07, 2013 at 09:49:39PM +0200, Johnny Billquist wrote:
In my eyes that definitely looks like a gas bug. Why would gas generate
8f ff ff ff ff 00 00 00 00 for the immediate value -1 for a quad? That
is not -1. That's a zero-extended 32-bit -1 into a 64-bit value. Do gas
regard the immediate value as unsigned?

Looking at gas/confg/tc-vax.c:vip surely makes my eyes bleed.

Anyone can test with a non-gnu assembler?


                                     0000     1         .TITLE  TEST
                                     0000     2
                                 00000000     3         .PSECT  TEST
                                     0000     4
00000000 FFFFFFFF 8F FC AD 79 0000 5 ASHQ -4(FP),#-1,-12(fp)
                         F4 AD       000C
                                     000E     6
                                     000E     7         .END

However, I'm pretty sure that unless I say otherwise, values are 32-bit unsigned in MACRO-32, so I'm not sure how this helps.

Hmm, it might be that gas also explicitly have that immediate values are unsigned 32 bit, in which case I guess I should blame gcc after all, if it assumes that a "-1" should be sign extended to 64 bits...


Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol

Home | Main Index | Thread Index | Old Index