Commit Graph

37622 Commits

Author SHA1 Message Date
pierre
a3bc5eaa3f * Fix spelling error in last commit
git-svn-id: trunk@21722 -
2012-06-26 22:49:34 +00:00
pierre
ef3bbf4c4a Really use get_fsr set_fsr functions
git-svn-id: trunk@21721 -
2012-06-26 22:43:19 +00:00
Jonas Maebe
d472a6d5d0 * changed tregset into tcpuregisterset so it's faster and uses less memory
git-svn-id: trunk@21717 -
2012-06-26 19:01:11 +00:00
florian
3733a000a4 * fix compilation with -dextdebug
git-svn-id: trunk@21716 -
2012-06-26 17:22:09 +00:00
Jonas Maebe
571b3feab1 * fixed internalerror on win64 after r21696 (source register size depends on
the platform, mantis #22316)

git-svn-id: trunk@21715 -
2012-06-26 17:01:34 +00:00
pierre
5597af2279 * Try to adapt sigcontext record to MIPS linux system
git-svn-id: trunk@21714 -
2012-06-26 16:23:06 +00:00
pierre
262bf0fe6e * Fix Sigcontext field order for MIPS CPU
git-svn-id: trunk@21713 -
2012-06-26 16:21:57 +00:00
pierre
ba4122fda8 * Add fpu_XXX constants and use them for fpc_cpuinit procedure
git-svn-id: trunk@21712 -
2012-06-26 16:20:59 +00:00
pierre
3a082f8c29 Add defautl mips name and use mips instead of mipseb
git-svn-id: trunk@21711 -
2012-06-26 07:20:12 +00:00
sergei
0c32756ef3 - removed TCoffObjData.afteralloc, calculating MemPos there is useless because every call to afteralloc is immediately followed by call to TObjData.resetsections that resets all MemPos back to zero.
- PE_FILE_RELOCS_STRIPPED flag is meaningless for object files.
- Don't write PE_FILE_BYTES_REVERSED_LO as well, it is deprecated and GNU tools don't write it either.
- Don't set PE_FILE_32_BIT_MACHINE flag in x86_64 object files.

git-svn-id: trunk@21710 -
2012-06-25 23:26:07 +00:00
pierre
022d842b06 * Fix SIGXXX constants for mips CPU
git-svn-id: trunk@21709 -
2012-06-25 23:15:34 +00:00
pierre
48597c64ee * get_caller_stackinfo: set framebp to nil if addr is nil
git-svn-id: trunk@21708 -
2012-06-25 22:43:08 +00:00
pierre
f340ef87e3 * get_addr function renamed to get_pc_addr
+ get_caller_stackinfo procedure added.

git-svn-id: trunk@21707 -
2012-06-25 22:17:49 +00:00
florian
117c083003 * call inherited Destroy in TAsmOptimizer to avoid memory leak
git-svn-id: trunk@21706 -
2012-06-25 20:19:19 +00:00
florian
6ae2a43161 * fix compilation with extdebug
git-svn-id: trunk@21705 -
2012-06-25 20:01:35 +00:00
sergei
8c8883cc35 * Once TExeOutput is accessible in TObjSection.fixuprelocs, its ImageBase can be used directly, without a need to have a copy in every TObjSection.
* Also simplified COFF symbol loading, separate array of symbol sizes is not needed because these sizes never change during the load.

git-svn-id: trunk@21704 -
2012-06-25 18:39:46 +00:00
pierre
150578f2c0 + Use SigContext sigc_sp and sigc_pc fields for HandleErrorAdrFrame parameters
git-svn-id: trunk@21703 -
2012-06-25 12:02:02 +00:00
pierre
0cf5b9abdb + Set __stkptr value
git-svn-id: trunk@21702 -
2012-06-25 11:59:27 +00:00
Jonas Maebe
b42d204514 * fpc_shortstr_assign as compilerproc, forgot to commit
git-svn-id: trunk@21701 -
2012-06-25 05:06:41 +00:00
pierre
aee68923e8 Fix .pdr generation by adding .end pseudo-instruction, limit .ent to text section for mips cpu
git-svn-id: trunk@21700 -
2012-06-24 21:54:31 +00:00
Jonas Maebe
7c21cba1e2 * migrated g_copyshortstring, g_incrrefcount and g_array_rtti_helper to thlcg
git-svn-id: trunk@21699 -
2012-06-24 21:36:28 +00:00
Jonas Maebe
60aedb19d6 * removed superfluous (de)allocallcpuregisters calls
git-svn-id: trunk@21698 -
2012-06-24 21:36:15 +00:00
pierre
8469741700 + Added additional addr pointer parameter to
get_caller_frame, get_caller_addr and dump_stack
  with default NIL value to systemh.inc.
  + Added new get_addr function.
  system.inc: Use get_addr and get_frame to call
  HandleErrorAddrFrame instead of HandleErrorFrame
  in several error functions.
  Modify dump_stack to use frame and addr parameters.
  Provide a dummy get_addr function returning nil.
  i386/i386.inc, x86_64./x86_64.inc: Provide real
  implementation of get_addr function.

git-svn-id: trunk@21697 -
2012-06-24 21:22:09 +00:00
Jonas Maebe
7a0ae38700 + also specify the parameter def when allocating a parameter via
getintparaloc + adapted all call sites of getintparaloc. This
    led to a number of additional, related changes:
   o corrected the type information for some getintparaloc parameters
   o don't allocate some intparalocs in cases they aren't used
   o changed "const tvardata" parameter into "constref tvardata" for
     fpc_variant_copy_overwrite to make pass-by-reference semantics
     explicit
   o moved a number of routines that now have to call find_system_type()
     from cgobj to hlcgobj so that cgobj doesn't have to start depending
     on the symtable unit
   o added versions of the cpureg alloc/dealloc methods to hlcgobj that
     call through to their cgobj counter parts, so we can call save/restore
     the cpu registers before/after calling system helpers from hlcgobj
     (not implemented in hlcgobj itself, because all basic register
      allocator functionality is still part of cgobj/cgcpu)

git-svn-id: trunk@21696 -
2012-06-24 15:02:12 +00:00
Jonas Maebe
adf66eed8b * don't turn constref shortstring parameters into openstrings (they can't
be changed just like const parameters, so there's no use for the hidden
    high parameter)

