master
c
20 lines
267 Bytes
|
1
|
#include<stdio.h> |
|
2
|
#include<assert.h> |
|
3
|
|
|
4
|
int main() |
|
5
|
{ |
|
6
|
int rd, rt; |
|
7
|
int result; |
|
8
|
|
|
9
|
rt = 0x12345678; |
|
10
|
result = 0x00001E6A; |
|
11
|
|
|
12
|
__asm |
|
13
|
("bitrev %0, %1\n\t" |
|
14
|
: "=r"(rd) |
|
15
|
: "r"(rt) |
|
16
|
); |
|
17
|
assert(rd == result); |
|
18
|
|
|
19
|
return 0; |
|
20
|
} |