Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/v850/v850.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. NEC V850 series | 1 /* Definitions of target machine for GNU compiler. NEC V850 series |
2 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, | 2 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, |
3 2007, 2008 Free Software Foundation, Inc. | 3 2007, 2008, 2009 Free Software Foundation, Inc. |
4 Contributed by Jeff Law (law@cygnus.com). | 4 Contributed by Jeff Law (law@cygnus.com). |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
8 GCC is free software; you can redistribute it and/or modify | 8 GCC is free software; you can redistribute it and/or modify |
504 #define ARG_POINTER_REGNUM 33 | 504 #define ARG_POINTER_REGNUM 33 |
505 | 505 |
506 /* Register in which static-chain is passed to a function. */ | 506 /* Register in which static-chain is passed to a function. */ |
507 #define STATIC_CHAIN_REGNUM 20 | 507 #define STATIC_CHAIN_REGNUM 20 |
508 | 508 |
509 /* Value should be nonzero if functions must have frame pointers. | |
510 Zero means the frame pointer need not be set up (and parms | |
511 may be accessed via the stack pointer) in functions that seem suitable. | |
512 This is computed in `reload', in reload1.c. */ | |
513 #define FRAME_POINTER_REQUIRED 0 | |
514 | |
515 /* If defined, this macro specifies a table of register pairs used to | 509 /* If defined, this macro specifies a table of register pairs used to |
516 eliminate unneeded registers that point into the stack frame. If | 510 eliminate unneeded registers that point into the stack frame. If |
517 it is not defined, the only elimination attempted by the compiler | 511 it is not defined, the only elimination attempted by the compiler |
518 is to replace references to the frame pointer with references to | 512 is to replace references to the frame pointer with references to |
519 the stack pointer. | 513 the stack pointer. |
541 #define ELIMINABLE_REGS \ | 535 #define ELIMINABLE_REGS \ |
542 {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ | 536 {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ |
543 { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }, \ | 537 { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }, \ |
544 { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ | 538 { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ |
545 { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }} \ | 539 { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }} \ |
546 | |
547 /* A C expression that returns nonzero if the compiler is allowed to | |
548 try to replace register number FROM-REG with register number | |
549 TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is | |
550 defined, and will usually be the constant 1, since most of the | |
551 cases preventing register elimination are things that the compiler | |
552 already knows about. */ | |
553 | |
554 #define CAN_ELIMINATE(FROM, TO) \ | |
555 ((TO) == STACK_POINTER_REGNUM ? ! frame_pointer_needed : 1) | |
556 | 540 |
557 /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It | 541 /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It |
558 specifies the initial difference between the specified pair of | 542 specifies the initial difference between the specified pair of |
559 registers. This macro must be defined if `ELIMINABLE_REGS' is | 543 registers. This macro must be defined if `ELIMINABLE_REGS' is |
560 defined. */ | 544 defined. */ |
634 | 618 |
635 /* 1 if N is a possible register number for function argument passing. */ | 619 /* 1 if N is a possible register number for function argument passing. */ |
636 | 620 |
637 #define FUNCTION_ARG_REGNO_P(N) (N >= 6 && N <= 9) | 621 #define FUNCTION_ARG_REGNO_P(N) (N >= 6 && N <= 9) |
638 | 622 |
639 /* Define how to find the value returned by a function. | |
640 VALTYPE is the data type of the value (as a tree). | |
641 If the precise function being called is known, FUNC is its FUNCTION_DECL; | |
642 otherwise, FUNC is 0. */ | |
643 | |
644 #define FUNCTION_VALUE(VALTYPE, FUNC) \ | |
645 gen_rtx_REG (TYPE_MODE (VALTYPE), 10) | |
646 | |
647 /* Define how to find the value returned by a library function | 623 /* Define how to find the value returned by a library function |
648 assuming the value has mode MODE. */ | 624 assuming the value has mode MODE. */ |
649 | 625 |
650 #define LIBCALL_VALUE(MODE) \ | 626 #define LIBCALL_VALUE(MODE) \ |
651 gen_rtx_REG (MODE, 10) | 627 gen_rtx_REG (MODE, 10) |
672 /* Output assembler code to FILE to increment profiler label # LABELNO | 648 /* Output assembler code to FILE to increment profiler label # LABELNO |
673 for profiling a function entry. */ | 649 for profiling a function entry. */ |
674 | 650 |
675 #define FUNCTION_PROFILER(FILE, LABELNO) ; | 651 #define FUNCTION_PROFILER(FILE, LABELNO) ; |
676 | 652 |
677 #define TRAMPOLINE_TEMPLATE(FILE) \ | |
678 do { \ | |
679 fprintf (FILE, "\tjarl .+4,r12\n"); \ | |
680 fprintf (FILE, "\tld.w 12[r12],r20\n"); \ | |
681 fprintf (FILE, "\tld.w 16[r12],r12\n"); \ | |
682 fprintf (FILE, "\tjmp [r12]\n"); \ | |
683 fprintf (FILE, "\tnop\n"); \ | |
684 fprintf (FILE, "\t.long 0\n"); \ | |
685 fprintf (FILE, "\t.long 0\n"); \ | |
686 } while (0) | |
687 | |
688 /* Length in units of the trampoline for entering a nested function. */ | 653 /* Length in units of the trampoline for entering a nested function. */ |
689 | 654 |
690 #define TRAMPOLINE_SIZE 24 | 655 #define TRAMPOLINE_SIZE 24 |
691 | |
692 /* Emit RTL insns to initialize the variable parts of a trampoline. | |
693 FNADDR is an RTX for the address of the function's pure code. | |
694 CXT is an RTX for the static chain value for the function. */ | |
695 | |
696 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ | |
697 { \ | |
698 emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 16)), \ | |
699 (CXT)); \ | |
700 emit_move_insn (gen_rtx_MEM (SImode, plus_constant ((TRAMP), 20)), \ | |
701 (FNADDR)); \ | |
702 } | |
703 | 656 |
704 /* Addressing modes, and classification of registers for them. */ | 657 /* Addressing modes, and classification of registers for them. */ |
705 | 658 |
706 | 659 |
707 /* 1 if X is an rtx for a constant that is a valid address. */ | 660 /* 1 if X is an rtx for a constant that is a valid address. */ |
827 + (GET_MODE_NUNITS (MODE) * UNITS_PER_WORD)))) \ | 780 + (GET_MODE_NUNITS (MODE) * UNITS_PER_WORD)))) \ |
828 goto ADDR; \ | 781 goto ADDR; \ |
829 } while (0) | 782 } while (0) |
830 | 783 |
831 | 784 |
832 /* Go to LABEL if ADDR (a legitimate address expression) | |
833 has an effect that depends on the machine mode it is used for. */ | |
834 | |
835 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) {} | |
836 | |
837 /* Nonzero if the constant value X is a legitimate general operand. | 785 /* Nonzero if the constant value X is a legitimate general operand. |
838 It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ | 786 It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ |
839 | 787 |
840 #define LEGITIMATE_CONSTANT_P(X) \ | 788 #define LEGITIMATE_CONSTANT_P(X) \ |
841 (GET_CODE (X) == CONST_DOUBLE \ | 789 (GET_CODE (X) == CONST_DOUBLE \ |