summaryrefslogtreecommitdiff
path: root/gcc/targhooks.c
diff options
context:
space:
mode:
authorJozef Lawrynowicz <jozef.l@mittosystems.com>2018-11-16 23:53:30 +0000
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>2018-11-16 23:53:30 +0000
commitcac6691c1375ea292e430d2c5780ebd3372f5f66 (patch)
tree26e6b0d4664cd6bc308e5010c9c81781e26aaebe /gcc/targhooks.c
parent8808260dfd1f7f25e7464bcf8006235677830672 (diff)
re PR target/87927 (ICE: segmentation fault with patchable_function_entry attribute for msp430-elf -mlarge)
2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com> PR target/87927 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP. Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs. * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in the byte_op hook. * target.h: Add psi, pdi, pti to struct asm_int_op definition. * targhooks.c (default_print_patchable_function_entry): Assert asm_int_op does not return a NULL string. * varasm.c (integer_asm_op): Return the op for a partial int type when the requested size does not correspond to an integer type. * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP. * doc/tm.texi: Regenerate. From-SVN: r266226
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r--gcc/targhooks.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index bcbd534e32d..41ccffe8645 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1807,13 +1807,15 @@ default_print_patchable_function_entry (FILE *file,
char buf[256];
static int patch_area_number;
section *previous_section = in_section;
+ const char *asm_op = integer_asm_op (POINTER_SIZE_UNITS, false);
+ gcc_assert (asm_op != NULL);
patch_area_number++;
ASM_GENERATE_INTERNAL_LABEL (buf, "LPFE", patch_area_number);
switch_to_section (get_section ("__patchable_function_entries",
0, NULL));
- fputs (integer_asm_op (POINTER_SIZE_UNITS, false), file);
+ fputs (asm_op, file);
assemble_name_raw (file, buf);
fputc ('\n', file);