Commit Graph

41202 Commits

Author SHA1 Message Date
nickysn
1bea98995b * regenerated fpcmake makefiles after r25642
git-svn-id: trunk@25644 -
2013-10-05 10:11:27 +00:00
nickysn
8844c67f56 * updated fpcmake revision.inc after r25642
git-svn-id: trunk@25643 -
2013-10-05 10:06:14 +00:00
nickysn
d89c286dc1 * changed the staticlibext for i8086-msdos to .a in fpcmake.ini as well
git-svn-id: trunk@25642 -
2013-10-05 10:05:03 +00:00
nickysn
96a4f8e43b * the staticlibext for i8086-msdos changed from .lib to .a; rationale:
1) less special cases needed in fpmkunit for i8086-msdos
  2) consistency with the naming scheme on the go32v2 target
  3) we didn't follow the DOS naming scheme completely anyway, e.g. we used .o
     for object files, instead of .obj

git-svn-id: trunk@25641 -
2013-10-05 10:01:59 +00:00
marco
6ace630c6f * fix for #24947, writing index expression of property. Patch by Daniel Gaspary.
git-svn-id: trunk@25640 -
2013-10-04 21:37:52 +00:00
marco
bca1e53840 * fix for mantis #24920 try to properly update messages unit for win64.
git-svn-id: trunk@25639 -
2013-10-04 18:24:16 +00:00
nickysn
8f8bd8b12d - rm the unnecessary jnz instruction before the rep stosb in the i8086-msdos startup code, because the rep prefix checks for cx=0 and skips the stosb instruction anyway
git-svn-id: trunk@25638 -
2013-10-04 13:36:24 +00:00
Károly Balogh
6c0581da49 * do not emit TST.L #ofs(dX) instructions for the Coldfire
fixes an assembler error while compiling packages/fpgtk/src/fpgtk.pp for the Coldfire

git-svn-id: trunk@25637 -
2013-10-04 11:31:58 +00:00
Károly Balogh
584e3638ab * get the count of params from the correct list
this fixes varargs a bit, particularly fixes an unhandled TList bounds exception while compiling packages/fcl-base/src/eventlog.pp

git-svn-id: trunk@25636 -
2013-10-04 11:24:20 +00:00
nickysn
608a449c4a + added a 'cld' before the first string x86 instruction in the i8086-msdos startup code
git-svn-id: trunk@25635 -
2013-10-04 11:18:47 +00:00
nickysn
826b4678f3 * moved UpdateAlignmentStr, UpdateOptimizerStr, UpdateWpoStr and UpdateDebugStr from unit globals to unit dirparse
git-svn-id: trunk@25634 -
2013-10-04 08:26:02 +00:00
svenbarth
235c06ab34 Implement volatile address registers. Fixes quite some tests, but also breaks others... (overall more are fixed than are broken :) )
paramgr.pas, tparamanager:
  + add virtual get_volatile_registers_address method which by default returns an empty set
cgobj.pas, tcg:
  * allocallcpuregisters: also allocate address registers if needed
  * deallocallcpuregisters: also deallocate address registers if needed
ncgcal.pas, tcgcallnode.pass_generate_code:
  * (de)allocate address registers
  * keep result from being deallocated if it should be an address register (currently by no architecture...)
m68k/cpupara.pas, tm68kparamanager:
  + get_volatile_registers_address: return a0 and a1 as volatile registers
m68k/n68kmat.pas, tm68kmoddivnode.call_rtl_divmod_reg_reg:
  * (de)allocate address registers

git-svn-id: trunk@25633 -
2013-10-03 20:33:11 +00:00
svenbarth
29ff548c0b Revert some additions of add_move_instruction as this heavily breaks code when the frame pointer is involved
git-svn-id: trunk@25632 -
2013-10-03 18:58:38 +00:00
svenbarth
dd204f395d m68k: add a few more add_move_instruction to tcg68k
git-svn-id: trunk@25631 -
2013-10-03 14:36:08 +00:00
svenbarth
03623c6c1a Forgot to commit that I moved tcgsize2opsize from cgcpu to cpubase.
git-svn-id: trunk@25630 -
2013-10-03 14:34:54 +00:00
nickysn
119cf760eb * UpdateTargetSwitchStr moved to a new unit dirparse.pas. This avoids the dependence of unit scandir on unit options
git-svn-id: trunk@25629 -
2013-10-03 12:21:33 +00:00
svenbarth
8e60465eb4 Fix the last failing tcnvint test (plus another one) by using comparisons that are not necessarily 32-bit.
m68k/n68kadd.pas, tn68kadd.second_cmpordinal:
  * use the size of the largest operand to select a fiting operand
  * ToDo: check whether a sign/zero extend of the value is necessary

