This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
common assembly code between ppc32 & ppc64
- From: Kumar Gala <kumar dot gala at freescale dot com>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 20 Sep 2005 15:34:52 -0500
- Subject: common assembly code between ppc32 & ppc64
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