Rev | Line | |
---|
[206] | 1 | #include "stdafx.h"
|
---|
| 2 |
|
---|
[225] | 3 | #include <Compiler.h>
|
---|
[4] | 4 |
|
---|
| 5 | #ifdef _AMD64_
|
---|
| 6 | #include "../BasicCompiler64/opcode.h"
|
---|
| 7 | #else
|
---|
[5] | 8 | #include "../BasicCompiler32/opcode.h"
|
---|
[4] | 9 | #endif
|
---|
| 10 |
|
---|
| 11 | void InitGCVariables(void){
|
---|
| 12 | char temporary[255];
|
---|
[75] | 13 | Type type;
|
---|
| 14 | RELATIVE_VAR RelativeVar;
|
---|
[4] | 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 |
|
---|
[75] | 24 | GetVarOffsetReadWrite("_System_gc_StackRoot_StartPtr",&RelativeVar,type);
|
---|
[4] | 25 |
|
---|
| 26 | //mov rax,rsp
|
---|
[225] | 27 | compiler.codeGenerator.op_mov_RR(REG_RAX,REG_RSP);
|
---|
[4] | 28 |
|
---|
| 29 | //mov ptr[offset],rax/eax
|
---|
[229] | 30 | compiler.codeGenerator.op_mov_MR(PTR_SIZE,REG_RAX,0,(int)RelativeVar.offset,MOD_DISP32, Schedule::GlobalVar );
|
---|
[4] | 31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.