Commit 8662b2ba by Richard Henderson Committed by Richard Henderson

pdp11.md (define_c_enum "unspecv"): New.

	* config/pdp11/pdp11.md (define_c_enum "unspecv"): New.
	(prologue, epilogue): New.
	(return, *rts): New.
	(blockage, setd, seti): New.
	* config/pdp11/pdp11.c (TARGET_ASM_FUNCTION_PROLOGUE): Remove.
	(TARGET_ASM_FUNCTION_EPILOGUE): Remove.
	(pdp11_saved_regno): New.
	(pdp11_expand_prologue): Rename from pdp11_output_function_prologue;
	generate rtl instead of text.
	(pdp11_expand_epilogue): Similarly from pdp11_output_function_epilogue.
	(pdp11_sp_frame_offset): Export.  Use pdp11_saved_regno.
	* config/pdp11/pdp11-protos.h: Update.

From-SVN: r176082
parent 28b21ebb
2011-07-09 Richard Henderson <rth@redhat.com> 2011-07-09 Richard Henderson <rth@redhat.com>
* config/pdp11/pdp11.md (define_c_enum "unspecv"): New.
(prologue, epilogue): New.
(return, *rts): New.
(blockage, setd, seti): New.
* config/pdp11/pdp11.c (TARGET_ASM_FUNCTION_PROLOGUE): Remove.
(TARGET_ASM_FUNCTION_EPILOGUE): Remove.
(pdp11_saved_regno): New.
(pdp11_expand_prologue): Rename from pdp11_output_function_prologue;
generate rtl instead of text.
(pdp11_expand_epilogue): Similarly from pdp11_output_function_epilogue.
(pdp11_sp_frame_offset): Export. Use pdp11_saved_regno.
* config/pdp11/pdp11-protos.h: Update.
2011-07-09 Richard Henderson <rth@redhat.com>
* config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't * config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
try to insert an rtl prologue here. try to insert an rtl prologue here.
(rs6000_output_function_epilogue): Similarly. (rs6000_output_function_epilogue): Similarly.
......
...@@ -38,6 +38,7 @@ typedef enum { no_action, dec_before, inc_after } pdp11_action; ...@@ -38,6 +38,7 @@ typedef enum { no_action, dec_before, inc_after } pdp11_action;
typedef enum { little, either, big } pdp11_partorder; typedef enum { little, either, big } pdp11_partorder;
extern bool pdp11_expand_operands (rtx *, rtx [][2], int, extern bool pdp11_expand_operands (rtx *, rtx [][2], int,
pdp11_action *, pdp11_partorder); pdp11_action *, pdp11_partorder);
extern int pdp11_sp_frame_offset (void);
extern int pdp11_initial_elimination_offset (int, int); extern int pdp11_initial_elimination_offset (int, int);
extern enum reg_class pdp11_regno_reg_class (int); extern enum reg_class pdp11_regno_reg_class (int);
...@@ -45,3 +46,5 @@ extern enum reg_class pdp11_regno_reg_class (int); ...@@ -45,3 +46,5 @@ extern enum reg_class pdp11_regno_reg_class (int);
extern void output_ascii (FILE *, const char *, int); extern void output_ascii (FILE *, const char *, int);
extern void pdp11_asm_output_var (FILE *, const char *, int, int, bool); extern void pdp11_asm_output_var (FILE *, const char *, int, int, bool);
extern void pdp11_expand_prologue (void);
extern void pdp11_expand_epilogue (void);
...@@ -22,6 +22,13 @@ ...@@ -22,6 +22,13 @@
(include "predicates.md") (include "predicates.md")
(include "constraints.md") (include "constraints.md")
(define_c_enum "unspecv"
[
UNSPECV_BLOCKAGE
UNSPECV_SETD
UNSPECV_SETI
])
(define_constants (define_constants
[ [
;; Register numbers ;; Register numbers
...@@ -104,6 +111,50 @@ ...@@ -104,6 +111,50 @@
;; define function units ;; define function units
;; Prologue and epilogue support.
(define_expand "prologue"
[(const_int 0)]
""
{
pdp11_expand_prologue ();
DONE;
})
(define_expand "epilogue"
[(const_int 0)]
""
{
pdp11_expand_epilogue ();
DONE;
})
(define_expand "return"
[(return)]
"reload_completed && !frame_pointer_needed && pdp11_sp_frame_offset () == 0"
"")
(define_insn "*rts"
[(return)]
""
"rts pc")
(define_insn "blockage"
[(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)]
""
""
[(set_attr "length" "0")])
(define_insn "setd"
[(unspec_volatile [(const_int 0)] UNSPECV_SETD)]
""
"setd")
(define_insn "seti"
[(unspec_volatile [(const_int 0)] UNSPECV_SETI)]
""
"seti")
;; arithmetic - values here immediately when next insn issued ;; arithmetic - values here immediately when next insn issued
;; or does it mean the number of cycles after this insn was issued? ;; or does it mean the number of cycles after this insn was issued?
;; how do I say that fpu insns use cpu also? (pre-interaction phase) ;; how do I say that fpu insns use cpu also? (pre-interaction phase)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment