Writing out long long integers

David Edelsohn dje@watson.ibm.com
Mon Oct 4 22:32:00 GMT 2004


>>>>> Suriya Narayanan M S writes:

Suriya> On PowerPC, GCC writes out long long constants in the data section as two
Suriya> .long directives, but as a single .quad in x86.

Suriya> For this code,

Suriya> typedef unsigned long long uint64;
Suriya> const uint64 bigconst = 1ULL << 34;

Suriya> in PowerPC

Suriya> bigconst:
Suriya> .long   4
Suriya> .long   0

Suriya> and in x86

Suriya> bigconst:
Suriya> .quad   0x400000000

Suriya> Is there a place which contains the formal specification for this?

	PowerPC is an architecture, not a specific GCC target.  Without
specifying the OS and file format, it is difficult to comment on your
message. 

	The syntax for emitting 64-bit constants is specified by the
definition of DOUBLE_INT_ASM_OP in the GCC configuration for the
particular PowerPC sub-target.

David



More information about the Gcc mailing list