source: dev/trunk/abdev/BasicCompiler_Common/gc.cpp@ 223

Last change on this file since 223 was 223, checked in by dai_9181, 17 years ago
File size: 764 bytes
Line 
1#include "stdafx.h"
2
3#include "common.h"
4
5#ifdef _AMD64_
6#include "../BasicCompiler64/opcode.h"
7#else
8#include "../BasicCompiler32/opcode.h"
9#endif
10
11void InitGCVariables(void){
12 char temporary[255];
13 Type type;
14 RELATIVE_VAR RelativeVar;
15
16
17 ///////////////////////////////
18 // スタックフレームの開始位置
19 ///////////////////////////////
20
21 sprintf(temporary,"_System_gc_StackRoot_StartPtr%c%c*LONG_PTR",1,ESC_AS);
22 OpcodeDim(temporary,0);
23
24 GetVarOffsetReadWrite("_System_gc_StackRoot_StartPtr",&RelativeVar,type);
25
26 //mov rax,rsp
27 op_mov_RR(REG_RAX,REG_RSP);
28
29 //mov ptr[offset],rax/eax
30 op_mov_MR(PTR_SIZE,REG_RAX,0,(int)RelativeVar.offset,MOD_DISP32);
31 obp-=sizeof(long);
32 pobj_GlobalVarSchedule->add();
33 obp+=sizeof(long);
34
35}
Note: See TracBrowser for help on using the repository browser.