Port-vax archive

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

Re: VAX: Another small GAS bug?



On Mon, 2024-04-08 18:07:11 +1000, Kalvis Duckmanton <kalvisd%gmail.com@localhost> wrote:
> I've also noticed that GAS will happily assemble code like this
> 
>            .type   f4, @function
>     f4:    .word    0
>         movd    $0g0.25, %r0
>         ret
> 
> producing
> 
>     0000009b <f4>:
>       9b:    00 00           .word 0x0000 # Entry mask: < >
>       9d:    70 8f f0 3f     movd $0x0000000000003ff0 [d-float],r0
>       a1:    00 00 00 00
>       a5:    00 00 50
>       a8:    04              ret
> 
> i.e. the bit pattern representing 0.25 is correct for a G-float operand but not
> so for a D-float.

...but the list (converted to a hash) of instructions knows the needed
operand type (like D_Float for MOVD), so maybe we can check for that
when the float value is marked for a specific type.

  With no specific type (so just a plain FP value), it should be
assembled to the correct (expected) type for that operand.

> The GAS documentation doesn't seem to specify what should happen in this case. 
> Programmer beware, I suppose!

Indeed. :/

MfG, JBG

-- 

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index