This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52941] SH Target: Add support for movco.l / movli.l atomics on SH4A
- From: "olegendo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 17 Apr 2012 00:03:19 +0000
- Subject: [Bug target/52941] SH Target: Add support for movco.l / movli.l atomics on SH4A
- Auto-submitted: auto-generated
- References: <bug-52941-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52941
--- Comment #7 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-04-17 00:03:19 UTC ---
Created attachment 27173
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27173
Proposed patch
(In reply to comment #6)
> The patch looks just fine. I don't mind whether those atomics are
> fully optimized or not ATM. Programs having atomics in the minor
> loop are pathological in the first place, I think.
I was also concerned about the code size in sync.md...
Anyway, how about the attached patch instead? It now should do all atomics for
-mhard-atomic.
I've scrapped the LUT and whatnot and the code size (both generated and in the
compiler) now looks more reasonable. Only one thing ... is it safe to do the
"@-r15", "@+r15" stuff in the atomic sequence? I remember there were some
border cases where things would blow up, but can't recall. I've also briefly
checked with atomic vars being on the stack and it looks OK.