diff options
| author | Mark Hatle <mark.hatle@kernel.crashing.org> | 2022-07-28 21:58:26 -0500 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@kernel.crashing.org> | 2022-09-01 09:53:21 -0500 |
| commit | 8ea75cc272182dbda8c3ac9daaed2d85f0546030 (patch) | |
| tree | f4c5ea1906fb202fe6998a93309b313cf91fb596 /meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch | |
| parent | 989c29f50ed005c5b6de0e3f57f0037460563ae8 (diff) | |
| download | meta-xilinx-8ea75cc272182dbda8c3ac9daaed2d85f0546030.tar.gz | |
meta-microblaze: Move to gcc-12 to match OE-Core
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Diffstat (limited to 'meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch')
| -rw-r--r-- | meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch new file mode 100644 index 00000000..293a7486 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | From b0ea0d18d1b353421ef7e18d496fd505cb1d5f7d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
| 3 | Date: Wed, 28 Apr 2021 16:49:18 +0530 | ||
| 4 | Subject: [PATCH 52/53] [Patch,MicroBlaze] : If we use break_handler attribute | ||
| 5 | then interrupt vector call happened to break_handler instead of | ||
| 6 | interrupt_handler. this fix will resolve the issue CR-1081780 This fix will | ||
| 7 | not change the behavior of compiler unless there is a usage of break_handler | ||
| 8 | attribute. | ||
| 9 | |||
| 10 | --- | ||
| 11 | gcc/config/microblaze/microblaze.c | 13 +++++-------- | ||
| 12 | 1 file changed, 5 insertions(+), 8 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c | ||
| 15 | index 6914eb8380c..d0546a164d7 100644 | ||
| 16 | --- a/gcc/config/microblaze/microblaze.c | ||
| 17 | +++ b/gcc/config/microblaze/microblaze.c | ||
| 18 | @@ -2019,7 +2019,7 @@ microblaze_save_volatiles (tree func) | ||
| 19 | int | ||
| 20 | microblaze_is_interrupt_variant (void) | ||
| 21 | { | ||
| 22 | - return (interrupt_handler || fast_interrupt); | ||
| 23 | + return (interrupt_handler || fast_interrupt || break_handler); | ||
| 24 | } | ||
| 25 | int | ||
| 26 | microblaze_is_break_handler (void) | ||
| 27 | @@ -2058,7 +2058,7 @@ microblaze_must_save_register (int regno) | ||
| 28 | { | ||
| 29 | if (df_regs_ever_live_p (regno) | ||
| 30 | || regno == MB_ABI_MSR_SAVE_REG | ||
| 31 | - || ((interrupt_handler || fast_interrupt) | ||
| 32 | + || ((interrupt_handler || fast_interrupt || break_handler) | ||
| 33 | && (regno == MB_ABI_ASM_TEMP_REGNUM | ||
| 34 | || regno == MB_ABI_EXCEPTION_RETURN_ADDR_REGNUM))) | ||
| 35 | return 1; | ||
| 36 | @@ -2274,9 +2274,6 @@ compute_frame_size (HOST_WIDE_INT size) | ||
| 37 | fast_interrupt = | ||
| 38 | microblaze_fast_interrupt_function_p (current_function_decl); | ||
| 39 | save_volatiles = microblaze_save_volatiles (current_function_decl); | ||
| 40 | - if (break_handler) | ||
| 41 | - interrupt_handler = break_handler; | ||
| 42 | - | ||
| 43 | gp_reg_size = 0; | ||
| 44 | mask = 0; | ||
| 45 | var_size = size; | ||
| 46 | @@ -3236,7 +3233,7 @@ microblaze_expand_prologue (void) | ||
| 47 | gen_rtx_PLUS (Pmode, stack_pointer_rtx, | ||
| 48 | const0_rtx)); | ||
| 49 | |||
| 50 | - if (interrupt_handler) | ||
| 51 | + if (interrupt_handler || break_handler) | ||
| 52 | /* Do not optimize in flow analysis. */ | ||
| 53 | MEM_VOLATILE_P (mem_rtx) = 1; | ||
| 54 | |||
| 55 | @@ -3347,12 +3344,12 @@ microblaze_expand_epilogue (void) | ||
| 56 | a load-use stall cycle :) This is also important to handle alloca. | ||
| 57 | (See comments for if (frame_pointer_needed) below. */ | ||
| 58 | |||
| 59 | - if (!crtl->is_leaf || interrupt_handler) | ||
| 60 | + if (!crtl->is_leaf || interrupt_handler || break_handler) | ||
| 61 | { | ||
| 62 | mem_rtx = | ||
| 63 | gen_rtx_MEM (Pmode, | ||
| 64 | gen_rtx_PLUS (Pmode, stack_pointer_rtx, const0_rtx)); | ||
| 65 | - if (interrupt_handler) | ||
| 66 | + if (interrupt_handler || break_handler) | ||
| 67 | /* Do not optimize in flow analysis. */ | ||
| 68 | MEM_VOLATILE_P (mem_rtx) = 1; | ||
| 69 | reg_rtx = gen_rtx_REG (Pmode, MB_ABI_SUB_RETURN_ADDR_REGNUM); | ||
| 70 | -- | ||
| 71 | 2.17.1 | ||
| 72 | |||
