Commit Graph

37717 Commits

Author SHA1 Message Date
tom_at_work
4150f0a2fb Rebase with r21814
git-svn-id: branches/targetandroid@21815 -
2012-07-07 23:09:20 +00:00
sergei
34fc366d64 * test/opt/tretopt.pp, test/tasmread.pp: fixed GOT calculation
* test/tcg1.pp: rewrote without PIC, was having the same issue (GOT off by 1), additionally Intel syntax part won't compile anyway. This test is about push/pop encoding, not about PIC.

git-svn-id: trunk@21811 -
2012-07-07 12:03:13 +00:00
joost
025f840dd5 * Added ReplaceStr and ReplaceText functions, for Delphi compatibility
git-svn-id: trunk@21810 -
2012-07-07 08:12:07 +00:00
masta
bba75a079c Better Code generation for SAR/ROR/ROL inline nodes
The old code forced dst and src to be the same, which is highly x86
specific and creates bad register utilization on other architectures
like arm.

The new version will use more imaginary registers, allowing the register
allocator to do a better job.

I've merged second_sar and second_rox into a single procedure
second_rox_sar because they were very similar.

git-svn-id: trunk@21809 -
2012-07-06 21:33:28 +00:00
masta
9825fbf554 Support top_shifterop and top_regset for arm in RegInOp
RegInOp did not check for a register beeing part of a shifterop
(op.shifterop^.rs) which could result in trashed registers (But that did
not seem to happen yet anyway).

I've also implemented support for top_regset, but it is currently not
generated outside of proc_entry/proc_exit anyway.

git-svn-id: trunk@21808 -
2012-07-06 21:33:22 +00:00
pierre
645698183d Integer Overflow signal must be mapped to error 215, not 205, which is for floating point overflow
git-svn-id: trunk@21807 -
2012-07-06 15:54:45 +00:00
pierre
32644a526c Use CPUMIPS instead of MIPS conditional
git-svn-id: trunk@21806 -
2012-07-06 15:26:49 +00:00
pierre
3693af4c69 Do not try to call do_client if do_server failed
git-svn-id: trunk@21805 -
2012-07-06 15:03:13 +00:00
masta
dbf0404fb0 More consolidation of OP_SHL/SHR/ROR/SAR in ARM CodeGen
This removes the duplications in a_op_reg_reg_reg_checkoverflow.
OP_ROL stays seperate because it needs some special treatment again.

The code for OP_ROL was changed, previously it generated:
mov tempreg, #32
sub src1, tempreg, src1
mov dst, src2, ror src1

This would trash src1, which MIGHT be a problem, but i'm not totally
sure. But the mov/sub was replaced with rsb, so the new code looks like
this.

rsb tempreg, src1, #32
mov dst, src2, ror tempreg

If src1 gets freed afterwards the regallocator should be able to change
that into:

rsb src1, src1, #32
mov dst, src2, ror src1

git-svn-id: trunk@21804 -
2012-07-06 15:01:31 +00:00
pierre
83d398719c Add support for MIPS cpu
git-svn-id: trunk@21803 -
2012-07-06 14:51:54 +00:00
pierre
6f12197d3b Fix set of frame poointer value for big local stack size
git-svn-id: trunk@21802 -
2012-07-06 13:32:13 +00:00
masta
d2d5d17557 Consolidate handling of OP_SHL/SHR/ROL/ROR/SAR in ARM CodeGen
The previous code was full with duplicated code, this new version just
maps the OP_* to the correct SM_* and does some special handling for
OP_ROL which is done via OP_ROR.

