common assembly code between ppc32 & ppc64
Kumar Gala
kumar.gala@freescale.com
Tue Sep 20 21:03:00 GMT 2005
Alan,
I was wondering if there was any GNU asm magic that you where aware
of to deal with the fact that pointers are different sizes on ppc32
vs ppc64. For example:
#ifndef __powerpc64__
#define END_FTR_SECTION(msk, val) \
99: \
.section __ftr_fixup,"a"; \
.align 2; \
.long msk; \
.long val; \
.long 98b; \
.long 99b; \
.previous
#else /* __powerpc64__ */
#define END_FTR_SECTION(msk, val) \
99: \
.section __ftr_fixup,"a"; \
.align 3; \
.llong msk; \
.llong val; \
.llong 98b; \
.llong 99b; \
.previous
#endif /* __powerpc64__ */
Is there any magic to handle ".llong" vs ".long" that we could
possibly use to reduce the duplication between these two code fragments.
thanks
- kumar
More information about the Binutils
mailing list