repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
aarch64
/
builtin-bswap-2.c
blob
6018b483479ac6cc72879ebc0bbc361ab587d9e6
1
/* { dg-do compile } */
2
/* { dg-options "-O2" } */
3
4
/* { dg-final { scan-assembler-times "rev16\\t" 2 } } */
5
6
/* rev16 */
7
unsigned short
8
swapu16_1
(
unsigned short
x
)
9
{
10
return
(
x
<<
8
) | (
x
>>
8
);
11
}
12
13
/* rev16 */
14
unsigned short
15
swapu16_2
(
unsigned short
x
)
16
{
17
return
(
x
>>
8
) | (
x
<<
8
);
18
}