OSDN Git Service

* vax.h (NOTICE_UPDATE_CC): Set CC_NO_OVERFLOW in cc_status.flags
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Jun 2001 18:30:12 +0000 (18:30 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Jun 2001 18:30:12 +0000 (18:30 +0000)
for integer operations that don't update C bit.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43094 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/vax/vax.h

index 71a20f8..1cafdce 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-09  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * vax.h (NOTICE_UPDATE_CC): Set CC_NO_OVERFLOW in cc_status.flags
+       for integer operations that don't update C bit.
+
 2001-06-09  Nicola Pero <nicola@brainstorm.co.uk>
 
        * gthr-posix.h (__gthread_objc_init_thread_system): If
index 36df447..a3a9dde 100644 (file)
@@ -986,7 +986,30 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
        CC_STATUS_INIT;                                         \
       else if (GET_CODE (SET_DEST (EXP)) != ZERO_EXTRACT       \
               && GET_CODE (SET_DEST (EXP)) != PC)              \
-       { cc_status.flags = 0;                                  \
+       {                                                       \
+         cc_status.flags = 0;                                  \
+         /* The integer operations below don't set carry or    \
+            set it in an incompatible way.  That's ok though   \
+            as the Z bit is all we need when doing unsigned    \
+            comparisons on the result of these insns (since    \
+            they're always with 0).  Set CC_NO_OVERFLOW to     \
+            generate the correct unsigned branches.  */        \
+         switch (GET_CODE (SET_SRC (EXP)))                     \
+           {                                                   \
+           case NEG:                                           \
+             if (GET_MODE_CLASS (GET_MODE (EXP)) == MODE_FLOAT)\
+               break;                                          \
+           case AND:                                           \
+           case IOR:                                           \
+           case XOR:                                           \
+           case NOT:                                           \
+           case MEM:                                           \
+           case REG:                                           \
+             cc_status.flags = CC_NO_OVERFLOW;                 \
+             break;                                            \
+           default:                                            \
+             break;                                            \
+           }                                                   \
          cc_status.value1 = SET_DEST (EXP);                    \
          cc_status.value2 = SET_SRC (EXP); } }                 \
   else if (GET_CODE (EXP) == PARALLEL                          \