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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [or32/] [predicates.md] - Blame information for rev 820

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

Line No. Rev Author Line
1 38 julius
;; Predicate definitions for OR32
2
 
3
(define_predicate "cc_reg_operand"
4
  (match_code "subreg,reg")
5
{
6
  register_operand (op, mode);
7
 
8
  if (GET_CODE (op) == REG && REGNO (op) == 32)
9
    return 1;
10
 
11
  return 0;
12
})
13
 
14
(define_predicate "sibcall_insn_operand"
15
  (match_code "subreg,reg,symbol_ref")
16
{
17
  /* Disallow indirect through a virtual register.  This leads to
18
     compiler aborts when trying to eliminate them.  */
19
  if (GET_CODE (op) == REG
20
      && (op == arg_pointer_rtx
21
          || op == frame_pointer_rtx
22
          || (REGNO (op) >= FIRST_PSEUDO_REGISTER
23
              && REGNO (op) <= LAST_VIRTUAL_REGISTER)))
24
    {
25
 
26
      fprintf (stderr, "0\n");
27
      return 0;
28
    }
29
 
30
  /* Explicitly allow SYMBOL_REF even if pic.  */
31
  if (GET_CODE (op) == SYMBOL_REF)
32
    return 1;
33
 
34
  /* Otherwise we can only allow register operands.  */
35
  return register_operand (op, Pmode);
36
})
37
 
38
(define_predicate "input_operand"
39
  (match_code "subreg,reg,const_int,mem,const")
40
{
41
  /* If both modes are non-void they must be the same.  */
42
  if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op))
43
    return 0;
44
 
45
  /* Allow any one instruction integer constant, and all CONST_INT
46
     variants when we are working in DImode and !arch64.  */
47
  if (GET_MODE_CLASS (mode) == MODE_INT
48
      && ((GET_CODE (op) == CONST_INT)
49
          && (CONST_OK_FOR_LETTER_P (INTVAL (op), 'K')
50
              || CONST_OK_FOR_LETTER_P (INTVAL (op), 'M')
51
              || CONST_OK_FOR_LETTER_P (INTVAL (op), 'I'))))
52
    return 1;
53
 
54
  if (register_operand (op, mode))
55
    return 1;
56
 
57
  /* If this is a SUBREG, look inside so that we handle
58
     paradoxical ones.  */
59
  if (GET_CODE (op) == SUBREG)
60
    op = SUBREG_REG (op);
61
 
62
 
63
  /* Check for valid MEM forms.  */
64
  if (GET_CODE (op) == MEM)
65
    return memory_address_p (mode, XEXP (op, 0));
66
 
67
  return 0;
68
})
69
 
70
(define_predicate "sym_ref_mem_operand"
71
  (match_code "mem")
72
{
73
  if (GET_CODE (op) == MEM)
74
    {
75
      rtx t1 = XEXP (op, 0);
76
      if (GET_CODE (t1) == SYMBOL_REF)
77
        return 1;
78
    }
79
  return 0;
80
})

powered by: WebSVN 2.1.0

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