OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [microblaze/] [isa/] [mul.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-options "-O3 -mcpu=v6.00.a -mno-xl-soft-mul" } */
2
 
3
volatile int m1, m2, m3;
4
volatile long l1, l2;
5
volatile long long llp;
6
volatile unsigned int u1, u2, u3;
7
 
8
volatile unsigned long ul1, ul2;
9
volatile unsigned long long ullp;
10
 
11
int test_mul () {
12
 
13
  /* { dg-final { scan-assembler "mul\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1])\[^0-9]" } } */
14
    m1 = m2 * m3 ;
15
 
16
  /* { dg-final { scan-assembler "muli\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),(0x\[0-9a-fA-F]+|\[+-]*\[0-9]+)" } } */
17
    m3 = m1 * 1234 ;
18
 
19
  /* { dg-final { scan-assembler-not "mulh" } } */
20
    llp = ((long long)l1 * l2);
21
 
22
  /* { dg-final { scan-assembler-not "mulhu" } } */
23
    ullp = ((unsigned long long)ul1 * ul2);
24
 
25
  /* { dg-final { scan-assembler-not "mulhsu" } } */
26
    llp = ((long long)l1 * ul2);
27
 
28
  /* { dg-final { scan-assembler-not "bslli" } } */
29
    m3 = m2 << 25;
30
 
31
  /* { dg-final { scan-assembler-not "bsll" } } */
32
    m2 = m1 << m3;
33
 
34
  /* { dg-final { scan-assembler-not "bsrai" } } */
35
    m3 = m2 >> 25;
36
 
37
  /* { dg-final { scan-assembler-not "bsra" } } */
38
    m2 = m1 >> m3;
39
 
40
  /* { dg-final { scan-assembler-not "idiv" } } */
41
    m1 = m2 / m1;
42
 
43
  /* { dg-final { scan-assembler-not "idivu" } } */
44
    u1 = u2 / u3;
45
 
46
  /* { dg-final { scan-assembler-not "pcmpne" } } */
47
    m3 = (m3 != m1);
48
 
49
  /* { dg-final { scan-assembler-not "pcmpeq" } } */
50
    return (m1 == m2);
51
}
52
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.