00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #include "defs.h"
00037 #include "tn.h"
00038 #include "op.h"
00039 #include "bb.h"
00040 #include "wn.h"
00041 #include "symtab.h"
00042 #include "errors.h"
00043 #include "targ_sim.h"
00044 #include "ttype.h"
00045 #include "topcode.h"
00046 #include "register.h"
00047 #include "entry_exit_targ.h"
00048 #include "calls.h"
00049 #include "be_util.h"
00050 #include "data_layout.h"
00051 #include "stblock.h"
00052 #include "cgtarget.h"
00053 #include "whirl2ops.h"
00054
00055 void
00056 EETARG_Save_Pfs (TN *saved_pfs, OPS *ops)
00057 {
00058 }
00059
00060
00061 void
00062 EETARG_Restore_Pfs (TN *saved_pfs, OPS *ops)
00063 {
00064 }
00065
00066
00067 void
00068 EETARG_Adjust_SP_For_Entry( TN *incr, OPS *ops )
00069 {
00070 FmtAssert(FALSE, ("NYI: EETARG_Adjust_SP_For_Entry"));
00071 }
00072
00073 void
00074 EETARG_Adjust_SP_For_Exit( TN *incr, OPS *ops )
00075 {
00076 FmtAssert(FALSE, ("NYI: EETARG_Adjust_SP_For_Exit"));
00077 }
00078
00079 void
00080 EETARG_Fixup_Entry_Code (BB *bb)
00081 {
00082 }
00083
00084 void
00085 EETARG_Init_Entry_Exit_Code (WN *pu_wn, BOOL need_frame_pointer)
00086 {
00087 }
00088
00089 void EETARG_Save_Extra_Callee_Tns (OPS *ops)
00090 {
00091 }
00092
00093 void EETARG_Restore_Extra_Callee_Tns (OPS *ops)
00094 {
00095 }
00096
00097
00098 OP *
00099 EETARG_Build_Jump_Instead_Of_Call (OP *call_op)
00100 {
00101 OP *jump_op;
00102 TOP jump_top;
00103 TOP call_top = OP_code(call_op);
00104 switch (call_top) {
00105 case TOP_jal:
00106 jump_top = TOP_j;
00107 break;
00108 case TOP_jalr:
00109 jump_top = TOP_jr;
00110 break;
00111 default:
00112 FmtAssert(FALSE, ("don't know how to generate tail call for %s",
00113 TOP_Name(call_top)));
00114
00115 }
00116
00117 Is_True(OP_opnds(call_op) == 1, ("unexpected number of call opnds"));
00118 #if defined(TARG_SL)
00119 if (jump_top == TOP_jr) {
00120 if (OP_opnd(call_op, 0) != JA_TN) {
00121 OP *mvop = Mk_OP(TOP_mvtc, JA_TN, OP_opnd(call_op, 0));
00122 OP_srcpos(mvop) = OP_srcpos(call_op);
00123 BB_Insert_Op_Before(call_op->bb, call_op, mvop);
00124 }
00125 jump_op = Mk_OP(jump_top, JA_TN);
00126 OP_srcpos(jump_op) = OP_srcpos(call_op);
00127 Is_True(OP_opnds(jump_op) == 1, ("unexpected number of jump opnds"));
00128 return jump_op;
00129 }
00130 #endif
00131 jump_op = Mk_OP(jump_top, OP_opnd(call_op, 0));
00132 OP_srcpos(jump_op) = OP_srcpos(call_op);
00133
00134 Is_True(OP_opnds(jump_op) == 1, ("unexpected number of jump opnds"));
00135 return jump_op;
00136 }