This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]