CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2015/05/05 21:30:03
Modified files: sys/arch/powerpc/include: atomic.h Log message: put mpi's atomics back in, but with the return value of add (and therefore sub, inc, and dec) fixed. the asm read the value from memory into a register, added to it, and then tried to write it back. after succeeding it doesnt have to add again before returning. this splits sub, inc, and dec off from add. sub can use the subf opcode, and inc and dec can use the addic opcode. explicitely identify where the modified memory is so we can avoid using "memory" as a clobber. ok mpi@