git-svn-id: trunk@21801 -
2012-07-06 12:10:42 +00:00
pierre
a771b32097 Use R9 instead of AT for big local stack size to avoid error due to AT being changed by pseudo-instructions
git-svn-id: trunk@21800 -
2012-07-06 12:05:58 +00:00
pierre
8b65ef2d94 * Fix error in last commit for MIPS cpu
git-svn-id: trunk@21799 -
2012-07-06 06:14:07 +00:00
pierre
2e4c704f06 Use A_J instead of A_BA for a_jmp_XXX unless we generate PIC code to avoid branch out of range error (like for packages/fpmake compilation)
git-svn-id: trunk@21798 -
2012-07-05 21:24:22 +00:00
pierre
56b4977858 Override tcallnode.pass_1 for use of got for cdecl'ared functions (assuming it can be PIC code)
git-svn-id: trunk@21797 -
2012-07-05 21:18:16 +00:00
pierre
c53d07f741 Improve addr_pic support
git-svn-id: trunk@21796 -
2012-07-05 21:16:02 +00:00
pierre
86d82a9006 Add reference to new ncpuld unit
git-svn-id: trunk@21795 -
2012-07-05 21:13:22 +00:00
pierre
514b14a5ae Override a_call_name to use _gp loading and call for cdecl (to get PIC compatible code)
git-svn-id: trunk@21794 -
2012-07-05 21:12:14 +00:00
pierre
fc81979f61 set got at create of cs_create_pic is used
git-svn-id: trunk@21793 -
2012-07-05 21:10:30 +00:00
pierre
c2cd8246cb Override tloadnode.pass_1 to for use of got for shared library variables and genrate_picvaraccess
git-svn-id: trunk@21792 -
2012-07-05 21:07:46 +00:00
pierre
b63bc6be13 MIPS: use OC_EQ instead of OC_NE for new_exception to avoid branch out of range error
git-svn-id: trunk@21791 -
2012-07-05 21:04:03 +00:00
pierre
5fb3d1398a + Use SIZEOF_PTHREAD_XXX macros for /usr/include/bits/pthreadtypes.h for MIPS cpu
git-svn-id: trunk@21790 -
2012-07-05 21:00:09 +00:00
pierre
c156b5a8b2 First version working to link with shared c library
git-svn-id: trunk@21789 -
2012-07-05 20:58:27 +00:00
pierre
d8d7c38aec * Use to call PASCALMAIN to allow linking with PIC Code
git-svn-id: trunk@21788 -
2012-07-05 20:57:25 +00:00
pierre
024bde8875 Create .ent/.end pair for mips/mipsel and alpha
git-svn-id: trunk@21787 -
2012-07-04 16:38:57 +00:00
pierre
3acc0e6686 Add needs_got_for_pic, set global_used to that procedure
git-svn-id: trunk@21786 -
2012-07-04 16:38:19 +00:00
pierre
31a3f4f4a0 Add ait_ent and ait_ent_end to aiclass array
git-svn-id: trunk@21785 -
2012-07-04 16:37:14 +00:00
pierre
9b7fec59bb Support ait_ent and ait_ent_end
git-svn-id: trunk@21784 -
2012-07-04 16:36:33 +00:00
pierre
502cd6db29 Remove tai_ent, which is moved to aasmtai unit
git-svn-id: trunk@21783 -
2012-07-04 16:35:46 +00:00
pierre
0a21c01737 Use 8 for max record alignment for mips/mipsel
git-svn-id: trunk@21782 -
2012-07-04 16:34:51 +00:00
pierre
e25937854f Use std reg names and and
git-svn-id: trunk@21781 -
2012-07-04 16:34:06 +00:00
pierre
1f762cc247 Add and replacement, for MIPS
git-svn-id: trunk@21780 -
2012-07-04 16:33:17 +00:00
pierre
f92fba996d + New tai_ent and tai_ent_end classes
git-svn-id: trunk@21779 -
2012-07-04 16:32:20 +00:00
pierre
68d7e943c8 + Add global_used callback procedure
git-svn-id: trunk@21778 -
2012-07-04 16:31:20 +00:00
pierre
7982b34416 Start of PIC code support
git-svn-id: trunk@21777 -
2012-07-04 16:28:55 +00:00
pierre
6a9edb2083 Always pass records by value (OABI compliance)
git-svn-id: trunk@21776 -
2012-07-04 16:27:57 +00:00
pierre
63b4cb3347 + Add NR/RS _GP and _PIC_FUNC aliases
git-svn-id: trunk@21775 -
2012-07-04 16:26:29 +00:00
pierre
a892e2aa6f set pi_needs_got always if cs_create_pic is on
git-svn-id: trunk@21774 -
2012-07-04 16:25:42 +00:00
pierre
944d500d55 Change std reg names to allow use with GAS assembler
git-svn-id: trunk@21773 -
2012-07-04 16:24:11 +00:00
pierre
87b6bb5053 + Add .cpXXX pseudo-instruction for PIC code
git-svn-id: trunk@21772 -
2012-07-04 16:23:16 +00:00
masta
8001979f7e Reworked ispowerof2 in cutils.pas
IsPowerOf2 now uses the BsfQWord intrinsic introduced in Freepascal 2.6,
instead of the old shl loop, to find the power.

git-svn-id: trunk@21771 -
2012-07-04 13:25:25 +00:00
michael
003a7ca217 * Allow session file prefix. Make sessiondir readable
git-svn-id: trunk@21770 -
2012-07-04 12:59:18 +00:00
michael
e06927d623 * Customization of upload dir
git-svn-id: trunk@21769 -
2012-07-04 12:45:46 +00:00
marco
a1b3e79554 * improvements to bufdataset testsuite specially for ftmemo and ftblob.
Patch by Lacak2, Mantis #22364

git-svn-id: trunk@21768 -
2012-07-04 09:18:23 +00:00
marco
8a72ccd1df * Add TestSpecificTBufDataset unit into dbtestframework to non gui testframework
patch by Lacak2, Mantis #22363

git-svn-id: trunk@21767 -
2012-07-04 09:15:04 +00:00
Jonas Maebe
3f5ae8b05f * forgot to commit, part of r21765
git-svn-id: trunk@21766 -
2012-07-03 21:23:20 +00:00
Jonas Maebe
882351bb21 * don't insert a conversion to widechar for ansistr[x]:='y' assignments on
the jvm target  (forgot to adapt code after adding ansistring support)

git-svn-id: trunk@21765 -
2012-07-03 21:16:29 +00:00
svenbarth
71c13190e1 Fix for Mantis #22329.
symtable.pas, searchsym_in_class:
* if we found a helper method that has overload defined we should not forget the symbol as there can be a case that no method with that name is defined in the extended class hierarchy
symtable.pas, searchsym_in_record:
* analogous to the above

+ added test given in the issue
+ added analogous test for record helpers

git-svn-id: trunk@21764 -
2012-07-03 16:27:03 +00:00
svenbarth
a908db5a91 Partially fix for Mantis #22160. This resolves the internal error, but the given example units still don't compile, because of the way we handle specializations and unit loading (more about this once I fixed that, too).
pgenutil.pas, specialization_init:
* don't add implementation units of the generic's unit to the symtable stack if we are specializing in a different unit (thus the generic needs to be defined in the interface section) as there is the possibility that the globalsymtable of an implementation unit is not yet defined if the specialization unit is used in the interface section of an implementation unit

git-svn-id: trunk@21763 -
2012-07-03 16:17:55 +00:00