Commit Graph

37956 Commits

Author SHA1 Message Date
masta
57b67dfa30 Better SP adjustments on entry/exit for ARM
If the needed adjustment is not expressible in a shifterconst, the old code
loaded a temporary register (fixed to r12) via a_load_const_reg and used it
to adjust the SP. Resulting in:

mov r12, #44
orr r12, r12, #4096
sub sp, sp, r12

The new code will try to split the adjustment into 2 shifterconstants and
will do two seperate adjustments:

sub sp, sp, #44
sub sp, sp, #4096

If that doesn't work we'll fall back to the old code. But that should
happen VERY rarely, only for stacks bigger than 256k which are not
expressible in 2 shifter constants.

git-svn-id: trunk@21863 -
2012-07-11 08:41:45 +00:00
Jonas Maebe
1955255dda * let thlcg.a_call_name() return the tcgpara representing the function
result location (NR_FUNCTION_RESULT_REG is not valid on all platforms)
   o this requires passing the forced function result type (if any) to this
     method
   o a generic, basic thlcg.a_call_name() is now available that sets the
     function result location; can be called by descendants
  * the availability under all circumstances of the correct function return
    type enables g_call_system_proc() on the JVM platform to now determine
    by itself how many stack slots are removed by the call -> do so, instead
    of manually counting them (or forgetting to do so and messing up the
    maximum evaluation stack height calculations)

git-svn-id: trunk@21862 -
2012-07-11 08:25:58 +00:00
Jonas Maebe
aba6923187 * moved g_test_self() from cgobj to hlcgobj
git-svn-id: trunk@21861 -
2012-07-11 08:25:51 +00:00
Jonas Maebe
276a0918f5 * fixed (harmless) class cast error
git-svn-id: trunk@21860 -
2012-07-11 08:25:42 +00:00
pierre
c38b78ba65 + Add missing implementation of pipe syscall
git-svn-id: trunk@21859 -
2012-07-11 07:48:54 +00:00
pierre
ffd01794fb Reserve R25 () register for PIC function calling
git-svn-id: trunk@21857 -
2012-07-10 21:36:00 +00:00
pierre
489b93f2f5 * Overload hlcg.a_call_ref and a_call_reg methods for cdecl'ared functions to use register
git-svn-id: trunk@21856 -
2012-07-10 21:35:11 +00:00
pierre
3f6c3cbb87 * Call hlcg.a_call_ref and a_call_reg instead of cg methods (needed for MIPS cpu)
git-svn-id: trunk@21855 -
2012-07-10 21:34:03 +00:00
sergei
31f9a9d420 * Fixed label name in .globl and .type directives, was causing every library to contain an unwanted dynamic reference to "_start".
git-svn-id: trunk@21854 -
2012-07-10 17:12:34 +00:00
sergei
1112041ff1 * get_pc_addr on x86_64 needs nostackframe attribute to return the correct value.
git-svn-id: trunk@21853 -
2012-07-10 16:54:42 +00:00
michael
b424ce2aeb GetDeclaration of "is nested" procedure type is now correct
git-svn-id: trunk@21852 -
2012-07-10 16:01:52 +00:00
michael
abaff904a1 * Support for Is Nested procedure declarations (Bug ID 21992)
git-svn-id: trunk@21851 -
2012-07-10 15:59:53 +00:00
michael
f8e6cfc6b8 * Fixed parsing of constref and one more case of deprecated hint
git-svn-id: trunk@21850 -
2012-07-10 15:14:14 +00:00
michael
c04bfe02e3 * Fixed parsing of deprecated hint texts
git-svn-id: trunk@21849 -
2012-07-10 15:02:39 +00:00
sergei
3b3da49ad6 * Merged TElfObjSection.secshidx and TCoffObjSection.secidx into TObjSection.index.
git-svn-id: trunk@21848 -
2012-07-10 13:34:55 +00:00
pierre
75420e78a8 Reset FPU exceptions and retrun after changing sigc_pc value if UContext is assigned
git-svn-id: trunk@21847 -
2012-07-10 13:34:25 +00:00
Jonas Maebe
99c22b87c1 * moved transformation of char-to-chararray type conversion into helpers
to first pass, fixes tbf/tb0215