git-svn-id: trunk@21695 -
2012-06-24 15:02:03 +00:00
Jonas Maebe
325c60866f * use tcgpara.def instead of extra size parameters
git-svn-id: trunk@21694 -
2012-06-24 15:01:59 +00:00
Jonas Maebe
c3ea451aea * set tcgpara.vardef when creating parameter info
git-svn-id: trunk@21693 -
2012-06-24 15:01:54 +00:00
Jonas Maebe
2d48396587 - removed redundant checks
git-svn-id: trunk@21692 -
2012-06-24 15:01:48 +00:00
Jonas Maebe
587244c088 * factored out common code from get_funcretloc()
* set tcgpara.def for the function return location (field introduced for and
    already used by the JVM code generator, required for future hlcg
    functionality)

git-svn-id: trunk@21691 -
2012-06-24 15:01:42 +00:00
svenbarth
f9211271d5 Fix for Mantis #22154:
* ptype.pas, read_named_type, array_dec: 
  allow border checks if both range elements are orddefs; for normal arrays
  using e.g. "0..15" this will allow to declare the correct amount of
  elements in the initialization while for generic arrays (e.g. "0..SizeOf(T)") 
  this will mean that only one element can be declared, which was already the 
  case before this change (maybe in such cases a constant initialization should 
  be forbidden in the future...)
+ added test

git-svn-id: trunk@21690 -
2012-06-24 10:43:28 +00:00
svenbarth
cc65ac20c5 Fix for Mantis #22220
ptype.pas:
  * read_named_type:
      allow specializations for pointers in Delphi modes
  * single_type: 
      correctly handle forwarddefs; as we can only specialize generics if
      they are completely defined (srsym<>nil) we don't need to return a 
      forward def, but instead return the specialized def itself
+ added tests to "test" instead of "webtbs" as no explicit tests were given 
  in the report

git-svn-id: trunk@21689 -
2012-06-24 10:35:21 +00:00
svenbarth
2d8796fa1a Added further tests regarding the topic from revision 21687
git-svn-id: trunk@21688 -
2012-06-24 10:27:01 +00:00
svenbarth
8c95ea039f Fix for Mantis #22219
ptype.pas:
  * read_named_type: 
      after reading the type we're pointing to we need to make sure that
      we didn't get a generic dummy symbol; this can happen when parsing
      a pointer declaration as the type in a constant or variable 
      declaration
  * resolve_forward_types:
      when resolving forward types we need to make sure that we weren't
      given a generic dummy to which no non-generic definition was
      given (possible in Delphi mode); for non-Delphi modes we can not
      rely on the generic dummy flag as the typedef of the symbol will
      the generic def
+ added test from the bug reports as well as three additional ones to
  make sure that nothing breaks regarding to forward pointer 
  declarations
      

git-svn-id: trunk@21687 -
2012-06-24 10:08:17 +00:00
masta
ca70207bc0 Support 64-bit shifts on ARM.
This code generate different versions of assembly depending on the
amount to shift.

Variable Amount: 6 cycles (5 if last shift can be folded)
Constant 1     : 2 cycles
Constant 2-31  : 3 cycles (2 if last shift can foldable)
Constant 32    : 1 cycle  (depends on the register allocator)
Constant 33-64 : 2 cycles

This should speed up softfpu on arm a bit.

git-svn-id: trunk@21686 -
2012-06-23 20:36:27 +00:00
masta
3566956389 Fix ARM-Assembler output for RRX-Shifterops
RRX (Rotate Right with eXtend) does a single bit right rotation through
the carry. So it does not take any arguments, neither constant nor
register.

Also remove redundant shiftmode2str and replace usage of it with gas_shiftmode2str.

git-svn-id: trunk@21685 -
2012-06-23 20:36:16 +00:00
sergei
5be97c7c9e - Removed TDJCoffObjSection,TPECoffObjSection,TCoffExeSection,TPECoffExeSection,TDJCoffExeSection. These only add complication and no value.
git-svn-id: trunk@21684 -
2012-06-23 14:59:45 +00:00
marco
31371eade1 * fix misnamed field in lookup related test, mantis #22113, patch by Lacak2.
git-svn-id: trunk@21683 -
2012-06-22 19:16:42 +00:00
marco
40d26638a7 * skip newline after comment. Patch by Lacak2, #22031
git-svn-id: trunk@21682 -
2012-06-22 19:14:26 +00:00
pierre
f2e83b0d7e * Avoid ShortString limitations for LocateExeFile in PATH environment variable is very long
git-svn-id: trunk@21681 -
2012-06-22 19:03:13 +00:00
Jonas Maebe
d953783a7e * also delete temporary files if the test crashes
git-svn-id: trunk@21680 -
2012-06-22 14:31:48 +00:00
marco
b70ed0a407 * fix bug #22300, "C" prefix of configuration file.
git-svn-id: trunk@21679 -
2012-06-22 13:31:48 +00:00
masta
59c726c829 Support ABS intrinsic on ARM
This code will generate the following sequence on arm:
r1=dst
r0=src

movs r1, r0
rsbmi r1, r0, #0

movs will set the N-flag when the MSB of r0 is set, if it is set, rsb
will calculate dst:=0-src;

git-svn-id: trunk@21678 -
2012-06-21 20:12:36 +00:00
masta
3d9d484bfd Remove redundant CPU-Check for FPC_HAS_INTERNAL_ABS_LONG
compiler/options.pas only defines FPC_HAS_INTERNAL_ABS_LONG for cpus
which support the intrinsic. No need to check again in the rtl.

git-svn-id: trunk@21677 -
2012-06-21 20:12:31 +00:00
masta
aeb15ba2b6 Fixed postfix check in taicpu.is_same_reg_move
The old version did not check the S-Postfix for MOV, which results in
removing instructions like:

movs r0, r0

which breaks later flag usage.

git-svn-id: trunk@21676 -
2012-06-21 20:12:25 +00:00
Jonas Maebe
512351043c * properly handle loading a value from a larger to a smaller subsetreg
if the source value comes from a bit position > sizeof(smaller subsetreg)
    (fixes internalerror 68991 when compiling fpcompactimg.inc for ppc64)

git-svn-id: trunk@21675 -
2012-06-21 17:05:38 +00:00
marco
48366917f5 * Add bufdataset support to testsuite for ftFixedChar and ftFmtBCD field types
mantis #22297 patch by Lacak2

git-svn-id: trunk@21674 -
2012-06-21 15:31:21 +00:00
pierre
5f656be053 * Fix last commit, rame is in register
git-svn-id: trunk@21673 -
2012-06-21 11:59:30 +00:00
pierre
74eb121d1c Fix big endian issues
git-svn-id: trunk@21672 -
2012-06-21 11:52:57 +00:00
pierre
aa8747f5c9 Add more information to TMipsProcInfo class
git-svn-id: trunk@21671 -
2012-06-21 11:52:08 +00:00
pierre
f9930e3f46 Use ldc1 and sdc1 for big endian mips CPU directly
git-svn-id: trunk@21670 -
2012-06-21 11:51:07 +00:00