[#162] Fix 64bit atomic api issues for 32bit system-part2#423
Conversation
*atomic apis are using only 64 bit assembly instructions([add,sub,..]q which are not supported in 32bit systems and compilation errors observed due to that. Fixing the assembly instruction for the api's add and subtract operator.
|
Is the technique used on atomics really equivalent? Can't it be half updated? Do you have a source for this technique? Maybe elements that use 64bit atomic should just not be compiled instead? |
|
yes, here are some of the references that i checked, not straight forward changes.
do you mean to use the 32 bit instructions?
it is mostly counters which are spread across elements (checkipheader, checkarpheader,etc), we can #def the usage according to the platforms. I can push the assembly implmentation changes for other functions as well towards the end of the week. Assembly instruction approach looked right so tried this approach. |
|
Indeed the patcheset seems fine theoretically. Have you tested them? The CI does not have a 32bit build, so I'm a bit worried about that. I could add a 32bit build and also a series of tests for atomics, but I'm not sure when... |
|
have to modify the formatting in the click chatter to match the uint64_t format, will modify the test cases to really validate the 64 bit operations. I wonder why this test case is with exit rather then just put out the result and let further elements to continue. |
|
@tbarbette have pushed another PR with that all apis are completed, All test cases in atomic.cc are passing with the changes. will push atomic.cc test cases changes in a separate PR which is common for both 64 bit and 32 bit platforms. |
|
Could you do a unique PR so I can try all at once? |
@tbarbette have raised PR with all changes in the below PR. |

*atomic apis are using only 64 bit assembly instructions([add,sub,..]q which are not supported in 32bit systems and compilation errors observed due to that. Fixing the assembly instruction for the api's add and subtract operator.