Emilio G. Cota <c...@braap.org> writes: > On Mon, Oct 03, 2016 at 20:42:43 +0100, Alex Bennée wrote: >> >> Richard Henderson <r...@twiddle.net> writes: >> >> > Add all of cmpxchg, op_fetch, fetch_op, and xchg. >> > Handle both endian-ness, and sizes up to 8. >> > Handle expanding non-atomically, when emulating in serial. >> > >> > Signed-off-by: Richard Henderson <r...@twiddle.net> >> > --- >> <snip> >> > diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c >> > index 291d50b..65e3663 100644 >> > --- a/tcg/tcg-op.c >> > +++ b/tcg/tcg-op.c >> <snip> >> > +void tcg_gen_atomic_cmpxchg_i32(TCGv_i32 retv, TCGv addr, TCGv_i32 cmpv, >> > + TCGv_i32 newv, TCGArg idx, TCGMemOp memop) >> > +{ >> > + memop = tcg_canonicalize_memop(memop, 0, 0); >> > + >> > + if (!parallel_cpus) { >> >> This breaks the compile because parallel_cpus isn't visible to the >> function. However I suspect it's because there is a missing patch in >> this series (I checked my email and the archive). What happened to 06/35? > > It doesn't break the build for me--but I'm grabbing the series from github. > > I think 06/35 was meant to be this patch: > https://github.com/rth7680/qemu/commit/fab3abe9220 > > The whole series is here: > https://github.com/rth7680/qemu/tree/atomic-4
Yeah I've been continuing the review with that branch. I've run into another problem when building on Travis: /tmp/qemu-test/src/tcg/tcg-op.c:2288:54: error: ‘gen_helper_atomic_fetch_addb’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2288:102: error: ‘gen_helper_atomic_fetch_addw_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2288:153: error: ‘gen_helper_atomic_fetch_addw_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2288:204: error: ‘gen_helper_atomic_fetch_addl_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2288:255: error: ‘gen_helper_atomic_fetch_addl_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2289:54: error: ‘gen_helper_atomic_fetch_andb’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2289:102: error: ‘gen_helper_atomic_fetch_andw_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2289:153: error: ‘gen_helper_atomic_fetch_andw_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2289:204: error: ‘gen_helper_atomic_fetch_andl_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2289:255: error: ‘gen_helper_atomic_fetch_andl_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2290:53: error: ‘gen_helper_atomic_fetch_orb’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2290:100: error: ‘gen_helper_atomic_fetch_orw_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2290:150: error: ‘gen_helper_atomic_fetch_orw_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2290:200: error: ‘gen_helper_atomic_fetch_orl_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2290:250: error: ‘gen_helper_atomic_fetch_orl_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2291:54: error: ‘gen_helper_atomic_fetch_xorb’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2291:102: error: ‘gen_helper_atomic_fetch_xorw_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2291:153: error: ‘gen_helper_atomic_fetch_xorw_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2291:204: error: ‘gen_helper_atomic_fetch_xorl_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2291:255: error: ‘gen_helper_atomic_fetch_xorl_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2293:54: error: ‘gen_helper_atomic_add_fetchb’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2293:102: error: ‘gen_helper_atomic_add_fetchw_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2293:153: error: ‘gen_helper_atomic_add_fetchw_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2293:204: error: ‘gen_helper_atomic_add_fetchl_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2293:255: error: ‘gen_helper_atomic_add_fetchl_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2294:54: error: ‘gen_helper_atomic_and_fetchb’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2294:102: error: ‘gen_helper_atomic_and_fetchw_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2294:153: error: ‘gen_helper_atomic_and_fetchw_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2294:204: error: ‘gen_helper_atomic_and_fetchl_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2294:255: error: ‘gen_helper_atomic_and_fetchl_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2295:53: error: ‘gen_helper_atomic_or_fetchb’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2295:100: error: ‘gen_helper_atomic_or_fetchw_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2295:150: error: ‘gen_helper_atomic_or_fetchw_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2295:200: error: ‘gen_helper_atomic_or_fetchl_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2295:250: error: ‘gen_helper_atomic_or_fetchl_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2296:54: error: ‘gen_helper_atomic_xor_fetchb’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2296:102: error: ‘gen_helper_atomic_xor_fetchw_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2296:153: error: ‘gen_helper_atomic_xor_fetchw_be’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2296:204: error: ‘gen_helper_atomic_xor_fetchl_le’ undeclared here (not in a function) /tmp/qemu-test/src/tcg/tcg-op.c:2296:255: error: ‘gen_helper_atomic_xor_fetchl_be’ undeclared here (not in a function) Which makes me wonder in we should be including: #include "exec/helper-proto.h" And if this is generating all the prototypes it should. -- Alex Bennée