主页 > 编程资料 > Delphi >
发布时间:2015-09-22 作者:网络 阅读:134次

 DCC32.exe肯定众多D迷都用过,Dcc64.exe功能也类似,是用来编译支持64位windows平台的应用程序的编译器,Dcc64可以在微软视窗32位平台上运行,所以Dcc64是应用程序实现跨平台的利器,当然64位的windows开发环境它也是可以支持的。

稍后会介绍C++下跨OSX平台和Delphi下跨OSX平台的编译器揭秘
DCC64 功能揭秘
编译的原始整数类型都是64位的。(Native integer types are 64-bit)
指针也是64位。(Pointers are 64-bit.)
动态数组拥有64位的索引(Dynamic arrays have 64-bit indexes)
浮点运算有在single 和double 精度下运行,Extended 精度的浮点运算将不能支持。
SHL/SHR behavior:32位整形将转移到使用32位空间,64位整形将转变到使用64位的空间
 混合的Pascal/汇编 代码将不会被支持。 

命令行帮助 
C:>dcc64 -h
 Embarcadero Delphi for Win64 compiler version 23.0
 Copyright (c) 1983,2011 Embarcadero Technologies, Inc.

 Syntax: dcc64 [options] filename [options]

   -A<unit>=<alias> = Set unit alias
   -B = Build all units
   -CC = Console target
   -CG = GUI target
   -D<syms> = Define conditionals
   -E<path> = EXE/DLL output directory
   -F<offset> = Find error
   -GD = Detailed map file
   -GP = Map file with publics
   -GS = Map file with segments
   -H = Output hint messages
   -I<paths> = Include directories
   -K<addr> = Set image base addr
   -LE<path> = package .bpl output directory
   -LN<path> = package .dcp output directory
   -LU<package> = Use package
   -M = Make modified units
   -N0<path> = unit .dcu output directory
   -NH<path> = unit .hpp output directory
   -NO<path> = unit .obj output directory
   -NB<path> = unit .bpi output directory
   -NS<namespaces> = Namespace search path
   -O<paths> = Object directories
   -P = look for 8.3 file names also
   -Q = Quiet compile
   -R<paths> = Resource directories
   -U<paths> = Unit directories
   -V = Debug information in EXE
   -VR = Generate remote debug (RSM)
   -VT = Debug information in TDS
   -W[+|-|^][warn_id] = Output warning messages
   -Z = Output 'never build' DCPs
   -$<dir> = Compiler directive
   --help = Show this help screen
   --version = Show name and version
   --codepage:<cp> = specify source file encoding
   --default-namespace:<namespace> = set namespace
   --depends = output unit dependency information
   --doc = output XML documentation
   --drc = output resource string .drc file
   --no-config = do not load default dcc64.cfg file
   --description:<string> = set executable description
   --inline:{on|off|auto} = function inlining control
   --peflags:<flags> = set extra PE Header flags field
   --peoptflags:<flags> = set extra PE Header optional flags field
   --peosversion:<major>.<minor> = set OS Version fields in PE Header (default: 5.0)
   --pesubsysversion:<major>.<minor> = set Subsystem Version fields in PE Header (default: 4.0)
   --peuserversion:<major>.<minor> = set User Version fields in PE Header (default: 0.0)
 Compiler switches: -$<letter><state> (defaults are shown below)
   A8  Aligned record fields
   B-  Full boolean Evaluation
   C+  Evaluate assertions at runtime
   D+  Debug information
   G+  Use imported data references
   H+  Use long strings by default
   I+  I/O checking
   J-  Writeable structured consts
   L+  Local debug symbols
   M-  Runtime type info
   O+  Optimization
   P+  Open string params
   Q-  Integer overflow checking
   R-  Range checking
   T-  Typed @ operator
   V+  Strict var-strings
   W-  Generate stack frames
   X+  Extended syntax
   Y+  Symbol reference info
   Z1  Minimum size of enum types
 Stack size: -$M<minStackSize[,maxStackSize]> (default 16384,1048576)

64-bit 内链汇编
DCC64.EXE 支持64位的汇编代码,但是有一些限制,书写必须要完整,在delphi或者汇编中,绝对不允许混用。

Pseudo-ops虚运算只能管理堆,下面的表中友一些详细的说明

Pseudo-op

.PARAMS#

Use this pseudo-instruction when calling external functions. This pseudo-instruction maps the function parameters in accordance with the x64 calling convention. When used, a pseudo-variable, @params, is available for passing stack parameters to called functions. Use @params as a byte array where the first stack parameter is @params[32], locations 0-31 represent the 4 register parameters.
.PUSHNV

REG Generates code to save and restore the non-volatile general purpose register in prologue and epilogue.
.SAVENV

XMM# Has the same functionality as .PUSHNV REG, except that .SAVENV XMM# is for non-volatile XMM registers.
.NOFRAME

Forcibly disables the generation of a stack frame as long as there are no local variables declared and the parameter count is less than 4. Use only for "leaf" functions.
关键字词: