returnVal is a member of the asCGeneric class. The value of returnVal is 0 before the call;
GetAddressOfReturnLocation is returning the address of the member returnVal.
*(asILockableSharedBool**)gen->GetAddressOfReturnLocation() = self->GetWeakRefFlag();
This statement sets value of returnVal to be the address to a asILockableSharedBool returned by GetWeakRefFlag().
I don't see anything wrong in that part of the code, and especially not something that wouldn't work on PPC64 but works on other machines.
Based on the callstack you showed in the earlier post I'm more inclined to think the address to the asCScriptObject in self is invalid. If the address is not pointing to a true asCScriptObject instance, the call to GetWeakRefFlag will fail with a segfault due to the lookup in the virtual function table giving an incorrect address. If I'm right in this suspicion the key to the solution is finding out how the address in self ended up pointing to an incorrect memory location.
Try printing the content of the asCScriptObject in self to see if the result appears to be normal. At the very least it should have a pointer to the objType that will give the name of the script class.