Line | |
---|
1 | #include "../BasicCompiler_Common/common.h"
|
---|
2 | #include "Opcode.h"
|
---|
3 |
|
---|
4 | ////////////////////////////////////
|
---|
5 | // 再配置が必要なステートメント
|
---|
6 | ////////////////////////////////////
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 | int DimStatementInsertPoint;
|
---|
11 |
|
---|
12 | void InsertDimStatement_ToProcHead(char *lpszCommand){
|
---|
13 | char *temp_buffer;
|
---|
14 | int temp_size;
|
---|
15 |
|
---|
16 | temp_size=obp-DimStatementInsertPoint;
|
---|
17 | temp_buffer=(char *)HeapAlloc(hHeap,0,temp_size);
|
---|
18 | memcpy(temp_buffer,OpBuffer+DimStatementInsertPoint,temp_size);
|
---|
19 |
|
---|
20 | //各種スケジューリング情報を再配置
|
---|
21 | NativeBuffer_StaticRelocation(DimStatementInsertPoint,temp_size,0x10000000);
|
---|
22 |
|
---|
23 | int back_obp;
|
---|
24 | back_obp=obp;
|
---|
25 | obp=DimStatementInsertPoint;
|
---|
26 |
|
---|
27 | //OpcodeDim(lpszCommand,0);
|
---|
28 | OpBuffer[obp++]=(char)0xcc;
|
---|
29 | OpcodeDim(lpszCommand,DIMFLAG_NONCALL_CONSTRACTOR);
|
---|
30 |
|
---|
31 | int obp_offset;
|
---|
32 | obp_offset=obp-DimStatementInsertPoint;
|
---|
33 |
|
---|
34 | memcpy(OpBuffer+obp,temp_buffer,temp_size);
|
---|
35 |
|
---|
36 | HeapDefaultFree(temp_buffer);
|
---|
37 |
|
---|
38 | obp+=temp_size;
|
---|
39 |
|
---|
40 |
|
---|
41 | //各種スケジューリング情報を再配置
|
---|
42 | NativeBuffer_StaticRelocation(DimStatementInsertPoint+0x10000000,temp_size,obp_offset-0x10000000);
|
---|
43 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.