[libc-commits] [PATCH] D153016: [libc] Enable conversion functions on the GPU

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jun 15 06:20:46 PDT 2023


jhuber6 created this revision.
jhuber6 added reviewers: sivachandra, lntue, michaelrj.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
jhuber6 requested review of this revision.

These functions were previously removed due to problems running the
tests with `errno` in them. This was resolved previously by making the
internal implementation of these functions use a global `errno` so that
tests can still use `errno` functionality as long as they are run with a
single thread. This allows us to re-enable these tests as a previous
patch has also resolved the issue where the `stdlib` tests could not be
hermetic due to the dependence on system rounding functions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153016

Files:
  libc/config/gpu/entrypoints.txt
  libc/docs/gpu/support.rst


Index: libc/docs/gpu/support.rst
===================================================================
--- libc/docs/gpu/support.rst
+++ libc/docs/gpu/support.rst
@@ -85,19 +85,19 @@
 Function Name  Available  RPC Required
 =============  =========  ============
 abs            |check|
-atoi           
-atof           
-atol           
-atoll          
+atoi           |check|
+atof           |check|
+atol           |check|
+atoll          |check|
 labs           |check|
 llabs          |check|
-strtod         
-strtof         
-strtol         
-strtold        
-strtoll        
-strtoul        
-strtoull       
+strtod         |check|
+strtof         |check|
+strtol         |check|
+strtold        |check|
+strtoll        |check|
+strtoul        |check|
+strtoull       |check|
 =============  =========  ============
 
 stdio.h
Index: libc/config/gpu/entrypoints.txt
===================================================================
--- libc/config/gpu/entrypoints.txt
+++ libc/config/gpu/entrypoints.txt
@@ -56,8 +56,19 @@
 
     # stdlib.h entrypoints
     libc.src.stdlib.abs
+    libc.src.stdlib.atoi
+    libc.src.stdlib.atof
+    libc.src.stdlib.atol
+    libc.src.stdlib.atoll
     libc.src.stdlib.labs
     libc.src.stdlib.llabs
+    libc.src.stdlib.strtod
+    libc.src.stdlib.strtof
+    libc.src.stdlib.strtol
+    libc.src.stdlib.strtold
+    libc.src.stdlib.strtoll
+    libc.src.stdlib.strtoul
+    libc.src.stdlib.strtoull
 
     # stdlib.h entrypoints
     libc.src.stdlib._Exit


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153016.531724.patch
Type: text/x-patch
Size: 1504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230615/88ee36d3/attachment.bin>


More information about the libc-commits mailing list