"Moore, Catherine" <catherine_mo...@mentor.com> writes: > Hi Richard, > > I updated this patch using your suggestions. I'm having a problem > though, that I'm having trouble nailing. Building libstdc++ for > microMIPS is failing trying to generate dwarf2 CFI info: > > _Unwind_Ptr base_of_encoded_value(unsigned char, _Unwind_Context*) > Analyzing compilation unit > Performing interprocedural optimizations > <*free_lang_data> <visibility> <early_local_cleanups> <*free_inline_summary> > <whole-program> <profile_estimate> <cp> <inline> <pure-const> > <static-var>Assembling functions: > _Unwind_Ptr base_of_encoded_value(unsigned char, _Unwind_Context*) > mm.cc: In function '_Unwind_Ptr base_of_encoded_value(unsigned char, > _Unwind_Context*)': > mm.cc:34:1: internal compiler error: in maybe_record_trace_start, at > dwarf2cfi.c:2209 > 0x8570656 maybe_record_trace_start > /scratch/cmoore/umips-elf/src/gcc-4.7-2012.09/gcc/dwarf2cfi.c:2209 > 0x857113f create_trace_edges > /scratch/cmoore/umips-elf/src/gcc-4.7-2012.09/gcc/dwarf2cfi.c:2301 > 0x8572505 scan_trace > /scratch/cmoore/umips-elf/src/gcc-4.7-2012.09/gcc/dwarf2cfi.c:2514 > 0x85726b3 create_cfi_notes > /scratch/cmoore/umips-elf/src/gcc-4.7-2012.09/gcc/dwarf2cfi.c:2540 > 0x8572703 execute_dwarf2_frame > /scratch/cmoore/umips-elf/src/gcc-4.7-2012.09/gcc/dwarf2cfi.c:2897 > Please submit a full bug report, > with preprocessed source if appropriate. > Please include the complete backtrace with any bug report. > See <https://support.codesourcery.com/GNUToolchain/> for instructions. > > I've attached a testcase hoping that you might have some ideas. I > plan to keep debugging in the meanwhile. I was able to reproduce with > ./cc1plus -mmicromips -Os mm.ii.
Ah, sorry, I expect it should be: mips_epilogue_set_cfa (stack_pointer_rtx, 0); instead of: mips_epilogue_emit_cfa_restores (); It would probably be better to call mips_epilogue_set_cfa immediately after emitting the jraddiusp, if that works (in which case making the assert conditional is OK). Richard