public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Writing out long long integers
@ 2004-10-04 20:08 Suriya Narayanan M S
  2004-10-04 22:32 ` David Edelsohn
  0 siblings, 1 reply; 2+ messages in thread
From: Suriya Narayanan M S @ 2004-10-04 20:08 UTC (permalink / raw)
  To: gcc; +Cc: Suriya Narayanan M S

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

For this code,

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

in PowerPC

bigconst:
        .long   4
        .long   0

and in x86

bigconst:
        .quad   0x400000000

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

Thanks,
Suriya

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Writing out long long integers
  2004-10-04 20:08 Writing out long long integers Suriya Narayanan M S
@ 2004-10-04 22:32 ` David Edelsohn
  0 siblings, 0 replies; 2+ messages in thread
From: David Edelsohn @ 2004-10-04 22:32 UTC (permalink / raw)
  To: Suriya Narayanan M S; +Cc: gcc

>>>>> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-04 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-04 20:08 Writing out long long integers Suriya Narayanan M S
2004-10-04 22:32 ` David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).