Skip to content

CC/370 v1.6.0

Choose a tag to compare

@github-actions github-actions released this 11 Oct 18:51
· 21 commits to main since this release
9093664

CC/370 (cc370) 1.6.0 is a minor release of the host-native MVS 3.8j toolchain. The system macros of MVS 3.8j -- all of SYS1.MACLIB and SYS1.AMODGEN -- now come with the toolchain as the package maclib370, and as370 finds them with no -I. The release also fixes a wrong address in one form of address constant and a wrong search byte in one compiler fold. It is a drop-in for 1.5.x. One thing is new: every way of installing CC/370 now also installs maclib370 (>= 1.0.0). The LIBC/370 (libc370) requirement is unchanged (>= 2.3.0); install.sh picks the newest release that fits, 2.7.0 today.

Read this first: what a caller can see

  • A second dependency: maclib370. The .deb depends on maclib370 (>= 1.0.0), the .rpm requires it, Homebrew installs mvslovers/tap/maclib370 with CC/370, and install.sh puts it into $PREFIX/cc370/maclib370. With .deb/.rpm files, install it in the same command: apt install ./cc370_1.6.0_amd64.deb ./libc370-dev_2.7.0_all.deb ./maclib370_1.0.0_all.deb.
  • System macros without -I. as370 searches <exedir>/../maclib370/macros after its own and LIBC/370's macros. A program that uses TIME, SPIE or any other system macro assembles as it is. A copy of SYS1.MACLIB that you name with -I or AS370_MACLIB is still searched first, and the macros of the C library and the prologue macros still win over an IBM original of the same name.
  • Rebuild code that uses strstr(s, "x") or strpbrk(s, "x") with a one-character literal. Up to 1.5.0, at -O1, such a call searched for the ASCII value of the character, not its EBCDIC one (see the table).
  • Reassemble modules where one name is both a V() target and a label of the same assembly, and also appears in an A(). Up to 1.5.0 the A() linked to twice the label's offset (see the table).
  • More than 16 macro libraries is an error. -I and AS370_MACLIB together take at most 16 directories. One more is named on stderr, the run ends with rc 16 and writes no object.

Fixed: before and now

1.5.0 1.6.0
strstr(s, "}") / strpbrk(s, "}") at -O1 searches for X'7D' (a quote in CP037) searches for X'D0', }
DC A(NAME) where NAME is a label here and also V(NAME) relocated against the external reference: linked to twice the offset (X'1404' for X'0A02', measured with IEWL on MVS) relocated against the section that holds the label, as the IBM assembler does
a 17th -I read as a second source file; rc 16 with a message about the wrong thing rc 16, names the directory and the limit
a 17th AS370_MACLIB entry dropped without a word; its macros undefined rc 16, names the directory
16 -I directories the toolchain's own macro libraries pushed out of the path always searched
TIME DEC with no -I Undefined operation code, rc 8 assembles

Measured for 1.6.0: 184 generated programs with the address-constant form all match the IBM assembler's object decks now (7 differed before); 5,528 modules of the MVS 3.8j source tree and 1,294 objects of twelve C and assembler projects are unchanged by the assembler fix.

Install

curl -fsSL https://github.com/mvslovers/cc370/releases/latest/download/install.sh | sh

With Homebrew (macOS, Linux):

brew trust mvslovers/tap            # once
brew install mvslovers/tap/cc370    # cc370 and, as its dependencies, libc370 and maclib370
brew upgrade mvslovers/tap/cc370    # an existing install

Or the pieces, all listed in SHA256SUMS:

file what
cc370-1.6.0-{darwin,linux}-{amd64,arm64}.tar.gz the toolchain for one host; unpack LIBC/370's sysroot tarball into its cc370/ and maclib370's tarball into cc370/maclib370/
cc370_1.6.0_{amd64,arm64}.deb Debian/Ubuntu; depends on libc370-dev (>= 2.3.0) and maclib370 (>= 1.0.0)
cc370-1.6.0.{x86_64,aarch64}.rpm Fedora/RHEL; requires libc370-devel and maclib370 the same way
install.sh the installer above (NO_MACLIB370=1 leaves maclib370 out)
ml01-0001-0.pdf CC/370 User's Guide, Draft edition, for 1.6.0
ml01-0002-0.pdf CC/370 Command Reference, Draft edition, for 1.6.0

maclib370 is released at https://github.com/mvslovers/maclib370/releases. The manuals are built from the tagged sources; the Draft edition still lacks the figures whose output is captured on MVS.

Full changelog

Added

  • as370 searches <exedir>/../maclib370/macros, after
    <exedir>/../macros and <exedir>/../libc370/macros. That is where the
    SYS1.MACLIB and SYS1.AMODGEN of MVS 3.8j go when they are installed as a
    package of their own, so an installed as370 then assembles a program using
    any system macro with no -I. The directory comes last, so a macro of
    the C library and the prologue macros win over an IBM original of the same
    name; when it is absent, nothing changes. It has a reserved place in the
    search path like the other two.
  • maclib370 is installed with CC/370. The .deb depends on
    maclib370 (>= 1.0.0) and the .rpm requires it; the Homebrew formula
    depends on mvslovers/tap/maclib370 and links it in as
    cc370/maclib370; install.sh installs its latest release into
    $PREFIX/cc370/maclib370 (MACLIB370_VERSION= names one, NO_MACLIB370=1
    leaves it out). maclib370 depends on nothing. A program using a system
    macro such as TIME now assembles with no -I.

Fixed

  • cc370: strstr and strpbrk with a one-character literal search for
    the right byte
    (#916). At -O1 the compiler turns strstr(s, "}") and
    strpbrk(s, "}") into strchr(s, c), and took c as the host (ASCII)
    value of the character instead of its EBCDIC one: "}" searched for
    X'7D', a quote in CP037, instead of X'D0'. Every one-character needle
    whose ASCII and EBCDIC codes differ was searched for wrongly, without a
    diagnostic. The byte now goes through the same translation as every other
    character constant. Code built with an earlier release that uses this
    pattern needs a rebuild.
  • as370: A(name) relocates against the section that holds name, even
    when V(name) also made it an external reference
    (#919). A name both
    called through V(name) and defined in the same assembly (typically as an
    ENTRY in a second CSECT) kept the external reference's ESD id, in either
    order, and an A(name) was relocated against it. The constant already
    holds the label's address, so the linkage editor added that address a
    second time: measured with IEWL on MVS, X'1404' where IFOX00's deck gives
    X'0A02', and ld370 links the same. The text was byte-identical and the
    return code 0. A V(name) still relocates against the external
    reference. Measured on 184 generated programs: 7 had such a constant, and
    all 184 decks now match IFOX00's. Across the 5,528 modules of the MVS 3.8j
    tree no deck changed.
  • as370: a macro library beyond the limit is an error, and the
    toolchain's own libraries are always searched
    (#918). -I and
    AS370_MACLIB together name at most 16 directories. A further
    AS370_MACLIB entry was dropped without a word, so its macros were
    undefined; a 17th -I left its directory to be read as a second source
    file, rc 16 under a message about the wrong thing; and 16 entries pushed
    <exedir>/../macros and <exedir>/../libc370/macros out of the path.
    Now the directory beyond the limit is named, the run ends with rc 16 and
    writes no object, and the two built-in libraries keep places of their own.