Jonas Maebe
b70e64dc67
* fixed some bugs in the camelCase conversion performed on the JVM target by
...
-CTlowercaseprocstart
o convert all consecutive uppercase characters at the start to lowercase
instead of only the first one. Exception: if there is more than one
such character and the last one is followed by a lowercase character,
assume the last uppercase character belongs to the second word (like
in FPCIsGreat) and don't lowercase that one
+ test
git-svn-id: trunk@25845 -
2013-10-23 22:44:45 +00:00
svenbarth
76f6de5cf1
Refactor tobjectdef.find_implemented_interface out into unit defcmp so that the recently introduced cycle between symdef and defcmp can be broken again.
...
defcmp.pas:
+ add function "find_implemented_interface"
* change method call of "find_implemented_interface" into function call
symdef.pas:
- tobjectdef: remove method "find_implemented_interface"
- remove use of unit "defcmp"
pgenutil.pas:
* change method call of "find_implemented_interface" into function call
+ add use of unit "defcmp"
ncgcnv.pas, ncnv.pas, pdecobj.pas, pdecsub.pas, pdecvar.pas:
* change method call of "find_implemented_interface" into function call
git-svn-id: trunk@25844 -
2013-10-23 19:05:00 +00:00
Jonas Maebe
555634b755
* (re)set upper bits of register when appropriate for all operations in
...
a_op_reg_reg() (except for NOT, which was already handled correctly)
+ test
git-svn-id: trunk@25840 -
2013-10-22 07:41:52 +00:00
nickysn
a0723ccfd5
* also check if ECX is nonvolatile in is_ecx_used. Not strictly necessary for the current set of i386 calling conventions, but good as an extra safety precaution in case new calling conventions are added or the code is adapted and used on other platforms.
...
git-svn-id: trunk@25839 -
2013-10-21 16:48:58 +00:00
nickysn
703e3f3ce2
* fixed test/cg/tcall1.pp for i8086
...
git-svn-id: trunk@25837 -
2013-10-20 20:09:27 +00:00
svenbarth
d908dbeec1
Fix for Mantis #25215 .
...
compiler/scanner.pas, tscannerfile.readtoken:
* after trying to read a _INTCONST check whether a valid first character for an identifier follows and give a syntax error if that is not the case
+ added test
git-svn-id: trunk@25835 -
2013-10-20 12:15:49 +00:00
svenbarth
d91d4afb0f
Fix for Mantis #25210 .
...
compiler/pdecobj.pas, object_dec:
* since revision 25518 the global symtable of the current module is no longer popped and pushed again so that the defaware symtablestack can add the helper; thus we need to do this not only for static symtables, but for global ones as well
* adjusted comment to reflect current situation
git-svn-id: trunk@25834 -
2013-10-20 11:33:01 +00:00
nickysn
1f30cd9505
* fixed test tmaclocalprocparam4c.pp for i8086 medium memory model
...
git-svn-id: trunk@25833 -
2013-10-19 22:42:35 +00:00
nickysn
f3a686eb69
* i8086 far code memory model fixes in tests tw2739,tw3173,tw16034,tw1152,
...
tw2944 and tw9261
git-svn-id: trunk@25832 -
2013-10-19 21:43:40 +00:00
nickysn
645cd11b9d
* fixed the assignment of global functions to nested procvars in i8086 far code
...
models
git-svn-id: trunk@25831 -
2013-10-19 20:42:39 +00:00
nickysn
378afb69b2
* optimization in tcg386.g_intf_wrapper: use the much more efficient case 1
...
for virtual methods, that use the register calling convention, but have at
least one free register (i.e. not used as a parameter and not required to be
preserved by the function)
git-svn-id: trunk@25830 -
2013-10-19 17:40:38 +00:00
nickysn
bfd31e7516
* optimizations in tcg8086.g_copyvaluepara_openarray:
...
- when elesize=2, avoid the SHR CX,1 instruction
- use rep movsw even for odd elesizes, unless cs_opt_size is set
git-svn-id: trunk@25829 -
2013-10-19 15:07:55 +00:00
nickysn
aca22a59f7
* optimizations in tcg386.g_copyvaluepara_openarray in order to avoid the
...
second IMUL
git-svn-id: trunk@25828 -
2013-10-19 12:56:58 +00:00
nickysn
0f69362edd
- rm LEA reg,imm from x86ins.dat, as that's not a valid x86 instruction,
...
using it in inline asm causes an internal error and removing it didn't show
any regressions after running the testsuite on i386-linux.
git-svn-id: trunk@25827 -
2013-10-18 23:26:58 +00:00
nickysn
ff9ce0d20d
* tcg8086.g_copyvaluepara_openarray improvements:
...
- use a_op_const_reg for the multiplication, instead of emitting directly
instructions, which are 186+
- avoid using IMUL twice, when the element size is not power of two
- rm the system_i386_win32 leftovers
git-svn-id: trunk@25826 -
2013-10-18 22:35:51 +00:00
nickysn
8744fbefbb
* add $parentfp as a first parameter on i8086, instead of last. This makes
...
regular non-nested procedures compatible with nested var procvars and fixes
the tmaclocalprocparam*.pp tests on i8086
git-svn-id: trunk@25825 -
2013-10-18 21:37:06 +00:00
nickysn
7e7ab2fd4d
* also handle nested proc ptrs in thlcgcpu.location_force_mem on i8086
...
git-svn-id: trunk@25824 -
2013-10-18 20:09:01 +00:00
nickysn
aab978fd19
* fixed test tmacprocvar for i8086 far code memory models
...
git-svn-id: trunk@25823 -
2013-10-18 17:23:25 +00:00
nickysn
38ad4974fd
* i8086 medium/compact memory model fixes in tests tb0368,tb0423,tb0433,tb0433a,
...
tb0508 and tb0594
git-svn-id: trunk@25822 -
2013-10-18 15:43:14 +00:00
nickysn
7e3d041a11
* fixed test tb0309.pp for i8086 medium/compact memory models
...
git-svn-id: trunk@25821 -
2013-10-18 14:24:27 +00:00
nickysn
2a11883ad6
* fixed test units/system/tassignd.pp for i8086 medium/compact memory model
...
git-svn-id: trunk@25820 -
2013-10-18 14:18:36 +00:00
nickysn
f006476ff0
* fixed tests tprocvar1 and tprocvar3 for i8086 medium/compact memory model
...
git-svn-id: trunk@25819 -
2013-10-18 14:08:11 +00:00
nickysn
1795368cff
* fixed test tchlp24 for i8086 medium/compact memory models
...
git-svn-id: trunk@25818 -
2013-10-18 13:28:10 +00:00
nickysn
ef51c8c5a2
* fixed the interface wrapper code generation for virtual methods on i8086 in
...
the medium memory model
git-svn-id: trunk@25817 -
2013-10-18 12:11:50 +00:00
nickysn
116d3746ca
* fixed the stack offset to the self parameter when generating an interface
...
wrapper for a virtual method in tcg8086.g_intf_wrapper
git-svn-id: trunk@25816 -
2013-10-18 10:56:04 +00:00
marco
655428a467
* fix for mantis #25202 macpascal->macpas, patch by Thaddy.
...
git-svn-id: trunk@25815 -
2013-10-18 08:40:34 +00:00
sergei
8afc5b8ebf
+ Basic implementation of TXPathNSResolver class, Mantis #25183 .
...
git-svn-id: trunk@25814 -
2013-10-18 08:36:19 +00:00
nickysn
5abeb67bff
* the i8086 versions of InterLockedDecrement and InterLockedIncrement were
...
missing 'nostackframe'. Fixed.
git-svn-id: trunk@25813 -
2013-10-17 22:38:59 +00:00
nickysn
83aa50de74
* emit a far jmp in the interface wrapper on i8086 in far code memory models
...
git-svn-id: trunk@25812 -
2013-10-17 21:55:45 +00:00
nickysn
e0e4c04456
* the Ptr(sel,ofs) parameters changed from longint to word on i8086
...
git-svn-id: trunk@25811 -
2013-10-17 20:44:58 +00:00
nickysn
e0350d6f44
+ added test tlea2.pp, which tests the LEA instruction with a 64-bit, 32-bit and
...
16-bit operand size on x86_64
git-svn-id: trunk@25810 -
2013-10-17 18:25:17 +00:00
nickysn
f30fddec53
* use 16-bit LEA directly in fpc_SetJmp, since that instruction is now supported
...
by the compiler
git-svn-id: trunk@25809 -
2013-10-17 17:33:55 +00:00
nickysn
4aa010eedc
+ support LEA with 16-bit operand size
...
git-svn-id: trunk@25808 -
2013-10-17 16:11:08 +00:00
Jonas Maebe
8dd956cbde
* convert unicode/widestring constants to ansistring in resourcestring
...
declarations (mantis #25198 )
git-svn-id: trunk@25807 -
2013-10-17 12:43:39 +00:00
nickysn
9be15583af
* compilation of i8086 rtl fixed (seems like the fpc asm reader doesn't support 16-bit LEA, so hardcode it with DB for now)
...
git-svn-id: trunk@25806 -
2013-10-16 16:34:48 +00:00
nickysn
c9d021aeb8
* prefer to use ax in fpc_SetJmp for i8086, because it's faster on old CPUs (and makes no difference on newer CPUs)
...
git-svn-id: trunk@25805 -
2013-10-16 15:17:23 +00:00
nickysn
acbf73ec6e
* stack frame eliminated also in fpc_longJmp for i8086
...
git-svn-id: trunk@25804 -
2013-10-16 13:50:18 +00:00
nickysn
0d24dcc21b
* optimizations in fpc_SetJmp for i8086 by stack frame elimination and using SI instead of BP
...
git-svn-id: trunk@25803 -
2013-10-16 12:49:38 +00:00
nickysn
6596ba9036
* fixed the stack param offsets in Ptr, get_caller_addr and get_caller_frame after the stackframe elimination
...
git-svn-id: trunk@25802 -
2013-10-16 12:39:39 +00:00
nickysn
9bf3d1edff
* optimized get_caller_addr and get_caller_frame on i8086 by eliminating the stack frame and using si, instead of bp
...
git-svn-id: trunk@25801 -
2013-10-16 12:35:05 +00:00
nickysn
aa9fe36fd3
* optimized version of Ptr() for i8086
...
git-svn-id: trunk@25800 -
2013-10-16 12:29:22 +00:00
nickysn
1c53d24743
* fixed typo (bug) in i8086 get_pc_addr. Use SP instead of BP to obtain the
...
return address.
git-svn-id: trunk@25799 -
2013-10-16 09:32:55 +00:00
nickysn
814e1297ed
* tcg8086.g_adjust_self_value fixed for far code memory models
...
git-svn-id: trunk@25798 -
2013-10-15 23:34:18 +00:00
nickysn
60537a94ea
* fixed test tintuint for i8086 medium memory model
...
git-svn-id: trunk@25797 -
2013-10-15 22:49:40 +00:00
nickysn
7ff97d9b7d
* specify AT_DATA when refering to the 'RESSTR' symbols; among other things,
...
this fixes resourcestring constants in the i8086 memory model.
git-svn-id: trunk@25796 -
2013-10-15 22:06:16 +00:00
nickysn
ea1370a89e
+ implementated get_frame() and get_pc_addr() for the i8086
...
git-svn-id: trunk@25795 -
2013-10-15 20:16:13 +00:00
nickysn
bf07fc077b
* specify AT_DATA in all references to the tobjectdef.vmt_mangledname symbol.
...
This fixes a lot of bugs, related to objects and classes in the i8086 medium
memory model
git-svn-id: trunk@25794 -
2013-10-15 18:56:27 +00:00
nickysn
9b2b5a9565
* fixed a bug in fpc_SetJmp on i8086, that caused an incorrect value of sp to
...
be written in Jmp_buf.sp
git-svn-id: trunk@25793 -
2013-10-15 16:28:37 +00:00
nickysn
e160dab697
+ added i8086 to the list of supported CPUs by FPC.exe
...
git-svn-id: trunk@25792 -
2013-10-15 13:29:51 +00:00
lacak
64df3503f3
fcl-db: dbase: rename new TLargeIntegerConstant to TLargeIntConstant to align naming with existing identifiers like etLargeInt and TLargeIntVariable
...
git-svn-id: trunk@25791 -
2013-10-15 13:00:58 +00:00