Changeset 759 in dev for branches/x64_compiler_on_32/abdev


Ignore:
Timestamp:
Sep 26, 2008, 11:49:14 PM (16 years ago)
Author:
イグトランス (egtra)
Message:

マクロBUILD_X64_COMPILERの導入

Location:
branches/x64_compiler_on_32/abdev
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/CDebugThreadInfo.cpp

    r741 r759  
    2222
    2323BOOL CDebugThreadInfo::Reflesh(int ThreadNum){
     24#if defined _WIN64 || !defined BUILD_X64_COMPILER
    2425    Free();
    2526
     
    102103
    103104    return 1;
     105#else
     106    return 0;
     107#endif
    104108}
    105109
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Compile.cpp

    r743 r759  
    77#include "../BasicCompiler_Common/common.h"
    88
    9 #ifdef _AMD64_
     9#if defined _AMD64_ || defined BUILD_X64_COMPILER
    1010#include "../compiler_x64/opcode.h"
    1111#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/DebugMiddleFile.cpp

    r750 r759  
    33#include "../BasicCompiler_Common/DebugSection.h"
    44
    5 #ifdef _AMD64_
     5#if defined _AMD64_ || defined BUILD_X64_COMPILER
    66#include "../compiler_x64/opcode.h"
    77#else
     
    104104        // オブジェクトモジュールリストに類似したソースコードリストを作成
    105105        BasicSources sources;
     106        sources.reserve( compiler.staticLibraries.size() );
    106107        foreach( const ObjectModule *pObjectModule, compiler.staticLibraries )
    107108        {
     
    240241    int maxLineInfoNum = *(long *)(buffer+i2);
    241242    i2+=sizeof(long);
     243    _oldSourceLines.reserve( maxLineInfoNum );
    242244    for(i3=0;i3<maxLineInfoNum;i3++){
    243245        int nativeCodePos = *(long *)(buffer+i2);
     
    319321
    320322    int pe_size;
    321 #ifdef _AMD64_
     323#if defined _AMD64_ || defined BUILD_X64_COMPILER
    322324    IMAGE_NT_HEADERS64 pe_hdr;
    323325    pe_size=sizeof(IMAGE_NT_HEADERS64);
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Diagnose.cpp

    r750 r759  
    33#include "../BasicCompiler_Common/common.h"
    44
    5 #ifdef _AMD64_
     5#if defined _AMD64_ || defined BUILD_X64_COMPILER
    66#include "../compiler_x64/opcode.h"
    77#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/MakeExe.cpp

    r750 r759  
    192192
    193193            char coreFilePath[MAX_PATH];
    194 #if defined _AMD64_
     194#if defined _AMD64_ || defined BUILD_X64_COMPILER
    195195            sprintf( coreFilePath, "..\\lib\\x64\\%s", coreFileName );
    196196#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Object.cpp

    r485 r759  
    55#include "../BasicCompiler_Common/common.h"
    66
    7 #ifdef _AMD64_
     7#if defined _AMD64_ || defined BUILD_X64_COMPILER
    88#include "../compiler_x64/opcode.h"
    99#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/OldStatement.cpp

    r485 r759  
    33#include "common.h"
    44
    5 #ifdef _AMD64_
     5#if defined _AMD64_ || defined BUILD_X64_COMPILER
    66#include "../compiler_x64/opcode.h"
    77#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Overload.cpp

    r485 r759  
    33#include "../BasicCompiler_Common/common.h"
    44
    5 #ifdef _AMD64_
     5#if defined _AMD64_ || defined BUILD_X64_COMPILER
    66#include "../compiler_x64/opcode.h"
    77#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/PESchedule.cpp

    r750 r759  
    55#include "../BasicCompiler_Common/common.h"
    66
    7 #ifdef _AMD64_
     7#if defined _AMD64_ || defined BUILD_X64_COMPILER
    88#include "../compiler_x64/opcode.h"
    99#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/ParamImpl.cpp

    r750 r759  
    11#include "stdafx.h"
    22
    3 #ifdef _AMD64_
     3#if defined _AMD64_ || defined BUILD_X64_COMPILER
    44#include "../compiler_x64/opcode.h"
    55#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/RSrcSection.cpp

    r750 r759  
    864864
    865865        //プラットフォームをセット
    866 #ifdef _AMD64_
     866#if defined _AMD64_ || defined BUILD_X64_COMPILER
    867867        temporary=PermutationString(temporary,"#PLATFORM#","amd64");
    868868#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Subroutine.cpp

    r751 r759  
    11#include "stdafx.h"
    22
    3 #ifdef _AMD64_
     3#if defined _AMD64_ || defined BUILD_X64_COMPILER
    44#include "../compiler_x64/opcode.h"
    55#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/VariableOpe.cpp

    r750 r759  
    11#include "stdafx.h"
    22
    3 #ifdef _AMD64_
     3#if defined _AMD64_ || defined BUILD_X64_COMPILER
    44#include "../compiler_x64/opcode.h"
    55#else
     
    7474            break;
    7575    }
    76 #ifdef _AMD64_
     76#if defined _AMD64_ || defined BUILD_X64_COMPILER
    7777    return IsPtrType(type);
    7878#else
     
    9393            break;
    9494    }
    95 #ifdef _AMD64_
     95#if defined _AMD64_ || defined BUILD_X64_COMPILER
    9696    if(IsPtrType(type)) return DEF_INT64;
    9797#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/WatchList.cpp

    r750 r759  
    55#include "common.h"
    66
    7 #ifdef _AMD64_
     7#if defined _AMD64_ || defined BUILD_X64_COMPILER
    88#include "../compiler_x64/opcode.h"
    99#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/calculation.cpp

    r672 r759  
    55#include "../BasicCompiler_Common/common.h"
    66
    7 #ifdef _AMD64_
     7#if defined _AMD64_ || defined BUILD_X64_COMPILER
    88#include "../compiler_x64/opcode.h"
    99#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/common.h

    r702 r759  
    66#include <option.h>
    77
    8 #ifdef _AMD64_
     8#if defined _AMD64_ || defined BUILD_X64_COMPILER
    99#include "../compiler_x64/resource.h"
    1010#include "../compiler_x64/CommandValue.h"
     
    3939
    4040
    41 #ifdef _AMD64_
     41#if defined _AMD64_ || defined BUILD_X64_COMPILER
    4242    #define PLATFORM    64
    4343#else
     
    5555#endif
    5656
    57 #ifdef _AMD64_
     57#if defined _AMD64_ || defined BUILD_X64_COMPILER
    5858    #ifndef IMAGE_SIZEOF_NT_OPTIONAL64_HEADER
    5959        #define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER    240
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/gc.cpp

    r508 r759  
    33#include <Compiler.h>
    44
    5 #ifdef _AMD64_
     5#if defined _AMD64_ || defined BUILD_X64_COMPILER
    66#include "../compiler_x64/opcode.h"
    77#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/hash.cpp

    r598 r759  
    55#include "../BasicCompiler_Common/common.h"
    66
    7 #ifdef _AMD64_
     7#if defined _AMD64_ || defined BUILD_X64_COMPILER
    88#include "../compiler_x64/opcode.h"
    99#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/include/CodeGenerator.h

    r641 r759  
    33#include <LexicalScope.h>
    44
    5 #ifdef _AMD64_
     5#if defined _AMD64_ || defined BUILD_X64_COMPILER
    66#include "../../compiler_x64/MachineFixed.h"
    77#else
     
    303303
    304304
    305 #ifdef _AMD64_
     305#if defined _AMD64_ || defined BUILD_X64_COMPILER
    306306    /////////////////////////////////////////////////////////////////
    307307    // 64ビット機械語生成
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/include/ver.h

    r388 r759  
    77#ifdef _AMD64_
    88#define VER_INFO        "(x64)"
     9#elif defined BUILD_X64_COMPILER
     10#define VER_INFO        "(x64 on x86)"
    911#else
    1012#define VER_INFO        ""
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/CommonCodeGenerator.cpp

    r750 r759  
    33#include <CodeGenerator.h>
    44
    5 #ifdef _AMD64_
     5#if defined _AMD64_ || defined BUILD_X64_COMPILER
    66#include "../../compiler_x64/opcode.h"
    77#else
     
    329329void CodeGenerator::op_AddNeedFreeTempStructure( int reg )
    330330{
    331 #ifdef _AMD64_
     331#if defined _AMD64_ || defined BUILD_X64_COMPILER
    332332    //////////////////////////////////////////////////////
    333333    /////    レジスタ資源のバックアップ
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/Exception.cpp

    r750 r759  
    11#include "stdafx.h"
    22
    3 #ifdef _AMD64_
     3#if defined _AMD64_ || defined BUILD_X64_COMPILER
    44#include "../../compiler_x64/opcode.h"
    55#else
     
    395395    }
    396396
    397 #ifdef _WIN64
     397#if defined _WIN64 || defined BUILD_X64_COMPILER
    398398    //mov rax,catchAddress
    399399    const PertialSchedule *pPertialSchedule = compiler.codeGenerator.op_mov_RV( sizeof(long), REG_RAX, 0, Schedule::DataTable, true );
     
    408408    int dataTableOffset = compiler.GetObjectModule().dataTable.Add( static_cast<LONG_PTR>(0) );
    409409
    410 #ifdef _WIN64
     410#if defined _WIN64 || defined BUILD_X64_COMPILER
    411411    //mov rax,dataTableOffset
    412412    compiler.codeGenerator.op_mov_RV( sizeof(_int64), REG_RAX, dataTableOffset, Schedule::DataTable);
     
    426426    }
    427427
    428 #ifdef _WIN64
     428#if defined _WIN64 || defined BUILD_X64_COMPILER
    429429    //mov rax,finallyAddress
    430430    const PertialSchedule *pPertialSchedule = compiler.codeGenerator.op_mov_RV( sizeof(long), REG_RAX, 0, Schedule::CatchAddress, true );
     
    439439    int dataTableOffset = compiler.GetObjectModule().dataTable.Add( static_cast<LONG_PTR>(0) );
    440440
    441 #ifdef _WIN64
     441#if defined _WIN64 || defined BUILD_X64_COMPILER
    442442    //mov rax,dataTableOffset
    443443    compiler.codeGenerator.op_mov_RV( sizeof(_int64), REG_RAX, dataTableOffset, Schedule::DataTable);
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp

    r750 r759  
    22
    33#include "../common.h"
    4 #ifdef _AMD64_
     4#if defined _AMD64_ || defined BUILD_X64_COMPILER
    55#include "../../compiler_x64/opcode.h"
    66#else
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/LexicalScope.cpp

    r750 r759  
    66#include "../common.h"
    77
    8 #ifdef _AMD64_
     8#if defined _AMD64_ || defined BUILD_X64_COMPILER
    99#include "../../compiler_x64/opcode.h"
    1010#else
     
    125125            //メモリを解放する
    126126
    127 #ifdef _AMD64_
     127#if defined _AMD64_ || defined BUILD_X64_COMPILER
    128128            //x64ビットコード
    129129
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/Linker.cpp

    r750 r759  
    2222        if( schedule.GetType() == Schedule::DataTable )
    2323        {
    24 #ifdef _WIN64
     24#if defined _WIN64 || defined BUILD_X64_COMPILER
    2525            dataTable.OverwriteInt64(
    2626                schedule.GetOffset(),
     
    6262            {
    6363                // 置き換える値が0の場合を除く
    64 #ifdef _WIN64
     64#if defined _WIN64 || defined BUILD_X64_COMPILER
    6565                dataTable.OverwriteInt64(
    6666                    schedule.GetOffset(),
     
    8585        if( schedule.GetType() == Schedule::DllProc )
    8686        {
    87 #ifdef _AMD64_
     87#if defined _AMD64_ || defined BUILD_X64_COMPILER
    8888            nativeCode.Overwrite(
    8989                schedule.GetOffset(),
     
    192192            LONG_PTR vtblOffset = schedule.GetClass().GetComVtblOffset();
    193193
    194 #ifdef _WIN64
     194#if defined _WIN64 || defined BUILD_X64_COMPILER
    195195            dataTable.OverwriteInt64(
    196196                schedule.GetOffset(),
     
    209209            LONG_PTR vtblMasterListOffset = schedule.GetClass().GetVtblMasterListOffset();
    210210
    211 #ifdef _WIN64
     211#if defined _WIN64 || defined BUILD_X64_COMPILER
    212212            dataTable.OverwriteInt64(
    213213                schedule.GetOffset(),
     
    232232            LONG_PTR typeInfoDataTableOffset = schedule.GetClass().GetTypeInfoDataTableOffset();
    233233
    234 #ifdef _WIN64
     234#if defined _WIN64 || defined BUILD_X64_COMPILER
    235235            dataTable.OverwriteInt64(
    236236                schedule.GetOffset(),
  • branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/ProcedureGenerator.cpp

    r750 r759  
    11#include "stdafx.h"
    22
    3 #ifdef _AMD64_
     3#if defined _AMD64_ || defined BUILD_X64_COMPILER
    44#include "../../compiler_x64/opcode.h"
    55#else
  • branches/x64_compiler_on_32/abdev/ab_common/ab_common.vcproj

    r755 r759  
    169169                Optimization="0"
    170170                AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;include"
    171                 PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
     171                PreprocessorDefinitions="WIN32;_DEBUG;_LIB;BUILD_X64_COMPILER"
    172172                MinimalRebuild="true"
    173173                BasicRuntimeChecks="3"
     
    212212            ConfigurationType="4"
    213213            CharacterSet="2"
    214             WholeProgramOptimization="1"
     214            WholeProgramOptimization="0"
    215215            >
    216216            <Tool
     
    235235                FavorSizeOrSpeed="1"
    236236                AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;include"
    237                 PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
     237                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;BUILD_X64_COMPILER"
    238238                RuntimeLibrary="0"
    239239                UsePrecompiledHeader="2"
  • branches/x64_compiler_on_32/abdev/ab_common/src/Lexical/DataTable.cpp

    r750 r759  
    6363        if( schedule.GetType() == Schedule::DataTable )
    6464        {
    65 #ifdef _WIN64
     65#if defined _WIN64 || defined BUILD_X64_COMPILER
    6666            OverwriteInt64(
    6767                schedule.GetOffset(),
  • branches/x64_compiler_on_32/abdev/ab_common/src/Lexical/Source.cpp

    r739 r759  
    6666    }
    6767
    68 #ifdef _AMD64_
     68#if defined _AMD64_ || defined BUILD_X64_COMPILER
    6969    add("_WIN64");
    7070#endif
  • branches/x64_compiler_on_32/abdev/ab_x64.sln

    r485 r759  
    11
    22Microsoft Visual Studio Solution File, Format Version 9.00
    3 # Visual C++ Express 2005
     3# Visual Studio 2005
    44Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jenga", "..\jenga\projects\jenga\jenga.vcproj", "{F01805B6-65B4-4708-88F4-A5E07DEA9FBD}"
    55EndProject
     
    1616        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.Debug|Win32.ActiveCfg = Debug(x64)|Win32
    1717        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.Debug|Win32.Build.0 = Debug(x64)|Win32
    18         {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.Release|Win32.ActiveCfg = Release(x64)|Win32
    19         {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.Release|Win32.Build.0 = Release(x64)|Win32
     18        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.Release|Win32.ActiveCfg = Release(x86)|Win32
     19        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.Release|Win32.Build.0 = Release(x86)|Win32
    2020        {87835C33-64C9-4BA5-9B39-608BA5394387}.Debug|Win32.ActiveCfg = Debug(x64)|Win32
    2121        {87835C33-64C9-4BA5-9B39-608BA5394387}.Debug|Win32.Build.0 = Debug(x64)|Win32
  • branches/x64_compiler_on_32/abdev/compiler_x64/compiler_x64.vcproj

    r650 r759  
    4747            <Tool
    4848                Name="VCCLCompilerTool"
    49                 AdditionalOptions="/GR"
    5049                Optimization="0"
    5150                AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
    52                 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN;_AMD64_;_WIN64"
     51                PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN;BUILD_X64_COMPILER"
    5352                MinimalRebuild="true"
    5453                BasicRuntimeChecks="0"
     
    8180            <Tool
    8281                Name="VCLinkerTool"
    83                 AdditionalOptions="/MACHINE:AMD64"
    8482                AdditionalDependencies="comctl32.lib psapi.lib imagehlp.lib shlwapi.lib"
    8583                OutputFile="$(OutDir)\abc.exe"
     
    9290                SubSystem="1"
    9391                StackReserveSize="4194304"
    94                 TargetMachine="0"
     92                TargetMachine="1"
    9593            />
    9694            <Tool
     
    155153            <Tool
    156154                Name="VCCLCompilerTool"
    157                 AdditionalOptions="/GR"
    158155                Optimization="2"
    159156                InlineFunctionExpansion="2"
     
    162159                WholeProgramOptimization="false"
    163160                AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
    164                 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN;_AMD64_;_WIN64"
     161                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN;BUILD_X64_COMPILER"
    165162                MinimalRebuild="false"
    166163                ExceptionHandling="1"
     
    194191            <Tool
    195192                Name="VCLinkerTool"
    196                 AdditionalOptions="/MACHINE:AMD64"
    197193                AdditionalDependencies="comctl32.lib psapi.lib imagehlp.lib shlwapi.lib"
    198194                OutputFile="$(OutDir)\abc.exe"
    199195                LinkIncremental="1"
    200196                SuppressStartupBanner="true"
    201                 AdditionalLibraryDirectories="..\..\jenga\lib\amd64;..\lib\amd64"
     197                AdditionalLibraryDirectories="..\..\jenga\lib\x86;..\lib\x86"
    202198                IgnoreDefaultLibraryNames=""
    203199                GenerateDebugInformation="false"
    204200                ProgramDatabaseFile=".\Release/BasicCompiler64.pdb"
    205201                SubSystem="1"
    206                 TargetMachine="0"
     202                TargetMachine="1"
    207203            />
    208204            <Tool
  • branches/x64_compiler_on_32/abdev/compiler_x64/manifest.xml

    r3 r759  
    33<assemblyIdentity
    44version="1.0.0.0"
    5 processorArchitecture="amd64"
    6 name="BasicCompiler64.exe"
     5processorArchitecture="*"
     6name="abc.exe"
    77type="win32"
    88/>
     
    1414name="Microsoft.Windows.Common-Controls"
    1515version="6.0.0.0"
    16 processorArchitecture="amd64"
     16processorArchitecture="*"
    1717publicKeyToken="6595b64144ccf1df"
    1818language="*"
Note: See TracChangeset for help on using the changeset viewer.