summaryrefslogtreecommitdiff
path: root/rtl
Commit message (Collapse)AuthorAgeFilesLines
* + VarIsBool function by Alexander Strokach, resolves #23358florian2012-11-201-0/+6
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@23038 3ad0048d-3df7-0310-abae-a5850022a9f2
* rtl/objpas/fgl.pp:svenbarth2012-11-191-1/+1
| | | | | | | Fix typo in comment; fixes Mantis #23352 git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@23036 3ad0048d-3df7-0310-abae-a5850022a9f2
* - removed unimplemented/unsupported rtleventsync (mantis #23332)jonas2012-11-182-20/+0
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@23012 3ad0048d-3df7-0310-abae-a5850022a9f2
* * terminate with an error when initializing a critical section and recursivejonas2012-11-181-1/+1
| | | | | | | | mutexes are not available, since one of the expected properties of (Delphi/Windows-compatible) critical sections is that they ar re-entrant (mantis #23334) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@23011 3ad0048d-3df7-0310-abae-a5850022a9f2
* * removed stray try/finally statement (mantis #23333)jonas2012-11-181-9/+6
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@23010 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Ansistring versions of MkDir,ChDir,RmDir: make a full copy of argument ↵sergei2012-11-161-6/+12
| | | | | | string. This is necessary because underlying implementations can modify directory separators in argument, causing crash if argument resides in read-only memory. This is also consistent with shortstring variants of same procedures. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@23000 3ad0048d-3df7-0310-abae-a5850022a9f2
* Add unsigned versions of ntohl and htonlmasta2012-11-162-14/+26
| | | | | | | | | | | | All systems i know of define ntohl and htonl to use unsigned 32bit types. To keep backward compatibility for now I've added overloaded versions so the impact on existing code is a small as possible. But I've marked the signed versions as deprecated. The code will now also use SwapEndian which is available as optimized versions on some platforms. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22994 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Prevent Move from freeing an associated object if OwnsObjects=True ↵michael2012-11-161-0/+1
| | | | | | (reported on sourceforge) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22992 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed compatilation on Haiku Alpha4 (patch by Olivier Coursière,jonas2012-11-101-2/+1
| | | | | | mantis #23300) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22969 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Need FILE_WRITE_ATTRIBUTES for setfiledate (mantis #23290)michael2012-11-081-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22952 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Avoid overflow when reading from streams > 2gbmichael2012-11-061-2/+3
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22945 3ad0048d-3df7-0310-abae-a5850022a9f2
* rtl/linux/m68k/prt0.as:svenbarth2012-11-051-7/+12
| | | | | | | | | correctly calculate and pass on the addresses for the parameters and the environment; this way parameters can now be used, but reading environment variables still does not seem to work... Note: the other assembler files (especially cprt0.as) were not adjusted and might not work at all git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22936 3ad0048d-3df7-0310-abae-a5850022a9f2
* * pass not only exception address but also frame to raise: florian2012-11-045-12/+10
| | | | | | | if an address is passed the compiler cannot know a good value for the frame so it passed nil and no stack trace is printed, resolves #12528 git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22932 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix memory leak of video unit as proposed by Michael Karst, resolves #22876florian2012-11-041-0/+9
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22927 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix sincos also for x86-64-linuxflorian2012-11-041-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22926 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix sincos for x86-64 windows resolves #23268florian2012-11-041-20/+12
| | | | | | | * changed to intel assembler to be more readble * test for sincos extended git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22925 3ad0048d-3df7-0310-abae-a5850022a9f2
* * patch by Cyrax for easy redirection of heaptrc output, resolves #22168florian2012-11-041-12/+27
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22922 3ad0048d-3df7-0310-abae-a5850022a9f2
* rtl/m68k/setjump.inc:svenbarth2012-11-012-6/+36
| | | | | | | | | | | * implement "fpc_setjmp" and "fpc_longjmp" rtl/m68k/m68k.inc: * add "nostackframe" to "get_frame" and "sptr" + add "get_pc_addr" => allows stack traces to be displayed correctly git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22899 3ad0048d-3df7-0310-abae-a5850022a9f2
* rtl/m68k/m68k.inc:svenbarth2012-10-311-0/+11
| | | | | | | dummyplement Interlocked* functions; they are not locking in any way, but at least they do what they should git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22884 3ad0048d-3df7-0310-abae-a5850022a9f2
* rtl/m68k/m68k.inc, move:svenbarth2012-10-311-10/+4
| | | | | | | completely disable the "fast loop" code for Coldfire instead of "hackfixing" it; with this StdIO starts to work (though one byte is missing at the end...) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22883 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Fetch PECOFF section sizes correctly (not including zero padding), ↵sergei2012-10-301-0/+10
| | | | | | resolves #22788. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22879 3ad0048d-3df7-0310-abae-a5850022a9f2
* Fixed error in define selecting write barrier code that has been introduced ↵tom_at_work2012-10-291-1/+1
| | | | | | during debugging git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22872 3ad0048d-3df7-0310-abae-a5850022a9f2
* * changed all version numbers to 900044 for freebsd 9. Expanded script to ↵marco2012-10-286-5/+13
| | | | | | | | | deal with all its incarnations. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22868 3ad0048d-3df7-0310-abae-a5850022a9f2
* Improve memory barriers on ARMtom_at_work2012-10-281-6/+20
| | | | | | | | | | - memory barriers are only needed on armv6 and up - DMB on ARMv6 is "mcr 15, 0, r0, cr7, cr10, {5}", not "mcr 15, 0, r0, cr7, cr10, {4}" - improve write barrier on armv7 by using "dmb st" instead of "dmb sy" todo: The use of the correct barrier code should be determined during runtime. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22867 3ad0048d-3df7-0310-abae-a5850022a9f2
* Add implementations for read/write barrier code for ARMtom_at_work2012-10-271-0/+35
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22864 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed wrong opcode sizejonas2012-10-271-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22855 3ad0048d-3df7-0310-abae-a5850022a9f2
* * rtl/m68k/m68k.inc, move:svenbarth2012-10-241-0/+2
| | | | | | | add a check for "count = 0" which happens e.g. inside of System.Assign if called with '' as filename (which is the case inside OpenStdIO) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22841 3ad0048d-3df7-0310-abae-a5850022a9f2
* * merging more of Jeppe Johansen's arm-embedded branchflorian2012-10-221-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22824 3ad0048d-3df7-0310-abae-a5850022a9f2
* Small fixes to ARM-Embedded RTL from Jeppe Johansenmasta2012-10-225-25/+113
| | | | | | | Added FSMC register definitions(from Anton Rieckert) Fixed faulty NVIC definitions git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22820 3ad0048d-3df7-0310-abae-a5850022a9f2
* o merging r22801 of Jeppe Johansenflorian2012-10-211-103/+30
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22812 3ad0048d-3df7-0310-abae-a5850022a9f2
* * rtl/m68k/setjump.inc:svenbarth2012-10-211-0/+1
| | | | | | | correctly dummy out setjump as "d0 <> 0" means that longjmp was executed (and d0 could be set from the calling function) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22797 3ad0048d-3df7-0310-abae-a5850022a9f2
* o merge of the branch laksen/arm-embedded of Jeppe Johansen:florian2012-10-2117-1672/+6365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes a couple of arm-embedded stuff, adds some controllers, start of fpv4_s16 support, for a complete list of changes see below: ------------------------------------------------------------------------ r22787 | laksen | 2012-10-20 22:00:36 +0200 (Sa, 20 Okt 2012) | 1 line Properly do NR_DEFAULTFLAGS detection/allocation/deallocation ------------------------------------------------------------------------ r22782 | laksen | 2012-10-20 07:44:55 +0200 (Sa, 20 Okt 2012) | 1 line Fixed flags detections code for wide->short optimization code for Thumb-2 ------------------------------------------------------------------------ r22778 | laksen | 2012-10-19 20:23:14 +0200 (Fr, 19 Okt 2012) | 1 line Added coprocessor registers, and support for 6 operands(MCR/MRC instructions, etc) ------------------------------------------------------------------------ r22647 | laksen | 2012-10-14 21:28:08 +0200 (So, 14 Okt 2012) | 1 line Added register specifications to lpc1768.pp. From Joan Duran ------------------------------------------------------------------------ r22646 | laksen | 2012-10-14 21:10:20 +0200 (So, 14 Okt 2012) | 4 lines Fixed some minor formating issues Implemented a small heap mananger Implemented console IO Changed default LineEnding to CrLf(to ease console IO parsing) ------------------------------------------------------------------------ r22599 | laksen | 2012-10-09 08:58:58 +0200 (Di, 09 Okt 2012) | 1 line Added all STM32F1 configurations ------------------------------------------------------------------------ r22597 | laksen | 2012-10-08 22:10:45 +0200 (Mo, 08 Okt 2012) | 1 line Added initial support for the Cortex-M4F FPv4_S16 FPU ------------------------------------------------------------------------ r22596 | laksen | 2012-10-08 22:04:14 +0200 (Mo, 08 Okt 2012) | 1 line Added FPv4_d16 FPU instructions, and a few extra registers ------------------------------------------------------------------------ r22592 | laksen | 2012-10-08 16:07:40 +0200 (Mo, 08 Okt 2012) | 2 lines Added support for IT block merging Added a peephole pattern check for UXTB->UXTH chains ------------------------------------------------------------------------ r22590 | laksen | 2012-10-08 14:30:00 +0200 (Mo, 08 Okt 2012) | 3 lines Add CBNZ/CBZ instructions Create preliminary Thumb-2 PeepHoleOptPass2 code, hacked together from the ARM mode code Added a number of simple size optimizations for common Thumb-2 instructions ------------------------------------------------------------------------ r22582 | laksen | 2012-10-08 06:49:39 +0200 (Mo, 08 Okt 2012) | 3 lines Fix optimizations of Thumb-2 code Fix problem with loading of condition operand for IT instructions Properly split IT blocks when register allocator tries to spill inside a block. ------------------------------------------------------------------------ r22581 | laksen | 2012-10-08 05:15:40 +0200 (Mo, 08 Okt 2012) | 4 lines Fixed assembler calling command line for cpus>ARMv5TE. EDSP instructions will generate errors while assembling, due to RTL assembler routines Updated boot code for all Cortex-M3 controllers, and sc32442b to use weak linking for exception tables. Cortex-M3 devices now also share initialization routine to simplify maintenance STM32F10x classes now have specific units which fit the interrupt source names and counts ------------------------------------------------------------------------ r22580 | laksen | 2012-10-08 05:10:44 +0200 (Mo, 08 Okt 2012) | 2 lines Added support for .section, .set, .weak, and .thumb_set directive for GAS assembler reader IFDEF'ed JVM specific assembler directives, to prevent ait_* set to exceed 32 elements ------------------------------------------------------------------------ r22579 | laksen | 2012-10-08 02:10:52 +0200 (Mo, 08 Okt 2012) | 3 lines Remove all traces of the interrupt vector table generation mechanism Clean up cpuinfo tables Fixed ARMv7M bug(BLX <label> doesn't exist on that version) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22792 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Fixed i386 longjmp, it must not return 0 if 'value' argument happens to be 0.sergei2012-10-191-0/+4
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22781 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Rewrote x86_64 implementations of setjmp and longjmp.sergei2012-10-192-60/+85
| | | | | | + Win64 variant now saves/restores nonvolatile xmm registers and fpu/xmm control words, as required by ABI. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22780 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed compilation after introduction of nostackframe checksjonas2012-10-191-12/+7
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22767 3ad0048d-3df7-0310-abae-a5850022a9f2
* Enabled signal handlerssvenbarth2012-10-181-5/+0
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22752 3ad0048d-3df7-0310-abae-a5850022a9f2
* Implement SysCall interface for m68k-linux. This is especially useful for ↵svenbarth2012-10-181-0/+42
| | | | | | | | testing code using QEMU's userspace emulation as no libraries are needed then. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22750 3ad0048d-3df7-0310-abae-a5850022a9f2
* Various adjustments to the RTL for m68k:svenbarth2012-10-185-6/+247
| | | | | | | | | * enable the 6 parameter syscall variant (still everything dummied out though) * add termios constants * don't change signal handlers for now * disable assembly set routines as set handling was changed git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22743 3ad0048d-3df7-0310-abae-a5850022a9f2
* Replace DBRA instruction for Coldfire with a SUB/BRA combination in the ↵svenbarth2012-10-181-0/+25
| | | | | | | | for-loop-code- generation and the assembly helpers in the RTL as DBRA is not supported by Coldfire. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22740 3ad0048d-3df7-0310-abae-a5850022a9f2
* For now completely disable (I)MUL/(I)DIV support for Coldfire and pass ↵svenbarth2012-10-182-0/+8
| | | | | | | | | | through the RTL routines (of which the names had changed from FPC_MUL_LONGWORD->FPC_MUL_DWORD and FPC_MOD_CARDINAL-> FPC_MOD_DWORD). Also disable the usage of FPU opcodes for Coldfire. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22739 3ad0048d-3df7-0310-abae-a5850022a9f2
* rtl/linux/m68k/prt0.as:svenbarth2012-10-181-0/+6
| | | | | | Add __stkptr variable git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22735 3ad0048d-3df7-0310-abae-a5850022a9f2
* rtl/m68k: Added mathu(h).inc with dummy implementations of SetExceptionMask ↵svenbarth2012-10-182-0/+50
| | | | | | and GetExceptionMask git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22729 3ad0048d-3df7-0310-abae-a5850022a9f2
* rtl/m68k/sysnr.inc:svenbarth2012-10-181-4/+4
| | | | | | | adjust syscalls just enough so that we don't have any duplicate symbols; the correctness will be verified once we have linkable code git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22727 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Fix nostackframe related problemspierre2012-10-181-5/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22719 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Fix dayOfWeek for dates < 0 (bug ID #23144)michael2012-10-171-2/+4
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22679 3ad0048d-3df7-0310-abae-a5850022a9f2
* + AVXSupport function to detect if the CPU and OS support AVXflorian2012-10-142-8/+59
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22641 3ad0048d-3df7-0310-abae-a5850022a9f2
* * add comment to size_t definition. Documents issue #22834 a bit.marco2012-10-121-0/+5
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22615 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Take care of Florian's remark that FList may be nil when constructor failedmichael2012-10-081-1/+2
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22593 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Fix from Luiz Americo to avoid crash when a freenotification is registered ↵michael2012-10-081-10/+5
| | | | | | during destroy. (bug ID 23031) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22589 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Patch from Luiz Americo to clean up tlist (bug ID 23024)michael2012-10-081-5/+3
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22585 3ad0048d-3df7-0310-abae-a5850022a9f2