Print this page
new smatch
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/smatch/src/validation/builtin-bswap-variable.c
+++ new/usr/src/tools/smatch/src/validation/builtin-bswap-variable.c
1 1 typedef unsigned short u16;
2 2 typedef unsigned int u32;
3 3 typedef unsigned long long u64;
4 4
5 5 static u16 swap16v(u16 a)
6 6 {
7 7 return __builtin_bswap16(a);
8 8 }
9 9
10 10 static u32 swap32v(u64 a)
11 11 {
12 12 return __builtin_bswap32(a);
13 13 }
14 14
15 15 static u64 swap64v(u32 a)
16 16 {
17 17 return __builtin_bswap64(a);
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
18 18 }
19 19
20 20 /*
21 21 * check-name: builtin-bswap
22 22 * check-command: test-linearize $file
23 23 * check-description: Check that the right builtin function is called, and
24 24 * that the args are correctly promoted or truncated.
25 25 *
26 26 * check-output-ignore
27 27 * check-output-contains:call.16 .* __builtin_bswap16
28 - * check-output-contains:cast.32 .* (64) %arg1
28 + * check-output-contains:trunc.32 .* (64) %arg1
29 29 * check-output-contains:call.32 .* __builtin_bswap32
30 - * check-output-contains:cast.64 .* (32) %arg1
30 + * check-output-contains:zext.64 .* (32) %arg1
31 31 * check-output-contains:call.64 .* __builtin_bswap64
32 32 */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX