Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/pdp11/pdp11.md @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | f6334be47118 |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 ;;- Machine description for the pdp11 for GNU C compiler | 1 ;;- Machine description for the pdp11 for GNU C compiler |
2 ;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2004, 2005 | 2 ;; Copyright (C) 1994-2017 Free Software Foundation, Inc. |
3 ;; 2007, 2008, 2010 Free Software Foundation, Inc. | |
4 ;; Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). | 3 ;; Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). |
5 | 4 |
6 ;; This file is part of GCC. | 5 ;; This file is part of GCC. |
7 | 6 |
8 ;; GCC is free software; you can redistribute it and/or modify | 7 ;; GCC is free software; you can redistribute it and/or modify |
19 ;; along with GCC; see the file COPYING3. If not see | 18 ;; along with GCC; see the file COPYING3. If not see |
20 ;; <http://www.gnu.org/licenses/>. | 19 ;; <http://www.gnu.org/licenses/>. |
21 | 20 |
22 (include "predicates.md") | 21 (include "predicates.md") |
23 (include "constraints.md") | 22 (include "constraints.md") |
23 | |
24 (define_c_enum "unspecv" | |
25 [ | |
26 UNSPECV_BLOCKAGE | |
27 UNSPECV_SETD | |
28 UNSPECV_SETI | |
29 ]) | |
24 | 30 |
25 (define_constants | 31 (define_constants |
26 [ | 32 [ |
27 ;; Register numbers | 33 ;; Register numbers |
28 (R0_REGNUM 0) | 34 (R0_REGNUM 0) |
102 ; modes for both operands. | 108 ; modes for both operands. |
103 (set_attr "length" "6")]) | 109 (set_attr "length" "6")]) |
104 | 110 |
105 ;; define function units | 111 ;; define function units |
106 | 112 |
113 ;; Prologue and epilogue support. | |
114 | |
115 (define_expand "prologue" | |
116 [(const_int 0)] | |
117 "" | |
118 { | |
119 pdp11_expand_prologue (); | |
120 DONE; | |
121 }) | |
122 | |
123 (define_expand "epilogue" | |
124 [(const_int 0)] | |
125 "" | |
126 { | |
127 pdp11_expand_epilogue (); | |
128 DONE; | |
129 }) | |
130 | |
131 (define_expand "return" | |
132 [(return)] | |
133 "reload_completed && !frame_pointer_needed && pdp11_sp_frame_offset () == 0" | |
134 "") | |
135 | |
136 (define_insn "*rts" | |
137 [(return)] | |
138 "" | |
139 "rts pc") | |
140 | |
141 (define_insn "blockage" | |
142 [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)] | |
143 "" | |
144 "" | |
145 [(set_attr "length" "0")]) | |
146 | |
147 (define_insn "setd" | |
148 [(unspec_volatile [(const_int 0)] UNSPECV_SETD)] | |
149 "" | |
150 "setd") | |
151 | |
152 (define_insn "seti" | |
153 [(unspec_volatile [(const_int 0)] UNSPECV_SETI)] | |
154 "" | |
155 "seti") | |
156 | |
107 ;; arithmetic - values here immediately when next insn issued | 157 ;; arithmetic - values here immediately when next insn issued |
108 ;; or does it mean the number of cycles after this insn was issued? | 158 ;; or does it mean the number of cycles after this insn was issued? |
109 ;; how do I say that fpu insns use cpu also? (pre-interaction phase) | 159 ;; how do I say that fpu insns use cpu also? (pre-interaction phase) |
110 | 160 |
111 ;(define_function_unit "cpu" 1 1 (eq_attr "type" "arith") 0 0) | 161 ;(define_function_unit "cpu" 1 1 (eq_attr "type" "arith") 0 0) |
321 (define_expand "movmemhi" | 371 (define_expand "movmemhi" |
322 [(parallel [(set (match_operand:BLK 0 "general_operand" "=g,g") | 372 [(parallel [(set (match_operand:BLK 0 "general_operand" "=g,g") |
323 (match_operand:BLK 1 "general_operand" "g,g")) | 373 (match_operand:BLK 1 "general_operand" "g,g")) |
324 (use (match_operand:HI 2 "general_operand" "n,mr")) | 374 (use (match_operand:HI 2 "general_operand" "n,mr")) |
325 (use (match_operand:HI 3 "immediate_operand" "i,i")) | 375 (use (match_operand:HI 3 "immediate_operand" "i,i")) |
326 (clobber (match_scratch:HI 4 "=&r,X")) | 376 (clobber (match_scratch:HI 6 "=&r,X")) |
377 (clobber (match_dup 4)) | |
327 (clobber (match_dup 5)) | 378 (clobber (match_dup 5)) |
328 (clobber (match_dup 6)) | |
329 (clobber (match_dup 2))])] | 379 (clobber (match_dup 2))])] |
330 "(TARGET_BCOPY_BUILTIN)" | 380 "(TARGET_BCOPY_BUILTIN)" |
331 " | 381 " |
332 { | 382 { |
333 operands[0] | 383 operands[0] |
335 copy_to_mode_reg (Pmode, XEXP (operands[0], 0))); | 385 copy_to_mode_reg (Pmode, XEXP (operands[0], 0))); |
336 operands[1] | 386 operands[1] |
337 = replace_equiv_address (operands[1], | 387 = replace_equiv_address (operands[1], |
338 copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); | 388 copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); |
339 | 389 |
340 operands[5] = XEXP (operands[0], 0); | 390 operands[4] = XEXP (operands[0], 0); |
341 operands[6] = XEXP (operands[1], 0); | 391 operands[5] = XEXP (operands[1], 0); |
342 }") | 392 }") |
343 | 393 |
344 | 394 |
345 (define_insn "movmemhi1" | 395 (define_insn "movmemhi1" |
346 [(set (mem:BLK (match_operand:HI 0 "register_operand" "r,r")) | 396 [(set (mem:BLK (match_operand:HI 0 "register_operand" "r,r")) |