From 544d6fa4571aea303160fcc3053ce474c6df94f2 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Jun 2001 18:30:12 +0000 Subject: [PATCH] vax.h (NOTICE_UPDATE_CC): Set CC_NO_OVERFLOW in cc_status.flags for integer operations that don't update... * vax.h (NOTICE_UPDATE_CC): Set CC_NO_OVERFLOW in cc_status.flags for integer operations that don't update C bit. From-SVN: r43094 --- gcc/ChangeLog | 5 +++++ gcc/config/vax/vax.h | 25 ++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 71a20f8adcd..1cafdce2674 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-06-09 John David Anglin + + * 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 * gthr-posix.h (__gthread_objc_init_thread_system): If diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h index 36df44723da..a3a9dde538d 100644 --- a/gcc/config/vax/vax.h +++ b/gcc/config/vax/vax.h @@ -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 \ -- 2.30.2