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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr45865.c] - Blame information for rev 754

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
 
3
typedef struct rtx_def *rtx;
4
enum machine_mode {
5
  VOIDmode,
6
  CCFPmode,
7
  CCFPUmode,
8
  MAX_MACHINE_MODE
9
};
10
enum mode_class {
11
  MODE_CC,
12
  MODE_FLOAT,
13
  MODE_COMPLEX_FLOAT,
14
  MODE_VECTOR_FLOAT
15
};
16
extern const enum mode_class mode_class[(int) MAX_MACHINE_MODE];
17
enum rtx_code {
18
  UNKNOWN,
19
  GEU,
20
  ORDERED,
21
  CONST_INT
22
};
23
struct rtx_def {
24
  unsigned int code: 16;
25
  unsigned int mode : 8;
26
};
27
extern enum rtx_code reverse_condition (enum rtx_code);
28
enum rtx_code
29
reversed_comparison_code_parts (enum rtx_code code, rtx insn, rtx arg0,
30
                                rtx arg1)
31
{
32
  enum machine_mode mode;
33
  mode = (enum machine_mode) (arg0)->mode;
34
  if (mode == VOIDmode)
35
    mode = (enum machine_mode) (arg1)->mode;
36
  if ((mode_class[(int) (mode)]) == MODE_CC)
37
    return (mode != CCFPmode && mode != CCFPUmode
38
            ? reverse_condition (code)
39
            : reverse_condition_maybe_unordered (code));
40
  switch (code)
41
    {
42
    case GEU:
43
      return reverse_condition (code);
44
    case ORDERED:
45
      return UNKNOWN;
46
    }
47
  if (((enum rtx_code) (arg0)->code) == CONST_INT
48
      || (((enum machine_mode) (arg0)->mode) != VOIDmode
49
          && ! ((mode_class[(int) (mode)]) == MODE_FLOAT
50
                || (mode_class[(int) (mode)]) == MODE_COMPLEX_FLOAT
51
                || (mode_class[(int) (mode)]) == MODE_VECTOR_FLOAT)))
52
    return reverse_condition (code);
53
  return UNKNOWN;
54
}

powered by: WebSVN 2.1.0

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