diff options
| author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-05 10:41:26 +0000 |
|---|---|---|
| committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-05 10:41:26 +0000 |
| commit | a1d50f1d77fcda2c1a299477d44b12760e9c5398 (patch) | |
| tree | 87b2b9db27c89d054c3e05e042bf497e5980fc6b /gcc | |
| parent | dd5e1e90a7625b4b7b641707f1e4593fd5fcd333 (diff) | |
| download | ppe42-gcc-a1d50f1d77fcda2c1a299477d44b12760e9c5398.tar.gz ppe42-gcc-a1d50f1d77fcda2c1a299477d44b12760e9c5398.zip | |
gcc/
* dwarf2out.c (dwarf2out_frame_debug_expr): Record the register
saves in a PARALLEL before the register assignments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121594 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/dwarf2out.c | 28 |
2 files changed, 28 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ad824be9af5..198dee3817b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2007-02-05 Richard Sandiford <richard@codesourcery.com> + * dwarf2out.c (dwarf2out_frame_debug_expr): Record the register + saves in a PARALLEL before the register assignments. + +2007-02-05 Richard Sandiford <richard@codesourcery.com> + * doc/tm.texi (DWARF_ALT_FRAME_RETURN_COLUMN): Do not require DWARF_FRAME_RETURN_COLUMN to be a general register. * dwarf2out.c (init_return_column_size): New function, split from... diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6cbf9d3874d..186c979abb5 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1524,13 +1524,31 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) { int par_index; int limit = XVECLEN (expr, 0); + rtx elem; + + /* PARALLELs have strict read-modify-write semantics, so we + ought to evaluate every rvalue before changing any lvalue. + It's cumbersome to do that in general, but there's an + easy approximation that is enough for all current users: + handle register saves before register assignments. */ + if (GET_CODE (expr) == PARALLEL) + for (par_index = 0; par_index < limit; par_index++) + { + elem = XVECEXP (expr, 0, par_index); + if (GET_CODE (elem) == SET + && MEM_P (SET_DEST (elem)) + && (RTX_FRAME_RELATED_P (elem) || par_index == 0)) + dwarf2out_frame_debug_expr (elem, label); + } for (par_index = 0; par_index < limit; par_index++) - if (GET_CODE (XVECEXP (expr, 0, par_index)) == SET - && (RTX_FRAME_RELATED_P (XVECEXP (expr, 0, par_index)) - || par_index == 0)) - dwarf2out_frame_debug_expr (XVECEXP (expr, 0, par_index), label); - + { + elem = XVECEXP (expr, 0, par_index); + if (GET_CODE (elem) == SET + && (!MEM_P (SET_DEST (elem)) || GET_CODE (expr) == SEQUENCE) + && (RTX_FRAME_RELATED_P (elem) || par_index == 0)) + dwarf2out_frame_debug_expr (elem, label); + } return; } |