git-svn-id: trunk@21846 -
2012-07-10 13:05:45 +00:00
sergei
27f342225a * Changed most fields of ELF structures to unsigned, to conform to their official declarations.
git-svn-id: trunk@21845 -
2012-07-10 13:03:17 +00:00
pierre
c234eae68a * cause bits must be clear as flags to avoid a second FPU exception
git-svn-id: trunk@21844 -
2012-07-10 12:31:46 +00:00
pierre
bc1ecc2e94 Use two parameter versions of get_caller_frame and get_caller_addr to get correct results for MIPS
git-svn-id: trunk@21843 -
2012-07-10 10:07:11 +00:00
pierre
b0fcb8cb2f Third field of SignalToRunError must be PUContext type
git-svn-id: trunk@21842 -
2012-07-10 10:06:02 +00:00
Jonas Maebe
92b4c84dae * fixed 'int64 shl/shr 0' on ppc32
git-svn-id: trunk@21841 -
2012-07-10 09:24:26 +00:00
Jonas Maebe
63ab1bae3e * don't allow ordinal->ptr-based-objectdef conversions on managed platforms,
even in Delphi mode (mantis #22401)

git-svn-id: trunk@21840 -
2012-07-10 09:24:13 +00:00
Jonas Maebe
c2be657671 * give an error instead of a note on the JVM target when overriding a
method by one with a lower visibility, because calling the overriding
    method results in a java.lang.AbstractMethodError in that case

git-svn-id: trunk@21839 -
2012-07-10 09:20:11 +00:00
michael
8d6557ec35 * Reversed default. Using UTF8 is now the default, old behaviour can be restored
git-svn-id: trunk@21838 -
2012-07-10 09:09:38 +00:00
michael
a7d55bc92b * Patch to allow use of UTF8 in ansistring (as requested in Bug ID #22310)
git-svn-id: trunk@21837 -
2012-07-10 06:56:06 +00:00
michael
5210d2fc94 * Patch from Silvio Clecio to implement TCookie.Expire (bug id 22361)
git-svn-id: trunk@21836 -
2012-07-10 06:16:49 +00:00
michael
4fb7d7caa5 * Forgot to commit
git-svn-id: trunk@21835 -
2012-07-09 18:24:19 +00:00
florian
95732625cc * use r11 as a normal register if no frame pointer is needed
git-svn-id: trunk@21834 -
2012-07-09 17:17:23 +00:00
michael
518af06016 * Remove wrong lineinfo unit. It does not work with DWARF
git-svn-id: trunk@21833 -
2012-07-09 15:39:12 +00:00
michael
15f59192ed * Parse complete expressions for default arguments
git-svn-id: trunk@21832 -
2012-07-09 14:53:27 +00:00
marco
9c52d89f95 * initialize variable in fpindexer. Mantis #22739
git-svn-id: trunk@21831 -
2012-07-09 13:54:35 +00:00
pierre
9bba5c956a Add support for indirect values
git-svn-id: trunk@21830 -
2012-07-09 13:46:11 +00:00
pierre
3ccfd2d74d + ESysERFKILL added
git-svn-id: trunk@21829 -
2012-07-09 13:45:20 +00:00
michael
add4de3089 *Fixed memory leak if an error occurs during argument parsing
git-svn-id: trunk@21828 -
2012-07-09 13:26:53 +00:00
pierre
6bc339192d MIPS system errors separated into errno-mips.inc file
git-svn-id: trunk@21827 -
2012-07-09 13:17:29 +00:00
pierre
2d6093645f Add a C compilation phase to check Error value
git-svn-id: trunk@21826 -
2012-07-09 13:14:37 +00:00
sergei
712f5d1c26 - Removed oso_readonly and oso_noload section options, it is enough to have just oso_write and oso_load to express possible section states.
git-svn-id: trunk@21825 -
2012-07-09 12:58:37 +00:00
sergei
2638bc01d9 * Fixed error introduced in r21732. For libraries, startup is always dllprt0.o, regardless of profiling/linking to libc. Mantis #22397.
git-svn-id: trunk@21824 -
2012-07-09 12:18:34 +00:00
pierre
b93b08427f Set needgsed to 0 for non-NetBSD systems
git-svn-id: trunk@21823 -
2012-07-09 09:56:45 +00:00
pierre
bc0c94c204 fpcdefs.inc: Set fpc_compiler_has_fixup_jmps for powerpcXX and mips CPUs.
psub.pas: Use new fpc_compiler_has_fixup_jmps conditional.
 mips/aasmcpu.pas: MIPS specific fixup_jmps function,
   The insttruction distance calculation is not exact as
   some pseudo-instruction can be expanded to a variable number of real instructions
   real calculation would only be possible if we first 
   convert pseudo-instuctions to real instructions before calling fixup_jmps.

 ncgutil.pas: Revert commit r21791
 ncgcon.pas: Revert commit r21786
 mips/cgcpu.pas: Partial revert of commit r21798, no need to always use A_J,
 as fixup_jmps now handles out of range branches.

git-svn-id: trunk@21822 -
2012-07-09 08:59:13 +00:00
michael
3d002a13c5 * Patch from Luiz Americo to return a variant with get
git-svn-id: trunk@21821 -
2012-07-09 07:39:51 +00:00
Jonas Maebe
1b3b097f3a * always interpret a function name on the RHS as a recursive function
call in MacPas mode, like in TP/Delphi (mantis #22344)

git-svn-id: trunk@21817 -
2012-07-08 09:52:30 +00:00
masta
aef81cad68 Add debug information about register spilling
If DEBUG_SPILLING is defined we'll output "XXX: Spill read/write".

git-svn-id: trunk@21816 -
2012-07-08 09:24:14 +00:00
sergei
1a25aed68d * Renamed a method for consistency (let script building methods start with ScriptAdd).
git-svn-id: trunk@21814 -
2012-07-07 22:49:05 +00:00
florian
a553798151 * improved makefile rules for linux
git-svn-id: trunk@21813 -
2012-07-07 21:22:06 +00:00
florian
9833f642fe * coalesce if either u or v are precolored, tested on arm and i386, it gives for both a small advantage
git-svn-id: trunk@21812 -
2012-07-07 21:20:26 +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