diff mbox

[AARCH64] Define REVERSIBLE_CC_MODE

Message ID F3068DEED1A463459E0887A091B15493380A8D@BY2PRD0710MB364.namprd07.prod.outlook.com
State New
Headers show

Commit Message

Hurugalawadi, Naveen Jan. 9, 2013, 4:37 a.m. UTC
Hi Marcus,

Thanks for reviewing the patch.

>> Given the comment about SELECT_CC_MODE and the implementation of
>> aarch64_select_cc_mode this definition of REVERSIBLE_CC_MODE looks
>> broken to me.

Please find attached the modified patch that does not allow floating
point inequality comparisons in REVERSIBLE_CC_MODE.
Please review the patch and let me know if its OK?

Build and tested on aarch64-thunder-elf (using Cavium's internal
simulator). No new regressions.

Thanks,
Naveen.H.S

2013-01-09   Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

	* config/aarch64/aarch64.h (REVERSIBLE_CC_MODE): Define.
diff mbox

Patch

--- gcc/config/aarch64/aarch64.h	2013-01-09 09:55:56.315992619 +0530
+++ gcc/config/aarch64/aarch64.h	2013-01-09 09:55:29.175991698 +0530
@@ -709,6 +709,14 @@  do {									     \
 
 #define SELECT_CC_MODE(OP, X, Y)	aarch64_select_cc_mode (OP, X, Y)
 
+/* A C expression whose value is one if it is always safe to reverse a
+   comparison whose mode is MODE.  If `SELECT_CC_MODE' can ever return
+   MODE for a floating-point inequality comparison, then
+   `REVERSIBLE_CC_MODE (MODE)' must be zero.
+   You need not define this macro if it would always returns zero or if the
+   floating-point format is anything other than `IEEE_FLOAT_FORMAT'.  */
+#define REVERSIBLE_CC_MODE(MODE)  ((MODE) != CCFPEmode)
+
 #define REVERSE_CONDITION(CODE, MODE)		\
   (((MODE) == CCFPmode || (MODE) == CCFPEmode)	\
    ? reverse_condition_maybe_unordered (CODE)	\