Commit Graph

311 Commits

Author SHA1 Message Date
Jonas Maebe
3279cc052a * moved llvm-specific code from aasmtai to aasmllvm
* call add_reg_instruction_hook() for top_para parameters

git-svn-id: trunk@30423 -
2015-04-04 14:28:57 +00:00
Jeppe Johansen
e2272c8a7e Added aitconst_gs for AVR pointer references to Flash.
git-svn-id: trunk@30419 -
2015-04-04 10:29:11 +00:00
Jonas Maebe
bd203a5b57 * synchronised with trunk till r30240
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Jonas Maebe
fb27dff638 * generate ".abiversion 2" directive when targeting ppc64/ELFv2
* generate code to load the TOC register if it's required, and
    emit the the ".localentry" directive to indicate to the linker
    where the actual function body starts
  * support the ".localentry" directive in the ppc64 assembler reader
   o disable the fpc_qword_to_double() assembler implementation for
     ELFv2, because we can't manually insert the .localentry directive
     before the stack allocation code
  * perform indirect calls on ppc64 via R12 in ncgcal, as R12 needs to
    contain the function address on entry on ppc64/ELFv2 (and it's
    a volatile register, so there's no problem with always using
    it)

git-svn-id: trunk@30198 -
2015-03-14 18:35:31 +00:00
Jonas Maebe
8445381929 * merged ait_set and ait_thumb_set into a single tai class
(tai_symbolpair)

git-svn-id: trunk@30197 -
2015-03-14 18:35:28 +00:00
Jeppe Johansen
52e505bff7 Fixed internal error in GOT related code for ARM internal assembler.
git-svn-id: trunk@30188 -
2015-03-14 16:03:16 +00:00
Jeppe Johansen
914e9e7b49 Merged from trunk
git-svn-id: branches/laksen/armiw@30146 -
2015-03-08 12:33:46 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
sergei
31fddaafe8 + New subtype of tai_regalloc, "ra_markused". It marks a physical register as used in procedure, triggering saving/restoring that register if it is non-volatile.
git-svn-id: trunk@30010 -
2015-02-25 21:38:23 +00:00
Jonas Maebe
1de8e53edd + AArch64 jump table support
git-svn-id: trunk@29964 -
2015-02-23 22:55:42 +00:00
Jonas Maebe
5041354b8e * recognise AArch64 PIC references
git-svn-id: trunk@29925 -
2015-02-23 22:53:14 +00:00
Jonas Maebe
d246ababff + condition code operand for aarch64
+ taicpu.op_reg_cond() constructor
  * use this operand for cset

git-svn-id: trunk@29889 -
2015-02-23 22:51:19 +00:00
Jeppe Johansen
47dbec3111 Rebase to trunk revision
git-svn-id: branches/laksen/armiw@29708 -
2015-02-15 16:08:18 +00:00
Károly Balogh
a99c9c29b6 m68k: basic 68881 FPU register save/restore support. probably still needs some work here and there.
git-svn-id: trunk@29644 -
2015-02-07 22:13:07 +00:00
Jeppe Johansen
6976af8365 Change .thumb_func to be an ait_directive instead of it's own tai type.
git-svn-id: branches/laksen/armiw@29334 -
2014-12-26 23:13:14 +00:00
pierre
0d9783e9a6 Avoid referencing an empty ansistring in tai_stabs.create_ansistr
git-svn-id: trunk@28990 -
2014-11-05 20:29:18 +00:00
nickysn
366dc179b6 * use tai_const.Create_int_code/dataptr(0) in tai_const.Create_nil_code/dataptr
git-svn-id: trunk@28725 -
2014-09-30 01:34:20 +00:00
nickysn
27a7c0863b + added constructors tai_const.Create_int_codeptr and .Create_int_dataptr. To be
used for emitting magic consts with the size of a code or data pointer (used
  in e.g. rtti data).

git-svn-id: trunk@28724 -
2014-09-30 01:26:16 +00:00
Jonas Maebe
23f34608ed * null-terminate tai_strings loaded from ppus
git-svn-id: branches/hlcgllvm@28133 -
2014-07-02 17:24:53 +00:00
Jonas Maebe
9f39188253 * moved the tai_*typedconst classes to aasmcnst to make use of def-related
helpers in a cleaner way (defutils would not belong in the uses clause of
    aasmtai)

