Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 31 May 2023 16:15:46 +0200
From: Jens Gustedt <Jens.Gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: [C23 128 bit 0/4] implement the library part of 128 bit support

This does not implement full featured support for 128 bit types or
functions. It only enables the support that is necessary, such that
compilers can claim [u]int128_t types and their functionality.

All 128 types and arithmetic has to be provided by the compilers.

Jens Gustedt (4):
  add an emulation for 128 bit arithmetic as needed for C library
    support
  C23: implement w128 and wf128 support for printf
  C23: implement w128 and wf128 for scanf and similar
  C23: implement proper support for int128_t and uint128_t

 include/inttypes.h                 |  55 ++++++++
 include/stdint.h                   |  37 +++++
 src/internal/intscan.c             | 105 +++++++++++---
 src/internal/intscan.h             |   4 +-
 src/internal/uwide128.c            | 213 +++++++++++++++++++++++++++++
 src/internal/uwide128.h            |  57 ++++++++
 src/internal/x86_64/uwide128_pop.s |  27 ++++
 src/stdio/vfprintf.c               | 113 +++++++++------
 src/stdio/vfscanf.c                |  25 ++--
 src/stdio/vfwprintf.c              |  45 +++---
 src/stdio/vfwscanf.c               |  19 ++-
 src/stdlib/strtol.c                |  12 +-
 src/stdlib/wcstol.c                |  12 +-
 13 files changed, 611 insertions(+), 113 deletions(-)
 create mode 100644 src/internal/uwide128.c
 create mode 100644 src/internal/uwide128.h
 create mode 100644 src/internal/x86_64/uwide128_pop.s

-- 
2.34.1

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.