Ok, one other thing that might be worth trying is just to see if the
generic GCC implementation works for you--it seems as if that should work
as long as you're using version 4.7 or higher. To do this you just have to
tweak atomicops.h so that it includes atomicops_internals_generic_gcc.h.

On Tue, Nov 15, 2016 at 7:01 AM, Bob Wilkinson <[email protected]>
wrote:

> I see in platform_macros.h
>
> #elif defined(_POWER) || defined(__powerpc64__) || defined(__PPC64__)
> #define GOOGLE_PROTOBUF_ARCH_POWER 1
> #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
> #elif defined(__PPC__)
> #define GOOGLE_PROTOBUF_ARCH_PPC 1
> #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
> #elif defined(__GNUC__)
>
> I know that I want 64 bit, so think that POWER looks better than PPC.
>
> However, I am using g++ to build rather than the default AIX xlc compiler
> (due to xlc++ not being C++11 compliant), which may be a use-case not
> considered by the code author.
>
> #elif defined(_POWER) || defined(__powerpc64__) || defined(__PPC64__)
> #define GOOGLE_PROTOBUF_ARCH_POWER 1
> #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
> #elif defined(__PPC__)
> #define GOOGLE_PROTOBUF_ARCH_PPC 1
> #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
> #elif defined(__GNUC__)
>
>
>
> On Mon, Nov 14, 2016 at 6:01 PM, Adam Cozzette <[email protected]>
> wrote:
>
>> Thanks, Bob. I tried to reach out to one of the authors of that code but
>> I have not heard back yet. I wonder if the problem may actually be that the
>> assembly code is correct but that we're choosing the wrong architecture.
>> I'm not at all familiar with AIX, but just from reading about it on its
>> Wikipedia entry <https://en.wikipedia.org/wiki/IBM_AIX> it sounds like
>> it supports both the POWER and PowerPC architectures, which are not exactly
>> the same. For AIX we seem to always choose the POWER implementation but
>> maybe we should actually be choosing the PPC implementation. Do you have
>> any thoughts on whether that could be the case in your situation?
>>
>> On Thu, Nov 10, 2016 at 1:40 AM, Bob Wilkinson <[email protected]>
>> wrote:
>>
>>>
>>>
>>> On Wednesday, 9 November 2016 22:01:59 UTC, Adam Cozzette wrote:
>>>>
>>>> Could you try to narrow it down to one file or the other? The
>>>> atomicops.h header
>>>> <https://github.com/google/protobuf/blob/ce5160b83b03c29fd27fc9f58370092b321bf2bc/src/google/protobuf/stubs/atomicops.h#L195>
>>>>  pulls
>>>> in the right atomic operations implementation based on the platform, so
>>>> with a little debugging it should be possible to see whether it's pulling
>>>> the _power.h implementation or the _ppc_gcc.h implementation for your 
>>>> build.
>>>>
>>>
>>> From the expanded .s file (generated by the -S option to g++)
>>>
>>>  # 214 "./google/protobuf/stubs/atomicops_internals_power.h" 1
>>>         1:     lwz 9, 0(3)
>>>                cmpw 9, 9
>>>                bne- 1b
>>>                isync
>>>
>>> So it is using the _power.h implementation
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Protocol Buffers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/protobuf.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to