git-svn-id: branches/hlcgllvm@28132 -
2014-07-02 17:24:50 +00:00
Jonas Maebe
1e7d9c9f0e + support for instruction operands that are tai themselves in the llvm
backend (required for inserting bitcasts/ptrtoint/... operations inside
    typed constant declarations)
   o taillvm constructors for creating bitcast-style and getlementptr
     operations that accept a tai as their source/base operand

git-svn-id: branches/hlcgllvm@28112 -
2014-07-01 16:30:22 +00:00
Jonas Maebe
e51b893c9e + "typed const" tai that combines a tai and its associated tdef information
git-svn-id: branches/hlcgllvm@28108 -
2014-07-01 16:30:09 +00:00
Jonas Maebe
b0ff41406a * grouped all tai_real* types into a single tai_realconst type,
to free up space for more ait_* types in taitype (can't have
    more than 32 because they have to fit in a small set)
   o factored out writing of floating point numbers as an array of
     byte in the external assemblers

git-svn-id: branches/hlcgllvm@28105 -
2014-07-01 16:29:58 +00:00
Jonas Maebe
6dcfd73d21 + support for a_call_name() on the llvm target:
o make use of the fact that callparanodes always first load everything
     in temporary parameters (allocated via paramanager.createtempparaloc)
     -> we pass those temporary paralocs to the llvm call nodes and ignore
     the "real" locations with physical registers
   o all function results are forced to memory before handing them back
     to the generic code generator to avoid having to deal with special
     result locations and llvm<->pascal type differences (llvm removes
     the extra temp stores/loads while optimising)
   o ideally, the llvm code generator should share the common code with
      the generic code generator for a_load_ref_cgpara() at some point in
      the future

git-svn-id: branches/hlcgllvm@27013 -
2014-03-06 21:42:14 +00:00
Jonas Maebe
b82053ef40 * reworked handling of defined/declared symbols in llvm: we now automatically
generate declarations when external symbols are referred in a taillvm
    instruction
  * added "declared" field to tasmsymbol for llvm to make avoid declaring a
    symbol multiple times (harmless, but unnecessary)
  * all kinds of declarations/definitions are now handled using the new
    taillvmdecl, the old separate types have been removed

git-svn-id: branches/hlcgllvm@27010 -
2014-03-06 21:42:03 +00:00
Jonas Maebe
227ff0ea48 * llvm requires that single precision constants are exactly representable
using single precision -> convert them to single precision in the code
    generator

git-svn-id: branches/hlcgllvm@27001 -
2014-03-06 21:41:32 +00:00
Jonas Maebe
e9268a0a14 * synchronised with trunk up till r26975
git-svn-id: branches/hlcgllvm@26976 -
2014-03-06 21:36:58 +00:00
sergei
46f8e78d1f + Support GOT/gp-relative constants in GAS and internal assemblers, MIPS and i386.
* Change MIPS jump tables in PIC mode to use gp-relative constants, making them ABI-compliant and not requiring dynamic relocations.

git-svn-id: trunk@26886 -
2014-02-26 14:54:47 +00:00
Jonas Maebe
66cbff35f6 * don't check whether references are PIC-safe when targeting LLVM, that's
not taken care of at our level in that case

git-svn-id: branches/hlcgllvm@26070 -
2013-11-12 19:17:03 +00:00
Jonas Maebe
3296984bd9 + classes for llvm instructions (ait_llvmins), procedure definitions
(ait_llvmprocdef), global variable definitions (ait_llvmvarsym)
    and alias definitions (ait_llvmalias)

git-svn-id: branches/hlcgllvm@26036 -
2013-11-11 11:15:13 +00:00
Jonas Maebe
62e1df9e76 * fixed indentation
git-svn-id: trunk@26020 -
2013-11-10 21:25:34 +00:00
florian
babbc21afd * fix handling of register sets on m68k: it is required that they are stored as two tcpuregistersets because address registers and data registers have different register types
git-svn-id: trunk@25726 -
2013-10-09 18:15:06 +00:00
nickysn
3bc89a50ed + added i8086-specific methods tai_const.Create_sym_near and tai_const.Create_sym_far, which allow creating explicitly a near or far ptr const, regardless of current memory model's defaults
git-svn-id: trunk@25502 -
2013-09-16 19:56:49 +00:00
sergei
bfcdf6b825 * Replaced tai_ent and tai_ent_end classes with tai_directive subtypes. Having separate classes for them is unnecessary complication.
git-svn-id: trunk@25338 -
2013-08-23 12:38:49 +00:00
sergei
108d3cb090 - Removed tai_label.is_global field, was used in just one place and is generally not needed: binding is controlled by 'bind' property of referenced AsmLabel.
git-svn-id: trunk@25336 -
2013-08-23 11:34:08 +00:00
florian
6606955b88 + basic support for pic on arm-linux
git-svn-id: trunk@25297 -
2013-08-19 21:35:37 +00:00
Jonas Maebe
da6d9cf3f3 * give an internalerror when we try to change the type of an asmsymbol from
anything but none (= undefined) to local

