* config/s390/s390.h (S390_TDC_POSITIVE_NORMALIZED_NUMBER):
Renamed to S390_TDC_POSITIVE_NORMALIZED_BFP_NUMBER.
(S390_TDC_NEGATIVE_NORMALIZED_NUMBER): Renamed to
S390_TDC_NEGATIVE_NORMALIZED_BFP_NUMBER.
(S390_TDC_POSITIVE_DENORMALIZED_NUMBER): Renamed to
S390_TDC_POSITIVE_DENORMALIZED_BFP_NUMBER.
(S390_TDC_NEGATIVE_DENORMALIZED_NUMBER): Renamed to
S390_TDC_NEGATIVE_DENORMALIZED_BFP_NUMBER.
(S390_TDC_POSITIVE_NORMALIZED_BFP_NUMBER): New constant.
(S390_TDC_NEGATIVE_NORMALIZED_BFP_NUMBER): New constant.
(S390_TDC_POSITIVE_DENORMALIZED_BFP_NUMBER): New constant.
(S390_TDC_NEGATIVE_DENORMALIZED_BFP_NUMBER): New constant.
* config/s390/s390.md (FP_ALL): New mode iterator.
(_d): New mode attribute.
("*signbit<mode>2>"): Changed mode of first operand.
("isinf<mode>2"): Changed mode of first operand.
("*TDC_insn"): Adaptation for DFP modes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131714
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-01-22 Wolfgang Gellerich <gellerich@de.ibm.com>
+
+ * config/s390/s390.h (S390_TDC_POSITIVE_NORMALIZED_NUMBER):
+ Renamed to S390_TDC_POSITIVE_NORMALIZED_BFP_NUMBER.
+ (S390_TDC_NEGATIVE_NORMALIZED_NUMBER): Renamed to
+ S390_TDC_NEGATIVE_NORMALIZED_BFP_NUMBER.
+ (S390_TDC_POSITIVE_DENORMALIZED_NUMBER): Renamed to
+ S390_TDC_POSITIVE_DENORMALIZED_BFP_NUMBER.
+ (S390_TDC_NEGATIVE_DENORMALIZED_NUMBER): Renamed to
+ S390_TDC_NEGATIVE_DENORMALIZED_BFP_NUMBER.
+ (S390_TDC_POSITIVE_NORMALIZED_BFP_NUMBER): New constant.
+ (S390_TDC_NEGATIVE_NORMALIZED_BFP_NUMBER): New constant.
+ (S390_TDC_POSITIVE_DENORMALIZED_BFP_NUMBER): New constant.
+ (S390_TDC_NEGATIVE_DENORMALIZED_BFP_NUMBER): New constant.
+ * config/s390/s390.md (FP_ALL): New mode iterator.
+ (_d): New mode attribute.
+ ("*signbit<mode>2>"): Changed mode of first operand.
+ ("isinf<mode>2"): Changed mode of first operand.
+ ("*TDC_insn"): Adaptation for DFP modes.
+
2008-01-22 Ben Elliston <bje@au.ibm.com>
* tree.c (check_qualified_type): Improve function description.
#define CAN_DEBUG_WITHOUT_FP
/* Constants needed to control the TEST DATA CLASS (TDC) instruction. */
-#define S390_TDC_POSITIVE_ZERO (1 << 11)
-#define S390_TDC_NEGATIVE_ZERO (1 << 10)
-#define S390_TDC_POSITIVE_NORMALIZED_NUMBER (1 << 9)
-#define S390_TDC_NEGATIVE_NORMALIZED_NUMBER (1 << 8)
-#define S390_TDC_POSITIVE_DENORMALIZED_NUMBER (1 << 7)
-#define S390_TDC_NEGATIVE_DENORMALIZED_NUMBER (1 << 6)
-#define S390_TDC_POSITIVE_INFINITY (1 << 5)
-#define S390_TDC_NEGATIVE_INFINITY (1 << 4)
-#define S390_TDC_POSITIVE_QUIET_NAN (1 << 3)
-#define S390_TDC_NEGATIVE_QUIET_NAN (1 << 2)
-#define S390_TDC_POSITIVE_SIGNALING_NAN (1 << 1)
-#define S390_TDC_NEGATIVE_SIGNALING_NAN (1 << 0)
-
+#define S390_TDC_POSITIVE_ZERO (1 << 11)
+#define S390_TDC_NEGATIVE_ZERO (1 << 10)
+#define S390_TDC_POSITIVE_NORMALIZED_BFP_NUMBER (1 << 9)
+#define S390_TDC_NEGATIVE_NORMALIZED_BFP_NUMBER (1 << 8)
+#define S390_TDC_POSITIVE_DENORMALIZED_BFP_NUMBER (1 << 7)
+#define S390_TDC_NEGATIVE_DENORMALIZED_BFP_NUMBER (1 << 6)
+#define S390_TDC_POSITIVE_INFINITY (1 << 5)
+#define S390_TDC_NEGATIVE_INFINITY (1 << 4)
+#define S390_TDC_POSITIVE_QUIET_NAN (1 << 3)
+#define S390_TDC_NEGATIVE_QUIET_NAN (1 << 2)
+#define S390_TDC_POSITIVE_SIGNALING_NAN (1 << 1)
+#define S390_TDC_NEGATIVE_SIGNALING_NAN (1 << 0)
+
+/* The following values are different for DFP. */
+#define S390_TDC_POSITIVE_DENORMALIZED_DFP_NUMBER (1 << 9)
+#define S390_TDC_NEGATIVE_DENORMALIZED_DFP_NUMBER (1 << 8)
+#define S390_TDC_POSITIVE_NORMALIZED_DFP_NUMBER (1 << 7)
+#define S390_TDC_NEGATIVE_NORMALIZED_DFP_NUMBER (1 << 6)
+
+/* For signbit, the BFP-DFP-difference makes no difference. */
#define S390_TDC_SIGNBIT_SET (S390_TDC_NEGATIVE_ZERO \
- | S390_TDC_NEGATIVE_NORMALIZED_NUMBER \
- | S390_TDC_NEGATIVE_DENORMALIZED_NUMBER\
+ | S390_TDC_NEGATIVE_NORMALIZED_BFP_NUMBER \
+ | S390_TDC_NEGATIVE_DENORMALIZED_BFP_NUMBER\
| S390_TDC_NEGATIVE_INFINITY \
| S390_TDC_NEGATIVE_QUIET_NAN \
| S390_TDC_NEGATIVE_SIGNALING_NAN )
;; These mode iterators allow floating point patterns to be generated from the
;; same template.
+(define_mode_iterator FP_ALL [TF DF SF (TD "TARGET_HARD_DFP") (DD "TARGET_HARD_DFP")
+ (SD "TARGET_HARD_DFP")])
(define_mode_iterator FP [TF DF SF (TD "TARGET_HARD_DFP") (DD "TARGET_HARD_DFP")])
(define_mode_iterator BFP [TF DF SF])
(define_mode_iterator DFP [TD DD])
;; within instruction mnemonics.
(define_mode_attr bt [(TF "b") (DF "b") (SF "b") (TD "t") (DD "t") (SD "t")])
+;; This attribute is used within instruction mnemonics. It evaluates to d for dfp
+;; modes and to an empty string for bfp modes.
+(define_mode_attr _d [(TF "") (DF "") (SF "") (TD "d") (DD "d") (SD "d")])
+
;; Although it is imprecise for z9-ec we handle all dfp instructions like
;; bfp regarding the pipeline description.
(define_mode_attr bfp [(TF "tf") (DF "df") (SF "sf")
(define_expand "signbit<mode>2"
[(set (reg:CCZ CC_REGNUM)
- (unspec:CCZ [(match_operand:BFP 1 "register_operand" "f")
+ (unspec:CCZ [(match_operand:FP_ALL 1 "register_operand" "f")
(match_dup 2)]
UNSPEC_TDC_INSN))
(set (match_operand:SI 0 "register_operand" "=d")
(define_expand "isinf<mode>2"
[(set (reg:CCZ CC_REGNUM)
- (unspec:CCZ [(match_operand:BFP 1 "register_operand" "f")
+ (unspec:CCZ [(match_operand:FP_ALL 1 "register_operand" "f")
(match_dup 2)]
UNSPEC_TDC_INSN))
(set (match_operand:SI 0 "register_operand" "=d")
;
(define_insn "*TDC_insn_<mode>"
[(set (reg:CCZ CC_REGNUM)
- (unspec:CCZ [(match_operand:BFP 0 "register_operand" "f")
+ (unspec:CCZ [(match_operand:FP_ALL 0 "register_operand" "f")
(match_operand:SI 1 "const_int_operand")] UNSPEC_TDC_INSN))]
"TARGET_HARD_FLOAT"
- "tc<xde>b\t%0,%1"
+ "t<_d>c<xde><bt>\t%0,%1"
[(set_attr "op_type" "RXE")
- (set_attr "type" "fsimp<mode>")])
+ (set_attr "type" "fsimp<bfp>")])
(define_insn_and_split "*ccz_to_int"
[(set (match_operand:SI 0 "register_operand" "=d")