comparison gcc/config/arc/arc.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 f6334be47118
comparison
equal deleted inserted replaced
52:c156f1bd5cd9 55:77e2b8dfacca
1 /* Definitions of target machine for GNU compiler, Argonaut ARC cpu. 1 /* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
2 Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2 Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005,
3 2007, 2008 Free Software Foundation, Inc. 3 2007, 2008, 2009 Free Software Foundation, 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
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
514 514
515 /* Register in which static-chain is passed to a function. This must 515 /* Register in which static-chain is passed to a function. This must
516 not be a register used by the prologue. */ 516 not be a register used by the prologue. */
517 #define STATIC_CHAIN_REGNUM 24 517 #define STATIC_CHAIN_REGNUM 24
518 518
519 /* A C expression which is nonzero if a function must have and use a
520 frame pointer. This expression is evaluated in the reload pass.
521 If its value is nonzero the function will have a frame pointer. */
522 #define FRAME_POINTER_REQUIRED \
523 (cfun->calls_alloca)
524
525 /* C statement to store the difference between the frame pointer 519 /* C statement to store the difference between the frame pointer
526 and the stack pointer values immediately after the function prologue. */ 520 and the stack pointer values immediately after the function prologue. */
527 #define INITIAL_FRAME_POINTER_OFFSET(VAR) \ 521 #define INITIAL_FRAME_POINTER_OFFSET(VAR) \
528 ((VAR) = arc_compute_frame_size (get_frame_size ())) 522 ((VAR) = arc_compute_frame_size (get_frame_size ()))
529 523
661 655
662 /* Output assembler code to FILE to increment profiler label # LABELNO 656 /* Output assembler code to FILE to increment profiler label # LABELNO
663 for profiling a function entry. */ 657 for profiling a function entry. */
664 #define FUNCTION_PROFILER(FILE, LABELNO) 658 #define FUNCTION_PROFILER(FILE, LABELNO)
665 659
666 /* Trampolines. */ 660 #define TRAMPOLINE_ALIGNMENT 32
667 /* ??? This doesn't work yet because GCC will use as the address of a nested
668 function the address of the trampoline. We need to use that address
669 right shifted by 2. It looks like we'll need PSImode after all. :-( */
670
671 /* Output assembler code for a block containing the constant parts
672 of a trampoline, leaving space for the variable parts. */
673 /* On the ARC, the trampoline is quite simple as we have 32-bit immediate
674 constants.
675
676 mov r24,STATIC
677 j.nd FUNCTION
678 */
679 #define TRAMPOLINE_TEMPLATE(FILE) \
680 do { \
681 assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x631f7c00)); \
682 assemble_aligned_integer (UNITS_PER_WORD, const0_rtx); \
683 assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x381f0000)); \
684 assemble_aligned_integer (UNITS_PER_WORD, const0_rtx); \
685 } while (0)
686
687 /* Length in units of the trampoline for entering a nested function. */
688 #define TRAMPOLINE_SIZE 16 661 #define TRAMPOLINE_SIZE 16
689
690 /* Emit RTL insns to initialize the variable parts of a trampoline.
691 FNADDR is an RTX for the address of the function's pure code.
692 CXT is an RTX for the static chain value for the function. */
693 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
694 do { \
695 emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 4)), CXT); \
696 emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 12)), FNADDR); \
697 emit_insn (gen_flush_icache (validize_mem (gen_rtx_MEM (SImode, TRAMP)))); \
698 } while (0)
699 662
700 /* Addressing modes, and classification of registers for them. */ 663 /* Addressing modes, and classification of registers for them. */
701 664
702 /* Maximum number of registers that can appear in a valid memory address. */ 665 /* Maximum number of registers that can appear in a valid memory address. */
703 /* The `ld' insn allows 2, but the `st' insn only allows 1. */ 666 /* The `ld' insn allows 2, but the `st' insn only allows 1. */
793 if ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == PRE_INC) \ 756 if ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == PRE_INC) \
794 /* We're restricted here by the `st' insn. */ \ 757 /* We're restricted here by the `st' insn. */ \
795 && RTX_OK_FOR_BASE_P (XEXP ((X), 0))) \ 758 && RTX_OK_FOR_BASE_P (XEXP ((X), 0))) \
796 goto ADDR; \ 759 goto ADDR; \
797 } 760 }
798
799 /* Go to LABEL if ADDR (a legitimate address expression)
800 has an effect that depends on the machine mode it is used for. */
801 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
802 761
803 /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, 762 /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
804 return the mode to be used for the comparison. */ 763 return the mode to be used for the comparison. */
805 #define SELECT_CC_MODE(OP, X, Y) \ 764 #define SELECT_CC_MODE(OP, X, Y) \
806 arc_select_cc_mode (OP, X, Y) 765 arc_select_cc_mode (OP, X, Y)
1069 1028
1070 /* alloca should avoid clobbering the old register save area. */ 1029 /* alloca should avoid clobbering the old register save area. */
1071 /* ??? Not defined in tm.texi. */ 1030 /* ??? Not defined in tm.texi. */
1072 #define SETJMP_VIA_SAVE_AREA 1031 #define SETJMP_VIA_SAVE_AREA
1073 1032
1074 /* Define the information needed to generate branch and scc insns. This is
1075 stored from the compare operation. Note that we can't use "rtx" here
1076 since it hasn't been defined! */
1077 extern struct rtx_def *arc_compare_op0, *arc_compare_op1;
1078
1079 /* ARC function types. */ 1033 /* ARC function types. */
1080 enum arc_function_type { 1034 enum arc_function_type {
1081 ARC_FUNCTION_UNKNOWN, ARC_FUNCTION_NORMAL, 1035 ARC_FUNCTION_UNKNOWN, ARC_FUNCTION_NORMAL,
1082 /* These are interrupt handlers. The name corresponds to the register 1036 /* These are interrupt handlers. The name corresponds to the register
1083 name that contains the return address. */ 1037 name that contains the return address. */