git-svn-id: trunk@25266 -
2013-08-16 10:10:38 +00:00
nickysn
fe4cac96be + added overloads to tai_const.Createname and Create_type_name, which take a Tasmsymtype parameter; to be used for declaring external symbols which reside in the data segment with AT_DATA, which is necessary for i8086 medium and compact memory models (where code and data pointers are of different size)
git-svn-id: trunk@25243 -
2013-08-11 19:46:17 +00:00
nickysn
db541b59fa - disallow calling tai_symbol_end.Createname with a symbol name that isn't yet defined
git-svn-id: trunk@25210 -
2013-08-03 12:27:43 +00:00
florian
2cdb4adf39 + tai_const.Create_type_name and tai_const.Create_pint_unaligned
* some locations fixed, where dwarf generated assembler for aligned data accidently

git-svn-id: trunk@25054 -
2013-07-07 15:09:36 +00:00
nickysn
784333edbb + added tai_const.Create_nil_codeptr and .Create_nil_dataptr, which should eventually replace tai_const.Create_sym(nil)
git-svn-id: trunk@24976 -
2013-06-25 20:57:12 +00:00
nickysn
6c1262049e * tai_const.Create_sym_offset: follow the default i8086 data (instead of code) pointer size for asm symbols with typ=AT_DATA
git-svn-id: trunk@24973 -
2013-06-25 15:12:00 +00:00
nickysn
bb06899ec7 * clarified the comment for aitconst_farptr
git-svn-id: trunk@24868 -
2013-06-10 21:35:29 +00:00
nickysn
e4a1230356 + added support for far pointer constants in the assembly output
git-svn-id: trunk@24854 -
2013-06-09 22:01:04 +00:00
sergei
b9bbe8ba67 * tai_const.getcopy: Check that 'sym' is assigned before trying to call its method. Mantis #24574.
git-svn-id: trunk@24836 -
2013-06-09 14:19:09 +00:00
florian
1682e9a2b1 * detabbed
git-svn-id: trunk@24433 -
2013-05-04 19:39:12 +00:00
florian
cec28ef512 * when inserting pc relative data blocks on arm thumb, avoid negative pc offsets, if needed, the data is copied
a short test with the rtl shows that this happens exactly once in the rtl, so it is feasible to do so

git-svn-id: trunk@24413 -
2013-05-03 20:45:26 +00:00
sergei
8e6d6d0027 * Replaced strpcopy() by its equivalent. With sysutils in uses clause, strpcopy resolves to ansistring version, inserting a redundant conversion to ansistring.
git-svn-id: trunk@24360 -
2013-04-28 19:43:47 +00:00
nickysn
f780d37d5e * proper defines of aitconst_ptr, aitconst_ptr_unaligned and aitconst_aint for 16-bit and 8-bit CPUs
git-svn-id: branches/i8086@24015 -
2013-03-27 00:01:30 +00:00
florian
2ae8d604bc + shifterop for ARM64
git-svn-id: trunk@22911 -
2012-11-01 20:11:15 +00:00
florian
04543b179f o merge of the branch laksen/arm-embedded of Jeppe Johansen:
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: trunk@22792 -
2012-10-21 08:39:52 +00:00
svenbarth
d9a61f2082 * make internal error unique
* add MULU and MULS to taicpu.get_spilling_operation_type

git-svn-id: trunk@22746 -
2012-10-18 20:12:16 +00:00
Jeppe Johansen
8e00978108 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

