Skip to content

Commit 10affe7

Browse files
committed
[PS5] Make library function availability match PS4
1 parent 6ccc273 commit 10affe7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

llvm/lib/Analysis/TargetLibraryInfo.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -659,12 +659,12 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
659659
TLI.setUnavailable(LibFunc_stpncpy);
660660
}
661661

662-
if (T.isPS4()) {
663-
// PS4 does have memalign.
662+
if (T.isPS()) {
663+
// PS4/PS5 do have memalign.
664664
TLI.setAvailable(LibFunc_memalign);
665665

666-
// PS4 does not have new/delete with "unsigned int" size parameter;
667-
// it only has the "unsigned long" versions.
666+
// PS4/PS5 do not have new/delete with "unsigned int" size parameter;
667+
// they only have the "unsigned long" versions.
668668
TLI.setUnavailable(LibFunc_ZdaPvj);
669669
TLI.setUnavailable(LibFunc_ZdaPvjSt11align_val_t);
670670
TLI.setUnavailable(LibFunc_ZdlPvj);

llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# REQUIRES: x86-registered-target
22
#
3-
## This produces the object that matches expectations for PS4.
3+
## This produces the object that matches expectations for PS4/PS5.
44
# RUN: yaml2obj %s -DZDAPV=_ZdaPv -o=%t1
55
# RUN: llvm-tli-checker --triple=x86_64-scei-ps4 %t1 | FileCheck %s
6+
# RUN: llvm-tli-checker --triple=x86_64-sie-ps5 %t1 | FileCheck %s
67
#
78
## This produces an object that has _ZdaPvj instead of _ZdaPv.
89
# RUN: yaml2obj %s -DZDAPV=_ZdaPvj -o=%t2

0 commit comments

Comments
 (0)