Sat 31 Jul 2010 12:44:27 AM UTC, original submission:
Hi. Information on the compiler states:
************************
long long
unsigned long long
Long long are 64-bit entities. They are never allocated in a hard register. They are passed on the stack for operations. They are returned like a struct (in memory). Logical operations (and, or, xor) are generated inline. Other operations are made by a library call. Some shift operations are generated inline.
63 55 47 39 31 23 15 7 0
+------+------+------+------+------+------+------+------+
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
+------+------+------+------+------+------+------+------+
************************
However, I get the errors:
4 main.c
warning: integer constant is too large for "long" type
9 main.c
warning: integer constant is too large for "long" type
For the following program:
- begin main.c ***************
#include <sys/types.h>
//#include <machine/types.h>
__uint64_t b = 0x11111111876;
//u_int64_t a = 0x1111111187;
unsigned long int x = 0xffffffff;
unsigned long int y = 0xeeeeeeee;
unsigned long long z = 0x111111118;
int main ()
{
z = x * y;
return 0;
}
- end main.c ***************
Also, looking at the assembly generated (optimization turned off), the multiplication result doesn't seem to be 64 bit.
|