Merge lp:~ams-codesourcery/gcc-linaro/cs-merge-20110413 into lp:gcc-linaro/4.5

Proposed by Andrew Stubbs
Status: Rejected
Rejected by: Loïc Minier
Proposed branch: lp:~ams-codesourcery/gcc-linaro/cs-merge-20110413
Merge into: lp:gcc-linaro/4.5
Diff against target: 1208 lines (+841/-83)
16 files modified
ChangeLog.linaro (+125/-0)
gcc/combine.c (+15/-1)
gcc/config/arm/arm.c (+356/-5)
gcc/config/arm/arm.md (+203/-31)
gcc/config/arm/arm.opt (+4/-0)
gcc/config/arm/unwind-arm.c (+30/-10)
gcc/expmed.c (+2/-2)
gcc/final.c (+6/-0)
gcc/ifcvt.c (+4/-0)
gcc/ipa-pure-const.c (+8/-1)
gcc/testsuite/gcc.c-torture/compile/20110322-1.c (+22/-0)
gcc/testsuite/gcc.dg/pr47763.c (+9/-0)
gcc/testsuite/lib/target-supports.exp (+3/-2)
gcc/tree-ssa-copyrename.c (+12/-0)
gcc/web.c (+11/-1)
libstdc++-v3/libsupc++/eh_arm.cc (+31/-30)
To merge this branch: bzr merge lp:~ams-codesourcery/gcc-linaro/cs-merge-20110413
Reviewer Review Type Date Requested Status
Andrew Stubbs (community) Needs Resubmitting
Review via email: mp+57486@code.launchpad.net

Description of the change

Latest batch of merges from Sourcery G++.

To post a comment you must log in.
Revision history for this message
Ira Rosen (irar) wrote :

I am out of the office until 17/04/2011.

Note: This is an automated response to your message "[Merge]
lp:~ams-codesourcery/gcc-linaro/cs-merge-20110413 into lp:gcc-linaro"
sent on 13/4/2011 16:28:34.

This is the only notification you will receive while this person is away.

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild has taken a snapshot of this branch at r99502 and queued it for build.

The snapshot is available at:
 http://ex.seabright.co.nz/snapshots/gcc-linaro-4.5+bzr99502~ams-codesourcery~cs-merge-20110413.tar.xdelta3.xz

and will be built on the following builders:
 a8-builder a9-builder i686 x86_64

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: gcc-linaro-4.5+bzr99502~ams-codesourcery~cs-merge-20110413
cbuild-ancestor: lp:gcc-linaro+bzr99492
cbuild-state: check

Revision history for this message
Ramana Radhakrishnan (ramana) wrote :

Since this is a large feature branch review is a bit harder in this case.

99493 - OK
99494 - OK
99495 - OK - has gone upstream .

99496 - OK - could go upstream into FSF 4.5 branch if possible.
99497 - OK
99498 - OK
99499 - OK

  OK if no regressions.

99500 - OK - Looks sensible but would like to do a round of benchmarking but can go in for sure.

99501 - Not fully reviewed. A first cut review - I *think* this is a sensible approach given that we can't just blanket remove SLOW_UNALIGNED_ACCESS .Should we take this at the start of the next release, so that it gets baked for 3 weeks more than just a week before the release ?

99502 - Ambivalent - Not fully reviewed . A comment is we probably want some testcases for this and it looks overall like a nice improvement.Should we take this at the start of the next release, so that it gets baked for 3 weeks more than just a week before the release ?

cheers
Ramana

Revision history for this message
Ramana Radhakrishnan (ramana) wrote :

As long as we can get bzr to individually commit these so that any performance archaelogy has a chance to individually benchmark each of these patches I think these are ok.

99493 - OK
99494 - OK
99495 - OK - has gone upstream .

99496 - OK - could go upstream into FSF 4.5 branch if possible.
99497 - OK
99498 - OK

Can we commit 99500, 99501 , 99502 as individual patches and do the merge just after the April release ?

Could we link 99499 only to the bug fix rather than one commit into gcc-linaro/4.5 which is the bug fix ?

Sorry I just think we should then end up having a merge request per feature or a merge request for a bug fix rather than one gigantic merge. I'm still not a power user of bzr so not totally sure if we can do all that's needed here.

Ramana

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :
Download full text (8.8 KiB)

