Timm Bäder
ec40097db2
[clang][Interp] Implement __builtin_{ctz,clz}g
2024-04-10 12:27:33 +02:00
Timm Bäder
1d9fb2ee61
[clang][Interp] Disable CFStringMakeConstantString test on AIX
...
It's not only the fist CFSTR call that's broken on AIX.
See 0a739eb75f (commitcomment-139910542)
2024-03-18 14:53:04 +01:00
Timm Bäder
426bf0c915
[clang][Interp] Try to fix builtin-functions test on AIX
...
See
0a739eb75f (commitcomment-139850284)
2024-03-16 06:05:03 +01:00
Timm Bäder
0a739eb75f
[clang][Interp] Implement __builtin___{CF,NS}StringMakeConstantString
...
By doing the same thing the current interpreter does: Just passing on
the first parameter.
2024-03-15 08:46:13 +01:00
OverMighty
e95040f0f0
[clang][Interp] Implement __builtin_popcountg ( #84500 )
...
The previous code would truncate IntegerAPs wider than 64 bits.
2024-03-10 06:54:03 +01:00
Timm Bäder
b901b0d3ed
[clang][Interp] Reject dummy pointers from __builtin_strcmp()
...
We can't load anything from them, so reject them here.
2024-03-02 18:28:51 +01:00
Timm Bäder
b3e4686af3
[clang][Interp] Implement __builtin_{ctz,clz,bswap}
2024-02-20 11:55:20 +01:00
Timm Bäder
67282077ea
[clang][Interp] Implement __builtin_launder
...
Just forward the pointer.
Copy tests from SemaCXX
2024-02-16 08:08:42 +01:00
Timm Bäder
dd9511d3e4
[clang][Interp][NFC] Convert test case to verify=expected,both style
2024-02-08 10:31:07 +01:00
Timm Bäder
5d8a7318b2
[clang][Interp] Support __builtin_eh_return_data_regno
2024-02-07 15:29:43 +01:00
Timm Baeder
d9671bba3e
[clang][Interp] Implement __builtin_ffs ( #72988 )
2023-12-12 15:59:39 +01:00
Timm Baeder
43e6aec145
[clang][Interp] Implement __builtin_rotate{right,left} ( #72984 )
2023-12-12 10:48:00 +01:00
Timm Baeder
d5e2cbd01a
[clang][Interp] Implement builtin_expect ( #69713 )
2023-12-08 14:46:25 +01:00
Timm Baeder
3defe8facc
[clang][Interp] Implement __builtin_bitreverse ( #71687 )
...
Since the return value of this function is slightly more involved than
the void/bool/int/size_t return values we've seen so far, also refactor
this.
2023-11-17 08:29:13 +01:00
Timm Baeder
bffa8e1d1a
[clang][Interp] Implement __builtin_clrsb ( #72243 )
2023-11-16 07:30:54 +01:00
Timm Baeder
0f8c51a523
[clang][Interp] Implement __builtin_parity ( #71662 )
2023-11-16 06:24:04 +01:00
Serge Pavlov
fc7198b799
[clang] Additional FP classification functions ( #69041 )
...
C language standard defined library functions `iszero`, `issignaling`
and `issubnormal`, which did not have counterparts among clang builtin
functions. This change adds new functions:
__builtin_iszero
__builtin_issubnormal
__builtin_issignaling
They provide builtin implementation for the missing standard functions.
Pull request: https://github.com/llvm/llvm-project/pull/69041
2023-11-01 12:10:54 +07:00
Timm Baeder
9aedb60c70
[clang][Interp] Implement __builtin_popcount() ( #67929 )
2023-10-02 17:14:31 +02:00
Timm Bäder
f8074942c5
[clang][Interp] Fix SourceLocExpr used in CXXDefaultInitExprs
...
... when initializing.
Fixes a problem pointed out in https://reviews.llvm.org/D156045/
2023-09-09 07:28:50 +02:00
Timm Bäder
b93d2d37e7
[clang][Interp] Handle SourceLocExprs
...
Differential Revision: https://reviews.llvm.org/D155627
2023-09-06 14:45:49 +02:00
Timm Bäder
673ef8ceae
Re-land "[clang][Interp] Make sure we push integers of the correct size"
...
This also re-reverts the commit implementing __builtin_strlen.
I was unable to reproduce the msan issue with an msan-enabled build (for
infrastructure reasons), but I think fixing the target-dependent int
sizes in the implementation of __builtin_fpclassify should work.
2023-08-18 10:25:54 +02:00
Vitaly Buka
e03686f4a3
Revert "[clang][Interp] Make sure we push integers of the correct size"
...
Revert "[clang][Interp] Implement __builtin_strlen"
Fails Msan. Details in https://reviews.llvm.org/D155568
This reverts commit d425720aed48fd2c058a126ac961576d48c9732b.
This reverts commit 91af0d0a669880918eda2d2bd2d6185b2903a402.
2023-08-17 18:12:02 -07:00
Timm Bäder
d425720aed
[clang][Interp] Implement __builtin_strlen
...
Differential Revision: https://reviews.llvm.org/D156042
2023-08-17 13:10:46 +02:00
Timm Bäder
91af0d0a66
[clang][Interp] Make sure we push integers of the correct size
...
Integers might not be 32 bits wide, so check the TargetInfo for their
size.
Differential Revision: https://reviews.llvm.org/D155568
2023-08-17 10:36:06 +02:00
Douglas Yung
9c9e8b4797
Fix test clang/test/AST/Interp/builtin-functions.cpp for compilers that default to a C++ standard earlier than C++17.
2023-08-10 16:21:41 -07:00
Timm Bäder
1684406e63
[clang][Interp] Implement __builtin_fabs()
...
Differential Revision: https://reviews.llvm.org/D155400
2023-08-01 16:32:29 +02:00
Timm Bäder
5821351343
[clang][Interp] Implement __builtin_fpclassify
...
Differential Revision: https://reviews.llvm.org/D155394
2023-08-01 16:02:15 +02:00
Timm Bäder
6ba4b21334
[clang][Interp] Implement __builtin_isfpclass
2023-08-01 15:25:22 +02:00
Timm Bäder
d37f1e9965
[clang][Interp] Implement __builtin_isnormal
...
Differential Revision: https://reviews.llvm.org/D155374
2023-07-31 09:14:16 +02:00
Timm Bäder
f444f39686
[clang][Interp] Implement __builtin_isfinite
...
Differential Revision: https://reviews.llvm.org/D155372
2023-07-31 09:12:32 +02:00
Timm Bäder
72450a7793
[clang][Interp] Implement __builtin_isinf
...
Differential Revision: https://reviews.llvm.org/D155371
2023-07-31 08:49:22 +02:00
Timm Bäder
c14c34de45
[clang][Interp] Implement __builtin_fmin
...
Differential Revision: https://reviews.llvm.org/D155546
2023-07-28 20:18:57 +02:00
Timm Bäder
1478d4dc8d
[clang][Interp] Disable a float128/long double test
...
This breaks ppc64le builders:
https://lab.llvm.org/buildbot/#builders/230/builds/16405
2023-07-28 11:19:35 +02:00
Timm Bäder
c2273e33bd
[clang][Interp] Implement __builtin_nan family
...
Differential Revision: https://reviews.llvm.org/D155356
2023-07-28 10:28:55 +02:00
Timm Bäder
53c936a67c
[clang][Interp] Add missing static_assert messages
2023-07-20 16:19:12 +02:00
Timm Bäder
eaadbcd5e0
[clang][Interp] Implement __builtin_strcmp
...
Make our Function class keep a list of parameter offsets so we can
simply get a parameter by index when evaluating builtin functions.
Differential Revision: https://reviews.llvm.org/D149816
2023-07-20 15:46:04 +02:00