OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [convert.c] - Diff between revs 280 and 378

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 280 Rev 378
Line 797... Line 797...
        case NEGATE_EXPR:
        case NEGATE_EXPR:
        case BIT_NOT_EXPR:
        case BIT_NOT_EXPR:
          /* This is not correct for ABS_EXPR,
          /* This is not correct for ABS_EXPR,
             since we must test the sign before truncation.  */
             since we must test the sign before truncation.  */
          {
          {
            tree typex;
            tree typex = unsigned_type_for (type);
 
 
            /* Don't do unsigned arithmetic where signed was wanted,
 
               or vice versa.  */
 
            if (TYPE_UNSIGNED (TREE_TYPE (expr)))
 
              typex = unsigned_type_for (type);
 
            else
 
              typex = signed_type_for (type);
 
            return convert (type,
            return convert (type,
                            fold_build1 (ex_form, typex,
                            fold_build1 (ex_form, typex,
                                         convert (typex,
                                         convert (typex,
                                                  TREE_OPERAND (expr, 0))));
                                                  TREE_OPERAND (expr, 0))));
          }
          }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.