File tree Expand file tree Collapse file tree 7 files changed +83
-0
lines changed
builtin_nontemporal_load_store Expand file tree Collapse file tree 7 files changed +83
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ --
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ --
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change @@ -2198,6 +2198,31 @@ exprt c_typecheck_baset::do_special_functions(
2198
2198
2199
2199
return bswap_expr;
2200
2200
}
2201
+ else if (identifier==" __builtin_nontemporal_load" )
2202
+ {
2203
+ typecheck_function_call_arguments (expr);
2204
+
2205
+ if (expr.arguments ().size ()!=1 )
2206
+ {
2207
+ err_location (f_op);
2208
+ error () << identifier << " expects one operand" << eom;
2209
+ throw 0 ;
2210
+ }
2211
+
2212
+ // these return the subtype of the argument
2213
+ exprt &ptr_arg=expr.arguments ().front ();
2214
+
2215
+ if (ptr_arg.type ().id ()!=ID_pointer)
2216
+ {
2217
+ err_location (f_op);
2218
+ error () << " __builtin_nontemporal_load takes pointer as argument" << eom;
2219
+ throw 0 ;
2220
+ }
2221
+
2222
+ expr.type ()=expr.arguments ().front ().type ().subtype ();
2223
+
2224
+ return expr;
2225
+ }
2201
2226
else if (
2202
2227
identifier == " __builtin_fpclassify" ||
2203
2228
identifier == CPROVER_PREFIX " fpclassify" )
Original file line number Diff line number Diff line change 1
1
__gcc_v4sf __builtin_shufflevector (__gcc_v4sf , __gcc_v4sf , ...);
2
2
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
+
3
10
int __builtin_flt_rounds (void );
You can’t perform that action at this time.
0 commit comments