Mercurial > hg > CbC > CbC_gcc
comparison gcc/expr.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 |
---|---|
216 /* ...nor static builtin stack checking. */ | 216 /* ...nor static builtin stack checking. */ |
217 #ifndef STACK_CHECK_STATIC_BUILTIN | 217 #ifndef STACK_CHECK_STATIC_BUILTIN |
218 #define STACK_CHECK_STATIC_BUILTIN 0 | 218 #define STACK_CHECK_STATIC_BUILTIN 0 |
219 #endif | 219 #endif |
220 | 220 |
221 /* The default interval is one page. */ | 221 /* The default interval is one page (4096 bytes). */ |
222 #ifndef STACK_CHECK_PROBE_INTERVAL | 222 #ifndef STACK_CHECK_PROBE_INTERVAL_EXP |
223 #define STACK_CHECK_PROBE_INTERVAL 4096 | 223 #define STACK_CHECK_PROBE_INTERVAL_EXP 12 |
224 #endif | 224 #endif |
225 | 225 |
226 /* The default is to do a store into the stack. */ | 226 /* The default is not to move the stack pointer. */ |
227 #ifndef STACK_CHECK_PROBE_LOAD | 227 #ifndef STACK_CHECK_MOVING_SP |
228 #define STACK_CHECK_PROBE_LOAD 0 | 228 #define STACK_CHECK_MOVING_SP 0 |
229 #endif | 229 #endif |
230 | 230 |
231 /* This is a kludge to try to capture the discrepancy between the old | 231 /* This is a kludge to try to capture the discrepancy between the old |
232 mechanism (generic stack checking) and the new mechanism (static | 232 mechanism (generic stack checking) and the new mechanism (static |
233 builtin stack checking). STACK_CHECK_PROTECT needs to be bumped | 233 builtin stack checking). STACK_CHECK_PROTECT needs to be bumped |
250 | 250 |
251 /* Make the maximum frame size be the largest we can and still only need | 251 /* Make the maximum frame size be the largest we can and still only need |
252 one probe per function. */ | 252 one probe per function. */ |
253 #ifndef STACK_CHECK_MAX_FRAME_SIZE | 253 #ifndef STACK_CHECK_MAX_FRAME_SIZE |
254 #define STACK_CHECK_MAX_FRAME_SIZE \ | 254 #define STACK_CHECK_MAX_FRAME_SIZE \ |
255 (STACK_CHECK_PROBE_INTERVAL - UNITS_PER_WORD) | 255 ((1 << STACK_CHECK_PROBE_INTERVAL_EXP) - UNITS_PER_WORD) |
256 #endif | 256 #endif |
257 | 257 |
258 /* This is arbitrary, but should be large enough everywhere. */ | 258 /* This is arbitrary, but should be large enough everywhere. */ |
259 #ifndef STACK_CHECK_FIXED_FRAME_SIZE | 259 #ifndef STACK_CHECK_FIXED_FRAME_SIZE |
260 #define STACK_CHECK_FIXED_FRAME_SIZE (4 * UNITS_PER_WORD) | 260 #define STACK_CHECK_FIXED_FRAME_SIZE (4 * UNITS_PER_WORD) |
264 allocate in the fixed frame. We may need to be able to make this | 264 allocate in the fixed frame. We may need to be able to make this |
265 controllable by the user at some point. */ | 265 controllable by the user at some point. */ |
266 #ifndef STACK_CHECK_MAX_VAR_SIZE | 266 #ifndef STACK_CHECK_MAX_VAR_SIZE |
267 #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100) | 267 #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100) |
268 #endif | 268 #endif |
269 | |
270 /* This structure is used to pass around information about exploded | |
271 unary, binary and trinary expressions between expand_expr_real_1 and | |
272 friends. */ | |
273 typedef struct separate_ops | |
274 { | |
275 enum tree_code code; | |
276 tree type; | |
277 tree op0, op1, op2; | |
278 location_t location; | |
279 } *sepops; | |
269 | 280 |
270 /* Functions from optabs.c, commonly used, and without need for the optabs | 281 /* Functions from optabs.c, commonly used, and without need for the optabs |
271 tables: */ | 282 tables: */ |
272 | 283 |
273 /* Passed to expand_simple_binop and expand_binop to say which options | 284 /* Passed to expand_simple_binop and expand_binop to say which options |
295 int); | 306 int); |
296 | 307 |
297 /* Report whether the machine description contains an insn which can | 308 /* Report whether the machine description contains an insn which can |
298 perform the operation described by CODE and MODE. */ | 309 perform the operation described by CODE and MODE. */ |
299 extern int have_insn_for (enum rtx_code, enum machine_mode); | 310 extern int have_insn_for (enum rtx_code, enum machine_mode); |
311 | |
312 extern rtx prepare_operand (int, rtx, int, enum machine_mode, enum machine_mode, | |
313 int); | |
300 | 314 |
301 /* Emit code to make a call to a constant function or a library call. */ | 315 /* Emit code to make a call to a constant function or a library call. */ |
302 extern void emit_libcall_block (rtx, rtx, rtx, rtx); | 316 extern void emit_libcall_block (rtx, rtx, rtx, rtx); |
303 | 317 |
304 /* Create but don't emit one rtl instruction to perform certain operations. | 318 /* Create but don't emit one rtl instruction to perform certain operations. |
374 extern void expand_builtin_trap (void); | 388 extern void expand_builtin_trap (void); |
375 extern rtx builtin_strncpy_read_str (void *, HOST_WIDE_INT, enum machine_mode); | 389 extern rtx builtin_strncpy_read_str (void *, HOST_WIDE_INT, enum machine_mode); |
376 | 390 |
377 /* Functions from expr.c: */ | 391 /* Functions from expr.c: */ |
378 | 392 |
379 /* This is run during target initialization to set up which modes can be | 393 /* This is run during target initialization to set up which modes can be |
380 used directly in memory and to initialize the block move optab. */ | 394 used directly in memory and to initialize the block move optab. */ |
381 extern void init_expr_target (void); | 395 extern void init_expr_target (void); |
382 | 396 |
383 /* This is run at the start of compiling a function. */ | 397 /* This is run at the start of compiling a function. */ |
384 extern void init_expr (void); | 398 extern void init_expr (void); |
410 | 424 |
411 extern rtx emit_block_move (rtx, rtx, rtx, enum block_op_methods); | 425 extern rtx emit_block_move (rtx, rtx, rtx, enum block_op_methods); |
412 extern rtx emit_block_move_via_libcall (rtx, rtx, rtx, bool); | 426 extern rtx emit_block_move_via_libcall (rtx, rtx, rtx, bool); |
413 extern rtx emit_block_move_hints (rtx, rtx, rtx, enum block_op_methods, | 427 extern rtx emit_block_move_hints (rtx, rtx, rtx, enum block_op_methods, |
414 unsigned int, HOST_WIDE_INT); | 428 unsigned int, HOST_WIDE_INT); |
429 extern bool emit_storent_insn (rtx to, rtx from); | |
415 | 430 |
416 /* Copy all or part of a value X into registers starting at REGNO. | 431 /* Copy all or part of a value X into registers starting at REGNO. |
417 The number of registers to be filled is NREGS. */ | 432 The number of registers to be filled is NREGS. */ |
418 extern void move_block_to_reg (int, rtx, int, enum machine_mode); | 433 extern void move_block_to_reg (int, rtx, int, enum machine_mode); |
419 | 434 |
462 unsigned int, HOST_WIDE_INT); | 477 unsigned int, HOST_WIDE_INT); |
463 /* The same, but always output an library call. */ | 478 /* The same, but always output an library call. */ |
464 rtx set_storage_via_libcall (rtx, rtx, rtx, bool); | 479 rtx set_storage_via_libcall (rtx, rtx, rtx, bool); |
465 | 480 |
466 /* Expand a setmem pattern; return true if successful. */ | 481 /* Expand a setmem pattern; return true if successful. */ |
467 extern bool set_storage_via_setmem (rtx, rtx, rtx, unsigned int, | 482 extern bool set_storage_via_setmem (rtx, rtx, rtx, unsigned int, |
468 unsigned int, HOST_WIDE_INT); | 483 unsigned int, HOST_WIDE_INT); |
469 | 484 |
470 /* Determine whether the LEN bytes can be moved by using several move | 485 /* Determine whether the LEN bytes can be moved by using several move |
471 instructions. Return nonzero if a call to move_by_pieces should | 486 instructions. Return nonzero if a call to move_by_pieces should |
472 succeed. */ | 487 succeed. */ |
523 /* Given an rtx that may include add and multiply operations, | 538 /* Given an rtx that may include add and multiply operations, |
524 generate them as insns and return a pseudo-reg containing the value. | 539 generate them as insns and return a pseudo-reg containing the value. |
525 Useful after calling expand_expr with 1 as sum_ok. */ | 540 Useful after calling expand_expr with 1 as sum_ok. */ |
526 extern rtx force_operand (rtx, rtx); | 541 extern rtx force_operand (rtx, rtx); |
527 | 542 |
528 /* Work horse for expand_expr. */ | 543 /* Work horses for expand_expr. */ |
529 extern rtx expand_expr_real (tree, rtx, enum machine_mode, | 544 extern rtx expand_expr_real (tree, rtx, enum machine_mode, |
530 enum expand_modifier, rtx *); | 545 enum expand_modifier, rtx *); |
546 extern rtx expand_expr_real_1 (tree, rtx, enum machine_mode, | |
547 enum expand_modifier, rtx *); | |
548 extern rtx expand_expr_real_2 (sepops, rtx, enum machine_mode, | |
549 enum expand_modifier); | |
531 | 550 |
532 /* Generate code for computing expression EXP. | 551 /* Generate code for computing expression EXP. |
533 An rtx for the computed value is returned. The value is never null. | 552 An rtx for the computed value is returned. The value is never null. |
534 In the case of a void EXP, const0_rtx is returned. */ | 553 In the case of a void EXP, const0_rtx is returned. */ |
535 static inline rtx | 554 static inline rtx |
563 a string constant. */ | 582 a string constant. */ |
564 extern tree string_constant (tree, tree *); | 583 extern tree string_constant (tree, tree *); |
565 | 584 |
566 /* Generate code to evaluate EXP and jump to LABEL if the value is zero. */ | 585 /* Generate code to evaluate EXP and jump to LABEL if the value is zero. */ |
567 extern void jumpifnot (tree, rtx); | 586 extern void jumpifnot (tree, rtx); |
587 extern void jumpifnot_1 (enum tree_code, tree, tree, rtx); | |
568 | 588 |
569 /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */ | 589 /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */ |
570 extern void jumpif (tree, rtx); | 590 extern void jumpif (tree, rtx); |
591 extern void jumpif_1 (enum tree_code, tree, tree, rtx); | |
571 | 592 |
572 /* Generate code to evaluate EXP and jump to IF_FALSE_LABEL if | 593 /* Generate code to evaluate EXP and jump to IF_FALSE_LABEL if |
573 the result is zero, or IF_TRUE_LABEL if the result is one. */ | 594 the result is zero, or IF_TRUE_LABEL if the result is one. */ |
574 extern void do_jump (tree, rtx, rtx); | 595 extern void do_jump (tree, rtx, rtx); |
575 | 596 extern void do_jump_1 (enum tree_code, tree, tree, rtx, rtx); |
576 /* Generate rtl to compare two rtx's, will call emit_cmp_insn. */ | 597 |
577 extern rtx compare_from_rtx (rtx, rtx, enum rtx_code, int, enum machine_mode, | |
578 rtx); | |
579 extern void do_compare_rtx_and_jump (rtx, rtx, enum rtx_code, int, | 598 extern void do_compare_rtx_and_jump (rtx, rtx, enum rtx_code, int, |
580 enum machine_mode, rtx, rtx, rtx); | 599 enum machine_mode, rtx, rtx, rtx); |
581 | 600 |
582 /* Two different ways of generating switch statements. */ | 601 /* Two different ways of generating switch statements. */ |
583 extern int try_casesi (tree, tree, tree, tree, rtx, rtx, rtx); | 602 extern int try_casesi (tree, tree, tree, tree, rtx, rtx, rtx); |
584 extern int try_tablejump (tree, tree, tree, tree, rtx, rtx); | 603 extern int try_tablejump (tree, tree, tree, tree, rtx, rtx); |
585 | |
586 /* Smallest number of adjacent cases before we use a jump table. | |
587 XXX Should be a target hook. */ | |
588 extern unsigned int case_values_threshold (void); | |
589 | 604 |
590 /* Functions from alias.c */ | 605 /* Functions from alias.c */ |
591 #include "alias.h" | 606 #include "alias.h" |
592 | 607 |
593 | 608 |
601 | 616 |
602 /* Return an rtx that refers to the value returned by a function | 617 /* Return an rtx that refers to the value returned by a function |
603 in its original home. This becomes invalid if any more code is emitted. */ | 618 in its original home. This becomes invalid if any more code is emitted. */ |
604 extern rtx hard_function_value (const_tree, const_tree, const_tree, int); | 619 extern rtx hard_function_value (const_tree, const_tree, const_tree, int); |
605 | 620 |
606 extern rtx prepare_call_address (rtx, rtx, rtx *, int, int); | 621 extern rtx prepare_call_address (tree, rtx, rtx, rtx *, int, int); |
607 | 622 |
608 extern bool shift_return_value (enum machine_mode, bool, rtx); | 623 extern bool shift_return_value (enum machine_mode, bool, rtx); |
609 | 624 |
610 extern rtx expand_call (tree, rtx, int); | 625 extern rtx expand_call (tree, rtx, int); |
611 | 626 |
633 /* Return an rtx like arg but sans any constant terms. | 648 /* Return an rtx like arg but sans any constant terms. |
634 Returns the original rtx if it has no constant terms. | 649 Returns the original rtx if it has no constant terms. |
635 The constant terms are added and stored via a second arg. */ | 650 The constant terms are added and stored via a second arg. */ |
636 extern rtx eliminate_constant_term (rtx, rtx *); | 651 extern rtx eliminate_constant_term (rtx, rtx *); |
637 | 652 |
638 /* Convert arg to a valid memory address for specified machine mode, | 653 /* Convert arg to a valid memory address for specified machine mode that points |
639 by emitting insns to perform arithmetic if nec. */ | 654 to a specific named address space, by emitting insns to perform arithmetic |
640 extern rtx memory_address (enum machine_mode, rtx); | 655 if necessary. */ |
656 extern rtx memory_address_addr_space (enum machine_mode, rtx, addr_space_t); | |
657 | |
658 /* Like memory_address_addr_space, except assume the memory address points to | |
659 the generic named address space. */ | |
660 #define memory_address(MODE,RTX) \ | |
661 memory_address_addr_space ((MODE), (RTX), ADDR_SPACE_GENERIC) | |
641 | 662 |
642 /* Return a memory reference like MEMREF, but with its mode changed | 663 /* Return a memory reference like MEMREF, but with its mode changed |
643 to MODE and its address changed to ADDR. | 664 to MODE and its address changed to ADDR. |
644 (VOIDmode means don't change the mode. | 665 (VOIDmode means don't change the mode. |
645 NULL for ADDR means don't change the address.) */ | 666 NULL for ADDR means don't change the address.) */ |
697 extern void set_mem_attributes_minus_bitpos (rtx, tree, int, HOST_WIDE_INT); | 718 extern void set_mem_attributes_minus_bitpos (rtx, tree, int, HOST_WIDE_INT); |
698 | 719 |
699 /* Return OFFSET if XEXP (MEM, 0) - OFFSET is known to be ALIGN | 720 /* Return OFFSET if XEXP (MEM, 0) - OFFSET is known to be ALIGN |
700 bits aligned for 0 <= OFFSET < ALIGN / BITS_PER_UNIT, or | 721 bits aligned for 0 <= OFFSET < ALIGN / BITS_PER_UNIT, or |
701 -1 if not known. */ | 722 -1 if not known. */ |
702 extern int get_mem_align_offset (rtx, int); | 723 extern int get_mem_align_offset (rtx, unsigned int); |
703 | 724 |
704 /* Assemble the static constant template for function entry trampolines. */ | 725 /* Assemble the static constant template for function entry trampolines. */ |
705 extern rtx assemble_trampoline_template (void); | 726 extern rtx assemble_trampoline_template (void); |
706 | 727 |
707 /* Copy given rtx to a new temp reg and return that. */ | 728 /* Copy given rtx to a new temp reg and return that. */ |
721 extern rtx force_reg (enum machine_mode, rtx); | 742 extern rtx force_reg (enum machine_mode, rtx); |
722 | 743 |
723 /* Return given rtx, copied into a new temp reg if it was in memory. */ | 744 /* Return given rtx, copied into a new temp reg if it was in memory. */ |
724 extern rtx force_not_mem (rtx); | 745 extern rtx force_not_mem (rtx); |
725 | 746 |
747 /* Return mode and signedness to use when an argument or result in the | |
748 given mode is promoted. */ | |
749 extern enum machine_mode promote_function_mode (const_tree, enum machine_mode, int *, | |
750 const_tree, int); | |
751 | |
752 /* Return mode and signedness to use when an object in the given mode | |
753 is promoted. */ | |
754 extern enum machine_mode promote_mode (const_tree, enum machine_mode, int *); | |
755 | |
726 /* Return mode and signedness to use when object is promoted. */ | 756 /* Return mode and signedness to use when object is promoted. */ |
727 extern enum machine_mode promote_mode (const_tree, enum machine_mode, int *, int); | 757 enum machine_mode promote_decl_mode (const_tree, int *); |
728 | 758 |
729 /* Remove some bytes from the stack. An rtx says how many. */ | 759 /* Remove some bytes from the stack. An rtx says how many. */ |
730 extern void adjust_stack (rtx); | 760 extern void adjust_stack (rtx); |
731 | 761 |
732 /* Add some bytes to the stack. An rtx says how many. */ | 762 /* Add some bytes to the stack. An rtx says how many. */ |
733 extern void anti_adjust_stack (rtx); | 763 extern void anti_adjust_stack (rtx); |
764 | |
765 /* Add some bytes to the stack while probing it. An rtx says how many. */ | |
766 extern void anti_adjust_stack_and_probe (rtx, bool); | |
734 | 767 |
735 /* This enum is used for the following two functions. */ | 768 /* This enum is used for the following two functions. */ |
736 enum save_level {SAVE_BLOCK, SAVE_FUNCTION, SAVE_NONLOCAL}; | 769 enum save_level {SAVE_BLOCK, SAVE_FUNCTION, SAVE_NONLOCAL}; |
737 | 770 |
738 /* Save the stack pointer at the specified level. */ | 771 /* Save the stack pointer at the specified level. */ |
747 /* Allocate some space on the stack dynamically and return its address. An rtx | 780 /* Allocate some space on the stack dynamically and return its address. An rtx |
748 says how many bytes. */ | 781 says how many bytes. */ |
749 extern rtx allocate_dynamic_stack_space (rtx, rtx, int); | 782 extern rtx allocate_dynamic_stack_space (rtx, rtx, int); |
750 | 783 |
751 /* Probe a range of stack addresses from FIRST to FIRST+SIZE, inclusive. | 784 /* Probe a range of stack addresses from FIRST to FIRST+SIZE, inclusive. |
752 FIRST is a constant and size is a Pmode RTX. These are offsets from the | 785 FIRST is a constant and size is a Pmode RTX. These are offsets from |
753 current stack pointer. STACK_GROWS_DOWNWARD says whether to add or | 786 the current stack pointer. STACK_GROWS_DOWNWARD says whether to add |
754 subtract from the stack. If SIZE is constant, this is done | 787 or subtract them from the stack pointer. */ |
755 with a fixed number of probes. Otherwise, we must make a loop. */ | |
756 extern void probe_stack_range (HOST_WIDE_INT, rtx); | 788 extern void probe_stack_range (HOST_WIDE_INT, rtx); |
757 | 789 |
758 /* Return an rtx that refers to the value returned by a library call | 790 /* Return an rtx that refers to the value returned by a library call |
759 in its original home. This becomes invalid if any more code is emitted. */ | 791 in its original home. This becomes invalid if any more code is emitted. */ |
760 extern rtx hard_libcall_value (enum machine_mode); | 792 extern rtx hard_libcall_value (enum machine_mode, rtx); |
761 | 793 |
762 /* Return the mode desired by operand N of a particular bitfield | 794 /* Return the mode desired by operand N of a particular bitfield |
763 insert/extract insn, or MAX_MACHINE_MODE if no such insn is | 795 insert/extract insn, or MAX_MACHINE_MODE if no such insn is |
764 available. */ | 796 available. */ |
765 | 797 |
776 extern rtx expand_mult (enum machine_mode, rtx, rtx, rtx, int); | 808 extern rtx expand_mult (enum machine_mode, rtx, rtx, rtx, int); |
777 extern rtx expand_mult_highpart_adjust (enum machine_mode, rtx, rtx, rtx, rtx, int); | 809 extern rtx expand_mult_highpart_adjust (enum machine_mode, rtx, rtx, rtx, rtx, int); |
778 | 810 |
779 extern rtx assemble_static_space (unsigned HOST_WIDE_INT); | 811 extern rtx assemble_static_space (unsigned HOST_WIDE_INT); |
780 extern int safe_from_p (const_rtx, tree, int); | 812 extern int safe_from_p (const_rtx, tree, int); |
813 extern bool split_comparison (enum rtx_code, enum machine_mode, | |
814 enum rtx_code *, enum rtx_code *); | |
781 | 815 |
782 /* Call this once to initialize the contents of the optabs | 816 /* Call this once to initialize the contents of the optabs |
783 appropriately for the current target machine. */ | 817 appropriately for the current target machine. */ |
784 extern void init_optabs (void); | 818 extern void init_optabs (void); |
785 extern void init_all_optabs (void); | 819 extern void init_all_optabs (void); |
786 | 820 |
787 /* Call this to initialize an optab function entry. */ | 821 /* Call this to initialize an optab function entry. */ |
788 extern rtx init_one_libfunc (const char *); | 822 extern rtx init_one_libfunc (const char *); |
789 extern rtx set_user_assembler_libfunc (const char *, const char *); | 823 extern rtx set_user_assembler_libfunc (const char *, const char *); |
790 | 824 |
825 /* Build a decl for a libfunc named NAME. */ | |
826 extern tree build_libfunc_function (const char *); | |
827 | |
828 /* Get the personality libfunc for a function decl. */ | |
829 rtx get_personality_function (tree); | |
830 | |
791 extern int vector_mode_valid_p (enum machine_mode); | 831 extern int vector_mode_valid_p (enum machine_mode); |
792 | 832 |
793 #endif /* GCC_EXPR_H */ | 833 #endif /* GCC_EXPR_H */ |