comparison gcc/emit-rtl.c @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children f6334be47118
comparison
equal deleted inserted replaced
56:3c8a44c06a95 63:b7f97abdc517
1 /* Emit RTL for the GCC expander. 1 /* Emit RTL for the GCC expander.
2 Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2 Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
3 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 3 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
4 2010
4 Free Software Foundation, Inc. 5 Free Software Foundation, Inc.
5 6
6 This file is part of GCC. 7 This file is part of GCC.
7 8
8 GCC is free software; you can redistribute it and/or modify it under 9 GCC is free software; you can redistribute it and/or modify it under
47 #include "regs.h" 48 #include "regs.h"
48 #include "hard-reg-set.h" 49 #include "hard-reg-set.h"
49 #include "hashtab.h" 50 #include "hashtab.h"
50 #include "insn-config.h" 51 #include "insn-config.h"
51 #include "recog.h" 52 #include "recog.h"
52 #include "real.h"
53 #include "fixed-value.h"
54 #include "bitmap.h" 53 #include "bitmap.h"
55 #include "basic-block.h" 54 #include "basic-block.h"
56 #include "ggc.h" 55 #include "ggc.h"
57 #include "debug.h" 56 #include "debug.h"
58 #include "langhooks.h" 57 #include "langhooks.h"
513 PUT_MODE (fixed, mode); 512 PUT_MODE (fixed, mode);
514 513
515 fixed->u.fv = value; 514 fixed->u.fv = value;
516 515
517 return lookup_const_fixed (fixed); 516 return lookup_const_fixed (fixed);
517 }
518
519 /* Constructs double_int from rtx CST. */
520
521 double_int
522 rtx_to_double_int (const_rtx cst)
523 {
524 double_int r;
525
526 if (CONST_INT_P (cst))
527 r = shwi_to_double_int (INTVAL (cst));
528 else if (CONST_DOUBLE_P (cst) && GET_MODE (cst) == VOIDmode)
529 {
530 r.low = CONST_DOUBLE_LOW (cst);
531 r.high = CONST_DOUBLE_HIGH (cst);
532 }
533 else
534 gcc_unreachable ();
535
536 return r;
537 }
538
539
540 /* Return a CONST_DOUBLE or CONST_INT for a value specified as
541 a double_int. */
542
543 rtx
544 immed_double_int_const (double_int i, enum machine_mode mode)
545 {
546 return immed_double_const (i.low, i.high, mode);
518 } 547 }
519 548
520 /* Return a CONST_DOUBLE or CONST_INT for a value specified as a pair 549 /* Return a CONST_DOUBLE or CONST_INT for a value specified as a pair
521 of ints: I0 is the low-order word and I1 is the high-order word. 550 of ints: I0 is the low-order word and I1 is the high-order word.
522 Do not use this routine for non-integer modes; convert to 551 Do not use this routine for non-integer modes; convert to
1748 apply_bitpos = bitpos; 1777 apply_bitpos = bitpos;
1749 } 1778 }
1750 /* ??? Any reason the field size would be different than 1779 /* ??? Any reason the field size would be different than
1751 the size we got from the type? */ 1780 the size we got from the type? */
1752 } 1781 }
1753 else if (flag_argument_noalias > 1 1782
1754 && (INDIRECT_REF_P (t2)) 1783 /* If this is an indirect reference, record it. */
1755 && TREE_CODE (TREE_OPERAND (t2, 0)) == PARM_DECL) 1784 else if (TREE_CODE (t) == INDIRECT_REF
1785 || TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
1756 { 1786 {
1757 expr = t2; 1787 expr = t;
1758 offset = NULL; 1788 offset = const0_rtx;
1789 apply_bitpos = bitpos;
1759 } 1790 }
1760 } 1791 }
1761 1792
1762 /* If this is a Fortran indirect argument reference, record the 1793 /* If this is an indirect reference, record it. */
1763 parameter decl. */ 1794 else if (TREE_CODE (t) == INDIRECT_REF
1764 else if (flag_argument_noalias > 1 1795 || TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
1765 && (INDIRECT_REF_P (t))
1766 && TREE_CODE (TREE_OPERAND (t, 0)) == PARM_DECL)
1767 { 1796 {
1768 expr = t; 1797 expr = t;
1769 offset = NULL; 1798 offset = const0_rtx;
1799 apply_bitpos = bitpos;
1770 } 1800 }
1771 1801
1772 if (!align_computed && !INDIRECT_REF_P (t)) 1802 if (!align_computed && !INDIRECT_REF_P (t))
1773 { 1803 {
1774 unsigned int obj_align 1804 unsigned int obj_align