cbuild successfully built this on i686-lucid-cbuild109-scorpius-i686r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99502~ams-codesourcery~cs-merge-20110413/logs/i686-lucid-cbuild109-scorpius-i686r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99492:
 +PASS: gcc.c-torture/compile/20110322-1.c -O0 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O1 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 -flto (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 -fwhopr (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer -funroll-loops (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -g (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -Os (test for excess errors)
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg1 == 1
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg2 == 2
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg3 == 3
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg4 == 4
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg5 == 5
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg6 == 6
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg7 == 30
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 *x == (char) 25
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 y == 2
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg1 == 1
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg2 == 2
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg3 == 3
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg4 == 4
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg5 == 5
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg6 == 6
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg7 == 30
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 *x == (char) 25
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 y == 2
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg1 == 1
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg2 == 2
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg3 == 3
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg4 == 4
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg5 == 5
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg6 == 6
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg7 == 30
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 *x == (char) 25
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 y == 2
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg1 == 1
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg2 == 2
 +...

Read more...

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :
Download full text (8.8 KiB)

cbuild successfully built this on x86_64-maverick-cbuild109-crucis-x86_64r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99502~ams-codesourcery~cs-merge-20110413/logs/x86_64-maverick-cbuild109-crucis-x86_64r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99492:
 +PASS: gcc.c-torture/compile/20110322-1.c -O0 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O1 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 -flto (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 -fwhopr (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer -funroll-loops (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -g (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -Os (test for excess errors)
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg1 == 1
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg2 == 2
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg3 == 3
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg4 == 4
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg5 == 5
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg6 == 6
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg7 == 30
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 *x == (char) 25
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 y == 2
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg1 == 1
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg2 == 2
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg3 == 3
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg4 == 4
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg5 == 5
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg6 == 6
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg7 == 30
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 *x == (char) 25
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 y == 2
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg1 == 1
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg2 == 2
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg3 == 3
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg4 == 4
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg5 == 5
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg6 == 6
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg7 == 30
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 *x == (char) 25
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 y == 2
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg1 == 1
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 ar...

Read more...

Revision history for this message
Michael Hope (michaelh1) wrote :

I'm happy with merging all of the correctness fixes. Please leave the new features such as unaligned memcpy() out until after this release. I want to have time to try them with Python, SPEC, and EEMBC and have time to correct any problems.

Revision history for this message
Andrew Stubbs (ams-codesourcery) wrote :

> Sorry I just think we should then end up having a merge request per feature or
> a merge request for a bug fix rather than one gigantic merge. I'm still not a
> power user of bzr so not totally sure if we can do all that's needed here.

In the past we've treated CS patches as pre-reviewed (which they are), and committed them directly to lp:gcc-linaro. I've only really changed this as a means to get the extra testing before I check in (I'm going to have to check the gcc.dg/guality/pr43077-1.c failures).

That said, extra review is always valuable. :)

I deliberately chose to submit them as a batch, because if I had submitted them individually I doubt we'd have had all the test results in time, and anyway some depend on others, at least textually. I did/do intend to do a rebase and push, rather than a merge, so as not to flatten the history. I can leave out some revisions if they're broken, or reviewers don't like them.

Revision history for this message
Loïc Minier (lool) wrote :

In any case, the history wont be flattened if you do a merge; it will be shown as a merge in the bzr history and all the individual original revisions will still be accessible; see bzr log -n0 or --include-merges to see them (or use bzr vis).

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :
Download full text (16.9 KiB)

cbuild successfully built this on armv7l-maverick-cbuild109-ursa3-cortexa9r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99502~ams-codesourcery~cs-merge-20110413/logs/armv7l-maverick-cbuild109-ursa3-cortexa9r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99492:
 +PASS: gcc.c-torture/compile/20110322-1.c -O0 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O1 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 -flto (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 -fwhopr (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer -funroll-loops (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -g (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -Os (test for excess errors)
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg1 == 1
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg2 == 2
 -FAIL: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg3 == 3
 -FAIL: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg4 == 4
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg5 == 5
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg6 == 6
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg7 == 30
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 *x == (char) 25
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 y == 2
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg1 == 1
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg2 == 2
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg3 == 3
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg4 == 4
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg5 == 5
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg6 == 6
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg7 == 30
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 *x == (char) 25
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 y == 2
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg1 == 1
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg2 == 2
 -FAIL: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg3 == 3
 -FAIL: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg4 == 4
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg5 == 5
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg6 == 6
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg7 == 30
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 *x == (char) 25
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 y == 2
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg1 == 1
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 ...

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :
Download full text (16.3 KiB)

cbuild successfully built this on armv7l-maverick-cbuild109-ursa4-cortexa8r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99502~ams-codesourcery~cs-merge-20110413/logs/armv7l-maverick-cbuild109-ursa4-cortexa8r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99492:
 +PASS: gcc.c-torture/compile/20110322-1.c -O0 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O1 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 -flto (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 -fwhopr (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O2 (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer -funroll-loops (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -fomit-frame-pointer (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -O3 -g (test for excess errors)
 +PASS: gcc.c-torture/compile/20110322-1.c -Os (test for excess errors)
 -FAIL: gcc.c-torture/compile/limits-fndefn.c -O3 -g (test for excess errors)
 +PASS: gcc.c-torture/compile/limits-fndefn.c -O3 -g (test for excess errors)
 -UNRESOLVED: gcc.dg/graphite/block-4.c compilation failed to produce executable
 +PASS: gcc.dg/graphite/block-4.c execution test
 -FAIL: gcc.dg/graphite/block-4.c (test for excess errors)
 +PASS: gcc.dg/graphite/block-4.c (test for excess errors)
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg1 == 1
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg2 == 2
 -FAIL: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg3 == 3
 -FAIL: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg4 == 4
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg5 == 5
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg6 == 6
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg7 == 30
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 *x == (char) 25
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 y == 2
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg1 == 1
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg2 == 2
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg3 == 3
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg4 == 4
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg5 == 5
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg6 == 6
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 arg7 == 30
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 *x == (char) 25
 +UNSUPPORTED: gcc.dg/guality/pr36728-1.c -O2 -flto line 14 y == 2
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg1 == 1
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg2 == 2
 -FAIL: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg3 == 3
 -FAIL: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg4 == 4
 -PASS: gcc.dg/guality/pr36728-1.c -O2 -fwhopr line 14 arg5 == 5
 -...

Revision history for this message
Michael Hope (michaelh1) wrote :

I'd prefer to keep the new features for the next release. It's not far away and it'll give us some more breathing room.

Revision history for this message
Michael Hope (michaelh1) wrote :

Does not fix LP: #730860. Does fix LP: #736439.

Revision history for this message
Andrew Stubbs (ams-codesourcery) wrote :

This is now merged as far as 99498.

I'll resubmit the rest later.

review: Needs Resubmitting
Revision history for this message
Michael Hope (michaelh1) wrote :

For reference, I've gone through the patches and seen what's where. See:
 https://spreadsheets.google.com/spreadsheet/ccc?key=0Ap7fWLePADFVdEhKd0xrNEpjZ2NCVXE1dVFVSHlLUFE&hl=en_US

or in text:

======== ========= ======== ========== ========== =====================
Revision Bug In trunk In our 4.5 In our 4.6 Notes
======== ========= ======== ========== ========== =====================
   99493 PR45052 162528 Y (twice) Y
   99494 175641 99498 N ABI conformance
   99495 PR47763 170422 N N Dhrystone improvement
   99496 PR47427 169226 N Y ICE
   99497 171304 B N Bug
   99498 N N N Bad debug info
   99499 LP:736439 171840 N N Shrinkwrap
   99500 N N N Needs benchmarking
   99501 Unaligned; obsolete
   99502 Unaligned; obsolete
======== ========= ======== ========== ========== =====================

Based on this we should backport 99493, 99494, 99495, 99496, 99497, 99499, and 99500.

Revision history for this message
Michael Hope (michaelh1) wrote :

(well, except 99493 and 99496 which are already in our 4.6...)

Revision history for this message
Michael Hope (michaelh1) wrote :

99495 was picked up via the 4.6 release branch.

Revision history for this message
Michael Hope (michaelh1) wrote :

I've created merge requests for 99494, 99497, 99499 (4.6 + 4.5), and 99500.

Unmerged revisions

99502. By Andrew Stubbs

Add unaligned support for built-in memcpy.

Merged from Sourcery G++

99501. By Andrew Stubbs

Add support for unaligned loads/stores.

Merged from Sourcery G++

99500. By Andrew Stubbs

Fix performance regression when using NEON.

Merged from Sourcery G++

99499. By Andrew Stubbs

Fix shrink wrapping bug.

LP:736439

Merged from Sourcery G++

99498. By Andrew Stubbs

Fix a bug that generated bad debug info.

Merged from Sourcery G++

99497. By Andrew Stubbs

Fix bug in__builtin_isgreaterequal.

Merged from Sourcery G++

(Backport from FSF)

99496. By Andrew Stubbs

Fix internal compiler errors.

GCC Bugzilla #47427 & #47428.

Merged from Sourcery G++

(Backport from FSF)

99495. By Andrew Stubbs

Fix a performance regression in Dhrystone.

Merged from Sourcery SG++.

99494. By Andrew Stubbs

Fix an ABI conformance issue that affected armcc interoperability.

Merged from Sourcery G++.

99493. By Andrew Stubbs

Fix a bug in which "volatile" keyword could be ignored.

Merged from Sourcery G++.

(Backport from FSF)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog.linaro'
--- ChangeLog.linaro 2011-04-11 09:52:39 +0000
+++ ChangeLog.linaro 2011-04-13 13:28:18 +0000
@@ -1,3 +1,128 @@
12011-04-01 Julian Brown <julian@codesourcery.com>
2
3 Issue #4220
4
5 gcc/
6 * config/arm/arm.c (arm_block_move_unaligned_straight)
7 (arm_adjust_block_mem, arm_block_move_unaligned_loop)
8 (arm_movmemqi_unaligned): New.
9 (arm_gen_movmemqi): Support unaligned block copies.
10
112011-04-01 Julian Brown <julian@codesourcery.com>
12
13 Issue #4220
14
15 gcc/
16 * config/arm/arm.c (arm_override_options): Add unaligned_access
17 support.
18 * config/arm/arm.md (UNSPEC_UNALIGNED_LOAD)
19 (UNSPEC_UNALIGNED_STORE): Add constants for unspecs.
20 (insv, extzv): Add unaligned-access support.
21 (extv): Change to expander. Likewise.
22 (unaligned_loadsi, unaligned_loadhis, unaligned_loadhiu)
23 (unaligned_storesi, unaligned_storehi): New.
24 (*extv_reg): New (previous extv implementation).
25 * config/arm/arm.opt (munaligned_access): Add option.
26 * expmed.c (store_bit_field_1): Don't tweak bitfield numbering for
27 memory locations if BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN.
28 (extract_bit_field_1): Likewise.
29
302011-04-01 Julian Brown <julian@codesourcery.com>
31
32 Issue #6223
33
34 gcc/
35 * config/arm/arm.c (arm_vector_alignment_reachable): Don't use
36 peeling for alignment for NEON.
37
38 gcc/testsuite/
39 * lib/target-supports.exp
40 (check_effective_target_vector_alignment_reachable): Not true for
41 ARM NEON.
42
432011-03-28 Bernd Schmidt <bernds@codesourcery.com>
44
45 gcc/
46 * ifcvt.c (cond_exec_process_insns): Don't convert the function
47 prologue.
48
49 gcc/testsuite/
50 * gcc.c-torture/compile/20110322-1.c: New test.
51
522011-03-28 Paul Brook <paul@codesourcery.com>
53 Daniel Jacobowitz <dan@codesourcery.com>
54
55 Issue #3772
56 gcc/
57 * final.c (notice_source_line): Ignore zero length instructions.
58
592011-03-22 Sandra Loosemore <sandra@codesourcery.com>
60
61 Issue #10483
62
63 gcc/
64 Backport from mainline:
65
66 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
67
68 * combine.c (simplify_set): Try harder to find the best CC mode when
69 simplifying a nested COMPARE on the RHS.
70
712011-03-17 Janis Johnson <janisjo@codesourcery.com>
72
73 Backport from FSF mainline:
74 2011-01-25 Jakub Jelinek <jakub@redhat.com>
75
76 PR tree-optimization/47427
77 PR tree-optimization/47428
78 * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Don't
79 coalesce if the new root var would be TREE_READONLY.
80
812011-02-23 Jie Zhang <jie@codesourcery.com>
82
83 Issue #10134
84
85 Backport from mainline
86
87 gcc/
88 2011-02-23 Jie Zhang <jie@codesourcery.com>
89
90 PR rtl-optimization/47763
91 * web.c (web_main): Ignore naked clobber when replacing register.
92
93 gcc/testsuite/
94 2011-02-23 Jie Zhang <jie@codesourcery.com>
95
96 PR rtl-optimization/47763
97 * gcc.dg/pr47763.c: New test.
98
992011-02-16 Nathan Sidwell <nathan@codesourcery.com>
100
101 Issue #10439
102 gcc/
103 * config/arm/unwind-arm.c (enum __cxa_type_match_result): New.
104 (cxa_type_match): Correct declaration.
105 (__gnu_unwind_pr_common): Reconstruct
106 additional indirection when __cxa_type_match returns
107 succeeded_with_ptr_to_base.
108
109 libstdc++/
110 * libsupc++/eh_arm.c (__cxa_type_match): Construct address of
111 thrown object here. Return succeded_with_ptr_to_base for all
112 pointer cases.
113
1142011-02-14 Kwok Cheung Yeung <kcy@codesourcery.com>
115
116 Issue #10417
117
118 Backport from mainline
119
120 gcc/
121 2010-07-31 Richard Guenther <rguenther@suse.de>
122
123 PR tree-optimization/45052
124 * ipa-pure-const.c (check_stmt): Check volatileness.
125
12011-04-10 Michael Hope <michael.hope@linaro.org>1262011-04-10 Michael Hope <michael.hope@linaro.org>
2127
3 gcc/128 gcc/
4129
=== modified file 'gcc/combine.c'
--- gcc/combine.c 2011-01-06 11:02:44 +0000
+++ gcc/combine.c 2011-04-13 13:28:18 +0000
@@ -5966,10 +5966,18 @@
5966 enum rtx_code new_code;5966 enum rtx_code new_code;
5967 rtx op0, op1, tmp;5967 rtx op0, op1, tmp;
5968 int other_changed = 0;5968 int other_changed = 0;
5969 rtx inner_compare = NULL_RTX;
5969 enum machine_mode compare_mode = GET_MODE (dest);5970 enum machine_mode compare_mode = GET_MODE (dest);
59705971
5971 if (GET_CODE (src) == COMPARE)5972 if (GET_CODE (src) == COMPARE)
5972 op0 = XEXP (src, 0), op1 = XEXP (src, 1);5973 {
5974 op0 = XEXP (src, 0), op1 = XEXP (src, 1);
5975 if (GET_CODE (op0) == COMPARE && op1 == const0_rtx)
5976 {
5977 inner_compare = op0;
5978 op0 = XEXP (inner_compare, 0), op1 = XEXP (inner_compare, 1);
5979 }
5980 }
5973 else5981 else
5974 op0 = src, op1 = CONST0_RTX (GET_MODE (src));5982 op0 = src, op1 = CONST0_RTX (GET_MODE (src));
59755983
@@ -6011,6 +6019,12 @@
6011 need to use a different CC mode here. */6019 need to use a different CC mode here. */
6012 if (GET_MODE_CLASS (GET_MODE (op0)) == MODE_CC)6020 if (GET_MODE_CLASS (GET_MODE (op0)) == MODE_CC)
6013 compare_mode = GET_MODE (op0);6021 compare_mode = GET_MODE (op0);
6022 else if (inner_compare
6023 && GET_MODE_CLASS (GET_MODE (inner_compare)) == MODE_CC
6024 && new_code == old_code
6025 && op0 == XEXP (inner_compare, 0)
6026 && op1 == XEXP (inner_compare, 1))
6027 compare_mode = GET_MODE (inner_compare);
6014 else6028 else
6015 compare_mode = SELECT_CC_MODE (new_code, op0, op1);6029 compare_mode = SELECT_CC_MODE (new_code, op0, op1);
60166030
60176031
=== modified file 'gcc/config/arm/arm.c'
--- gcc/config/arm/arm.c 2011-03-02 11:29:06 +0000
+++ gcc/config/arm/arm.c 2011-04-13 13:28:18 +0000
@@ -1896,6 +1896,22 @@
1896 if (arm_selected_tune->core == cortexm4)1896 if (arm_selected_tune->core == cortexm4)
1897 flag_schedule_interblock = 0;1897 flag_schedule_interblock = 0;
18981898
1899 /* Enable -munaligned-access by default for
1900 - all ARMv6 architecture-based processors
1901 - ARMv7-A, ARMv7-R, and ARMv7-M architecture-based processors.
1902
1903 Disable -munaligned-access by default for
1904 - all pre-ARMv6 architecture-based processors
1905 - ARMv6-M architecture-based processors. */
1906
1907 if (unaligned_access == 2)
1908 {
1909 if (arm_arch6 && (arm_arch_notm || arm_arch7))
1910 unaligned_access = 1;
1911 else
1912 unaligned_access = 0;
1913 }
1914
1899 if (TARGET_THUMB1 && flag_schedule_insns)1915 if (TARGET_THUMB1 && flag_schedule_insns)
1900 {1916 {
1901 /* Don't warn since it's on by default in -O2. */1917 /* Don't warn since it's on by default in -O2. */
@@ -10505,6 +10521,333 @@
10505 return true;10521 return true;
10506}10522}
1050710523
10524/* Copy a block of memory using plain ldr/str/ldrh/strh instructions, to permit
10525 unaligned copies on processors which support unaligned semantics for those
10526 instructions. INTERLEAVE_FACTOR can be used to attempt to hide load latency
10527 (using more registers) by doing e.g. load/load/store/store for a factor of 2.
10528 An interleave factor of 1 (the minimum) will perform no interleaving.
10529 Load/store multiple are used for aligned addresses where possible. */
10530
10531static void
10532arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase,
10533 HOST_WIDE_INT length,
10534 unsigned int interleave_factor)
10535{
10536 rtx *regs = XALLOCAVEC (rtx, interleave_factor);
10537 HOST_WIDE_INT block_size_bytes = interleave_factor * UNITS_PER_WORD;
10538 HOST_WIDE_INT i, j;
10539 HOST_WIDE_INT remaining = length, words;
10540 rtx halfword_tmp = NULL, byte_tmp = NULL;
10541 rtx dst, src;
10542 bool src_aligned = MEM_ALIGN (srcbase) >= BITS_PER_WORD;
10543 bool dst_aligned = MEM_ALIGN (dstbase) >= BITS_PER_WORD;
10544 HOST_WIDE_INT srcoffset, dstoffset;
10545 HOST_WIDE_INT src_autoinc, dst_autoinc;
10546 rtx mem, addr;
10547
10548 gcc_assert (1 <= interleave_factor && interleave_factor <= 4);
10549
10550 /* Use hard registers if we have aligned source or destination so we can use
10551 load/store multiple with contiguous registers. */
10552 if (dst_aligned || src_aligned)
10553 for (i = 0; i < interleave_factor; i++)
10554 regs[i] = gen_rtx_REG (SImode, i);
10555 else
10556 for (i = 0; i < interleave_factor; i++)
10557 regs[i] = gen_reg_rtx (SImode);
10558
10559 dst = copy_addr_to_reg (XEXP (dstbase, 0));
10560 src = copy_addr_to_reg (XEXP (srcbase, 0));
10561
10562 srcoffset = dstoffset = 0;
10563
10564 /* Calls to arm_gen_load_multiple and arm_gen_store_multiple update SRC/DST.
10565 For copying the last bytes we want to subtract this offset again. */
10566 src_autoinc = dst_autoinc = 0;
10567
10568 /* Copy BLOCK_SIZE_BYTES chunks. */
10569
10570 for (i = 0; i + block_size_bytes <= length; i += block_size_bytes)
10571 {
10572 /* Load words. */
10573 if (src_aligned && interleave_factor > 1)
10574 {
10575 emit_insn (arm_gen_load_multiple (arm_regs_in_sequence,
10576 interleave_factor, src, TRUE,
10577 srcbase, &srcoffset));
10578 src_autoinc += UNITS_PER_WORD * interleave_factor;
10579 }
10580 else
10581 {
10582 for (j = 0; j < interleave_factor; j++)
10583 {
10584 addr = plus_constant (src, srcoffset + j * UNITS_PER_WORD
10585 - src_autoinc);
10586 mem = adjust_automodify_address (srcbase, SImode, addr,
10587 srcoffset + j * UNITS_PER_WORD);
10588 emit_insn (gen_unaligned_loadsi (regs[j], mem));
10589 }
10590 srcoffset += block_size_bytes;
10591 }
10592
10593 /* Store words. */
10594 if (dst_aligned && interleave_factor > 1)
10595 {
10596 emit_insn (arm_gen_store_multiple (arm_regs_in_sequence,
10597 interleave_factor, dst, TRUE,
10598 dstbase, &dstoffset));
10599 dst_autoinc += UNITS_PER_WORD * interleave_factor;
10600 }
10601 else
10602 {
10603 for (j = 0; j < interleave_factor; j++)
10604 {
10605 addr = plus_constant (dst, dstoffset + j * UNITS_PER_WORD
10606 - dst_autoinc);
10607 mem = adjust_automodify_address (dstbase, SImode, addr,
10608 dstoffset + j * UNITS_PER_WORD);
10609 emit_insn (gen_unaligned_storesi (mem, regs[j]));
10610 }
10611 dstoffset += block_size_bytes;
10612 }
10613
10614 remaining -= block_size_bytes;
10615 }
10616
10617 /* Copy any whole words left (note these aren't interleaved with any
10618 subsequent halfword/byte load/stores in the interests of simplicity). */
10619
10620 words = remaining / UNITS_PER_WORD;
10621
10622 gcc_assert (words < interleave_factor);
10623
10624 if (src_aligned && words > 1)
10625 {
10626 emit_insn (arm_gen_load_multiple (arm_regs_in_sequence, words, src,
10627 TRUE, srcbase, &srcoffset));
10628 src_autoinc += UNITS_PER_WORD * words;
10629 }
10630 else
10631 {
10632 for (j = 0; j < words; j++)
10633 {
10634 addr = plus_constant (src,
10635 srcoffset + j * UNITS_PER_WORD - src_autoinc);
10636 mem = adjust_automodify_address (srcbase, SImode, addr,
10637 srcoffset + j * UNITS_PER_WORD);
10638 emit_insn (gen_unaligned_loadsi (regs[j], mem));
10639 }
10640 srcoffset += words * UNITS_PER_WORD;
10641 }
10642
10643 if (dst_aligned && words > 1)
10644 {
10645 emit_insn (arm_gen_store_multiple (arm_regs_in_sequence, words, dst,
10646 TRUE, dstbase, &dstoffset));
10647 dst_autoinc += words * UNITS_PER_WORD;
10648 }
10649 else
10650 {
10651 for (j = 0; j < words; j++)
10652 {
10653 addr = plus_constant (dst,
10654 dstoffset + j * UNITS_PER_WORD - dst_autoinc);
10655 mem = adjust_automodify_address (dstbase, SImode, addr,
10656 dstoffset + j * UNITS_PER_WORD);
10657 emit_insn (gen_unaligned_storesi (mem, regs[j]));
10658 }
10659 dstoffset += words * UNITS_PER_WORD;
10660 }
10661
10662 remaining -= words * UNITS_PER_WORD;
10663
10664 gcc_assert (remaining < 4);
10665
10666 /* Copy a halfword if necessary. */
10667
10668 if (remaining >= 2)
10669 {
10670 halfword_tmp = gen_reg_rtx (SImode);
10671
10672 addr = plus_constant (src, srcoffset - src_autoinc);
10673 mem = adjust_automodify_address (srcbase, HImode, addr, srcoffset);
10674 emit_insn (gen_unaligned_loadhiu (halfword_tmp, mem));
10675
10676 /* Either write out immediately, or delay until we've loaded the last
10677 byte, depending on interleave factor. */
10678 if (interleave_factor == 1)
10679 {
10680 addr = plus_constant (dst, dstoffset - dst_autoinc);
10681 mem = adjust_automodify_address (dstbase, HImode, addr, dstoffset);
10682 emit_insn (gen_unaligned_storehi (mem,
10683 gen_lowpart (HImode, halfword_tmp)));
10684 halfword_tmp = NULL;
10685 dstoffset += 2;
10686 }
10687
10688 remaining -= 2;
10689 srcoffset += 2;
10690 }
10691
10692 gcc_assert (remaining < 2);
10693
10694 /* Copy last byte. */
10695
10696 if ((remaining & 1) != 0)
10697 {
10698 byte_tmp = gen_reg_rtx (SImode);
10699
10700 addr = plus_constant (src, srcoffset - src_autoinc);
10701 mem = adjust_automodify_address (srcbase, QImode, addr, srcoffset);
10702 emit_move_insn (gen_lowpart (QImode, byte_tmp), mem);
10703
10704 if (interleave_factor == 1)
10705 {
10706 addr = plus_constant (dst, dstoffset - dst_autoinc);
10707 mem = adjust_automodify_address (dstbase, QImode, addr, dstoffset);
10708 emit_move_insn (mem, gen_lowpart (QImode, byte_tmp));
10709 byte_tmp = NULL;
10710 dstoffset++;
10711 }
10712
10713 remaining--;
10714 srcoffset++;
10715 }
10716
10717 /* Store last halfword if we haven't done so already. */
10718
10719 if (halfword_tmp)
10720 {
10721 addr = plus_constant (dst, dstoffset - dst_autoinc);
10722 mem = adjust_automodify_address (dstbase, HImode, addr, dstoffset);
10723 emit_insn (gen_unaligned_storehi (mem,
10724 gen_lowpart (HImode, halfword_tmp)));
10725 dstoffset += 2;
10726 }
10727
10728 /* Likewise for last byte. */
10729
10730 if (byte_tmp)
10731 {
10732 addr = plus_constant (dst, dstoffset - dst_autoinc);
10733 mem = adjust_automodify_address (dstbase, QImode, addr, dstoffset);
10734 emit_move_insn (mem, gen_lowpart (QImode, byte_tmp));
10735 dstoffset++;
10736 }
10737
10738 gcc_assert (remaining == 0 && srcoffset == dstoffset);
10739}
10740
10741/* From mips_adjust_block_mem:
10742
10743 Helper function for doing a loop-based block operation on memory
10744 reference MEM. Each iteration of the loop will operate on LENGTH
10745 bytes of MEM.
10746
10747 Create a new base register for use within the loop and point it to
10748 the start of MEM. Create a new memory reference that uses this
10749 register. Store them in *LOOP_REG and *LOOP_MEM respectively. */
10750
10751static void
10752arm_adjust_block_mem (rtx mem, HOST_WIDE_INT length, rtx *loop_reg,
10753 rtx *loop_mem)
10754{
10755 *loop_reg = copy_addr_to_reg (XEXP (mem, 0));
10756
10757 /* Although the new mem does not refer to a known location,
10758 it does keep up to LENGTH bytes of alignment. */
10759 *loop_mem = change_address (mem, BLKmode, *loop_reg);
10760 set_mem_align (*loop_mem, MIN (MEM_ALIGN (mem), length * BITS_PER_UNIT));
10761}
10762
10763/* From mips_block_move_loop:
10764
10765 Move LENGTH bytes from SRC to DEST using a loop that moves BYTES_PER_ITER
10766 bytes at a time. LENGTH must be at least BYTES_PER_ITER. Assume that
10767 the memory regions do not overlap. */
10768
10769static void
10770arm_block_move_unaligned_loop (rtx dest, rtx src, HOST_WIDE_INT length,
10771 unsigned int interleave_factor,
10772 HOST_WIDE_INT bytes_per_iter)
10773{
10774 rtx label, src_reg, dest_reg, final_src, test;
10775 HOST_WIDE_INT leftover;
10776
10777 leftover = length % bytes_per_iter;
10778 length -= leftover;
10779
10780 /* Create registers and memory references for use within the loop. */
10781 arm_adjust_block_mem (src, bytes_per_iter, &src_reg, &src);
10782 arm_adjust_block_mem (dest, bytes_per_iter, &dest_reg, &dest);
10783
10784 /* Calculate the value that SRC_REG should have after the last iteration of
10785 the loop. */
10786 final_src = expand_simple_binop (Pmode, PLUS, src_reg, GEN_INT (length),
10787 0, 0, OPTAB_WIDEN);
10788
10789 /* Emit the start of the loop. */
10790 label = gen_label_rtx ();
10791 emit_label (label);
10792
10793 /* Emit the loop body. */
10794 arm_block_move_unaligned_straight (dest, src, bytes_per_iter,
10795 interleave_factor);
10796
10797 /* Move on to the next block. */
10798 emit_move_insn (src_reg, plus_constant (src_reg, bytes_per_iter));
10799 emit_move_insn (dest_reg, plus_constant (dest_reg, bytes_per_iter));
10800
10801 /* Emit the loop condition. */
10802 test = gen_rtx_NE (VOIDmode, src_reg, final_src);
10803 emit_jump_insn (gen_cbranchsi4 (test, src_reg, final_src, label));
10804
10805 /* Mop up any left-over bytes. */
10806 if (leftover)
10807 arm_block_move_unaligned_straight (dest, src, leftover, interleave_factor);
10808}
10809
10810/* Emit a block move when either the source or destination is unaligned (not
10811 aligned to a four-byte boundary). This may need further tuning depending on
10812 core type, optimize_size setting, alignment of source/destination, etc. */
10813
10814static int
10815arm_movmemqi_unaligned (rtx *operands)
10816{
10817 HOST_WIDE_INT length = INTVAL (operands[2]);
10818
10819 if (optimize_size)
10820 {
10821 bool src_aligned = MEM_ALIGN (operands[1]) >= BITS_PER_WORD;
10822 bool dst_aligned = MEM_ALIGN (operands[0]) >= BITS_PER_WORD;
10823 /* Inlined memcpy using ldr/str/ldrh/strh can be quite big: try to limit
10824 size of code if optimizing for size. We'll use ldm/stm if src_aligned
10825 or dst_aligned though: allow more interleaving in those cases since the
10826 resulting code can be smaller. */
10827 unsigned int interleave_factor = (src_aligned || dst_aligned) ? 2 : 1;
10828 HOST_WIDE_INT bytes_per_iter = (src_aligned || dst_aligned) ? 8 : 4;
10829
10830 if (length > 12)
10831 arm_block_move_unaligned_loop (operands[0], operands[1], length,
10832 interleave_factor, bytes_per_iter);
10833 else
10834 arm_block_move_unaligned_straight (operands[0], operands[1], length,
10835 interleave_factor);
10836 }
10837 else
10838 {
10839 /* Note that the loop created by arm_block_move_unaligned_loop may be
10840 subject to loop unrolling, which makes tuning this condition a little
10841 awkward. */
10842 if (length > 32)
10843 arm_block_move_unaligned_loop (operands[0], operands[1], length, 4, 16);
10844 else
10845 arm_block_move_unaligned_straight (operands[0], operands[1], length, 4);
10846 }
10847
10848 return 1;
10849}
10850
10508int10851int
10509arm_gen_movmemqi (rtx *operands)10852arm_gen_movmemqi (rtx *operands)
10510{10853{
@@ -10517,8 +10860,13 @@
1051710860
10518 if (GET_CODE (operands[2]) != CONST_INT10861 if (GET_CODE (operands[2]) != CONST_INT
10519 || GET_CODE (operands[3]) != CONST_INT10862 || GET_CODE (operands[3]) != CONST_INT
10520 || INTVAL (operands[2]) > 6410863 || INTVAL (operands[2]) > 64)
10521 || INTVAL (operands[3]) & 3)10864 return 0;
10865
10866 if (unaligned_access && (INTVAL (operands[3]) & 3) != 0)
10867 return arm_movmemqi_unaligned (operands);
10868
10869 if (INTVAL (operands[3]) & 3)
10522 return 0;10870 return 0;
1052310871
10524 dstbase = operands[0];10872 dstbase = operands[0];
@@ -23095,10 +23443,13 @@
23095static bool23443static bool
23096arm_vector_alignment_reachable (const_tree type, bool is_packed)23444arm_vector_alignment_reachable (const_tree type, bool is_packed)
23097{23445{
23098 /* Vectors which aren't in packed structures will not be less aligned than23446 /* NOTE: returning true here will unconditionally peel loop iterations so
23099 the natural alignment of their element type, so this is safe. */23447 that aligned accesses can be used. This is undesirable when misaligned
23448 accesses are available, particularly for small loop iteration counts,
23449 since the overhead for dispatching to multiple versions of the loop is
23450 quite high. */
23100 if (TARGET_NEON && !BYTES_BIG_ENDIAN)23451 if (TARGET_NEON && !BYTES_BIG_ENDIAN)
23101 return !is_packed;23452 return false;
2310223453
23103 return default_builtin_vector_alignment_reachable (type, is_packed);23454 return default_builtin_vector_alignment_reachable (type, is_packed);
23104}23455}
2310523456
=== modified file 'gcc/config/arm/arm.md'
--- gcc/config/arm/arm.md 2011-03-11 14:26:34 +0000
+++ gcc/config/arm/arm.md 2011-04-13 13:28:18 +0000
@@ -104,6 +104,8 @@
104 (UNSPEC_SYMBOL_OFFSET 27) ; The offset of the start of the symbol from104 (UNSPEC_SYMBOL_OFFSET 27) ; The offset of the start of the symbol from
105 ; another symbolic address.105 ; another symbolic address.
106 (UNSPEC_MEMORY_BARRIER 28) ; Represent a memory barrier.106 (UNSPEC_MEMORY_BARRIER 28) ; Represent a memory barrier.
107 (UNSPEC_UNALIGNED_LOAD 29)
108 (UNSPEC_UNALIGNED_STORE 30)
107 ]109 ]
108)110)
109111
@@ -2372,7 +2374,7 @@
2372;;; this insv pattern, so this pattern needs to be reevalutated.2374;;; this insv pattern, so this pattern needs to be reevalutated.
23732375
2374(define_expand "insv"2376(define_expand "insv"
2375 [(set (zero_extract:SI (match_operand:SI 0 "s_register_operand" "")2377 [(set (zero_extract:SI (match_operand:SI 0 "nonimmediate_operand" "")
2376 (match_operand:SI 1 "general_operand" "")2378 (match_operand:SI 1 "general_operand" "")
2377 (match_operand:SI 2 "general_operand" ""))2379 (match_operand:SI 2 "general_operand" ""))
2378 (match_operand:SI 3 "reg_or_int_operand" ""))]2380 (match_operand:SI 3 "reg_or_int_operand" ""))]
@@ -2386,35 +2388,66 @@
23862388
2387 if (arm_arch_thumb2)2389 if (arm_arch_thumb2)
2388 {2390 {
2389 bool use_bfi = TRUE;2391 if (unaligned_access && MEM_P (operands[0])
23902392 && s_register_operand (operands[3], GET_MODE (operands[3]))
2391 if (GET_CODE (operands[3]) == CONST_INT)2393 && (width == 16 || width == 32) && (start_bit % BITS_PER_UNIT) == 0)
2392 {2394 {
2393 HOST_WIDE_INT val = INTVAL (operands[3]) & mask;2395 rtx base_addr;
23942396
2395 if (val == 0)2397 if (width == 32)
2396 {2398 {
2397 emit_insn (gen_insv_zero (operands[0], operands[1],2399 base_addr = adjust_address (operands[0], SImode,
2398 operands[2]));2400 start_bit / BITS_PER_UNIT);
2401 emit_insn (gen_unaligned_storesi (base_addr, operands[3]));
2402 }
2403 else
2404 {
2405 rtx tmp = gen_reg_rtx (HImode);
2406
2407 base_addr = adjust_address (operands[0], HImode,
2408 start_bit / BITS_PER_UNIT);
2409 emit_move_insn (tmp, gen_lowpart (HImode, operands[3]));
2410 emit_insn (gen_unaligned_storehi (base_addr, tmp));
2411 }
2412 DONE;
2413 }
2414 else if (s_register_operand (operands[0], GET_MODE (operands[0])))
2415 {
2416 bool use_bfi = TRUE;
2417
2418 if (GET_CODE (operands[3]) == CONST_INT)
2419 {
2420 HOST_WIDE_INT val = INTVAL (operands[3]) & mask;
2421
2422 if (val == 0)
2423 {
2424 emit_insn (gen_insv_zero (operands[0], operands[1],
2425 operands[2]));
2426 DONE;
2427 }
2428
2429 /* See if the set can be done with a single orr instruction. */
2430 if (val == mask && const_ok_for_arm (val << start_bit))
2431 use_bfi = FALSE;
2432 }
2433
2434 if (use_bfi)
2435 {
2436 if (GET_CODE (operands[3]) != REG)
2437 operands[3] = force_reg (SImode, operands[3]);
2438
2439 emit_insn (gen_insv_t2 (operands[0], operands[1], operands[2],
2440 operands[3]));
2399 DONE;2441 DONE;
2400 }2442 }
24012443 }
2402 /* See if the set can be done with a single orr instruction. */2444 else
2403 if (val == mask && const_ok_for_arm (val << start_bit))2445 FAIL;
2404 use_bfi = FALSE;
2405 }
2406
2407 if (use_bfi)
2408 {
2409 if (GET_CODE (operands[3]) != REG)
2410 operands[3] = force_reg (SImode, operands[3]);
2411
2412 emit_insn (gen_insv_t2 (operands[0], operands[1], operands[2],
2413 operands[3]));
2414 DONE;
2415 }
2416 }2446 }
24172447
2448 if (!s_register_operand (operands[0], GET_MODE (operands[0])))
2449 FAIL;
2450
2418 target = copy_rtx (operands[0]);2451 target = copy_rtx (operands[0]);
2419 /* Avoid using a subreg as a subtarget, and avoid writing a paradoxical 2452 /* Avoid using a subreg as a subtarget, and avoid writing a paradoxical
2420 subreg as the final target. */2453 subreg as the final target. */
@@ -3604,7 +3637,7 @@
36043637
3605(define_expand "extzv"3638(define_expand "extzv"
3606 [(set (match_dup 4)3639 [(set (match_dup 4)
3607 (ashift:SI (match_operand:SI 1 "register_operand" "")3640 (ashift:SI (match_operand:SI 1 "nonimmediate_operand" "")
3608 (match_operand:SI 2 "const_int_operand" "")))3641 (match_operand:SI 2 "const_int_operand" "")))
3609 (set (match_operand:SI 0 "register_operand" "")3642 (set (match_operand:SI 0 "register_operand" "")
3610 (lshiftrt:SI (match_dup 4)3643 (lshiftrt:SI (match_dup 4)
@@ -3617,10 +3650,53 @@
3617 3650
3618 if (arm_arch_thumb2)3651 if (arm_arch_thumb2)
3619 {3652 {
3620 emit_insn (gen_extzv_t2 (operands[0], operands[1], operands[2],3653 HOST_WIDE_INT width = INTVAL (operands[2]);
3621 operands[3]));3654 HOST_WIDE_INT bitpos = INTVAL (operands[3]);
3622 DONE;3655
3656 if (unaligned_access && MEM_P (operands[1])
3657 && (width == 16 || width == 32) && (bitpos % BITS_PER_UNIT) == 0)
3658 {
3659 rtx base_addr;
3660
3661 if (width == 32)
3662 {
3663 base_addr = adjust_address (operands[1], SImode,
3664 bitpos / BITS_PER_UNIT);
3665 emit_insn (gen_unaligned_loadsi (operands[0], base_addr));
3666 }
3667 else
3668 {
3669 rtx dest = operands[0];
3670 rtx tmp = gen_reg_rtx (SImode);
3671
3672 /* We may get a paradoxical subreg here. Strip it off. */
3673 if (GET_CODE (dest) == SUBREG
3674 && GET_MODE (dest) == SImode
3675 && GET_MODE (SUBREG_REG (dest)) == HImode)
3676 dest = SUBREG_REG (dest);
3677
3678 if (GET_MODE_BITSIZE (GET_MODE (dest)) != width)
3679 FAIL;
3680
3681 base_addr = adjust_address (operands[1], HImode,
3682 bitpos / BITS_PER_UNIT);
3683 emit_insn (gen_unaligned_loadhiu (tmp, base_addr));
3684 emit_move_insn (gen_lowpart (SImode, dest), tmp);
3685 }
3686 DONE;
3687 }
3688 else if (s_register_operand (operands[1], GET_MODE (operands[1])))
3689 {
3690 emit_insn (gen_extzv_t2 (operands[0], operands[1], operands[2],
3691 operands[3]));
3692 DONE;
3693 }
3694 else
3695 FAIL;
3623 }3696 }
3697
3698 if (!s_register_operand (operands[1], GET_MODE (operands[1])))
3699 FAIL;
36243700
3625 operands[3] = GEN_INT (rshift);3701 operands[3] = GEN_INT (rshift);
3626 3702
@@ -3635,7 +3711,103 @@
3635 }"3711 }"
3636)3712)
36373713
3638(define_insn "extv"3714(define_expand "extv"
3715 [(set (match_operand 0 "s_register_operand" "")
3716 (sign_extract (match_operand 1 "nonimmediate_operand" "")
3717 (match_operand 2 "const_int_operand" "")
3718 (match_operand 3 "const_int_operand" "")))]
3719 "arm_arch_thumb2"
3720{
3721 HOST_WIDE_INT width = INTVAL (operands[2]);
3722 HOST_WIDE_INT bitpos = INTVAL (operands[3]);
3723
3724 if (unaligned_access && MEM_P (operands[1]) && (width == 16 || width == 32)
3725 && (bitpos % BITS_PER_UNIT) == 0)
3726 {
3727 rtx base_addr;
3728
3729 if (width == 32)
3730 {
3731 base_addr = adjust_address (operands[1], SImode,
3732 bitpos / BITS_PER_UNIT);
3733 emit_insn (gen_unaligned_loadsi (operands[0], base_addr));
3734 }
3735 else
3736 {
3737 rtx dest = operands[0];
3738 rtx tmp = gen_reg_rtx (SImode);
3739
3740 /* We may get a paradoxical subreg here. Strip it off. */
3741 if (GET_CODE (dest) == SUBREG
3742 && GET_MODE (dest) == SImode
3743 && GET_MODE (SUBREG_REG (dest)) == HImode)
3744 dest = SUBREG_REG (dest);
3745
3746 if (GET_MODE_BITSIZE (GET_MODE (dest)) != width)
3747 FAIL;
3748
3749 base_addr = adjust_address (operands[1], HImode,
3750 bitpos / BITS_PER_UNIT);
3751 emit_insn (gen_unaligned_loadhis (tmp, base_addr));
3752 emit_move_insn (gen_lowpart (SImode, dest), tmp);
3753 }
3754
3755 DONE;
3756 }
3757 else if (s_register_operand (operands[1], GET_MODE (operands[1])))
3758 DONE;
3759 else
3760 FAIL;
3761})
3762
3763; ARMv6+ unaligned load/store instructions (used for packed structure accesses).
3764
3765(define_insn "unaligned_loadsi"
3766 [(set (match_operand:SI 0 "s_register_operand" "=r")
3767 (unspec:SI [(match_operand:SI 1 "memory_operand" "m")]
3768 UNSPEC_UNALIGNED_LOAD))]
3769 "unaligned_access"
3770 "ldr%?\t%0, %1\t@ unaligned"
3771 [(set_attr "predicable" "yes")
3772 (set_attr "type" "load1")])
3773
3774(define_insn "unaligned_loadhis"
3775 [(set (match_operand:SI 0 "s_register_operand" "=r")
3776 (sign_extend:SI (unspec:HI [(match_operand:HI 1 "memory_operand" "m")]
3777 UNSPEC_UNALIGNED_LOAD)))]
3778 "unaligned_access"
3779 "ldr%(sh%)\t%0, %1\t@ unaligned"
3780 [(set_attr "predicable" "yes")
3781 (set_attr "type" "load_byte")])
3782
3783(define_insn "unaligned_loadhiu"
3784 [(set (match_operand:SI 0 "s_register_operand" "=r")
3785 (zero_extend:SI (unspec:HI [(match_operand:HI 1 "memory_operand" "m")]
3786 UNSPEC_UNALIGNED_LOAD)))]
3787 "unaligned_access"
3788 "ldr%(h%)\t%0, %1\t@ unaligned"
3789 [(set_attr "predicable" "yes")
3790 (set_attr "type" "load_byte")])
3791
3792(define_insn "unaligned_storesi"
3793 [(set (match_operand:SI 0 "memory_operand" "=m")
3794 (unspec:SI [(match_operand:SI 1 "s_register_operand" "r")]
3795 UNSPEC_UNALIGNED_STORE))]
3796 "unaligned_access"
3797 "str%?\t%1, %0\t@ unaligned"
3798 [(set_attr "predicable" "yes")
3799 (set_attr "type" "store1")])
3800
3801(define_insn "unaligned_storehi"
3802 [(set (match_operand:HI 0 "memory_operand" "=m")
3803 (unspec:HI [(match_operand:HI 1 "s_register_operand" "r")]
3804 UNSPEC_UNALIGNED_STORE))]
3805 "unaligned_access"
3806 "str%(h%)\t%1, %0\t@ unaligned"
3807 [(set_attr "predicable" "yes")
3808 (set_attr "type" "store1")])
3809
3810(define_insn "*extv_reg"
3639 [(set (match_operand:SI 0 "s_register_operand" "=r")3811 [(set (match_operand:SI 0 "s_register_operand" "=r")
3640 (sign_extract:SI (match_operand:SI 1 "s_register_operand" "r")3812 (sign_extract:SI (match_operand:SI 1 "s_register_operand" "r")
3641 (match_operand:SI 2 "const_int_operand" "M")3813 (match_operand:SI 2 "const_int_operand" "M")
36423814
=== modified file 'gcc/config/arm/arm.opt'
--- gcc/config/arm/arm.opt 2010-08-05 15:20:54 +0000
+++ gcc/config/arm/arm.opt 2011-04-13 13:28:18 +0000
@@ -173,3 +173,7 @@
173Target Report Var(fix_cm3_ldrd) Init(2)173Target Report Var(fix_cm3_ldrd) Init(2)
174Avoid overlapping destination and address registers on LDRD instructions174Avoid overlapping destination and address registers on LDRD instructions
175that may trigger Cortex-M3 errata.175that may trigger Cortex-M3 errata.
176
177munaligned-access
178Target Report Var(unaligned_access) Init(2)
179Enable unaligned word and halfword accesses to packed data.
176180
=== modified file 'gcc/config/arm/unwind-arm.c'
--- gcc/config/arm/unwind-arm.c 2010-08-12 12:39:35 +0000
+++ gcc/config/arm/unwind-arm.c 2011-04-13 13:28:18 +0000
@@ -32,13 +32,18 @@
32typedef unsigned char bool;32typedef unsigned char bool;
3333
34typedef struct _ZSt9type_info type_info; /* This names C++ type_info type */34typedef struct _ZSt9type_info type_info; /* This names C++ type_info type */
35enum __cxa_type_match_result
36 {
37 ctm_failed = 0,
38 ctm_succeeded = 1,
39 ctm_succeeded_with_ptr_to_base = 2
40 };
3541
36void __attribute__((weak)) __cxa_call_unexpected(_Unwind_Control_Block *ucbp);42void __attribute__((weak)) __cxa_call_unexpected(_Unwind_Control_Block *ucbp);
37bool __attribute__((weak)) __cxa_begin_cleanup(_Unwind_Control_Block *ucbp);43bool __attribute__((weak)) __cxa_begin_cleanup(_Unwind_Control_Block *ucbp);
38bool __attribute__((weak)) __cxa_type_match(_Unwind_Control_Block *ucbp,44enum __cxa_type_match_result __attribute__((weak)) __cxa_type_match
39 const type_info *rttip,45 (_Unwind_Control_Block *ucbp, const type_info *rttip,
40 bool is_reference,46 bool is_reference, void **matched_object);
41 void **matched_object);
4247
43_Unwind_Ptr __attribute__((weak))48_Unwind_Ptr __attribute__((weak))
44__gnu_Unwind_Find_exidx (_Unwind_Ptr, int *);49__gnu_Unwind_Find_exidx (_Unwind_Ptr, int *);
@@ -1107,6 +1112,7 @@
1107 _uw rtti;1112 _uw rtti;
1108 bool is_reference = (data[0] & uint32_highbit) != 0;1113 bool is_reference = (data[0] & uint32_highbit) != 0;
1109 void *matched;1114 void *matched;
1115 enum __cxa_type_match_result match_type;
11101116
1111 /* Check for no-throw areas. */1117 /* Check for no-throw areas. */
1112 if (data[1] == (_uw) -2)1118 if (data[1] == (_uw) -2)
@@ -1118,17 +1124,31 @@
1118 {1124 {
1119 /* Match a catch specification. */1125 /* Match a catch specification. */
1120 rtti = _Unwind_decode_target2 ((_uw) &data[1]);1126 rtti = _Unwind_decode_target2 ((_uw) &data[1]);
1121 if (!__cxa_type_match (ucbp, (type_info *) rtti,1127 match_type = __cxa_type_match (ucbp,
1122 is_reference,1128 (type_info *) rtti,
1123 &matched))1129 is_reference,
1124 matched = (void *)0;1130 &matched);
1125 }1131 }
1132 else
1133 match_type = ctm_succeeded;
11261134
1127 if (matched)1135 if (match_type)
1128 {1136 {
1129 ucbp->barrier_cache.sp =1137 ucbp->barrier_cache.sp =
1130 _Unwind_GetGR (context, R_SP);1138 _Unwind_GetGR (context, R_SP);
1131 ucbp->barrier_cache.bitpattern[0] = (_uw) matched;1139 // ctm_succeeded_with_ptr_to_base really
1140 // means _c_t_m indirected the pointer
1141 // object. We have to reconstruct the
1142 // additional pointer layer by using a temporary.
1143 if (match_type == ctm_succeeded_with_ptr_to_base)
1144 {
1145 ucbp->barrier_cache.bitpattern[2]
1146 = (_uw) matched;
1147 ucbp->barrier_cache.bitpattern[0]
1148 = (_uw) &ucbp->barrier_cache.bitpattern[2];
1149 }
1150 else
1151 ucbp->barrier_cache.bitpattern[0] = (_uw) matched;
1132 ucbp->barrier_cache.bitpattern[1] = (_uw) data;1152 ucbp->barrier_cache.bitpattern[1] = (_uw) data;
1133 return _URC_HANDLER_FOUND;1153 return _URC_HANDLER_FOUND;
1134 }1154 }
11351155
=== modified file 'gcc/expmed.c'
--- gcc/expmed.c 2011-01-18 19:06:14 +0000
+++ gcc/expmed.c 2011-04-13 13:28:18 +0000
@@ -720,7 +720,7 @@
720 /* On big-endian machines, we count bits from the most significant.720 /* On big-endian machines, we count bits from the most significant.
721 If the bit field insn does not, we must invert. */721 If the bit field insn does not, we must invert. */
722722
723 if (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN)723 if (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN && !MEM_P (xop0))
724 xbitpos = unit - bitsize - xbitpos;724 xbitpos = unit - bitsize - xbitpos;
725725
726 /* We have been counting XBITPOS within UNIT.726 /* We have been counting XBITPOS within UNIT.
@@ -1564,7 +1564,7 @@
15641564
1565 /* On big-endian machines, we count bits from the most significant.1565 /* On big-endian machines, we count bits from the most significant.
1566 If the bit field insn does not, we must invert. */1566 If the bit field insn does not, we must invert. */
1567 if (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN)1567 if (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN && !MEM_P (xop0))
1568 xbitpos = unit - bitsize - xbitpos;1568 xbitpos = unit - bitsize - xbitpos;
15691569
1570 /* Now convert from counting within UNIT to counting in EXT_MODE. */1570 /* Now convert from counting within UNIT to counting in EXT_MODE. */
15711571
=== modified file 'gcc/final.c'
--- gcc/final.c 2011-02-08 10:51:58 +0000
+++ gcc/final.c 2011-04-13 13:28:18 +0000
@@ -2751,6 +2751,12 @@
2751 if (filename == NULL)2751 if (filename == NULL)
2752 return false;2752 return false;
27532753
2754#ifdef HAVE_ATTR_length
2755 /* Prevent duplicate line markers at the same location. */
2756 if (get_attr_length (insn) == 0)
2757 return false;
2758#endif
2759
2754 if (force_source_line2760 if (force_source_line
2755 || filename != last_filename2761 || filename != last_filename
2756 || last_linenum != linenum)2762 || last_linenum != linenum)
27572763
=== modified file 'gcc/ifcvt.c'
--- gcc/ifcvt.c 2011-02-08 12:07:29 +0000
+++ gcc/ifcvt.c 2011-04-13 13:28:18 +0000
@@ -311,6 +311,10 @@
311311
312 for (insn = start; ; insn = NEXT_INSN (insn))312 for (insn = start; ; insn = NEXT_INSN (insn))
313 {313 {
314 /* dwarf2out can't cope with conditional prologues. */
315 if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_PROLOGUE_END)
316 return FALSE;
317
314 if (NOTE_P (insn) || DEBUG_INSN_P (insn))318 if (NOTE_P (insn) || DEBUG_INSN_P (insn))
315 goto insn_done;319 goto insn_done;
316320
317321
=== modified file 'gcc/ipa-pure-const.c'
--- gcc/ipa-pure-const.c 2010-11-15 22:27:24 +0000
+++ gcc/ipa-pure-const.c 2011-04-13 13:28:18 +0000
@@ -422,7 +422,14 @@
422 if (dump_file)422 if (dump_file)
423 fprintf (dump_file, " Volatile stmt is not const/pure\n");423 fprintf (dump_file, " Volatile stmt is not const/pure\n");
424 }424 }
425425
426 if (gimple_has_volatile_ops (stmt))
427 {
428 local->pure_const_state = IPA_NEITHER;
429 if (dump_file)
430 fprintf (dump_file, " Volatile stmt is not const/pure\n");
431 }
432
426 /* Look for loads and stores. */433 /* Look for loads and stores. */
427 walk_stmt_load_store_ops (stmt, local, check_load, check_store);434 walk_stmt_load_store_ops (stmt, local, check_load, check_store);
428435
429436
=== added file 'gcc/testsuite/gcc.c-torture/compile/20110322-1.c'
--- gcc/testsuite/gcc.c-torture/compile/20110322-1.c 1970-01-01 00:00:00 +0000
+++ gcc/testsuite/gcc.c-torture/compile/20110322-1.c 2011-04-13 13:28:18 +0000
@@ -0,0 +1,22 @@
1void asn1_length_der (unsigned long int len, unsigned char *ans, int *ans_len)
2{
3 int k;
4 unsigned char temp[4];
5 if (len < 128) {
6 if (ans != ((void *) 0))
7 ans[0] = (unsigned char) len;
8 *ans_len = 1;
9 } else {
10 k = 0;
11 while (len) {
12 temp[k++] = len & 0xFF;
13 len = len >> 8;
14 }
15 *ans_len = k + 1;
16 if (ans != ((void *) 0)) {
17 ans[0] = ((unsigned char) k & 0x7F) + 128;
18 while (k--)
19 ans[*ans_len - 1 - k] = temp[k];
20 }
21 }
22}
023
=== added file 'gcc/testsuite/gcc.dg/pr47763.c'
--- gcc/testsuite/gcc.dg/pr47763.c 1970-01-01 00:00:00 +0000
+++ gcc/testsuite/gcc.dg/pr47763.c 2011-04-13 13:28:18 +0000
@@ -0,0 +1,9 @@
1/* { dg-do compile } */
2/* { dg-options "-O2 -funroll-loops -fdump-rtl-web" } */
3
4foo()
5{
6}
7
8/* { dg-final { scan-rtl-dump-not "Web oldreg" "web" } } */
9/* { dg-final { cleanup-rtl-dump "web" } } */
010
=== modified file 'gcc/testsuite/lib/target-supports.exp'
--- gcc/testsuite/lib/target-supports.exp 2011-02-22 11:38:56 +0000
+++ gcc/testsuite/lib/target-supports.exp 2011-04-13 13:28:18 +0000
@@ -2722,8 +2722,9 @@
2722 if [info exists et_vector_alignment_reachable_saved] {2722 if [info exists et_vector_alignment_reachable_saved] {
2723 verbose "check_effective_target_vector_alignment_reachable: using cached result" 22723 verbose "check_effective_target_vector_alignment_reachable: using cached result" 2
2724 } else {2724 } else {
2725 if { [check_effective_target_vect_aligned_arrays]2725 if { ([check_effective_target_vect_aligned_arrays]
2726 || [check_effective_target_natural_alignment_32] } {2726 || [check_effective_target_natural_alignment_32])
2727 && !([istarget arm*-*-*] && [check_effective_target_arm_neon]) } {
2727 set et_vector_alignment_reachable_saved 12728 set et_vector_alignment_reachable_saved 1
2728 } else {2729 } else {
2729 set et_vector_alignment_reachable_saved 02730 set et_vector_alignment_reachable_saved 0
27302731
=== modified file 'gcc/tree-ssa-copyrename.c'
--- gcc/tree-ssa-copyrename.c 2011-01-20 10:36:29 +0000
+++ gcc/tree-ssa-copyrename.c 2011-04-13 13:28:18 +0000
@@ -225,6 +225,18 @@
225 ign2 = false;225 ign2 = false;
226 }226 }
227227
228 /* Don't coalesce if the new chosen root variable would be read-only.
229 If both ign1 && ign2, then the root var of the larger partition
230 wins, so reject in that case if any of the root vars is TREE_READONLY.
231 Otherwise reject only if the root var, on which replace_ssa_name_symbol
232 will be called below, is readonly. */
233 if ((TREE_READONLY (root1) && ign2) || (TREE_READONLY (root2) && ign1))
234 {
235 if (debug)
236 fprintf (debug, " : Readonly variable. No coalesce.\n");
237 return false;
238 }
239
228 /* Don't coalesce if the two variables aren't type compatible . */240 /* Don't coalesce if the two variables aren't type compatible . */
229 if (!types_compatible_p (TREE_TYPE (root1), TREE_TYPE (root2))241 if (!types_compatible_p (TREE_TYPE (root1), TREE_TYPE (root2))
230 /* There is a disconnect between the middle-end type-system and242 /* There is a disconnect between the middle-end type-system and
231243
=== modified file 'gcc/web.c'
--- gcc/web.c 2010-01-26 16:27:34 +0000
+++ gcc/web.c 2011-04-13 13:28:18 +0000
@@ -350,7 +350,17 @@
350 FOR_BB_INSNS (bb, insn)350 FOR_BB_INSNS (bb, insn)
351 {351 {
352 unsigned int uid = INSN_UID (insn);352 unsigned int uid = INSN_UID (insn);
353 if (NONDEBUG_INSN_P (insn))353
354 if (NONDEBUG_INSN_P (insn)
355 /* Ignore naked clobber. For example, reg 134 in the second insn
356 of the following sequence will not be replaced.
357
358 (insn (clobber (reg:SI 134)))
359
360 (insn (set (reg:SI 0 r0) (reg:SI 134)))
361
362 Thus the later passes can optimize them away. */
363 && GET_CODE (PATTERN (insn)) != CLOBBER)
354 {364 {
355 df_ref *use_rec;365 df_ref *use_rec;
356 df_ref *def_rec;366 df_ref *def_rec;
357367
=== modified file 'libstdc++-v3/libsupc++/eh_arm.cc'
--- libstdc++-v3/libsupc++/eh_arm.cc 2009-04-09 14:00:19 +0000
+++ libstdc++-v3/libsupc++/eh_arm.cc 2011-04-13 13:28:18 +0000
@@ -30,10 +30,11 @@
30using namespace __cxxabiv1;30using namespace __cxxabiv1;
3131
3232
33// Given the thrown type THROW_TYPE, pointer to a variable containing a33// Given the thrown type THROW_TYPE, exception object UE_HEADER and a
34// pointer to the exception object THROWN_PTR_P and a type CATCH_TYPE to34// type CATCH_TYPE to compare against, return whether or not there is
35// compare against, return whether or not there is a match and if so,35// a match and if so, update *THROWN_PTR_P to point to either the
36// update *THROWN_PTR_P.36// type-matched object, or in the case of a pointer type, the object
37// pointed to by the pointer.
3738
38extern "C" __cxa_type_match_result39extern "C" __cxa_type_match_result
39__cxa_type_match(_Unwind_Exception* ue_header,40__cxa_type_match(_Unwind_Exception* ue_header,
@@ -41,51 +42,51 @@
41 bool is_reference __attribute__((__unused__)),42 bool is_reference __attribute__((__unused__)),
42 void** thrown_ptr_p)43 void** thrown_ptr_p)
43{44{
44 bool forced_unwind = __is_gxx_forced_unwind_class(ue_header->exception_class);45 bool forced_unwind
45 bool foreign_exception = !forced_unwind && !__is_gxx_exception_class(ue_header->exception_class);46 = __is_gxx_forced_unwind_class(ue_header->exception_class);
46 bool dependent_exception =47 bool foreign_exception
47 __is_dependent_exception(ue_header->exception_class);48 = !forced_unwind && !__is_gxx_exception_class(ue_header->exception_class);
49 bool dependent_exception
50 = __is_dependent_exception(ue_header->exception_class);
48 __cxa_exception* xh = __get_exception_header_from_ue(ue_header);51 __cxa_exception* xh = __get_exception_header_from_ue(ue_header);
49 __cxa_dependent_exception *dx = __get_dependent_exception_from_ue(ue_header);52 __cxa_dependent_exception *dx = __get_dependent_exception_from_ue(ue_header);
50 const std::type_info* throw_type;53 const std::type_info* throw_type;
54 void *thrown_ptr = 0;
5155
52 if (forced_unwind)56 if (forced_unwind)
53 throw_type = &typeid(abi::__forced_unwind);57 throw_type = &typeid(abi::__forced_unwind);
54 else if (foreign_exception)58 else if (foreign_exception)
55 throw_type = &typeid(abi::__foreign_exception);59 throw_type = &typeid(abi::__foreign_exception);
56 else if (dependent_exception)
57 throw_type = __get_exception_header_from_obj
58 (dx->primaryException)->exceptionType;
59 else60 else
60 throw_type = xh->exceptionType;61 {
6162 if (dependent_exception)
62 void* thrown_ptr = *thrown_ptr_p;63 xh = __get_exception_header_from_obj (dx->primaryException);
64 throw_type = xh->exceptionType;
65 // We used to require the caller set the target of thrown_ptr_p,
66 // but that's incorrect -- the EHABI makes no such requirement
67 // -- and not all callers will set it. Fortunately callers that
68 // do initialize will always pass us the value we calculate
69 // here, so there's no backwards compatibility problem.
70 thrown_ptr = __get_object_from_ue (ue_header);
71 }
72
73 __cxa_type_match_result result = ctm_succeeded;
6374
64 // Pointer types need to adjust the actual pointer, not75 // Pointer types need to adjust the actual pointer, not
65 // the pointer to pointer that is the exception object.76 // the pointer to pointer that is the exception object.
66 // This also has the effect of passing pointer types77 // This also has the effect of passing pointer types
67 // "by value" through the __cxa_begin_catch return value.78 // "by value" through the __cxa_begin_catch return value.
68 if (throw_type->__is_pointer_p())79 if (throw_type->__is_pointer_p())
69 thrown_ptr = *(void**) thrown_ptr;80 {
81 thrown_ptr = *(void**) thrown_ptr;
82 // We need to indicate the indirection to our caller.
83 result = ctm_succeeded_with_ptr_to_base;
84 }
7085
71 if (catch_type->__do_catch(throw_type, &thrown_ptr, 1))86 if (catch_type->__do_catch(throw_type, &thrown_ptr, 1))
72 {87 {
73 *thrown_ptr_p = thrown_ptr;88 *thrown_ptr_p = thrown_ptr;
7489 return result;
75 if (typeid(*catch_type) == typeid (typeid(void*)))
76 {
77 const __pointer_type_info *catch_pointer_type =
78 static_cast<const __pointer_type_info *> (catch_type);
79 const __pointer_type_info *throw_pointer_type =
80 static_cast<const __pointer_type_info *> (throw_type);
81
82 if (typeid (*catch_pointer_type->__pointee) != typeid (void)
83 && (*catch_pointer_type->__pointee !=
84 *throw_pointer_type->__pointee))
85 return ctm_succeeded_with_ptr_to_base;
86 }
87
88 return ctm_succeeded;
89 }90 }
9091
91 return ctm_failed;92 return ctm_failed;

Subscribers

People subscribed via source and target branches