Changeset 20 in dev for BasicCompiler64/stack_frame.cpp
- Timestamp:
- Dec 28, 2006, 5:24:48 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/stack_frame.cpp
r3 r20 39 39 return -(answer_sp-0x08); 40 40 } 41 voidCStackFrame::push(int reg){41 int CStackFrame::push(int reg){ 42 42 now_sp-=sizeof(_int64); 43 43 if(lowest_sp>now_sp) lowest_sp=now_sp; 44 44 45 if(reg==REG_NON) return ;45 if(reg==REG_NON) return now_sp; 46 46 47 47 //mov qword ptr[rsp+offset],reg … … 52 52 add(); 53 53 obp+=sizeof(long); 54 55 return now_sp; 54 56 } 55 57 void CStackFrame::push(int xmm_reg,int var_size){ … … 77 79 obp+=sizeof(long); 78 80 } 79 void CStackFrame::ref (int reg){81 void CStackFrame::ref_offset_data( int reg, int sp_offset ){ 80 82 //mov reg,qword ptr[rsp+offset] ※スタックフレームを利用 81 op_mov_RM(sizeof(_int64),reg,REG_RSP, now_sp,MOD_BASE_DISP32);83 op_mov_RM(sizeof(_int64),reg,REG_RSP,sp_offset,MOD_BASE_DISP32); 82 84 83 85 //スケジュールをセット … … 85 87 add(); 86 88 obp+=sizeof(long); 89 } 90 void CStackFrame::ref(int reg){ 91 ref_offset_data( reg, now_sp ); 87 92 } 88 93 void CStackFrame::ref(int xmm_reg,int var_size){
Note:
See TracChangeset
for help on using the changeset viewer.