git-svn-id: branches/laksen/arm-embedded@22580 -
2012-10-08 03:10:44 +00:00
pierre
7c1db10df9 Handle new unaligned constant types
git-svn-id: trunk@22520 -
2012-10-02 22:30:22 +00:00
pierre
b041b3ad4a Add unaligned 16,32 and 64 bit tai_const, needed for dwarf
git-svn-id: trunk@22514 -
2012-10-02 13:03:54 +00:00
pierre
4b7a6ecc14 move currentregloc setting to ncgutil to avoid sysym unit ependency in aasmtai unit
git-svn-id: trunk@22513 -
2012-10-02 09:25:49 +00:00
pierre
fcaff0489c * psub.pas : translate tregister for registerhi also
(avoids imaginary register number in "# Var I in register .." assembler comments.
  * dbgdwarf.pas : Support register variables as register pairs.
      Does not yet handle case of changing registers.
  * symsym.pas : add currentregloc field to tabstractnormalvarsym class,
     to be able to track changing registers used for a given variable.
  * aasmtai.pas : Update currentregloc field of tai_varloc.create sym parameter.
  * ncgutil.pas : Only generate a tai_varloc if the new registers are different for the variable.

git-svn-id: trunk@22508 -
2012-10-01 14:21:13 +00:00
florian
54d3d736f5 * patch by Jeppe Johansen to add support for handling different flags for xPSR regs,
and add usermode parsing of LDM/STM ops
  This patch basically extends the ARM assembly reader a bit to properly parse CPSR and 
  SPSR flags for the MSR opcode, and allows the reader to understand 
  the ^ modifer for register lists for STMxx and LDMxx.

  Previously the following combinations weren't possible in straight assembler:
     MRS R0, CPSR
     MRS R0, SPSR
     MSR CPSR_CX, R0
     LDMIA SP, {R0-R15}^
     etc.. 

git-svn-id: trunk@22502 -
2012-09-29 08:23:40 +00:00
florian
ca5fabda6d * cleanup some unused units from uses clauses
git-svn-id: trunk@22433 -
2012-09-21 18:53:46 +00:00
florian
7840b4657a * the improved arm optimizer might move instructions around so the old hacky test if a label with its data has been already embedded into the code by checking if the offset is 0 does not work anymore so a new field for tai_label has been introduced for this purpose
git-svn-id: trunk@22345 -
2012-09-06 15:12:17 +00:00
florian
7361e19799 + support for handling OS_128/OS_S128 on 64 Bit CPUs as far as needed for method pointers in registers
git-svn-id: trunk@22344 -
2012-09-06 15:12:12 +00:00
florian
e1a2b1859a * comments and explanations on tai_regalloc.keep field
* write/read tai_regalloc. field to/from ppu

git-svn-id: trunk@22190 -
2012-08-22 19:52:08 +00:00
florian
b6608e716b + tai_regalloc.keep to force register deallocations to be keep
git-svn-id: trunk@22187 -
2012-08-22 19:51:47 +00:00
sergei
de34f58284 * Update instruction segment prefix when copying operands from another instruction, Mantis #18113.
git-svn-id: trunk@22067 -
2012-08-13 04:51:28 +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
sergei
be5a5d6ae6 - Removed redundant fillchar() calls, class instances are cleared on construction.
git-svn-id: trunk@21101 -
2012-04-28 17:16:33 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
Jonas Maebe
247033cce1 + stabx support for AIX, which is a variant of stabs. Note that we only
support the stabx as understood by gdb, which is a mixture of regular
    stabs and stabx (e.g., class/object definitions are completely different
    in real stabx). This means that gdb can be used to debug aix programs,
    but the native dbx will complain about lots of debug information
    constructs

git-svn-id: trunk@20842 -
2012-04-11 18:06:38 +00:00
Jonas Maebe
aaf6015b51 * converted tai directive string from pshortstring to ansistring (some
AIX directives are quite long)

git-svn-id: trunk@20799 -
2012-04-11 18:01:41 +00:00
florian
9375945082 * toper.val : aint => tcgint, needed at least for avr
git-svn-id: trunk@20018 -
2012-01-08 22:22:09 +00:00
florian
111d05c68f o patch by Alexander Shishkin, resolves #20409
* eliminate warnings in compiler (i386 & i368->x86_64) and minor refactorings
    - comment out unused vars and types
    - comment out unneeded comparisons (Longword <=> 0)
    - suppress some "comparison always true|false" warnings
    - tweak visiblity sections

git-svn-id: trunk@19385 -
2011-10-05 20:11:09 +00:00
sergei
9eb451756b + Support .seh_handler directive
git-svn-id: trunk@19365 -
2011-10-04 12:19:24 +00:00
Jonas Maebe
cf47b8d422 * fixed all known memory leaks in the code added for the JVM port
git-svn-id: branches/jvmbackend@19248 -
2011-09-26 19:31:34 +00:00
sergei
1365467b0d + Support classes for creating unwind bytecode for Win64.
git-svn-id: trunk@19071 -
2011-09-15 15:35:08 +00:00
florian
7b72e21743 * forgotten part of r18958
git-svn-id: trunk@18959 -
2011-09-03 19:45:17 +00:00
Jonas Maebe
e20919f065 + support for writing JVM line number information
* moved emitting line information from agjasmin to dbgjasm (+ it now
    also works if -al is not used)

git-svn-id: branches/jvmbackend@18355 -
2011-08-20 07:50:46 +00:00
Jonas Maebe
d456ec2ffe + support for JVM local variable and parameter debug information
o self is encoded as "this" for javac compatibility
  + ait_jvar (for the above) and ait_jcatch (similar, for future try/catch
    support) classes
  + support for smallset JVM type encoding (as int)

git-svn-id: branches/jvmbackend@18354 -
2011-08-20 07:50:41 +00:00
Jonas Maebe
19275d1a4c + single, double, string and widestring operand support for jvm
git-svn-id: branches/jvmbackend@18293 -
2011-08-20 07:35:45 +00:00
Jonas Maebe
c373748e26 + some Jasmin directives (class, interface, super, field, limit)
git-svn-id: branches/jvmbackend@18292 -
2011-08-20 07:35:39 +00:00
florian
68dd23b5a2 * write proper register locations when doing ssa, resolves #7552
git-svn-id: trunk@18278 -
2011-08-19 22:06:52 +00:00
florian
2eb39c8843 * patch by Jeppe Johansen to support jumptable generation for case nodes on arm/thumb-2, resolves #19502
git-svn-id: trunk@18233 -
2011-08-16 22:39:00 +00:00
florian
1e1c45c665 * references containing a symbol must be virtually always pc relative on arm
git-svn-id: trunk@18232 -
2011-08-16 22:28:30 +00:00
florian
8bc94610c7 + tai_stab.create_ansistr
* write vmt info using create_ansistr, resolves #20003
* replaced move/getmem sequences in dbgstabs.pas by create_ansistr

git-svn-id: trunk@18230 -
2011-08-16 20:27:54 +00:00
florian
5abdfb6f7e * aint -> asizeint changes
git-svn-id: trunk@17018 -
2011-02-26 20:16:14 +00:00
Jonas Maebe
bbf0e35a51 + Support for ARM CPS/CPSIE/CPSID instructions and mode flag bitfield
operand (patch by Jeppe Johansen, mantis #18334)

git-svn-id: trunk@16750 -
2011-01-11 16:02:51 +00:00
Jonas Maebe
769eb3f604 * moved the initialisation of the nodetree and tai class reference constants
from the unit initialisation sections to the variable declaration sections
    to prevent the base units from overriding derived classes (based on patch
    by Hans-Peter Dietrich, mantis #17516)

git-svn-id: trunk@16118 -
2010-10-09 18:52:22 +00:00
mazen
b127fc154a * Fixed spell error revealed by lintian.
git-svn-id: trunk@16094 -
2010-10-06 20:33:57 +00:00
pierre
8e8a573707 * commit 15780 reverted
git-svn-id: trunk@15784 -
2010-08-11 21:45:55 +00:00
pierre
df01446f42 * avoid private constructor warning
git-svn-id: trunk@15780 -
2010-08-11 15:41:54 +00:00
pierre
874e69bcf8 * revert wrong commits
git-svn-id: trunk@15762 -
2010-08-10 11:33:38 +00:00
pierre
d27278faac * Add external linker possibility for windows x86_64 compiler
git-svn-id: trunk@15761 -
2010-08-10 11:28:31 +00:00
Jonas Maebe
356026f849 * use new_section() instead of tai_section.create() everywhere
- sort of reverted r14134, which is no longer required after the above
    change (new_section() inserts the alignment itself)
  * made the tai_section.create() constructor private so it cannot be
    called directly anymore

git-svn-id: trunk@15482 -
2010-06-26 10:50:14 +00:00
Jonas Maebe
b4687b5a13 * handle aitconst_darwin_dwarf_delta32 and aitconst_darwin_dwarf_delta64 in
tai_const.size (fixes internalerror when using the internal Mach-O
    assembler with DWARF debug info, patch by Dmitry Boyarintsev, mantis
    #16640)

git-svn-id: trunk@15391 -
2010-06-05 17:12:00 +00:00
Jonas Maebe
734f9de2a0 + support for array of widechar typed constants (based on patch by
Blaise Thorn, mantis #16004)

git-svn-id: trunk@15096 -
2010-03-30 19:45:50 +00:00
Jonas Maebe
025ec34e4d + "CExtended" type that is the same as "extended", but conforming to the
properties/behaviour of the equivalent of Extended in C (i.e., to
    "long double" on i386 and x86_64 platforms that support a 10 byte
    long double, and to "double" elsewhere)

git-svn-id: trunk@14912 -
2010-02-14 13:45:58 +00:00
Jonas Maebe
4838ebe73b * renamed mark_InlineStart/mark_InlineEnd to mark_NoLineinfoStart/
mark_NoLineinfoEnd
  * add "no line info" markers for try/except and try/finally internal cleanup
    code, so the debugger doesn't jump back and forth between the end and start
    of exception blocks when you arrive at the end
  * honour "no line info" markers in dbgdwarf.pas

git-svn-id: trunk@14327 -
2009-12-04 19:37:22 +00:00
Jonas Maebe
d1538ab023 o added ARM VPFv2/VFPv3 support:
+ RTL support:
      o VFP exceptions are disabled by default on Darwin,
        because they cause kernel panics on iPhoneOS 2.2.1 at least
      o all denormals are truncated to 0 on Darwin, because disabling
        that also causes kernel panics on iPhoneOS 2.2.1 (probably
        because otherwise denormals can also cause exceptions)
    * set softfloat rounding mode correctly for non-wince/darwin/vfp
      targets
    + compiler support: only half the number of single precision
      registers is available due to limitations of the register
      allocator
    + added a number of comments about why the stackframe on ARM is
      set up the way it is by the compiler
    + added regtype and subregtype info to regsets, because they're
      also used for VFP registers (+ support in assembler reader)
    + various generic support routines for dealing with floating point
      values located in integer registers that have to be transferred to
      mm registers (needed for VFP)
    * renamed use_sse() to use_vectorfpu() and also use it for
      ARM/vfp support
    o only superficially tested for Linux (compiler compiled with -Cpvfpv6
      -Cfvfpv2 works on a Cortex-A8, no testsuite run performed -- at least
      the fpu exception handler still needs to be implemented), Darwin has
      been tested more thoroughly
  + added ARMv6 cpu type and made it default for Darwin/ARM
  + ARMv6+ implementations of atomic operations using ldrex/strex
  * don't use r9 on Darwin/ARM, as it's reserved under certain
    circumstances (don't know yet which ones)
  * changed C-test object files for ARM/Darwin to ARMv6 versions
  * check in assembler reader that regsets are not empty, because
    instructions with a regset operand have undefined behaviour in that
    case
  * fixed resultdef of tarmtypeconvnode.first_int_to_real in case of
    int64->single type conversion
  * fixed constant pool locations in case 64 bit constants are generated,
    and/or when vfp instructions with limited reach are present

  WARNING: when using VFP on an ARMv6 or later cpu, you *must* compile all
    code with -Cparmv6 (or higher), or you will get crashes. The reason is
    that storing/restoring multiple VFP registers must happen using
    different instructions on pre/post-ARMv6.

git-svn-id: trunk@14317 -
2009-12-03 22:46:30 +00:00
florian
4123e0425c * don't generate instruction alignment fill bytes in non exectuable sections
git-svn-id: trunk@14251 -
2009-11-21 22:34:46 +00:00
Jonas Maebe
f7360d47c5 - removed aitconst_indirect_symbol, replaced with tai_directive
(patch by Dmitry Boyarintsev, mantis #15050)

git-svn-id: trunk@14157 -
2009-11-12 19:39:41 +00:00
Jonas Maebe
edacea82be * changed assembler directives for darwin lazy/non-lazy symbol pointers
and init/fini routines into their section equivalents (based on patch
    by Dmitry Boyarintsev, mantis #15037)

git-svn-id: trunk@14128 -
2009-11-09 22:20:01 +00:00