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

Last change on this file since 233 was 229, checked in by dai_9181, 17 years ago
File size: 757 bytes
Line 
1#include "stdafx.h"
2
3#include <Compiler.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 compiler.codeGenerator.op_mov_RR(REG_RAX,REG_RSP);
28
29 //mov ptr[offset],rax/eax
30 compiler.codeGenerator.op_mov_MR(PTR_SIZE,REG_RAX,0,(int)RelativeVar.offset,MOD_DISP32, Schedule::GlobalVar );
31}
Note: See TracBrowser for help on using the repository browser.