Re: VAX: Another small GAS bug?

Jan-Benedict Glaw <[email protected]>
Newsgroups gmane.os.netbsd.ports.vax
Message-ID <[email protected]>
On Mon, 2024-04-08 18:07:11 +1000, Kalvis Duckmanton <[email protected]> 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

--
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCZhOyvgAKCRAdvV51g5nh
uy3qAJsH/1N6w+cqlh8ymdgUaCx4VhhUywCeLg8XvTbA4cFxy/p6WyRt2CuSkSM=
=7g+A
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.