From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gcc.target/frv/fr550-builtins-4.c | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 gcc/testsuite/gcc.target/frv/fr550-builtins-4.c (limited to 'gcc/testsuite/gcc.target/frv/fr550-builtins-4.c') diff --git a/gcc/testsuite/gcc.target/frv/fr550-builtins-4.c b/gcc/testsuite/gcc.target/frv/fr550-builtins-4.c new file mode 100644 index 000000000..801dfee20 --- /dev/null +++ b/gcc/testsuite/gcc.target/frv/fr550-builtins-4.c @@ -0,0 +1,48 @@ +/* Test the __M{,D}{ADD,SUB}ACC functions. */ +/* { dg-do run } */ +extern void abort (void); +extern void exit (int); + +int +main () +{ + __MWTACC (6, 10); + __MWTACC (7, 25); + __MADDACCS (5, 6); + if (__MRDACC (5) != 35) + abort (); + __MSUBACCS (4, 6); + if (__MRDACC (4) != -15) + abort (); + __MASACCS (4, 6); + if (__MRDACC (4) != 35 || __MRDACC (5) != -15) + abort (); + + __MWTACC (0, 100); + __MWTACC (1, 150); + __MWTACC (2, 1000); + __MWTACC (3, 1500); + __MDADDACCS (2, 0); + if (__MRDACC (2) != 250 || __MRDACC (3) != 2500) + abort (); + + __MWTACC (0, 100); + __MWTACC (1, 150); + __MWTACC (2, 1000); + __MWTACC (3, 1500); + __MDSUBACCS (2, 0); + if (__MRDACC (2) != -50 || __MRDACC (3) != -500) + abort (); + + __MWTACC (0, 100); + __MWTACC (1, 150); + __MWTACC (2, 1000); + __MWTACC (3, 1500); + __MDASACCS (0, 0); + if (__MRDACC (0) != 250 || __MRDACC (1) != -50) + abort (); + if (__MRDACC (2) != 2500 || __MRDACC (3) != -500) + abort (); + + exit (0); +} -- cgit v1.2.3