Skip to content

as370: -a listing renders LTORG at the pre-alignment LOC and mis-numbers literal-pool entries #28

Description

@mgrossmann

Summary

In the -a listing, the LTORG directive line shows the location counter before the literal pool's doubleword alignment, and the literal-pool entries are assigned statement numbers out of source order. The object deck is correct (pool doubleword-aligned, literals at the right offsets); only the listing diverges from IFOX00.

Found while building the #21 pin-deck test; pre-existing (reproduces on as370 without the #21 change), listing-only.

Reproducer

FOO      CSECT
         USING FOO,12
         L     1,=F'9'
LABX     DS    F
         LTORG
         END

as370 -a vs IFOX00

IFOX00:                              as370 -a:
000020  ... 23 LABX  DS F            000020  ... 23 LABX  DS F      (ok)
000028  ... 24 LTORG                 000024  ... 24 LTORG          <- pre-alignment LOC (pool is at 0x28)
000028  ... 25 =F'9'                 000028  ... 29 =F'9'          <- right LOC, wrong stmt number

The pool is doubleword-aligned to 0x28 in both object decks (a 4-byte gap after LABX at 0x20-0x23), but as370's listing prints the LTORG line's LOC as the un-aligned 0x24. The literal entries also get statement numbers assigned after the rest of the module rather than immediately after LTORG.

Impact / scope

Listing-only cosmetic; the object deck (pool alignment, literal offsets, and every reference to a literal) is correct. Out of scope for #21 (that fix touches operand addressability, not LTORG/literal listing). Filed so the #21 listref case can exclude the LTORG region with a reference to this issue rather than silently masking it.

Related: #24 (a sibling -a rendering gap, DS inside a DSECT).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions