Skip to content

Releases

v2.11.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 01:33
bdc2dda

What's Changed

Full Changelog: v2.10.0...v2.11.0

Highlights

--syntax gas now links C++ compiled with g++ -fno-exceptions, with or without RTTI.

New

  • COMDAT groups ("axG"): the first file's copy of a template or inline function is kept, later copies are dropped, as ld does; before, every copy was stored
  • .init_array/.fini_array (also C __attribute__((constructor))), sorted by priority, between read-only data and data; the link defines __init_array_start/_end and __fini_array_start/_end
  • string merging for 2- and 4-byte characters (wchar_t, char16_t literals)

Fixed

  • a pointer to an undefined weak symbol (__cxa_pure_virtual in a vtable) stays 0 without a fixup

Exceptions remain refused (.gcc_except_table, .uleb128); .cfi_* is read and dropped.

Checked against GNU as + ld, whole image: pugixml, tinyxml2 and a multi-file template test at -O0/-O2/-Os on 68000 to 68060 (36 builds); Doom, Lua, musl and SQLite unchanged.

v2.10.0

Choose a tag to compare

@github-actions github-actions released this 21 Nov 10:07
b45653f

What's Changed

Full Changelog: v2.9.1...v2.10.0

Highlights

--syntax gas now links musl libc and SQLite as compiled by GCC, in addition to Doom and Lua.

New

  • .weak: a strong definition replaces a weak one, an undefined weak symbol resolves to 0 (a jbsr to it becomes jsr 0.l)
  • .set, .equ and name = expr, including aliases of labels (identical-code folding emits same = helper)
  • broken words: a .word a-b that overflows 16 bits is redirected through a jump stub placed before the next label, as in GNU as (bra.l on 68020+, jmp abs.l with a fixup on 68000)
  • cas; mov as an alias of move

