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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [config/] [m32c/] [prologue.md] - Blame information for rev 12

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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