This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Committed, MMIX: correct EH info, fixing g++.old-deja/g++.other/eh3.C
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 29 Mar 2002 12:09:15 -0500 (EST)
- Subject: Committed, MMIX: correct EH info, fixing g++.old-deja/g++.other/eh3.C
Fixes g++.other/eh3.C execution. Will commit this to 3.1 too.
The unwind info can be further simplified, but I'm saving that
for when switching to emitting RTL for prologue and epilogue.
* config/mmix/mmix.c (mmix_target_asm_function_prologue): Correct
unwind information when frame_pointer_needed.
(mmix_assemble_integer): Tweak wording in comment.
Index: mmix.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.c,v
retrieving revision 1.22
diff -p -c -r1.22 mmix.c
*** mmix.c 2002/03/11 10:44:27 1.22
--- mmix.c 2002/03/29 15:45:57
*************** mmix_target_asm_function_prologue (strea
*** 734,741 ****
setting; they don't accumulate. We must keep track
of the offset ourselves. */
cfa_offset += stack_chunk;
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
! cfa_offset);
}
offset += stack_chunk;
stack_space_to_allocate -= stack_chunk;
--- 734,742 ----
setting; they don't accumulate. We must keep track
of the offset ourselves. */
cfa_offset += stack_chunk;
! if (!frame_pointer_needed)
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
! cfa_offset);
}
offset += stack_chunk;
stack_space_to_allocate -= stack_chunk;
*************** mmix_target_asm_function_prologue (strea
*** 768,778 ****
reg_names[MMIX_STACK_POINTER_REGNUM],
stack_chunk);
if (doing_dwarf)
! {
! cfa_offset += stack_chunk;
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
! cfa_offset);
! }
offset += stack_chunk;
stack_space_to_allocate -= stack_chunk;
}
--- 769,775 ----
reg_names[MMIX_STACK_POINTER_REGNUM],
stack_chunk);
if (doing_dwarf)
! cfa_offset += stack_chunk;
offset += stack_chunk;
stack_space_to_allocate -= stack_chunk;
}
*************** mmix_target_asm_function_prologue (strea
*** 785,793 ****
reg_names[MMIX_STACK_POINTER_REGNUM],
offset + 8);
if (doing_dwarf)
! dwarf2out_reg_save ("", MMIX_FRAME_POINTER_REGNUM,
! -cfa_offset + offset);
offset -= 8;
}
--- 782,800 ----
reg_names[MMIX_STACK_POINTER_REGNUM],
offset + 8);
if (doing_dwarf)
! {
! /* If we're using the frame-pointer, then we just need this CFA
! definition basing on that value (often equal to the CFA).
! Further changes to the stack-pointer do not affect the
! frame-pointer, so we conditionalize them below on
! !frame_pointer_needed. */
! dwarf2out_def_cfa ("", MMIX_FRAME_POINTER_REGNUM,
! -cfa_offset + offset + 8);
+ dwarf2out_reg_save ("", MMIX_FRAME_POINTER_REGNUM,
+ -cfa_offset + offset);
+ }
+
offset -= 8;
}
*************** mmix_target_asm_function_prologue (strea
*** 811,818 ****
if (doing_dwarf)
{
cfa_offset += stack_chunk;
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
! cfa_offset);
}
offset += stack_chunk;
stack_space_to_allocate -= stack_chunk;
--- 818,826 ----
if (doing_dwarf)
{
cfa_offset += stack_chunk;
! if (!frame_pointer_needed)
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
! cfa_offset);
}
offset += stack_chunk;
stack_space_to_allocate -= stack_chunk;
*************** mmix_target_asm_function_prologue (strea
*** 850,856 ****
if (doing_dwarf)
{
cfa_offset += stack_chunk;
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
cfa_offset);
}
}
--- 858,865 ----
if (doing_dwarf)
{
cfa_offset += stack_chunk;
! if (!frame_pointer_needed)
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
cfa_offset);
}
}
*************** mmix_target_asm_function_prologue (strea
*** 910,917 ****
if (doing_dwarf)
{
cfa_offset += stack_chunk;
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
! cfa_offset);
}
}
else
--- 919,927 ----
if (doing_dwarf)
{
cfa_offset += stack_chunk;
! if (!frame_pointer_needed)
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
! cfa_offset);
}
}
else
*************** mmix_target_asm_function_prologue (strea
*** 925,932 ****
if (doing_dwarf)
{
cfa_offset += stack_chunk;
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
! cfa_offset);
}
}
--- 935,943 ----
if (doing_dwarf)
{
cfa_offset += stack_chunk;
! if (!frame_pointer_needed)
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
! cfa_offset);
}
}
*************** mmix_target_asm_function_prologue (strea
*** 965,972 ****
if (doing_dwarf)
{
cfa_offset += stack_space_to_allocate;
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
! cfa_offset);
}
}
--- 976,984 ----
if (doing_dwarf)
{
cfa_offset += stack_space_to_allocate;
! if (!frame_pointer_needed)
! dwarf2out_def_cfa ("", MMIX_STACK_POINTER_REGNUM,
! cfa_offset);
}
}
*************** mmix_assemble_integer (x, size, aligned_
*** 1913,1925 ****
{
/* We handle a limited number of types of operands in here. But
that's ok, because we can punt to generic functions. We then
! pretend that we don't emit aligned data is needed, so the usual
! .pseudo syntax is used (which work for aligned data too). We
! actually *must* do that, since we say we don't have simple
! aligned pseudos, causing this function to be called. We just
! try and keep as much compatibility as possible with mmixal
! syntax for normal cases (i.e. without GNU extensions and C
! only). */
case 1:
if (GET_CODE (x) != CONST_INT)
{
--- 1925,1936 ----
{
/* We handle a limited number of types of operands in here. But
that's ok, because we can punt to generic functions. We then
! pretend that aligned data isn't needed, so the usual .<pseudo>
! syntax is used (which works for aligned data too). We actually
! *must* do that, since we say we don't have simple aligned
! pseudos, causing this function to be called. We just try and
! keep as much compatibility as possible with mmixal syntax for
! normal cases (i.e. without GNU extensions and C only). */
case 1:
if (GET_CODE (x) != CONST_INT)
{
brgds, H-P