This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, AARCH64] Define REVERSIBLE_CC_MODE


Hi,

AARCH64 back-end defines REVERSE_CONDITION but not REVERSIBLE_CC_MODE.
REVERSE_CONDITION is used only in case REVERSIBLE_CC_MODE (mode) is
nonzero.

Please find attached the patch that defines REVERSIBLE_CC_MODE for 
aarch64 back-end. Please review the patch and let me know if there should be any
modifications?

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

Thanks,
Naveen.H.S

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

	* config/aarch64/aarch64.h (REVERSIBLE_CC_MODE): Define.
--- gcc/config/aarch64/aarch64.h	2013-01-08 09:42:21.081034770 +0530
+++ gcc/config/aarch64/aarch64.h	2013-01-08 09:43:52.277037865 +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) 1
+
 #define REVERSE_CONDITION(CODE, MODE)		\
   (((MODE) == CCFPmode || (MODE) == CCFPEmode)	\
    ? reverse_condition_maybe_unordered (CODE)	\

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]