The attached patch should fix the align 2 issues mentioned before and also fixes the ior fetchop_name. It should be "or" instead of "ior".
I'm not sure whether it requires re-testing. Just in case now running: make -k -check RUNTESTFLAGS="--target_board=sh-sim \{-m2/-ml/-msoft-atomic, -m2/-mb/-msoft-atomic, -m2a-single/-mb/-msoft-atomic, -m4-single/-ml/-msoft-atomic, -m4-single/-mb/-msoft-atomic, -m4a-single/-ml, -m4a-single/-mb/-msoft-atomic}" Cheers, Oleg ChangeLog: 2011-12-17 Oleg Endo <oleg.e...@t-online.de> * config/sh/sync.md (fetchop_name): Change "ior" to "or". (atomic_compare_and_swap<mode>_soft, atomic_fetch_<fetchop_name><mode>_soft, atomic_fetch_nand<mode>_soft, atomic_<fetchop_name>_fetch<mode>_soft, atomic_nand_fetch<mode>_soft): Move align 2 above atomic sequence entrance.
Index: gcc/config/sh/sync.md =================================================================== --- gcc/config/sh/sync.md (revision 182438) +++ gcc/config/sh/sync.md (working copy) @@ -35,7 +35,7 @@ (define_code_iterator FETCHOP [plus minus ior xor and]) (define_code_attr fetchop_name - [(plus "add") (minus "sub") (ior "ior") (xor "xor") (and "and")]) + [(plus "add") (minus "sub") (ior "or") (xor "xor") (and "and")]) (define_code_attr fetchop_insn [(plus "add") (minus "sub") (ior "or") (xor "xor") (and "and")]) @@ -90,13 +90,13 @@ return \"\\ mova\\t1f, r0\\n\\ \\t<i124extend_insn>\\t%2, %4\\n\\ +\\t.align\\t2\\n\\ \\tmov\\tr15, r1\\n\\ \\tmov\\t#(0f-1f), r15\\n\\ 0:\\tmov.<i124suffix>\\t@%1, %0\\n\\ \\tcmp/eq\\t%0, %4\\n\\ \\tbf\\t1f\\n\\ \\tmov.<i124suffix>\\t%3, @%1\\n\\ -\\t.align\\t2\\n\\ 1:\\tmov\tr1, r15\"; }" [(set_attr "length" "20")]) @@ -142,13 +142,13 @@ { return \"\\ mova\\t1f, r0\\n\\ +\\t.align\\t2\\n\\ \\tmov\\tr15, r1\\n\\ \\tmov\\t#(0f-1f), r15\\n\\ 0:\\tmov.<i124suffix>\\t@%1, %0\\n\\ \\tmov\\t%0, %3\\n\\ \\t<fetchop_insn>\\t%2, %3\\n\\ \\tmov.<i124suffix>\\t%3, @%1\\n\\ -\\t.align\\t2\\n\\ 1:\\tmov\tr1, r15\"; }" [(set_attr "length" "18")]) @@ -195,13 +195,13 @@ return \"\\ mova\\t1f, r0\\n\\ \\tmov\\tr15, r1\\n\\ +\\t.align\\t2\\n\\ \\tmov\\t#(0f-1f), r15\\n\\ 0:\\tmov.<i124suffix>\\t@%1, %0\\n\\ \\tmov\\t%2, %3\\n\\ \\tand\\t%0, %3\\n\\ \\tnot\\t%3, %3\\n\\ \\tmov.<i124suffix>\\t%3, @%1\\n\\ -\\t.align\\t2\\n\\ 1:\\tmov\tr1, r15\"; }" [(set_attr "length" "20")]) @@ -249,11 +249,11 @@ return \"\\ mova\\t1f, r0\\n\\ \\tmov\\tr15, r1\\n\\ +\\t.align\\t2\\n\\ \\tmov\\t#(0f-1f), r15\\n\\ 0:\\tmov.<i124suffix>\\t@%1, %0\\n\\ \\t<fetchop_insn>\\t%2, %0\\n\\ \\tmov.<i124suffix>\\t%0, @%1\\n\\ -\\t.align\\t2\\n\\ 1:\\tmov\tr1, r15\"; }" [(set_attr "length" "16")]) @@ -300,13 +300,13 @@ { return \"\\ mova\\t1f, r0\\n\\ +\\t.align\\t2\\n\\ \\tmov\\tr15, r1\\n\\ \\tmov\\t#(0f-1f), r15\\n\\ 0:\\tmov.<i124suffix>\\t@%1, %0\\n\\ \\tand\\t%2, %0\\n\\ \\tnot\\t%0, %0\\n\\ \\tmov.<i124suffix>\\t%0, @%1\\n\\ -\\t.align\\t2\\n\\ 1:\\tmov\tr1, r15\"; }" [(set_attr "length" "18")])