Re: VAX: Another small GAS bug?

Jan-Benedict Glaw <[email protected]>
Newsgroups gmane.os.netbsd.ports.vax
Message-ID <[email protected]>
On Thu, 2024-04-04 17:36:38 +0200, Jan-Benedict Glaw <[email protected]> wrote:

These three produced different output:
[...]
> 686         movq $0f0.0, TMPFRAC2
[...]
> 730         movd $0f0.0, TMPFRAC1
[...]
> 766         movd $0f0, (%r0)

Giving that a test on a Linux host with vax-linux configured binutils
I had readily around:
# cat test.s 
x:
        movq $0d0.0, %r4
        movd $0d0.0, %r4
        movd $0d0,   %r4



# vax-linux-as test.s
# vax-linux-objdump -w -d a.out
[...]
00000000 <x>:
   0:   7d 8f 00 00 00 00 00 00 00 00 54        movq $0x0000000000000000,r4
   b:   70 8f 00 00 00 00 00 00 00 00 54        movd $0x0000000000000000 [d-float],r4
  16:   70 8f 00 00 00 00 00 00 00 00 54        movd $0x0000000000000000 [d-float],r4


That matches the differences I got from the NetBSD I've built on a Linux
amd64 host vs. one built on a NetBSD host. Started a NetBSD amd64 VM
(Qemu, the very same thing I do the *native* NetBSD builds on), built
TOOLS and ...

nnetbsd-template# cat test.s
x:
        movq $0f0.0, %r4
        movd $0f0.0, %r4
        movd $0f0,   %r4
nnetbsd-template# ./_tools_/bin/vax--netbsdelf-as test.s
nnetbsd-template# ./_tools_/bin/vax--netbsdelf-objdump -w -d a.out 

a.out:     file format elf32-vax


Disassembly of section .text:

00000000 <x>:
   0:   7d 8f 00 00 00 00 00 00 00 00 54        movq $0x0000000000000000,r4
   b:   70 8f 00 00 00 00 00 00 00 00 54        movd $0x0000000000000000 [d-float],r4
  16:   70 8f 00 00 00 00 00 00 00 00 54        movd $0x0000000000000000 [d-float],r4



What the heck?! The original output (full unimpl_emul.S) was
different, but the critical excerpt is no longer? That'll be "fun" to
debug. Unfortunately, paid work is demanding right now, that might
take a while for me to really work on...

MfG, JBG

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

iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCZhF1VAAKCRAdvV51g5nh
u+wkAJ9Cm0VtVT2Iot0LB8JvbmAqOcuhhwCfSmA8462TJTCp8nfmuIY/wFPoPAU=
=fDY+
-----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.