git-svn-id: trunk@25628 -
2013-10-03 11:59:25 +00:00
sergei
5af873ee5b * x86 targets: Profiling shows that quite a bit of time is spent in findreg_by_number(), despite it uses binary search. Worse, it is repeated for every piece of register information. Trying to get rid of some of these calls: rearranged registers so that their "opcode" matches 3 LSBs of superregister number (with a few exceptions described at the beginning of x86reg.dat). This allows to lookup opcodes in regval() with O(1) complexity, and removes need in rXXXop.inc files.
git-svn-id: trunk@25627 -
2013-10-03 08:08:04 +00:00
sergei
2c79314d59 * IF_SANDYBRIDGE designates CPU family, not feature. Mostly a cosmetic change, since we don't use these flags for anything.
git-svn-id: trunk@25626 -
2013-10-03 06:06:34 +00:00
svenbarth
75dc360bd4 Correctly handle 64-Bit values when converting ints to bools. Fixes 2 tests.
m68k/n68kcnv.pas, tn68kcnv.second_int_to_bool:
  * we need to check both the upper and the lower register for a 64-bit value to decide whether it's True or False

git-svn-id: trunk@25625 -
2013-10-02 20:16:42 +00:00
svenbarth
0cb2bda0a5 Correctly handle loads of different sizes. Fixes 1 test. Might be more, but some other bugs might hide it.
m68k/cgcpu.pas, tcg68k:
  * a_load_ref_cgpara: use pashsize instead of paraloc^.size as the latter could be OS_NO and thus a "move" instead of a "move.x" will be generated resulting in a word move when a long or byte move might have been necessary
  * a_load_reg_ref: use the smallest size when moving the value to a reference
  * a_load_ref_ref: when the size is different always use a temporary register for a ref to ref move
  * a_load_ref_ref: when doing a fixed move for Coldfire use the correct ref (that's another embarrasing error...) and size (fixes usage of String[Index] for a const array parameter)
  * a_load_ref_reg: use the smallest size when moving the value from a reference
  * g_concatcopy: don't use source.alignment as that doesn't contain the correct value and also load the value into the temp register using the correct size (fixes passing of small values as parameters, like chars)

git-svn-id: trunk@25624 -
2013-10-02 20:14:16 +00:00
Károly Balogh
c108a24cc8 reverted r25622 which was an accidental commit of some highly experimental debug code (sorry)
git-svn-id: trunk@25623 -
2013-10-02 18:31:28 +00:00
Károly Balogh
d004b44406 really fixed FillChar and fixed FillWord. fixes 8 tests.
git-svn-id: trunk@25622 -
2013-10-02 14:11:09 +00:00
Károly Balogh
e27db65085 really fixed FillChar and fixed FillWord. fixes 8 tests.
git-svn-id: trunk@25621 -
2013-10-02 12:33:52 +00:00
marco
2a9916baba * fix mantis #25129 for non OS X BSD systems. Patch by A. Cardenas Marquez
- crtbegin and crtend suffix handling
     - crti before crtbegin

git-svn-id: trunk@25620 -
2013-10-02 09:05:32 +00:00
michael
1f0c70508f * DisplayName should not set name
git-svn-id: trunk@25619 -
2013-10-02 07:52:30 +00:00
michael
50b9b65395 * Only specify override for destructor in interface section. Add inherited to constructor, Tstreamclass is TMemoryStream
git-svn-id: trunk@25618 -
2013-10-02 07:51:45 +00:00
michael
38f72cf39b Raise exception if no scanner specified
git-svn-id: trunk@25617 -
2013-10-02 07:49:33 +00:00
michael
a6627d14d4 * Added Extract to TJSONArray
git-svn-id: trunk@25616 -
2013-10-02 07:48:31 +00:00
Károly Balogh
31e7b790a7 a_load_const_reg: don't sign_extend after MOVEQ, it's not needed. also use CRL.L before loading to reg instead of sign_extend when possible
git-svn-id: trunk@25615 -
2013-10-02 01:19:44 +00:00
Tomas Hajny
e79246d6e6 * fix missing dependency of fppkg on fpmkunit (unnoticed on some targets due to dependency import via fcl-web)
git-svn-id: trunk@25613 -
2013-10-02 00:18:53 +00:00
michael
5799ff1789 * Fixed bug #0025117
git-svn-id: trunk@25610 -
2013-09-30 13:23:01 +00:00
svenbarth
bb00c76fe7 Fix for Mantis #21015 .
symdef.pas:
  * tobjectdef.find_implemented_interface: use equal_defs to ensure that equal specializations of interfaces are found as well
  * getparaencoding: use globals.CP_NONE instead of just CP_NONE, because defcmp contains a cp_none enum as well.

+ added test

git-svn-id: trunk@25609 -
2013-09-30 08:44:46 +00:00
michael
e72db83b71 * Applied patch for RomanToInt by Bart Broersma (Bug ID 0025112)
git-svn-id: trunk@25608 -
2013-09-29 18:35:29 +00:00
nickysn
a846d0fc42 * cleaned up the ugly hack from r25595. The default value of ts_cld for the
target is now set before the second pass of parsing the command line
  arguments. Then during the second pass, it can be overriden.

git-svn-id: trunk@25607 -
2013-09-29 11:30:52 +00:00
nickysn
4b3bf874df * Added CLDs in the RTL i386 inline asm routines, wrapped in {$ifdef
FPC_ENABLED_CLD}.

git-svn-id: trunk@25606 -
2013-09-29 10:53:49 +00:00
nickysn
4929bc5694 * regenerated the i8086 ins files
git-svn-id: trunk@25603 -
2013-09-28 21:10:23 +00:00
nickysn
781fa416e2 * make insdatx86 now also refereshes the i8086 ins files
git-svn-id: trunk@25602 -
2013-09-28 21:08:21 +00:00
nickysn
c47d745bcf + added support for i8086 in mkx86ins.pp
git-svn-id: trunk@25601 -
2013-09-28 21:06:09 +00:00
nickysn
a013019462 * make insdatx86 now also updates the i8086 reg files
git-svn-id: trunk@25600 -
2013-09-28 20:59:46 +00:00
nickysn
d8ef5aa3c4 * mkx86reg.pp updated to support i8086
git-svn-id: trunk@25599 -
2013-09-28 20:56:47 +00:00
svenbarth
2c93687c5a Fix an embarrasing error in m68k which fixes 60 tests.
m68k/cgcpu.pas, tcg68k.g_flags2reg:
  * don't sign extend the flag value which was stored to the register, but instead do a "AND 1" on it to reduce it to 1 bit; afterall Booleans in Pascal are either 0 or 1 and not 0 or $FF

+ added test

git-svn-id: trunk@25598 -
2013-09-28 20:07:57 +00:00
nickysn
4d6a9137cf + added the new -CTcld option to the help screen
git-svn-id: trunk@25597 -
2013-09-28 16:05:01 +00:00
nickysn
989c543ea2 * UpdateTargetSwitchStr moved from unit globals to unit options in order to
avoid the dependency of unit globals on unit symtable, which breaks the build
  of ppudump

git-svn-id: trunk@25596 -
2013-09-28 15:43:56 +00:00
nickysn
a48b44cfe5 + added a new tsystemflag tf_cld, which indicates that ts_cld should be enabled
by default on this target
+ tf_cld enabled for i8086-msdos (for Turbo Pascal compatibility)

git-svn-id: trunk@25595 -
2013-09-28 14:57:12 +00:00
nickysn
ac66f3ae1b + added new field 'define' to ttargetswitchinfo, which specifies a system macro
to be defined while the target switch is active
* the CLD target switch defines 'FPC_ENABLED_CLD' once again

git-svn-id: trunk@25594 -
2013-09-28 14:14:32 +00:00
Jonas Maebe
90fb63db26 * also compare the type of tordconstnode in docompare, so that the node CSE
doesn't replace e.g. 32 bit and 64 bit constants with the same value by
    a single 32 bit constant (mantis #25090)

git-svn-id: trunk@25593 -
2013-09-28 14:12:50 +00:00
nickysn
bd0585274e * tsettings.enablecld converted to a targetswitch ts_cld
git-svn-id: trunk@25592 -
2013-09-28 13:41:58 +00:00
nickysn
e4b05477e1 * put the cld instructions behind {$ifdef FPC_ENABLED_CLD} in i386/strings*.inc
* strupper and strlower were missing a cld, so it was added to them as well.

git-svn-id: trunk@25591 -
2013-09-28 12:06:47 +00:00
nickysn
52fcc0a407 + added a new x86-specific compiler option 'enablecld', which controls whether
the compiler should emit a CLD before using the x86 string instructions.

git-svn-id: trunk@25590 -
2013-09-28 11:54:02 +00:00