[all-commits] [llvm/llvm-project] 60c0d3: [libc] Implement stdio writing functions for the G...

Joseph Huber via All-commits all-commits at lists.llvm.org
Sat Sep 9 11:27:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 60c0d303d67631f6504310db2cabab6703c2e3ca
      https://github.com/llvm/llvm-project/commit/60c0d303d67631f6504310db2cabab6703c2e3ca
  Author: Joseph Huber <35342157+jhuber6 at users.noreply.github.com>
  Date:   2023-09-09 (Sat, 09 Sep 2023)

  Changed paths:
    M libc/config/gpu/entrypoints.txt
    M libc/docs/gpu/support.rst
    M libc/src/stdio/CMakeLists.txt
    R libc/src/stdio/fputc.cpp
    R libc/src/stdio/fwrite.cpp
    R libc/src/stdio/fwrite_unlocked.cpp
    M libc/src/stdio/generic/CMakeLists.txt
    A libc/src/stdio/generic/fputc.cpp
    A libc/src/stdio/generic/fwrite.cpp
    A libc/src/stdio/generic/fwrite_unlocked.cpp
    A libc/src/stdio/generic/putc.cpp
    A libc/src/stdio/generic/putchar.cpp
    M libc/src/stdio/gpu/CMakeLists.txt
    A libc/src/stdio/gpu/fputc.cpp
    A libc/src/stdio/gpu/fwrite.cpp
    A libc/src/stdio/gpu/putc.cpp
    A libc/src/stdio/gpu/putchar.cpp
    R libc/src/stdio/putc.cpp
    R libc/src/stdio/putchar.cpp
    M libc/test/src/stdio/CMakeLists.txt
    M libc/test/src/stdio/fopen_test.cpp
    A libc/test/src/stdio/fputc_test.cpp

  Log Message:
  -----------
  [libc] Implement stdio writing functions for the GPU port (#65809)

Summary:
This patch implements fwrite, putc, putchar, and fputc on the GPU. These
are very straightforward, the main difference for the GPU implementation
is that we are currently ignoring `errno`. This patch also introduces a
minimal smoke test for `putc` that is an exact copy of the `puts` test
except we print the string char by char. This also modifies the `fopen`
test to use `fwrite` to mirror its use of `fread` so that it is tested
as well.




More information about the All-commits mailing list