Fixed

  • a bitfield width of 0 ({#0:#0}) means 32
  • a branch to a local alias of a label was sized against the wrong item
  • an alignment of 32 KiB or coarser panicked while looking for the fixups

Checked against GNU as + ld, whole image: musl on 68000 to 68060 at -O0/-O2/-O3/-Os, SQLite at -O0 on all CPUs and -Os on 68000. The other SQLite builds differ only where GNU as over-grows branches; with GNU's branch sizes pinned they are byte-identical.

v2.9.1

Choose a tag to compare

@github-actions github-actions released this 21 Nov 00:37
464bd8b

What's Changed

Full Changelog: v2.9.0...v2.9.1

Highlights

Robustness pass over --syntax gas, with a new fuzz target for it.

Fixed: wrong code without an error

  • an index register without a size ((%a0,%d1)) is long, as in GNU as; it was encoded as a word index
  • a displacement whose labels only partly cancel ((a-b+c-b)(%a0)) was dropped
  • a numeric d(%pc) behind a leading extension word (mulu.l, divs.l, FPU, bitfield, chk2/cmp2) was 2 bytes short
  • a byte branch displacement of -1 ($FF, the 32-bit form on a 68020) is refused
  • movem/fmovem masks wider than 16/8 bits are refused instead of truncated
  • adjacent strings (.ascii "ab" "cd") are joined; >> is unsigned, as in GNU as
  • .previous/.pushsection in a dropped debug section are refused instead of skipped together with the code after them

Fixed: crashes and unbounded memory

  • the stored image is limited to 16 MiB and the program must end 256 bytes below 4 GiB; sizes beyond that panicked, wrapped __bss_end or allocated up to 4 GB
  • checked arithmetic in expressions, at most 256 operators per expression
  • long chains of branches that grow one after another no longer hit the relaxation limit

C compiler output is unaffected: whole-image parity with GNU as + ld is unchanged on the test code bases (68000 to 68060).

v2.9.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 23:50
15c1cfa

What's Changed

Full Changelog: v2.8.0...v2.9.0

Highlights

FPU instructions in GNU as syntax (--syntax gas --cpu 68020…68060), so GCC hard-float code (-m68020/-m68040/-m68060 without -msoft-float) links into one image:

  • %fp0–%fp7, %fpcr/%fpsr/%fpiar and register lists, sizes .s/.d/.x/.p
  • floating-point immediates as the hex bit patterns GCC writes (#0x…, up to 96 bits for .x)
  • fmovem with a register list or a raw mask
  • fjXX relaxes from word to fbcc.l (always .l to another file); fbXX stays word and reports an out-of-range target instead of truncating it

Fixes in the shared encoder and disassembler:

  • fsabs, fdabs, fsneg, fdneg were missing; the fsxxx/fdxxx forms are now limited to 68040+
  • ftst has no destination: ftst fp3 encodes as f200 0c3a (was 0dba), ftst <ea> is accepted, and the disassembler no longer prints a destination

Hard-float code needs a 68881/68882 on a 68020/68030; the FPSP emulates fintrz and fmovecr on the 68040, and fmovecr, fscc, fdbcc and ftrapcc on the 68060.

v2.8.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 21:38
f4cd29a

What's Changed

Full Changelog: v2.7.0...v2.8.0

Highlights

--syntax gas for 68020 to 68060 (before: 68000 and 68010), following GNU as, so GCC -m68020…-m68060 code links into one image:

  • jbsr/jra/jXX to another file or beyond the word range become 32-bit branches (bsr.l, bra.l, bcc.l); a DBcc out of reach skips over a bra.l; bra.l/bsr.l/bcc.l may be written
  • index and d16 displacements that do not fit, and addresses in them, use the full-format extension word; (bd,%dn.l*4) without a base register is accepted
  • %dh:%dl register pairs (64-bit muls.l/mulu.l/divsl.l/divul.l) and ea{offset:width} bitfield operands
  • an unknown CPU name is refused

FPU instructions are still refused in this release (added in 2.9.0); -msoft-float code is complete.

--sym and --map in GAS mode:

  • --sym: the program's symbols at their addresses in the linked image, in the Motorola-mode format; GCC's .L… labels are left out, a file-local name that occurs more than once is written file:name
  • --map: every non-empty input section with its start, end and size, the global commons as one block, image and BSS bounds

v2.7.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 18:44
c3f6415

What's Changed

Full Changelog: v2.6.1...v2.7.0

Highlights

GNU as syntax (--syntax gas, #156): m68k-asm --syntax gas FILE.s [FILE.s ...] assembles what GCC (m68k, ELF target, -S) emits into one flat binary image, without a linker:

  • GAS operand and directive syntax as GCC writes it (% registers, (d,%An), MIT %pc@(2,%d0:w) switch tables, movem #mask, jXX/jra/jbsr, .section .rodata*, .comm, inline-asm #APP blocks); debug and CFI directives are skipped, anything else is an error naming file and line
  • .globl symbols are global, all others are local to their file
  • text, read-only data and data are merged at the origin, BSS follows the stored image; __image_end, __bss_start and __bss_end are defined
  • .reloc_table emits the TOS fixup table of every 32-bit field holding an image address, so start-up code can relocate the image itself
  • branch relaxation and PC-relative selection follow GNU as; checked byte for byte against GNU as + ld on a 34-file C code base at all optimisation levels

Limits in this release: 68000/68010 only, no FPU, binary output only (--sym, --map, --listing refused), several .comm symbols placed in order of appearance (ld uses hash order).

EQU and relaxation (#157): an EQU of the location counter or of a label (here EQU *, buf EQU end, the label on a macro call's line) is evaluated again in every relaxation round, so it follows an instruction above it that changes size. Before, it could be off by two bytes after a forward tab(PC,Dn) beyond address 128.

Dependencies: clap 4.6.8, softprops/action-gh-release v3.0.4.

v2.6.1

Choose a tag to compare

@github-actions github-actions released this 10 Nov 14:48
ff91061

What's Changed

  • Accept (Dn), ZPC and FMOVEM of one control register via Dn/An by @Attackwave in #144
  • Pass --optimize and --origin through to the language server's assembly by @Attackwave in #146
  • Close every macro and conditional block the source opens by @Attackwave in #147
  • Fix S0 header, PRG data length, labelled empty hunks and listing bytes by @Attackwave in #149
  • Model UNLK, RTD, FPU branches and word immediates in the analyses by @Attackwave in #150
  • Decode only encodings the PRM allows; fix FPU SNE/ST and sized PC bd by @Attackwave in #151
  • Resolve local labels in the scope of their routine by @Attackwave in #148
  • Release 2.6.1 by @Attackwave in #152

Full Changelog: v2.6.0...v2.6.1

Note on ADF bootblocks

Since 2.6.0 (#131), m68k-floppy --format leaves the checksum of an empty bootblock at 0, so the disk is not marked bootable while it holds no boot code. To get a valid checksum over bootblock code, run --fix-bootblock after writing the code; this behaviour is unchanged.

v2.6.0

Choose a tag to compare

@github-actions github-actions released this 09 Nov 22:28
69ec36d

What's Changed

  • Remove unreferenced code by @Attackwave in #127
  • Harden file, image and protocol inputs against crashes and data loss by @Attackwave in #128
  • Fix silently wrong assembler output and missing operand checks by @Attackwave in #129
  • Make disassembler source output reassemble byte for byte by @Attackwave in #130
  • Fix floppy format handling and tooling edge cases by @Attackwave in #131
  • Read real SPS/CAPS IPF images by @Attackwave in #132
  • Give SET symbols their value in source order by @Attackwave in #133
  • Convert DC.X and FPU .x literals exactly by @Attackwave in #134
  • Honour displacement sizes and report malformed displacements by @Attackwave in #135
  • Accept rarer valid FPU, MMU, CMPI and PC memory-indirect forms by @Attackwave in #136
  • Time ANDI.L #,Dn at 14 cycles by @Attackwave in #137
  • Size special forms identically in both passes; converge source round-trips by @Attackwave in #139
  • Bound expression nesting and IPF track decoding work by @Attackwave in #140
  • Fix silently wrong MMU, memory-indirect, range and TAS encodings by @Attackwave in #141
  • Reject sizes and redefinitions the source cannot mean; accept sized bd/od by @Attackwave in #142
  • Fix LSP format range and label colons; keep quick constants numeric by @Attackwave in #143
  • Release 2.6.0 by @Attackwave in #138

Full Changelog: v2.5.9...v2.6.0

v2.5.9

Choose a tag to compare

@github-actions github-actions released this 04 Nov 19:24
ba6721b

What's Changed

Full Changelog: v2.5.8...v2.5.9

v2.5.8

Choose a tag to compare

@github-actions github-actions released this 04 Nov 08:16
dd24e9c

What's Changed

  • asm, disasm: write and read the DRI symbol table of TOS programs by @Attackwave in #108
  • floppy: format and write FAT12 images (.st) by @Attackwave in #112
  • disasm: name addresses from symbol files and equates files by @Attackwave in #109
  • disasm: explain immediates written to the Mega Drive VDP control port by @Attackwave in #110
  • fpu: reject arithmetic with an fp register source and a memory destination by @Attackwave in #111
  • ci: weekly fuzzing campaign with a persistent corpus by @Attackwave in #113
  • disasm: keep string pointer tables and unpadded strings out of the code by @Attackwave in #114
  • disasm: LVO tables for gadtools, utility, asl, layers and diskfont by @Attackwave in #115
  • disasm: stop string runs at known labels; document a Hatari PC trace recipe by @Attackwave in #116
  • disasm: reject encodings no assembler emits; --source output that reassembles byte for byte by @Attackwave in #117
  • disasm: MOVEA accepts an address register source by @Attackwave in #118
  • asm: fail when the program runs past the end of the address space by @Attackwave in #119
  • asm: Amiga example run as a Hunk executable under vamos by @Attackwave in #120
  • Release 2.5.8 by @Attackwave in #121

Full Changelog: v2.5.7...v2.5.8