Commit 9d92695c by Adam Nemet Committed by Adam Nemet

octeon-exts-2.c: Compile it with -meb.

	* gcc.target/mips/octeon-exts-2.c: Compile it with -meb.
	* gcc.target/mips/octeon-exts-5.c: New test.
	* gcc.target/mips/octeon-bbit-3.c: Compile with -meb.  Add
	comment why this is necessary.

From-SVN: r140988
parent 88b98d1a
2008-10-08 Adam Nemet <anemet@caviumnetworks.com>
* gcc.target/mips/octeon-exts-2.c: Compile it with -meb.
* gcc.target/mips/octeon-exts-5.c: New test.
* gcc.target/mips/octeon-bbit-3.c: Compile with -meb. Add
comment why this is necessary.
2008-10-08 Jakub Jelinek <jakub@redhat.com> 2008-10-08 Jakub Jelinek <jakub@redhat.com>
PR target/36635 PR target/36635
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-mips-options "-O2 -march=octeon" } */
/* Force big-endian because for little-endian, combine generates this:
(if_then_else (ne (zero_extract:DI (subreg:DI (truncate:SI (reg:DI 196)) 0)
(const_int 1)
(const_int 0))
(const_int 0))
(label_ref 20)
(pc)))
which does not get recognized as a valid bbit pattern. The
middle-end should be able to simplify this further. */
/* { dg-mips-options "-O2 -march=octeon -meb" } */
/* { dg-final { scan-assembler-times "\tbbit\[01\]\t|\tbgez\t" 2 } } */ /* { dg-final { scan-assembler-times "\tbbit\[01\]\t|\tbgez\t" 2 } } */
/* { dg-final { scan-assembler-not "ext\t" } } */ /* { dg-final { scan-assembler-not "ext\t" } } */
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-mips-options "-O -march=octeon" } */ /* { dg-mips-options "-O -march=octeon -meb" } */
/* { dg-final { scan-assembler-times "\texts\t" 4 } } */ /* { dg-final { scan-assembler-times "\texts\t" 4 } } */
struct bar struct bar
......
/* -mel version of octeon-exts-2.c. */
/* { dg-do compile } */
/* { dg-mips-options "-O -march=octeon -mel" } */
/* { dg-final { scan-assembler-times "\texts\t" 4 } } */
struct bar
{
long long d:1;
unsigned long long c:48;
long long b:14;
unsigned long long a:1;
};
NOMIPS16 int
f1 (struct bar *s, int a)
{
return (int) s->b + a;
}
NOMIPS16 char
f2 (struct bar *s)
{
return s->d + 1;
}
NOMIPS16 int
f3 ()
{
struct bar s;
asm ("" : "=r"(s));
return (int) s.b + 1;
}
NOMIPS16 long long
f4 (struct bar *s)
{
return s->d;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment