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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [m32c/] [prologue.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
;; Machine Descriptions for R8C/M16C/M32C
2
;; Copyright (C) 2005, 2007 Free Software Foundation, Inc.
3
;; Contributed by Red Hat.
4
;;
5
;; This file is part of GCC.
6
;;
7
;; GCC is free software; you can redistribute it and/or modify it
8
;; under the terms of the GNU General Public License as published
9
;; by the Free Software Foundation; either version 3, or (at your
10
;; option) any later version.
11
;;
12
;; GCC is distributed in the hope that it will be useful, but WITHOUT
13
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14
;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
15
;; License for more details.
16
;;
17
;; You should have received a copy of the GNU General Public License
18
;; along with GCC; see the file COPYING3.  If not see
19
;; .
20
 
21
;; Prologue and epilogue patterns
22
 
23
(define_expand "prologue"
24
  [(const_int 1)]
25
  ""
26
  "m32c_emit_prologue(); DONE;"
27
  )
28
 
29
; For the next two, operands[0] is the amount of stack space we want
30
; to reserve.
31
 
32
; We assume dwarf2out will process each set in sequence.
33
(define_insn "prologue_enter_16"
34
  [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNO)))
35
        (reg:HI FB_REGNO))
36
   (set (reg:HI FB_REGNO)
37
        (reg:HI SP_REGNO))
38
   (set (reg:HI SP_REGNO)
39
        (minus:HI (reg:HI SP_REGNO)
40
                   (match_operand 0 "const_int_operand" "i")))
41
   ]
42
  "TARGET_A16"
43
  "enter\t%0"
44
  [(set_attr "flags" "x")]
45
  )
46
 
47
(define_insn "prologue_enter_24"
48
  [(set (mem:SI (pre_dec:PSI (reg:PSI SP_REGNO)))
49
        (reg:SI FB_REGNO))
50
   (set (reg:PSI FB_REGNO)
51
        (reg:PSI SP_REGNO))
52
   (set (reg:PSI SP_REGNO)
53
        (minus:PSI (reg:PSI SP_REGNO)
54
                   (match_operand 0 "const_int_operand" "i")))
55
   ]
56
  "TARGET_A24"
57
  "enter\t%0"
58
  [(set_attr "flags" "x")]
59
  )
60
 
61
; Just a comment, for debugging the assembler output.
62
(define_insn "prologue_end"
63
  [(unspec_volatile [(const_int 0)] UNS_PROLOGUE_END)]
64
  ""
65
  "; end of prologue"
66
  [(set_attr "flags" "n")]
67
  )
68
 
69
 
70
 
71
(define_expand "epilogue"
72
  [(const_int 1)]
73
  ""
74
  "m32c_emit_epilogue(); DONE;"
75
  )
76
 
77
(define_expand "eh_return"
78
  [(match_operand:PSI 0 "" "")]
79
  ""
80
  "m32c_emit_eh_epilogue(operands[0]); DONE;"
81
  )
82
 
83
(define_insn "eh_epilogue"
84
  [(set (pc)
85
        (unspec_volatile [(match_operand 0 "m32c_r1_operand" "")
86
                          (match_operand 1 "m32c_r0_operand" "")
87
                          ] UNS_EH_EPILOGUE))]
88
  ""
89
  "jmp.a\t__m32c_eh_return"
90
  [(set_attr "flags" "x")]
91
  )
92
 
93
(define_insn "epilogue_exitd"
94
  [(set (reg:PSI SP_REGNO)
95
        (reg:PSI FB_REGNO))
96
   (set (reg:PSI FB_REGNO)
97
        (mem:PSI (reg:PSI SP_REGNO)))
98
   (set (reg:PSI SP_REGNO)
99
        (plus:PSI (reg:PSI SP_REGNO)
100
              (match_operand 0 "const_int_operand" "i")))
101
   (return)
102
   ]
103
  ""
104
  "exitd"
105
  [(set_attr "flags" "x")]
106
  )
107
 
108
(define_insn "epilogue_reit"
109
  [(set (reg:PSI SP_REGNO)
110
        (plus:PSI (reg:PSI SP_REGNO)
111
              (match_operand 0 "const_int_operand" "i")))
112
   (return)
113
   ]
114
  ""
115
  "reit"
116
  [(set_attr "flags" "x")]
117
  )
118
 
119
(define_insn "epilogue_rts"
120
  [(return)
121
   ]
122
  ""
123
  "rts"
124
  [(set_attr "flags" "x")]
125
  )
126
 
127
(define_insn "epilogue_start"
128
  [(unspec_volatile [(const_int 0)] UNS_EPILOGUE_START)]
129
  ""
130
  "; start of epilogue"
131
  [(set_attr "flags" "n")]
132
  )
133
 
134
 
135
; These are used by the prologue/epilogue code.
136
 
137
(define_insn "pushm"
138
  [(unspec [(match_operand 0 "const_int_operand" "i")] UNS_PUSHM)]
139
  ""
140
  "pushm\t%p0"
141
  [(set_attr "flags" "n")]
142
  )
143
 
144
(define_insn "popm"
145
  [(unspec [(match_operand 0 "const_int_operand" "i")] UNS_POPM)]
146
  ""
147
  "popm\t%p0"
148
  [(set_attr "flags" "n")]
149
  )

powered by: WebSVN 2.1.0

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