* Don't generate rex.w for "CALL|JMP|LCALL|LJMP regmem", they are 64-bit by default.
* LCALL,LJMP flagged as calljump instructions.
* LCALL,LJMP encode only far jumps and don't accept register operands.
* GAS writer: fixed writing rip-relative operands of calljump instructions.
+ test.
git-svn-id: trunk@19413 -
* eliminate warnings in compiler (i386 & i368->x86_64) and minor refactorings
- comment out unused vars and types
- comment out unneeded comparisons (Longword <=> 0)
- suppress some "comparison always true|false" warnings
- tweak visiblity sections
git-svn-id: trunk@19385 -
* Adjust rip-relative offsets using values known from calcsize, instead of reinterpreting the tail of instruction. This is simpler and remains the same regardless of particular codes used in opcode table.
* Reduced maxinfolen to 8.
- 'jmp imm64' and 64-bit versions of 'in' do not exist, removed.
git-svn-id: trunk@17546 -
* mkx86ins.pp: 'regmem' operand type in x86ins.dat must be converted to OT_RM_GPR, not OT_REGMEM. The latter does not restrict register type, allowing to use e.g. xmm registers in place of regular ones.
* Finished 'movd' and 'movq', added some tests for them to tasm2.pp.
git-svn-id: trunk@17515 -
* Optimized the opcode representation of movq and remaining 3DNow instructions
* Disallow immediates not fitting in 32 bits (Mantis #14685) + test
* Disallow push/pop with 32-bit operands in x86_64 + test
git-svn-id: trunk@17490 -
- Removed remaining address-size control codes \300 and \301
- Also removed codes \323, they are no longer necessary once REX is being written on the first literal.
git-svn-id: trunk@17457 -
* Using ot_mmxrm and ot_xmmrm operand types to match arguments, reduces number of required entries by half.
* Replaced all literal $66, $F2 and $F3 prefixes with control codes (\361, \334 and \333, respectively).
* Prefix control codes imply writing REX, so code \323 after them is no longer necessary, removed.
* Fixed technology flags (SSSE3, SSE4.1, SSE4.2)
- Removed codes \300 and \301 (intended to generate address size prefix). FPC does not support this feature (the prefix itself is generated, but process_ea rejects operands needing non-default address size). Probably we don't even need to support it. But if we do, a much simpler solution is check all operands, like today's NASM does.
* Fixed/added some instructions along the way, namely CRC32, UNPCKHPD, CMPNEQSD.
git-svn-id: trunk@17437 -
* Simplified REX handling: instead of useless adjusting instruction length on every REX change, adjust it just once, based on the final REX value.
* Similar for omitting REX.W in certain instructions: set a flag and consider it once the entire instruction has been processed. This removes the requirement for \335 to be the last opcode.
* maybewriterex also after $F2 prefix
* Fixed behavior of codes \310 and \311 (16- and 32-bit address respectively), this is needed for a few fancy instructions like LOOP and JCXZ, which honor address-size prefix instead of REX.
+ control code \361 for $66 prefix
+ IF_SSSE3, IF_SSE41, IF_SSE42 instruction flags (with dummy values)
x86/x86ins.dat:
* replaced literal $67 prefixes with \310 or \311
* marked encodings containing code \310 as NOX86_64
* replaced literal $48 prefixes with \326
git-svn-id: trunk@17433 -
* AESKEYGENASSIST is not ATT-specific name, it is used by Intel-style assemblers as well. Also updated tests/test/taes1.pp to reflect the change.
+ Added SCASQ, resolves#16730 (other opcodes mentioned in that report were added/fixed earlier)
git-svn-id: trunk@17431 -
* x86ins.dat: replaced codes \17 with literal zeros. They aren't necessary for FPC, and they were removed from NASM quite a while ago.
git-svn-id: trunk@17430 -
x86_64 (mantis #19269)
* this is also required for darwin/i386 and was already done there for
parameters, but not yet for return values
git-svn-id: trunk@17388 -
+ Added new value TAttSuffix.attsufINTdual, assigned it to movsX and movzX instructions
* Moved suffix-to-size translation tables from rax86att.pas to itcpugas.pas
+ Added x86_64 specific suffix-to-size translation, enabling BQ and WQ suffixes (LQ seems unnecessary at the moment)
* Fixed logic of tx86attreader.is_asmopcode so it only assigns dual suffix to instructions that explicitly allow it. This disambiguates cases like movsbq=movs+bq vs. cmovbq=cmovb+q
* As a net result: movz[bw]q and movs[bw]q now compile for x86_64; cmovbw and cmovbl which were incorrectly handled for i386 are now fixed.
+ Test for correct assembling of cmov.
git-svn-id: trunk@17353 -
-- Zusammenführen der Unterschiede zwischen Projektarchiv-URLs in ».«:
U rtl/inc/objc1.inc
U rtl/inc/system.inc
U rtl/objpas/typinfo.pp
A tests/test/tchlp30.pp
A tests/test/thlp35.pp
A tests/test/tchlp3.pp
A tests/test/thlp7.pp
A tests/test/trhlp24.pp
A tests/test/tchlp13.pp
A tests/test/thlp44.pp
A tests/test/thlp18.pp
A tests/test/trhlp33.pp
A tests/test/tchlp22.pp
A tests/test/thlp27.pp
A tests/test/trhlp16.pp
A tests/test/tchlp31.pp
A tests/test/thlp36.pp
A tests/test/tchlp4.pp
A tests/test/thlp8.pp
A tests/test/trhlp25.pp
A tests/test/trhlp1.pp
A tests/test/uhlp41a.pp
A tests/test/tchlp40.pp
A tests/test/tchlp14.pp
A tests/test/thlp19.pp
A tests/test/trhlp34.pp
U tests/test/ttpara1.pp
A tests/test/tchlp23.pp
A tests/test/thlp28.pp
A tests/test/urhlp14.pp
A tests/test/trhlp17.pp
A tests/test/tchlp32.pp
A tests/test/uhlp43.pp
A tests/test/thlp37.pp
A tests/test/tchlp5.pp
A tests/test/thlp9.pp
A tests/test/trhlp26.pp
A tests/test/trhlp2.pp
A tests/test/uchlp12.pp
A tests/test/tchlp41.pp
A tests/test/uhlp41b.pp
A tests/test/tchlp15.pp
A tests/test/trhlp35.pp
U tests/test/ttpara2.pp
A tests/test/tchlp50.pp
A tests/test/tchlp24.pp
A tests/test/thlp29.pp
A tests/test/trhlp18.pp
A tests/test/thlp10.pp
U tests/test/cg/ttincdec.pp
A tests/test/tchlp33.pp
A tests/test/thlp38.pp
A tests/test/tchlp6.pp
A tests/test/trhlp27.pp
A tests/test/trhlp3.pp
A tests/test/tchlp42.pp
A tests/test/tchlp16.pp
A tests/test/trhlp36.pp
A tests/test/tchlp51.pp
A tests/test/tchlp25.pp
A tests/test/trhlp19.pp
A tests/test/thlp11.pp
A tests/test/tchlp34.pp
A tests/test/thlp39.pp
A tests/test/tchlp7.pp
A tests/test/trhlp28.pp
A tests/test/thlp20.pp
A tests/test/trhlp4.pp
A tests/test/tchlp43.pp
A tests/test/tchlp17.pp
A tests/test/trhlp37.pp
A tests/test/tchlp52.pp
A tests/test/tchlp26.pp
A tests/test/thlp1.pp
A tests/test/urhlp17.pp
A tests/test/thlp12.pp
A tests/test/tchlp35.pp
A tests/test/tchlp8.pp
A tests/test/trhlp29.pp
A tests/test/thlp21.pp
A tests/test/trhlp5.pp
A tests/test/tchlp44.pp
A tests/test/tchlp18.pp
A tests/test/trhlp10.pp
A tests/test/trhlp38.pp
A tests/test/thlp30.pp
A tests/test/tchlp53.pp
A tests/test/tchlp27.pp
A tests/test/thlp2.pp
A tests/test/thlp13.pp
A tests/test/tchlp36.pp
A tests/test/tchlp9.pp
A tests/test/thlp22.pp
A tests/test/trhlp6.pp
A tests/test/tchlp45.pp
A tests/test/tchlp19.pp
A tests/test/trhlp11.pp
A tests/test/trhlp39.pp
A tests/test/thlp31.pp
A tests/test/tchlp54.pp
A tests/test/tchlp28.pp
A tests/test/uhlp39.pp
A tests/test/thlp3.pp
A tests/test/trhlp20.pp
A tests/test/thlp40.pp
A tests/test/thlp14.pp
A tests/test/tchlp37.pp
A tests/test/thlp23.pp
A tests/test/trhlp7.pp
A tests/test/tchlp46.pp
A tests/test/trhlp12.pp
A tests/test/thlp32.pp
A tests/test/tchlp29.pp
A tests/test/thlp4.pp
A tests/test/trhlp21.pp
A tests/test/tchlp10.pp
A tests/test/thlp41.pp
A tests/test/thlp15.pp
A tests/test/tchlp38.pp
U tests/test/trtti1.pp
A tests/test/trhlp30.pp
A tests/test/thlp24.pp
A tests/test/trhlp8.pp
A tests/test/uchlp18.pp
A tests/test/tchlp47.pp
A tests/test/trhlp13.pp
A tests/test/thlp33.pp
A tests/test/tchlp1.pp
A tests/test/thlp5.pp
A tests/test/trhlp22.pp
A tests/test/tchlp11.pp
A tests/test/thlp42.pp
A tests/test/thlp16.pp
A tests/test/tchlp39.pp
A tests/test/uhlp3.pp
A tests/test/trhlp31.pp
A tests/test/tchlp20.pp
A tests/test/uhlp31.pp
A tests/test/thlp25.pp
A tests/test/trhlp9.pp
A tests/test/tchlp48.pp
A tests/test/trhlp40.pp
A tests/test/trhlp14.pp
A tests/test/thlp34.pp
A tests/test/tchlp2.pp
A tests/test/thlp6.pp
A tests/test/trhlp23.pp
A tests/test/tchlp12.pp
A tests/test/thlp43.pp
A tests/test/thlp17.pp
A tests/test/trhlp32.pp
A tests/test/tchlp21.pp
A tests/test/thlp26.pp
A tests/test/tchlp49.pp
A tests/test/trhlp41.pp
A tests/test/trhlp15.pp
U tests/webtbf/tw13815.pp
U tests/tbf/tb0216.pp
U compiler/msgtxt.inc
U compiler/nld.pas
U compiler/dbgdwarf.pas
U compiler/sparc/cgcpu.pas
U compiler/fmodule.pas
U compiler/i386/cgcpu.pas
U compiler/msgidx.inc
U compiler/pdecsub.pas
U compiler/ncgld.pas
U compiler/symdef.pas
U compiler/nobj.pas
U compiler/nflw.pas
U compiler/pdecobj.pas
U compiler/objcdef.pas
U compiler/pinline.pas
U compiler/pexpr.pas
U compiler/ncgrtti.pas
U compiler/x86_64/cgcpu.pas
U compiler/htypechk.pas
U compiler/parser.pas
U compiler/tokens.pas
U compiler/symbase.pas
U compiler/ncal.pas
U compiler/symtable.pas
U compiler/pp.lpi
U compiler/m68k/cgcpu.pas
U compiler/ppu.pas
U compiler/rautils.pas
U compiler/arm/cgcpu.pas
U compiler/ptype.pas
U compiler/symconst.pas
U compiler/mips/cgcpu.pas
U compiler/msg/errore.msg
U compiler/psub.pas
U compiler/utils/ppudump.pp
U compiler/utils
U compiler/pdecvar.pas
U compiler/ncgcal.pas
U compiler/pdecl.pas
U compiler/dbgstabs.pas
U compiler/ppcgen/cgppc.pas
U packages/fcl-xml/tests/README_DOM.txt
U packages/unzip/src/unzip51g.pp
U packages/winunits-base/src/dwmapi.pp
U .
git-svn-id: trunk@17328 -
- second calculation of EDI is obsolete, its value is never used.
- calculation of ECX can be partially shared with first calculation of EDI.
- multiplying ECX by 1 is also redundant (was happening due to a wrong condition).
git-svn-id: trunk@17260 -
+ parsing of section directive for variables
+ section test
+ write section names in the assembler/binary writers correctly
* allow section only after ; and for embedded targets
git-svn-id: branches/usersections@17154 -
* $CPU/cgcpu.pas: disable the generation of VMT loading code
* dbgstabs.pas, dbgdwarf.pas: treat virtual methods of helpers as normal methods
* ncgcal.pas: don't register virtual helper methods for WPO
* ncgrtti.pas: write virtual helper methods as normal methods to RTTI
* nobj.pas: correctly handle final and override cases in helpers
* pdecvar.pas: property getters
* rautils.pas: no VMT offset in records
git-svn-id: branches/svenbarth/classhelpers@17150 -
- rename tprocdef._class to tprocdef.struct and change the type from tobjectdef to tabstractrecorddef because methods can belong not to classes only now but to records too
- replace in many places use of current_objectdef to current_structdef with typcast where is needed
- add an argument to comp_expr, expr, factor, sub_expr to notify that we are searching type only symbol to solve the problem with records,objects,classes which contains fields with the same name as previosly declared type (like:
HWND = type Handle;
rec = record
hWnd: HWND;
end;)
- disable check in factor_read_id which was made for object that only static fields can be accessed as TObjectType.FieldName outside the object because it makes SizeOf(TObjectType.FieldName) imposible and since the same method was extended to handle records it also breaks a52 package compilation
- rename tcallcandidates.collect_overloads_in_class to tcallcandidates.collect_overloads_in_struct and addapt the code to handle overloads in records too
- fix searchsym_type to search also in object ancestors if we found an object symtable
- add pd_record, pd_notrecord flags to mark procedure modifies which can or can't be used with records. Disallow the next modifiers for records: abstract, dynamic, export, external, far, far16, final, forward, internconst, internproc, interrupt, message, near, override, public, reintroduce, virtual, weakexternal,
Allow the next modifiers for records: static
git-svn-id: branches/paul/extended_records@16526 -