On Wed, Nov 11, 2026 at 04:32:18AM +0000, segaloco wrote:
> I've been working on a M68K project lately for the first time in a while
> and noticed some problems getting the right output with bitwise OR.
> 
> > $ cat repro.s
> >     .byte   2|1
> > $ as -o repro.o repro.s
> > $ ld -o repro.elf repro.o
> > $ objcopy -O binary repro.elf repro.bin
> > $ od -An -txC repro.bin
> 
> With m68k-unknown-elf, I get 02, but with z80 and powerpc both I get 03
> in the resulting binary.  This is with version 2.47 from ftp.gnu.org,
> tested on both riscv-unknown-linux-gnu and i686-w64-mingw32 hosts.

On m68k, | starts a comment.  So there your line is " .byte 2" followed
by an odd comment.

Try "as --bitwise-or" on m68k.

-- 
Alan Modra

Reply via email to