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]

Re: [PATCH, AArch64] Negate with Compare instruction


On 19/04/13 12:41, Hurugalawadi, Naveen wrote:
Hi,

Please find attached the patch that implements Negate with Carry
instruction for aarch64 target.

Please review the same and let me know if there should be any
modifications in the patch.

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

Thanks,
Naveen

gcc/

2013-04-19   Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

         * config/aarch64/aarch64.md (*ngc<mode>): New pattern.
	(*ngcsi_uxtw): New pattern.

gcc/testsuite/

2013-04-19   Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

         * gcc.target/aarch64/ngc.c: New.



diff -uprN NCDtools/thunder/gits/gcc/gcc-orig/testsuite/gcc.target/aarch64/ngc.c NCDtools/thunder/gits/gcc/gcc/testsuite/gcc.target/aarch64/ngc.c
--- NCDtools/thunder/gits/gcc/gcc-orig/testsuite/gcc.target/aarch64/ngc.c	1970-01-01 05:30:00.000000000 +0530
+++ NCDtools/thunder/gits/gcc/gcc/testsuite/gcc.target/aarch64/ngc.c	2013-04-19 16:48:44.457544465 +0530
@@ -0,0 +1,67 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+typedef unsigned int u32;
+
+u32
+ngc_si (u32 a, u32 b, u32 c, u32 d)
+{
+  /* { dg-final { scan-assembler "ngc\tw\[0-9\]+, w\[0-9\]+\n" } } */
+  a = -b - (c < d);
+  return a;
+}
+
+typedef unsigned long long u64;
+
+u64
+ngc_si_tst (u64 a, u32 b, u32 c, u32 d)
+{
+  /* { dg-final { scan-assembler "ngc\tw\[0-9\]+, w\[0-9\]+\n" } } */

This and the preceding scan are the same pattern. So if either passes you'll fail to detect a failure in the other.

R.


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