[libc-commits] [libc] fd14f7a - [libc] Enable conversion functions on the GPU

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Thu Jun 15 07:38:20 PDT 2023


Author: Joseph Huber
Date: 2023-06-15T09:38:12-05:00
New Revision: fd14f7adbee006be32a683df52af89b1cac75432

URL: https://github.com/llvm/llvm-project/commit/fd14f7adbee006be32a683df52af89b1cac75432
DIFF: https://github.com/llvm/llvm-project/commit/fd14f7adbee006be32a683df52af89b1cac75432.diff

LOG: [libc] Enable conversion functions on the GPU

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.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D153016

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/libc/config/gpu/entrypoints.txt b/libc/config/gpu/entrypoints.txt
index 567f6d3dae57b..f9d194475c0e9 100644
--- a/libc/config/gpu/entrypoints.txt
+++ b/libc/config/gpu/entrypoints.txt
@@ -56,8 +56,19 @@ set(TARGET_LIBC_ENTRYPOINTS
 
     # 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

diff  --git a/libc/docs/gpu/support.rst b/libc/docs/gpu/support.rst
index 1aeb318501a21..f557acabd492b 100644
--- a/libc/docs/gpu/support.rst
+++ b/libc/docs/gpu/support.rst
@@ -85,19 +85,19 @@ stdlib.h
 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


        


More information about the libc-commits mailing list