Changeset 231 in dev for trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
- Timestamp:
- Jul 25, 2007, 12:02:30 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
r225 r231 677 677 } 678 678 } 679 else if(i3==DEF_DOUBLE){ 679 else if( i3==DEF_DOUBLE 680 || i3 == DEF_SINGLE ) 681 { 680 682 //fld qword ptr[ebp+offset] 681 OpBuffer[obp++]=(char)0xDD; 682 OpBuffer[obp++]=(char)0x85; 683 *((long *)(OpBuffer+obp))=RelativeVar.offset; 684 AddLocalVarAddrSchedule(); 685 obp+=sizeof(long); 686 } 687 else if(i3==DEF_SINGLE){ 688 //fld dword ptr[ebp+offset] 689 OpBuffer[obp++]=(char)0xD9; 690 OpBuffer[obp++]=(char)0x85; 691 *((long *)(OpBuffer+obp))=RelativeVar.offset; 692 AddLocalVarAddrSchedule(); 693 obp+=sizeof(long); 683 compiler.codeGenerator.op_fld_base_offset( i3, REG_EBP, RelativeVar.offset, Schedule::LocalVar ); 694 684 } 695 685 else if(i3==DEF_INT64||i3==DEF_QWORD){ 696 686 //mov eax,dword ptr[ebp+offset] 697 OpBuffer[obp++]=(char)0x8B; 698 OpBuffer[obp++]=(char)0x85; 699 *((long *)(OpBuffer+obp))=RelativeVar.offset; 700 AddLocalVarAddrSchedule(); 701 obp+=sizeof(long); 687 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::LocalVar ); 702 688 703 689 //mov edx,dword ptr[ebp+offset+sizeof(long)] 704 OpBuffer[obp++]=(char)0x8B; 705 OpBuffer[obp++]=(char)0x95; 706 *((long *)(OpBuffer+obp))=RelativeVar.offset+sizeof(long); 707 AddLocalVarAddrSchedule(); 708 obp+=sizeof(long); 690 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EDX, REG_EBP, RelativeVar.offset+sizeof(long), MOD_BASE_DISP32, Schedule::LocalVar ); 709 691 } 710 692 else if(i3==DEF_LONG||i3==DEF_DWORD|| 711 693 IsPtrType(i3)){ 712 694 //mov eax,dword ptr[ebp+offset] 713 OpBuffer[obp++]=(char)0x8B; 714 OpBuffer[obp++]=(char)0x85; 715 *((long *)(OpBuffer+obp))=RelativeVar.offset; 716 AddLocalVarAddrSchedule(); 717 obp+=sizeof(long); 695 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::LocalVar ); 718 696 } 719 697 else if(i3==DEF_INTEGER||i3==DEF_WORD || (Smoothie::IsUnicode()&&i3==DEF_CHAR)){ … … 722 700 723 701 //mov ax,word ptr[ebp+offset] 724 OpBuffer[obp++]=(char)0x66; 725 OpBuffer[obp++]=(char)0x8B; 726 OpBuffer[obp++]=(char)0x85; 727 *((long *)(OpBuffer+obp))=RelativeVar.offset; 728 AddLocalVarAddrSchedule(); 729 obp+=sizeof(long); 702 compiler.codeGenerator.op_mov_RM( sizeof(short), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::LocalVar ); 730 703 } 731 704 else if(i3==DEF_SBYTE||i3==DEF_BYTE||i3==DEF_BOOLEAN || (Smoothie::IsUnicode()==false&&i3==DEF_CHAR)){ … … 734 707 735 708 //mov al,byte ptr[ebp+offset] 736 OpBuffer[obp++]=(char)0x8A; 737 OpBuffer[obp++]=(char)0x85; 738 *((long *)(OpBuffer+obp))=RelativeVar.offset; 739 AddLocalVarAddrSchedule(); 740 obp+=sizeof(long); 709 compiler.codeGenerator.op_mov_RM( sizeof(char), REG_EAX, REG_EBP, RelativeVar.offset, MOD_BASE_DISP32, Schedule::LocalVar ); 741 710 } 742 711 }
Note:
See TracChangeset
for help on using the changeset viewer.