Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/9] v2: Handle small-aggregates via AMD64 abi


This is v2 of the abi patchset. Since v1:

 - Unify the classify and howreturned functions so that a single code
   path inspects both returned values and arguments. The only
   significant difference between the inspection of the two was the
   check for sufficient registers on the argument side, which is simple
   enough.

   Also rename the RetType enum to ArgType, which reflects a more
   general role.

 - Reduce the role of PassIn arrays. Instead, the ArgType enum
   incorporates the int/flt possibilities, since there are only a few
   bits of information needed.

   This makes the switch statements slightly taller, but less wide.

 - Make the logics of in gencall/handlearglocs and simpcall/gencall more
   obviously mirror each other.

There are still some ugly parts (for example, the duplication around
6/isel.c:700 looks like it could be ripe for typos), but they should be
linear instead of nested now.

No changes to the tests, which is a pretty good sign.

S. Gilles (9):
  Unify alignment for heterogeneous tuples.
  Add isaggregate for later use with abi conformity.
  Factor out the code for placing/retrieving arguments.
  Add classification algorithm for small-struct passing.
  Pass small-aggregate arguments by the AMD64 abi.
  Return small-aggregate values by the AMD64 abi.
  Bump abi version.
  Allow runtest.{rc,sh} to handle subdirectories.
  Add tests for abi conformity.

 6/asm.h                  |  24 +
 6/gengas.c               |   1 +
 6/genp9.c                |   1 +
 6/isel.c                 | 566 ++++++++++++++++++++----
 6/locs.c                 |   2 +
 6/simp.c                 |  86 +++-
 6/typeinfo.c             | 187 +++++++-
 lib/std/varargs.myr      |   2 +-
 mbld/libs.myr            |   2 +-
 parse/parse.h            |   2 +-
 test/abi/001_in-c.glue.c |  25 ++
 test/abi/001_in-c.myr    |   7 +
 test/abi/001_in-myr.myr  |  11 +
 test/abi/001_main.myr    |  29 ++
 test/abi/001_types.h     |   2 +
 test/abi/001_types.myr   |   5 +
 test/abi/002_main.myr    |  24 +
 test/abi/003_main.myr    |  42 ++
 test/abi/004_in-c.glue.c | 443 +++++++++++++++++++
 test/abi/004_in-c.myr    |  16 +
 test/abi/004_in-myr.myr  | 310 +++++++++++++
 test/abi/004_main.myr    | 175 ++++++++
 test/abi/004_types.h     |  62 +++
 test/abi/004_types.myr   | 341 +++++++++++++++
 test/abi/005_in-c.glue.c | 468 ++++++++++++++++++++
 test/abi/005_in-c.myr    |  16 +
 test/abi/005_in-myr.myr  | 330 ++++++++++++++
 test/abi/005_main.myr    | 180 ++++++++
 test/abi/005_types.h     |  79 ++++
 test/abi/005_types.myr   | 420 ++++++++++++++++++
 test/abi/006_in-c.glue.c | 913 +++++++++++++++++++++++++++++++++++++++
 test/abi/006_in-c.myr    |  26 ++
 test/abi/006_in-myr.myr  | 646 +++++++++++++++++++++++++++
 test/abi/006_main.myr    | 339 +++++++++++++++
 test/abi/006_types.h     | 102 +++++
 test/abi/006_types.myr   | 523 ++++++++++++++++++++++
 test/abi/bld.proj        |  39 ++
 test/fmtnest.myr         |  18 +
 test/runtest.rc          |  23 +-
 test/runtest.sh          |  28 +-
 test/tests               |  16 +-
 41 files changed, 6412 insertions(+), 119 deletions(-)
 create mode 100644 test/abi/001_in-c.glue.c
 create mode 100644 test/abi/001_in-c.myr
 create mode 100644 test/abi/001_in-myr.myr
 create mode 100644 test/abi/001_main.myr
 create mode 100644 test/abi/001_types.h
 create mode 100644 test/abi/001_types.myr
 create mode 100644 test/abi/002_main.myr
 create mode 100644 test/abi/003_main.myr
 create mode 100644 test/abi/004_in-c.glue.c
 create mode 100644 test/abi/004_in-c.myr
 create mode 100644 test/abi/004_in-myr.myr
 create mode 100644 test/abi/004_main.myr
 create mode 100644 test/abi/004_types.h
 create mode 100644 test/abi/004_types.myr
 create mode 100644 test/abi/005_in-c.glue.c
 create mode 100644 test/abi/005_in-c.myr
 create mode 100644 test/abi/005_in-myr.myr
 create mode 100644 test/abi/005_main.myr
 create mode 100644 test/abi/005_types.h
 create mode 100644 test/abi/005_types.myr
 create mode 100644 test/abi/006_in-c.glue.c
 create mode 100644 test/abi/006_in-c.myr
 create mode 100644 test/abi/006_in-myr.myr
 create mode 100644 test/abi/006_main.myr
 create mode 100644 test/abi/006_types.h
 create mode 100644 test/abi/006_types.myr
 create mode 100644 test/abi/bld.proj
 create mode 100644 test/fmtnest.myr

-- 
2.27.0


Follow-Ups:
[PATCH 1/9] Unify alignment for heterogeneous tuples."S. Gilles" <sgilles@xxxxxxx>
[PATCH 2/9] Add isaggregate for later use with abi conformity."S. Gilles" <sgilles@xxxxxxx>
[PATCH 3/9] Factor out the code for placing/retrieving arguments."S. Gilles" <sgilles@xxxxxxx>
[PATCH 4/9] Add classification algorithm for small-struct passing."S. Gilles" <sgilles@xxxxxxx>
[PATCH 5/9] Pass small-aggregate arguments by the AMD64 abi."S. Gilles" <sgilles@xxxxxxx>
[PATCH 6/9] Return small-aggregate values by the AMD64 abi."S. Gilles" <sgilles@xxxxxxx>
[PATCH 7/9] Bump abi version."S. Gilles" <sgilles@xxxxxxx>
[PATCH 8/9] Allow runtest.{rc,sh} to handle subdirectories."S. Gilles" <sgilles@xxxxxxx>
[PATCH 9/9] Add tests for abi conformity."S. Gilles" <sgilles@xxxxxxx>