Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/mmix/mmix.h @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | b7f97abdc517 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
1 /* Definitions of target machine for GNU compiler, for MMIX. | 1 /* Definitions of target machine for GNU compiler, for MMIX. |
2 Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007, 2008 | 2 Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007, 2008, 2009 |
3 Free Software Foundation, Inc. | 3 Free Software Foundation, Inc. |
4 Contributed by Hans-Peter Nilsson (hp@bitrange.com) | 4 Contributed by Hans-Peter Nilsson (hp@bitrange.com) |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
79 #endif | 79 #endif |
80 | 80 |
81 #define MMIX_FUNCTION_ARG_SIZE(MODE, TYPE) \ | 81 #define MMIX_FUNCTION_ARG_SIZE(MODE, TYPE) \ |
82 ((MODE) != BLKmode ? GET_MODE_SIZE (MODE) : int_size_in_bytes (TYPE)) | 82 ((MODE) != BLKmode ? GET_MODE_SIZE (MODE) : int_size_in_bytes (TYPE)) |
83 | 83 |
84 /* Declarations for helper variables that are not tied to a particular | |
85 target macro. */ | |
86 extern GTY(()) rtx mmix_compare_op0; | |
87 extern GTY(()) rtx mmix_compare_op1; | |
88 | |
89 /* Per-function machine data. This is normally an opaque type just | 84 /* Per-function machine data. This is normally an opaque type just |
90 defined and used in the tm.c file, but we need to see the definition in | 85 defined and used in the tm.c file, but we need to see the definition in |
91 mmix.md too. */ | 86 mmix.md too. */ |
92 struct machine_function GTY(()) | 87 struct GTY(()) machine_function |
93 { | 88 { |
94 int has_landing_pad; | 89 int has_landing_pad; |
95 int highest_saved_stack_register; | 90 int highest_saved_stack_register; |
96 int in_prologue; | 91 int in_prologue; |
97 }; | 92 }; |
184 #define BITS_BIG_ENDIAN 0 | 179 #define BITS_BIG_ENDIAN 0 |
185 #define BYTES_BIG_ENDIAN 1 | 180 #define BYTES_BIG_ENDIAN 1 |
186 #define WORDS_BIG_ENDIAN 1 | 181 #define WORDS_BIG_ENDIAN 1 |
187 #define FLOAT_WORDS_BIG_ENDIAN 1 | 182 #define FLOAT_WORDS_BIG_ENDIAN 1 |
188 #define UNITS_PER_WORD 8 | 183 #define UNITS_PER_WORD 8 |
189 | |
190 /* FIXME: Promotion of modes currently generates slow code, extending | |
191 before every operation. */ | |
192 /* I'm a little bit undecided about this one. It might be beneficial to | |
193 promote all operations. */ | |
194 | |
195 #define PROMOTE_FUNCTION_MODE(MODE, UNSIGNEDP, TYPE) \ | |
196 do { \ | |
197 if (GET_MODE_CLASS (MODE) == MODE_INT \ | |
198 && GET_MODE_SIZE (MODE) < 8) \ | |
199 { \ | |
200 (MODE) = DImode; \ | |
201 /* Do the following some time later, \ | |
202 scrutinizing differences. */ \ | |
203 if (0) (UNSIGNEDP) = 0; \ | |
204 } \ | |
205 } while (0) | |
206 | 184 |
207 /* We need to align everything to 64 bits that can affect the alignment | 185 /* We need to align everything to 64 bits that can affect the alignment |
208 of other types. Since address N is interpreted in MMIX as (N modulo | 186 of other types. Since address N is interpreted in MMIX as (N modulo |
209 access_size), we must align. */ | 187 access_size), we must align. */ |
210 #define PARM_BOUNDARY 64 | 188 #define PARM_BOUNDARY 64 |
588 | 566 |
589 #define STATIC_CHAIN_REGNUM MMIX_STATIC_CHAIN_REGNUM | 567 #define STATIC_CHAIN_REGNUM MMIX_STATIC_CHAIN_REGNUM |
590 | 568 |
591 | 569 |
592 /* Node: Elimination */ | 570 /* Node: Elimination */ |
593 /* FIXME: Is this requirement built-in? Anyway, we should try to get rid | |
594 of it; we can deduce the value. */ | |
595 #define FRAME_POINTER_REQUIRED cfun->has_nonlocal_label | |
596 | 571 |
597 /* The frame-pointer is stored in a location that either counts to the | 572 /* The frame-pointer is stored in a location that either counts to the |
598 offset of incoming parameters, or that counts to the offset of the | 573 offset of incoming parameters, or that counts to the offset of the |
599 frame, so we can't use a single offset. We therefore eliminate those | 574 frame, so we can't use a single offset. We therefore eliminate those |
600 two separately. */ | 575 two separately. */ |
601 #define ELIMINABLE_REGS \ | 576 #define ELIMINABLE_REGS \ |
602 {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ | 577 {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ |
603 {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ | 578 {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ |
604 {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}} | 579 {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}} |
605 | 580 |
606 /* We need not worry about when the frame-pointer is required for other | |
607 reasons; GCC takes care of those cases. */ | |
608 #define CAN_ELIMINATE(FROM, TO) 1 | |
609 | |
610 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ | 581 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ |
611 (OFFSET) = mmix_initial_elimination_offset (FROM, TO) | 582 (OFFSET) = mmix_initial_elimination_offset (FROM, TO) |
612 | 583 |
613 | 584 |
614 /* Node: Stack Arguments */ | 585 /* Node: Stack Arguments */ |
678 #define FUNCTION_PROFILER(FILE, LABELNO) \ | 649 #define FUNCTION_PROFILER(FILE, LABELNO) \ |
679 mmix_function_profiler (FILE, LABELNO) | 650 mmix_function_profiler (FILE, LABELNO) |
680 | 651 |
681 /* Node: Trampolines */ | 652 /* Node: Trampolines */ |
682 | 653 |
683 #define TRAMPOLINE_TEMPLATE(FILE) \ | 654 #define TRAMPOLINE_SIZE (4*UNITS_PER_WORD) |
684 mmix_trampoline_template (FILE) | 655 #define TRAMPOLINE_ALIGNMENT BITS_PER_WORD |
685 | |
686 #define TRAMPOLINE_SIZE mmix_trampoline_size | |
687 #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \ | |
688 mmix_initialize_trampoline (ADDR, FNADDR, STATIC_CHAIN) | |
689 | |
690 | 656 |
691 /* Node: Addressing Modes */ | 657 /* Node: Addressing Modes */ |
692 | 658 |
693 #define CONSTANT_ADDRESS_P(X) \ | 659 #define CONSTANT_ADDRESS_P(X) \ |
694 mmix_constant_address_p (X) | 660 mmix_constant_address_p (X) |
695 | 661 |
696 #define MAX_REGS_PER_ADDRESS 2 | 662 #define MAX_REGS_PER_ADDRESS 2 |
697 | |
698 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \ | |
699 if (mmix_legitimate_address (MODE, X, MMIX_REG_OK_STRICT)) \ | |
700 goto LABEL | |
701 | 663 |
702 #ifndef REG_OK_STRICT | 664 #ifndef REG_OK_STRICT |
703 # define REG_OK_FOR_BASE_P(X) \ | 665 # define REG_OK_FOR_BASE_P(X) \ |
704 (REGNO (X) <= MMIX_LAST_GENERAL_REGISTER \ | 666 (REGNO (X) <= MMIX_LAST_GENERAL_REGISTER \ |
705 || REGNO (X) == MMIX_ARG_POINTER_REGNUM \ | 667 || REGNO (X) == MMIX_ARG_POINTER_REGNUM \ |
707 #else | 669 #else |
708 # define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) | 670 # define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) |
709 #endif /* REG_OK_STRICT */ | 671 #endif /* REG_OK_STRICT */ |
710 | 672 |
711 #define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X) | 673 #define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X) |
712 | |
713 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) | |
714 | 674 |
715 #define LEGITIMATE_CONSTANT_P(X) \ | 675 #define LEGITIMATE_CONSTANT_P(X) \ |
716 mmix_legitimate_constant_p (X) | 676 mmix_legitimate_constant_p (X) |
717 | 677 |
718 | 678 |