re PR target/61223 (libstdc++ build fail due to pop lr register)

2014-05-20  Alexey Merzlyakov  <alexey.merzlyakov@samsung.com>

	PR libstdc++/61223
	Revert:
	2014-05-16  Alexey Merzlyakov  <alexey.merzlyakov@samsung.com>

	PR libstdc++/60758
	* libsupc++/eh_arm.cc (__cxa_end_cleanup): Change r4 to lr in save/restore
	and add unwind directives.

From-SVN: r210650
This commit is contained in:
Alexey Merzlyakov 2014-05-20 17:25:26 +00:00 committed by Yury Gribov
parent 7eab31edf2
commit a852a67c02
2 changed files with 15 additions and 11 deletions

View File

@ -1,3 +1,13 @@
2014-05-20 Alexey Merzlyakov <alexey.merzlyakov@samsung.com>
PR libstdc++/61223
Revert:
2014-05-16 Alexey Merzlyakov <alexey.merzlyakov@samsung.com>
PR libstdc++/60758
* libsupc++/eh_arm.cc (__cxa_end_cleanup): Change r4 to lr in save/restore
and add unwind directives.
2014-05-20 Sebastian Huber <sebastian.huber@embedded-brains.de>
* testsuite/lib/libstdc++.exp (load_gcc_lib): Register loaded libs.

View File

@ -199,33 +199,27 @@ asm (".global __cxa_end_cleanup\n"
" nop 5\n");
#else
// Assembly wrapper to call __gnu_end_cleanup without clobbering r1-r3.
// Also push lr to preserve stack alignment and to allow backtracing.
// Also push r4 to preserve stack alignment.
#ifdef __thumb__
asm (" .pushsection .text.__cxa_end_cleanup\n"
" .global __cxa_end_cleanup\n"
" .type __cxa_end_cleanup, \"function\"\n"
" .thumb_func\n"
"__cxa_end_cleanup:\n"
" .fnstart\n"
" push\t{r1, r2, r3, lr}\n"
" .save\t{r1, r2, r3, lr}\n"
" push\t{r1, r2, r3, r4}\n"
" bl\t__gnu_end_cleanup\n"
" pop\t{r1, r2, r3, lr}\n"
" pop\t{r1, r2, r3, r4}\n"
" bl\t_Unwind_Resume @ Never returns\n"
" .fnend\n"
" .popsection\n");
#else
asm (" .pushsection .text.__cxa_end_cleanup\n"
" .global __cxa_end_cleanup\n"
" .type __cxa_end_cleanup, \"function\"\n"
"__cxa_end_cleanup:\n"
" .fnstart\n"
" stmfd\tsp!, {r1, r2, r3, lr}\n"
" .save\t{r1, r2, r3, lr}\n"
" stmfd\tsp!, {r1, r2, r3, r4}\n"
" bl\t__gnu_end_cleanup\n"
" ldmfd\tsp!, {r1, r2, r3, lr}\n"
" ldmfd\tsp!, {r1, r2, r3, r4}\n"
" bl\t_Unwind_Resume @ Never returns\n"
" .fnend\n"
" .popsection\n");
#endif
#endif