Macros with 64-bit constants in assembly?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a PowerPC assembly language program, and I'm trying to create a
macro that will manipulate 64-bit constants.  Specifically, I'm trying
to do this:

#define A 0x1234567890ULL
#define M(x) ((x) >> 32)

This works in C, but not in assembly language.  The assembler
complains about the "ULL".  So if I remove the "ULL":

#define A 0x1234567890
#define M(x) ((x) >> 32)

The assembler evaluates "M(A)" as 0.  I think that's because it
truncates A to 32-bits, and then a 32-bit number shifted right by 32
bits is always 0.

Is there any way to get this work.  I have existing header files that
defined unsigned long long constants, and I want to use those header
files in my assembly code.

-- 
Timur Tabi
Linux kernel developer at Freescale



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux