public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, AARCH64] Define REVERSIBLE_CC_MODE
@ 2013-01-08  5:10 Hurugalawadi, Naveen
  2013-01-08  9:33 ` Marcus Shawcroft
  2013-04-11 18:13 ` Marcus Shawcroft
  0 siblings, 2 replies; 4+ messages in thread
From: Hurugalawadi, Naveen @ 2013-01-08  5:10 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: reversible_cc.patch --]
[-- Type: text/x-patch; name="reversible_cc.patch", Size: 831 bytes --]

--- 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)	\

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch, AARCH64] Define REVERSIBLE_CC_MODE
  2013-01-08  5:10 [Patch, AARCH64] Define REVERSIBLE_CC_MODE Hurugalawadi, Naveen
@ 2013-01-08  9:33 ` Marcus Shawcroft
  2013-01-09  4:37   ` Hurugalawadi, Naveen
  2013-04-11 18:13 ` Marcus Shawcroft
  1 sibling, 1 reply; 4+ messages in thread
From: Marcus Shawcroft @ 2013-01-08  9:33 UTC (permalink / raw)
  To: Hurugalawadi, Naveen; +Cc: gcc-patches

On 8 January 2013 05:09, Hurugalawadi, Naveen
<Naveen.Hurugalawadi@caviumnetworks.com> wrote:
> 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.


+/* 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
+

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.

/Marcus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [Patch, AARCH64] Define REVERSIBLE_CC_MODE
  2013-01-08  9:33 ` Marcus Shawcroft
@ 2013-01-09  4:37   ` Hurugalawadi, Naveen
  0 siblings, 0 replies; 4+ messages in thread
From: Hurugalawadi, Naveen @ 2013-01-09  4:37 UTC (permalink / raw)
  To: Marcus Shawcroft; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: reversible_cc.patch --]
[-- Type: text/x-patch; name="reversible_cc.patch", Size: 850 bytes --]

--- 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)	\

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch, AARCH64] Define REVERSIBLE_CC_MODE
  2013-01-08  5:10 [Patch, AARCH64] Define REVERSIBLE_CC_MODE Hurugalawadi, Naveen
  2013-01-08  9:33 ` Marcus Shawcroft
@ 2013-04-11 18:13 ` Marcus Shawcroft
  1 sibling, 0 replies; 4+ messages in thread
From: Marcus Shawcroft @ 2013-04-11 18:13 UTC (permalink / raw)
  To: Hurugalawadi, Naveen; +Cc: gcc-patches

Naveen, I've committed your original REVERSIBLE_CC_MODE patch.

Cheers
/Marcus

On 8 January 2013 05:09, Hurugalawadi, Naveen
<Naveen.Hurugalawadi@caviumnetworks.com> wrote:
> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-11 15:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-08  5:10 [Patch, AARCH64] Define REVERSIBLE_CC_MODE Hurugalawadi, Naveen
2013-01-08  9:33 ` Marcus Shawcroft
2013-01-09  4:37   ` Hurugalawadi, Naveen
2013-04-11 18:13 ` Marcus Shawcroft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).