Commit a2ccd780 by Nagaraju Mekala Committed by Jeff Law

Microblaze: Fixed missing save of r18 in fast_interrupt. Register 18 is used as…

Microblaze: Fixed missing save of r18 in fast_interrupt. Register 18 is used as a clobber register, and must be stored when entering a fast_interrupt. Before this fix, register 18 was only saved if it was used directly in the interrupt function.

    However, if the fast_interrupt function called a function that used
    r18, the register would not be saved, and thus be mangled
    upon returning from the interrupt.

	* config/microblaze/microblaze.c (microblaze_must_save_register): Check
	for fast_interrupt.
parent 971c3d0e
2020-04-05 Nagaraju Mekala <nmekala@xilix.com>
* gcc/config/microblaze/microblaze.md (trap): Update output pattern.
* gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
(dg-final): update in the scan-assembler instruction
* config/microblaze/microblaze.c (microblaze_must_save_register): Check
for fast_interrupt.
* config/microblaze/microblaze.md (trap): Update output pattern.
2020-04-04 Hannes Domani <ssbssa@yahoo.de>
Jakub Jelinek <jakub@redhat.com>
......
......@@ -2035,7 +2035,7 @@ microblaze_must_save_register (int regno)
{
if (df_regs_ever_live_p (regno)
|| regno == MB_ABI_MSR_SAVE_REG
|| (interrupt_handler
|| ((interrupt_handler || fast_interrupt)
&& (regno == MB_ABI_ASM_TEMP_REGNUM
|| regno == MB_ABI_EXCEPTION_RETURN_ADDR_REGNUM)))
return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment