comparison gcc/config/stormy16/stormy16.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* Xstormy16 target functions. 1 /* Xstormy16 target functions.
2 Copyright (C) 1997-2017 Free Software Foundation, Inc. 2 Copyright (C) 1997-2018 Free Software Foundation, Inc.
3 Contributed by Red Hat, Inc. 3 Contributed by Red Hat, Inc.
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify 7 GCC is free software; you can redistribute it and/or modify
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see 18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */ 19 <http://www.gnu.org/licenses/>. */
20
21 #define IN_TARGET_CODE 1
20 22
21 #include "config.h" 23 #include "config.h"
22 #include "system.h" 24 #include "system.h"
23 #include "coretypes.h" 25 #include "coretypes.h"
24 #include "backend.h" 26 #include "backend.h"
2187 static tree xstormy16_handle_below100_attribute 2189 static tree xstormy16_handle_below100_attribute
2188 (tree *, tree, tree, int, bool *); 2190 (tree *, tree, tree, int, bool *);
2189 2191
2190 static const struct attribute_spec xstormy16_attribute_table[] = 2192 static const struct attribute_spec xstormy16_attribute_table[] =
2191 { 2193 {
2192 /* name, min_len, max_len, decl_req, type_req, fn_type_req, handler, 2194 /* name, min_len, max_len, decl_req, type_req, fn_type_req,
2193 affects_type_identity. */ 2195 affects_type_identity, handler, exclude. */
2194 { "interrupt", 0, 0, false, true, true, 2196 { "interrupt", 0, 0, false, true, true, false,
2195 xstormy16_handle_interrupt_attribute , false }, 2197 xstormy16_handle_interrupt_attribute, NULL },
2196 { "BELOW100", 0, 0, false, false, false, 2198 { "BELOW100", 0, 0, false, false, false, false,
2197 xstormy16_handle_below100_attribute, false }, 2199 xstormy16_handle_below100_attribute, NULL },
2198 { "below100", 0, 0, false, false, false, 2200 { "below100", 0, 0, false, false, false, false,
2199 xstormy16_handle_below100_attribute, false }, 2201 xstormy16_handle_below100_attribute, NULL },
2200 { NULL, 0, 0, false, false, false, NULL, false } 2202 { NULL, 0, 0, false, false, false, false, NULL, NULL }
2201 }; 2203 };
2202 2204
2203 /* Handle an "interrupt" attribute; 2205 /* Handle an "interrupt" attribute;
2204 arguments as in struct attribute_spec.handler. */ 2206 arguments as in struct attribute_spec.handler. */
2205 2207
2631 static bool 2633 static bool
2632 xstormy16_modes_tieable_p (machine_mode mode1, machine_mode mode2) 2634 xstormy16_modes_tieable_p (machine_mode mode1, machine_mode mode2)
2633 { 2635 {
2634 return mode1 != BImode && mode2 != BImode; 2636 return mode1 != BImode && mode2 != BImode;
2635 } 2637 }
2638
2639 /* Implement PUSH_ROUNDING. */
2640
2641 poly_int64
2642 xstormy16_push_rounding (poly_int64 bytes)
2643 {
2644 return (bytes + 1) & ~1;
2645 }
2636 2646
2637 #undef TARGET_ASM_ALIGNED_HI_OP 2647 #undef TARGET_ASM_ALIGNED_HI_OP
2638 #define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t" 2648 #define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
2639 #undef TARGET_ASM_ALIGNED_SI_OP 2649 #undef TARGET_ASM_ALIGNED_SI_OP
2640 #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t" 2650 #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
2716 #define TARGET_MODES_TIEABLE_P xstormy16_modes_tieable_p 2726 #define TARGET_MODES_TIEABLE_P xstormy16_modes_tieable_p
2717 2727
2718 #undef TARGET_CONSTANT_ALIGNMENT 2728 #undef TARGET_CONSTANT_ALIGNMENT
2719 #define TARGET_CONSTANT_ALIGNMENT constant_alignment_word_strings 2729 #define TARGET_CONSTANT_ALIGNMENT constant_alignment_word_strings
2720 2730
2731 #undef TARGET_HAVE_SPECULATION_SAFE_VALUE
2732 #define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed
2733
2721 struct gcc_target targetm = TARGET_INITIALIZER; 2734 struct gcc_target targetm = TARGET_INITIALIZER;
2722 2735
2723 #include "gt-stormy16.h" 2736 #include "gt-stormy16.h"