2009-04-02 Chao-ying Fu <fu@mips.com> James Grosbach <james.grosbach@microchip.com> * config/mips/mips.c (mips_frame_info): Add acc_mask, num_acc, num_cop0_regs, acc_save_offset, cop0_save_offset, acc_sp_offset, cop0_sp_offset. (machine_function): Add interrupt_handler_p, use_shadow_register_set_p, keep_interrupts_masked_p, use_debug_exception_return_p. (mips_attribute_table): Add interrupt, use_shadow_register_set, keep_interrupts_masked, use_debug_exception_return. (mips_interrupt_type_p, mips_use_shadow_register_set_p, mips_keep_interrupts_masked_p, mips_use_debug_exception_return_p): New functions. (mips_function_ok_for_sibcall): Return false for interrupt handlers. (mips_print_operand): Process COP0 registers to print $0 .. $31 correctly for GAS to process. (mips_interrupt_extra_call_saved_reg_p): New function. (mips_cfun_call_saved_reg_p): For interrupt handlers, we need to check extra registers. (mips_cfun_might_clobber_call_saved_reg_p): Likewise. (mips_compute_frame_info): Add supports for interrupt context that includes doubleword accumulators and COP0 registers. (mips_for_each_saved_acc): New function. (mips_for_each_saved_gpr_and_fpr): Change the function name from mips_for_each_saved_reg. (mips_save_reg): Save accumulators. (mips_kernel_reg_p): A new for_each_rtx callback. (mips_expand_prologue): Support interrupt handlers. (mips_restore_reg): Restore accumulators. (mips_expand_epilogue): Support interrupt handlers. (mips_can_use_return_insn): Return false for interrupt handlers. (mips_epilogue_uses): New function. * config/mips/mips.md (UNSPEC_ERET, UNSPEC_DERET, UNSPEC_DI, UNSPEC_EHB, UNSPEC_RDPGPR, UNSPEC_COP0): New UNSPEC. (mips_eret, mips_deret, mips_di, mips_ehb, mips_rdpgpr, cop0_move): New instructions. * config/mips/mips-protos.h (mips_epilogue_uses): Declare. * config/mips/mips.h (K0_REG_NUM, K1_REG_NUM, KERNEL_REG_P): New defines. (COP0_STATUS_REG_NUM, COP0_CAUSE_REG_NUM, COP0_EPC_REG_NUM): New defines. (CAUSE_IPL, SR_IPL, SR_EXL, SR_IE): New defines. (MIPS_PROLOGUE_TEMP_REGNUM, MIPS_EPILOGUE_TEMP_REGNUM): For interrupt handlers, we use K0 as the temporary register. (EPILOGUE_USES): Change to a function call. * config/mips/sde.h (MIPS_EPILOGUE_TEMP_REGNUM): For interrupt handlers, we use K0 as the temporary register. * doc/extend.texi (Function Attributes): Document interrupt, use_shadow_register_set, keep_interrupts_masked, use_debug_exception_return for MIPS attributes. Co-Authored-By: James Grosbach <james.grosbach@microchip.com> From-SVN: r145481
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| alpha | Loading commit data... | |
| arc | Loading commit data... | |
| arm | Loading commit data... | |
| avr | Loading commit data... | |
| bfin | Loading commit data... | |
| cris | Loading commit data... | |
| crx | Loading commit data... | |
| fr30 | Loading commit data... | |
| frv | Loading commit data... | |
| h8300 | Loading commit data... | |
| i386 | Loading commit data... | |
| ia64 | Loading commit data... | |
| iq2000 | Loading commit data... | |
| m32c | Loading commit data... | |
| m32r | Loading commit data... | |
| m68hc11 | Loading commit data... | |
| m68k | Loading commit data... | |
| mcore | Loading commit data... | |
| mips | Loading commit data... | |
| mmix | Loading commit data... | |
| mn10300 | Loading commit data... | |
| pa | Loading commit data... | |
| pdp11 | Loading commit data... | |
| picochip | Loading commit data... | |
| rs6000 | Loading commit data... | |
| s390 | Loading commit data... | |
| score | Loading commit data... | |
| sh | Loading commit data... | |
| soft-fp | Loading commit data... | |
| sparc | Loading commit data... | |
| spu | Loading commit data... | |
| stormy16 | Loading commit data... | |
| v850 | Loading commit data... | |
| vax | Loading commit data... | |
| xtensa | Loading commit data... | |
| README | Loading commit data... | |
| darwin-64.c | Loading commit data... | |
| darwin-c.c | Loading commit data... | |
| darwin-crt2.c | Loading commit data... | |
| darwin-crt3.c | Loading commit data... | |
| darwin-driver.c | Loading commit data... | |
| darwin-f.c | Loading commit data... | |
| darwin-ppc-ldouble-patch.def | Loading commit data... | |
| darwin-protos.h | Loading commit data... | |
| darwin-sections.def | Loading commit data... | |
| darwin.c | Loading commit data... | |
| darwin.h | Loading commit data... | |
| darwin.opt | Loading commit data... | |
| darwin9.h | Loading commit data... | |
| dbx.h | Loading commit data... | |
| dbxcoff.h | Loading commit data... | |
| dbxelf.h | Loading commit data... | |
| dfp-bit.c | Loading commit data... | |
| dfp-bit.h | Loading commit data... | |
| divmod.c | Loading commit data... | |
| elfos.h | Loading commit data... | |
| fixed-bit.c | Loading commit data... | |
| fixed-bit.h | Loading commit data... | |
| flat.h | Loading commit data... | |
| floatunsidf.c | Loading commit data... | |
| floatunsisf.c | Loading commit data... | |
| floatunsitf.c | Loading commit data... | |
| floatunsixf.c | Loading commit data... | |
| fp-bit.c | Loading commit data... | |
| fp-bit.h | Loading commit data... | |
| freebsd-nthr.h | Loading commit data... | |
| freebsd-spec.h | Loading commit data... | |
| freebsd.h | Loading commit data... | |
| glibc-stdint.h | Loading commit data... | |
| gnu.h | Loading commit data... | |
| gofast.h | Loading commit data... | |
| host-darwin.c | Loading commit data... | |
| host-darwin.h | Loading commit data... | |
| host-hpux.c | Loading commit data... | |
| host-linux.c | Loading commit data... | |
| host-solaris.c | Loading commit data... | |
| interix.h | Loading commit data... | |
| interix3.h | Loading commit data... | |
| kfreebsd-gnu.h | Loading commit data... | |
| knetbsd-gnu.h | Loading commit data... | |
| kopensolaris-gnu.h | Loading commit data... | |
| libgcc-glibc.ver | Loading commit data... | |
| linux.h | Loading commit data... | |
| linux.opt | Loading commit data... | |
| lynx.h | Loading commit data... | |
| lynx.opt | Loading commit data... | |
| memcmp.c | Loading commit data... | |
| memcpy.c | Loading commit data... | |
| memmove.c | Loading commit data... | |
| memset.c | Loading commit data... | |
| netbsd-aout.h | Loading commit data... | |
| netbsd-elf.h | Loading commit data... | |
| netbsd.h | Loading commit data... | |
| newlib-stdint.h | Loading commit data... | |
| openbsd-oldgas.h | Loading commit data... | |
| openbsd.h | Loading commit data... | |
| rtems.h | Loading commit data... | |
| sol2-10.h | Loading commit data... | |
| sol2-c.c | Loading commit data... | |
| sol2-protos.h | Loading commit data... | |
| sol2.c | Loading commit data... | |
| sol2.h | Loading commit data... | |
| svr3.h | Loading commit data... | |
| svr4.h | Loading commit data... | |
| sync.c | Loading commit data... | |
| t-darwin | Loading commit data... | |
| t-dfprules | Loading commit data... | |
| t-freebsd | Loading commit data... | |
| t-freebsd-thread | Loading commit data... | |
| t-gnu | Loading commit data... | |
| t-libc-ok | Loading commit data... | |
| t-libgcc-pic | Loading commit data... | |
| t-libunwind | Loading commit data... | |
| t-libunwind-elf | Loading commit data... | |
| t-linux | Loading commit data... | |
| t-lynx | Loading commit data... | |
| t-netbsd | Loading commit data... | |
| t-openbsd | Loading commit data... | |
| t-openbsd-thread | Loading commit data... | |
| t-rtems | Loading commit data... | |
| t-slibgcc-darwin | Loading commit data... | |
| t-slibgcc-elf-ver | Loading commit data... | |
| t-slibgcc-nolc-override | Loading commit data... | |
| t-slibgcc-sld | Loading commit data... | |
| t-sol2 | Loading commit data... | |
| t-svr4 | Loading commit data... | |
| t-vxworks | Loading commit data... | |
| tm-dwarf2.h | Loading commit data... | |
| udivmod.c | Loading commit data... | |
| udivmodsi4.c | Loading commit data... | |
| usegas.h | Loading commit data... | |
| vx-common.h | Loading commit data... | |
| vxlib-tls.c | Loading commit data... | |
| vxlib.c | Loading commit data... | |
| vxworks-dummy.h | Loading commit data... | |
| vxworks.c | Loading commit data... | |
| vxworks.h | Loading commit data... | |
| vxworks.opt | Loading commit data... | |
| vxworksae.h | Loading commit data... | |
| x-cflags-O1 | Loading commit data... | |
| x-darwin | Loading commit data... | |
| x-hpux | Loading commit data... | |
| x-linux | Loading commit data... | |
| x-solaris | Loading commit data... |