Hello Ivan
Attached are 2 patch files, modified slightly because I have not managed to implement in the state.
Tests are correct. I generated and tested libatomic_ops-7.4.4-8 version with these two patches.
Regards
Jean Girardet
From: Ivan Maidanski [mailto:***@mail.ru]
Sent: Tuesday, October 11, 2016 12:04 AM
To: GIRARDET, JEAN
Cc: bdwgc; REIX, Tony
Subject: Re[2]: [Gc] Patch for libatomic_ops for AIX/PPC
Hello Jean,
I've done code refactoring of powerpc.h to reduce code duplication - https://github.com/ivmai/libatomic_ops/commit/d5e5ac5af63c98492922128740e0ee0a64720b71
And applied your patch to support AIX - https://github.com/ivmai/libatomic_ops/commit/d93573cd0a9cf507e19002459ca0420e68839e34
Please test it.
Regards,
Ivan
Tue, 27 Sep 2016, 12:38 +03:00 from "GIRARDET, JEAN" <***@atos.net<mailto:***@atos.net>>:
Hello Ivan,
Here are the new patch with your suggestions :
libatomic_ops-7.4.4-5_powerpc_h.patch
Regards,
Jean
From: Ivan Maidanski [mailto:***@mail.ru]
Sent: Wednesday, September 21, 2016 11:53 PM
To: GIRARDET, JEAN
Cc: bdwgc; REIX, Tony
Subject: Re[4]: [Gc] Patch for libatomic_ops for AIX/PPC
Hello Jean,
I'd like to suggest to rewrite the patch to reduce code duplication by defining
#ifdef _AIX
/* labels are not supported on AIX */
# define AO_PPC_L(label) /* empty */
# define AO_PPC_A(labelBF, addr) addr
#else
# define AO_PPC_L(label) label ":\n"
# define AO_PPC_A(labelBF, addr) labelBF
#endif
Then e.g. AO_load_acquire should look like
"ld%U1%X1 %0,%1\n"
"cmpw %0,%0\n"
"bne- " AO_PPC_A("1f", "$+4") "\n"
AO_PPC_L("1") "isync\n"
Regards,
Ivan
Fri, 16 Sep 2016, 12:27 +03:00 from "GIRARDET, JEAN" <***@atos.net<mailto:***@atos.net>>:
Bonjour Ivan,
1. Please explain why is this patch needed? Is this because AIX assembler does not support labels?
Yes, labels are not supported on AIX.
2. As labels are replaced with the exact offset, are the offsets the same for 32-bit and 64-bit modes?
Yes, the length of the instruction (4 characters) is the same for 32/64 bits so the offset are the same for the 2 versions.
3. Please remove asm lines that contain only "\n"
Yes, I will do it for the next patch version for gc and libatomic (patch : libatomic_ops-7.4.4-2_powerpc_h.patch)
I also changed the patch so that it can be applied to both packages (gc and libatomic) without modification.
Regards,
Jean.
From: Ivan Maidanski [mailto:***@mail.ru]
Sent: Thursday, September 15, 2016 12:19 AM
To: REIX, Tony
Cc: bdwgc; GIRARDET, JEAN
Subject: Re[2]: [Gc] Patch for libatomic_ops for AIX/PPC
Hello Tony,
1. Please explain why is this patch needed? Is this because AIX assembler does not support labels?
2. As labels are replaced with the exact offset, are the offsets the same for 32-bit and 64-bit modes?
3. Please remove asm lines that contain only "\n"
Regards,
Ivan
Mon, 12 Sep 2016, 17:59 +03:00 from "REIX, Tony" <***@atos.net<mailto:***@atos.net>>:
Hi Ivan,
Jean was sick last week. He should be back tomorrow.
Here is the patch he worked on and that he delivered with GC on BullFreeware.
Regards,
Tony
Le 03/09/2016 14:58, Ivan Maidanski a écrit :
Hello Tony,
Please send me patch by email.
64-bit variant of libatomic_ops makes sense because e.g. it has ao_malloc which can allocate objects outside 4 GB space.
Regards,
Ivan
--
Fri, 02 Sep 2016, 18:45 +03:00 from "REIX, Tony" <***@atos.net><mailto:***@atos.net>:
Hi Ivan
Hummm We do not use github for now. Not sure if Jean knows how to use it.
R U OK if Jean proposes the patch to you by email ?
About libatomic_ops product:
For now, we were using it inside GC only. I've started to build a .spec file for AIX for building libatomic_op as a RPM.
And I've seen that the test_stack test fails in our environment.
Since the issue is still there though I applied the patch I'm talking about, I guess it is something else.
Jean will study this test_stack test failure asap.
Do you know if a 64bit version of libatomic_ops does make sens ?
For now, we build nearly all our RPMs in 32 & 64 bit modes, and we deliver .so files in .a archives, like AIX does.
Regards,
Tony
../test-driver: line 107: 16515260 IOT/Abort trap (core dumped) "$@" > $log_file 2>&1
FAIL: test_stack
Post by Ivan MaidanskiHello Tony,
You can propose the patch as an attachment but the best way is to raise pull request on github.
AIX is not well tested I guess.
Is the proposed patch related to test_stack fail on ppc -
https://github.com/ivmai/libatomic_ops/issues/15 ?
Regards,
Ivan
Post by Ivan Maidanski--
Fri, 02 Sep 2016, 11:50 +03:00 from "REIX, Tony"
Hi Ivan,
https://github.com/ivmai/libatomic_ops/
https://github.com/ivmai
I see that you manage the github of libtatomic_ops.
My team ports OpenSource packages on AIX 6.1, 7.1, 7.2 .
We (BullFreeware team, Jean) are porting GC v7.6.0 on AIX 6.1 and we had to fix the file:
libatomic_ops/src/atomic_ops/sysdeps/gcc/powerpc.h
from:
libatomic_ops-7.4.4.tar.gz
We have a small patch, changing some ASM instructions that are causing issue on AIX.
1) What is the process for proposing the patch to the maintainers of libatomic_ops ?
2) Up to now, libatomic_ops was delivered by us only inside GC.
It seems to me that delivering it as a individual package, like FedoraCore does, should be useful.
Do you know how deep libatomic_ops has been tested on AIX ?
Thanks
Tony
Post by Ivan Maidanskihttp://www.bullfreeware.com
_______________________________________________
bdwgc mailing list
***@lists.opendylan.org<mailto:***@lists.opendylan.org>
https://lists.opendylan.org/mailman/listinfo/bdwgc
_______________________________________________
bdwgc mailing list
***@lists.opendylan.org<mailto:***@lists.opendylan.org>
https://lists.opendylan.org/mailman/listinfo/bdwgc