On 14 November 2012 06:21, Jon Masters <jcm@xxxxxxxxxx> wrote: > On 11/13/2012 01:24 AM, Nicolas Pitre wrote: > >> There are several serious mistakes in your assembly example. > > Thanks for the feedback! Appreciated. Comments below... > >> |START_FUNC(opal_atomic_add_32) >> | push {r4-r7} >> >> Why r4 to r7? You're using only r4 below. > > Ah. Because in the rest of the OpenMPI code they're doing similar on > function entry (saving all 4 of the variable registers). You're right > that I only use one of those registers so I could have not bothered to > save all 4 of them. Random note: you need to save an even number of registers to keep the stack aligned to eight bytes. Nico's code below is good. -- Michael _______________________________________________ arm mailing list arm@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/arm