|
Last change
on this file since 27 was 2, checked in by Dmitry A. Kuminov, 17 years ago |
|
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
|
|
File size:
606 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 |
|
|---|
| 3 | LE: strings | grep 0123ABCD0123ABCD
|
|---|
| 4 | BE: strings | grep DCBA3210DCBA3210
|
|---|
| 5 |
|
|---|
| 6 | LE arm-swaped-dword-order: strings | grep ABCD0123ABCD0123
|
|---|
| 7 | BE arm-swaped-dword-order: strings | grep 3210DCBA3210DCBA (untested)
|
|---|
| 8 |
|
|---|
| 9 | tested on x86, arm-le (gp), aix
|
|---|
| 10 |
|
|---|
| 11 | */
|
|---|
| 12 |
|
|---|
| 13 | #include <stdlib.h>
|
|---|
| 14 |
|
|---|
| 15 | // equals static char c [] = "0123ABCD0123ABCD\0\0\0\0\0\0\0"
|
|---|
| 16 | static double d [] = { 710524581542275055616.0, 710524581542275055616.0};
|
|---|
| 17 |
|
|---|
| 18 | int main(int argc, char **argv)
|
|---|
| 19 | {
|
|---|
| 20 | // make sure the linker doesn't throw away the arrays
|
|---|
| 21 | double *d2 = (double *) d;
|
|---|
| 22 | if (argc > 3)
|
|---|
| 23 | d[1] += 1;
|
|---|
| 24 | return d2[0] + d[2] + atof(argv[1]);
|
|---|
| 25 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.