Skip to content

Commit 0378f71

Browse files
author
Daniel Kroening
committed
add clang's __builtin_ia32_undefX and __builtin_nontemporal_store and __builtin_nontemporal_load
1 parent d36cd07 commit 0378f71

File tree

6 files changed

+58
-0
lines changed

6 files changed

+58
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
int main()
2+
{
3+
#ifdef __clang__
4+
long long A __attribute__ ((__vector_size__ (16))) =
5+
__builtin_ia32_undef128();
6+
long long B __attribute__ ((__vector_size__ (32))) =
7+
__builtin_ia32_undef256();
8+
long long C __attribute__ ((__vector_size__ (64))) =
9+
__builtin_ia32_undef512();
10+
#endif
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CORE
2+
main.c
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
int main()
2+
{
3+
#ifdef __clang__
4+
int var, value;
5+
__builtin_nontemporal_store(1, &var);
6+
value = __builtin_nontemporal_load(&var);
7+
#endif
8+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CORE
2+
main.c
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--

regression/goto-clang/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
default: tests.log
2+
3+
test:
4+
@../test.pl -p -c ../../../src/goto-cc/goto-cc
5+
6+
tests.log: ../test.pl
7+
@../test.pl -p -c ../../../src/goto-cc/goto-cc
8+
9+
show:
10+
@for dir in *; do \
11+
if [ -d "$$dir" ]; then \
12+
vim -o "$$dir/*.c" "$$dir/*.out"; \
13+
fi; \
14+
done;
15+
16+
clean:
17+
find -name '*.o' -execdir $(RM) '{}' \;
18+
find -name '*.gb' -execdir $(RM) '{}' \;
19+
find -name '*.goto-cc-saved' -execdir $(RM) '{}' \;
20+
$(RM) tests.log

src/ansi-c/clang_builtin_headers.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
__gcc_v4sf __builtin_shufflevector(__gcc_v4sf, __gcc_v4sf, ...);
22

3+
__gcc_v2di __builtin_ia32_undef128(void);
4+
__gcc_v4di __builtin_ia32_undef256(void);
5+
__gcc_v8di __builtin_ia32_undef512(void);
6+
7+
void __builtin_nontemporal_store();
8+
void __builtin_nontemporal_load();
9+
310
int __builtin_flt_rounds(void);

0 commit comments

Comments
 (0)