Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: gcc/gcc/fixed-value.c

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gcc/gcc/final.c ('k') | gcc/gcc/fixproto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Fixed-point arithmetic support. 1 /* Fixed-point arithmetic support.
2 Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc. 2 Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify it under 6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free 7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later 8 Software Foundation; either version 3, or (at your option) any later
9 version. 9 version.
10 10
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 return false; 777 return false;
778 } 778 }
779 779
780 /* Compare fixed-point values by tree_code. 780 /* Compare fixed-point values by tree_code.
781 Note that OP0 and OP1 must have the same mode. */ 781 Note that OP0 and OP1 must have the same mode. */
782 782
783 bool 783 bool
784 fixed_compare (int icode, const FIXED_VALUE_TYPE *op0, 784 fixed_compare (int icode, const FIXED_VALUE_TYPE *op0,
785 const FIXED_VALUE_TYPE *op1) 785 const FIXED_VALUE_TYPE *op1)
786 { 786 {
787 enum tree_code code = icode; 787 enum tree_code code = (enum tree_code) icode;
788 gcc_assert (op0->mode == op1->mode); 788 gcc_assert (op0->mode == op1->mode);
789 789
790 switch (code) 790 switch (code)
791 { 791 {
792 case NE_EXPR: 792 case NE_EXPR:
793 return !double_int_equal_p (op0->data, op1->data); 793 return !double_int_equal_p (op0->data, op1->data);
794 794
795 case EQ_EXPR: 795 case EQ_EXPR:
796 return double_int_equal_p (op0->data, op1->data); 796 return double_int_equal_p (op0->data, op1->data);
797 797
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 if (SIGNED_FIXED_POINT_MODE_P (f->mode)) 1141 if (SIGNED_FIXED_POINT_MODE_P (f->mode))
1142 { 1142 {
1143 int i_f_bits = GET_MODE_IBIT (f->mode) + GET_MODE_FBIT (f->mode); 1143 int i_f_bits = GET_MODE_IBIT (f->mode) + GET_MODE_FBIT (f->mode);
1144 int sign_bit = get_fixed_sign_bit (f->data, i_f_bits); 1144 int sign_bit = get_fixed_sign_bit (f->data, i_f_bits);
1145 if (sign_bit == 1) 1145 if (sign_bit == 1)
1146 return true; 1146 return true;
1147 } 1147 }
1148 1148
1149 return false; 1149 return false;
1150 } 1150 }
OLDNEW
« no previous file with comments | « gcc/gcc/final.c ('k') | gcc/gcc/fixproto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698