[libc] Support the `abs` functions in the GPU libc.
authorJoseph Huber <jhuber6@vols.utk.edu>
Thu, 27 Apr 2023 01:46:02 +0000 (20:46 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Fri, 28 Apr 2023 01:31:59 +0000 (20:31 -0500)
This patch simply enables building the integer `abs` functions for the
GPU.

Reviewed By: sivachandra

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

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

index 13d70f9..72c3067 100644 (file)
@@ -55,10 +55,13 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.string.strtok_r
 
     # 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.atexit
     libc.src.stdlib.strtod
     libc.src.stdlib.strtof
index 5638e51..d5b9948 100644 (file)
@@ -84,11 +84,13 @@ stdlib.h
 =============  =========  ============
 Function Name  Available  RPC Required
 =============  =========  ============
+abs            |check|
 atoi           |check|
 atof           |check|
 atol           |check|
 atoll          |check|
-atexit         |check|
+labs           |check|
+llabs          |check|
 strtod         |check|
 strtof         |check|
 strtol         |check|