Commit Graph

980 Commits

Author SHA1 Message Date
florian
d13246cea4 + handle FMA instructions in taicpu.spilling_get_operation_type
git-svn-id: trunk@33183 -
2016-03-06 13:33:18 +00:00
florian
1c067e96bf * fix VFPv4 support
git-svn-id: trunk@33182 -
2016-03-06 13:33:16 +00:00
florian
43746685a5 + fma support for arm
git-svn-id: trunk@33181 -
2016-03-06 13:33:14 +00:00
florian
73aeea73ed + VOpVMov2VOp optimization
git-svn-id: trunk@33135 -
2016-02-28 20:13:16 +00:00
florian
1266491085 o refactored some peephole optimizer code:
* updated TAOptObj.RegUsedAfterInstruction with the arm implementation and removed the arm specific implementation
  * RegLoadedWithNewValue and InstructionLoadsFromReg are now a methods of TAoptBase
  * moved RegEndOfLife to TAOptObj
* during this refactoring, fixed also TCpuAsmOptimizer.RegLoadedWithNewValue for arm regarding post/preindexed 
  memory references: those modify the register but do not load it with a new value in the sense of RegLoadedWithNewValue

git-svn-id: trunk@33000 -
2016-01-24 15:25:16 +00:00
Jeppe Johansen
017d58748f Use thumb_func flag to detect selected arm/thumb mode.
git-svn-id: trunk@32958 -
2016-01-16 11:24:38 +00:00
Jeppe Johansen
0251263234 Move some of the local reloc calculation out of aasmcpu, and into COFF and ELF writers.
git-svn-id: trunk@32867 -
2016-01-06 23:15:08 +00:00
Jeppe Johansen
1b02dd27dc Make relocation type more precise compared to output of gas.
Change and to or in case symbol in other section is not exported.

git-svn-id: trunk@32852 -
2016-01-05 07:23:20 +00:00
florian
37cb35d780 + support for the .code directive in arm inline assembler
git-svn-id: trunk@32840 -
2016-01-03 22:08:25 +00:00
florian
3f2057a2f2 * do not generate blx instructions, the generation of blx instead of bl was introduced some years ago but today it proves to be wrong: if necessary, the linker converts the bl into a blx, this is also how gcc and clang handle it
git-svn-id: trunk@32788 -
2015-12-29 13:32:21 +00:00
Jeppe Johansen
c929bb32ae Make sure to remove postfix as well when fixing thumb instructions.
git-svn-id: trunk@32787 -
2015-12-29 12:20:30 +00:00
Jeppe Johansen
4b0f4cf86a Fix some small bugs in the Thumb assembler.
git-svn-id: trunk@32785 -
2015-12-28 21:10:46 +00:00
Jeppe Johansen
9d1646e2a8 Add support for writeback in RFE and SRS instructions.
git-svn-id: trunk@32749 -
2015-12-26 23:53:11 +00:00
Jeppe Johansen
803f402bf8 Fix minor bug in peephole optimizer.
git-svn-id: trunk@32748 -
2015-12-26 23:51:08 +00:00
Jonas Maebe
da696057ab * converted register_maybe_adjust_setbase() to the high level code generator
git-svn-id: trunk@32591 -
2015-12-05 18:03:37 +00:00
Jeppe Johansen
9aa3c23b18 Added a bunch of new and fixed embedded controller units. From Michael Ring.
git-svn-id: trunk@32386 -
2015-11-21 10:30:49 +00:00
Jonas Maebe
fa3b0ca312 * support marking defs created via the getreusable*() class methods as
"don't free even if not registered"; use for defs that may not be written
    to a ppu file, but that must nevertheless survive the compilation of the
    current module
  * mark all defs created for para locations as "don't free even if not
    registered", because we don't discard and recalculate all para locations
    after a module has been compiled (since that's not needed)
   o solves issues if the paralocations for a routine in the interface of
     unit A are calculated while the implementation of unit B gets
     compiled, and a new reusable type is allocated at that point which
     is not used anywhere else (after r32160)

git-svn-id: trunk@32235 -
2015-11-04 20:46:18 +00:00
Jeppe Johansen
eadd93dbae Most if not all instructions for thumb use only 2 operand rw forms. Changed get_oper_type to match that. It was previously creating bad spilling.
git-svn-id: trunk@32100 -
2015-10-20 03:45:22 +00:00
Jonas Maebe
7c594b0288 + added support for using Clang as an assembler, and make it the default
for all non-ppc(32/64) Darwin platforms
   o pass the macosx-version-min/iphoneos-version-min to clang as an assembler,
     so that it properly sets this information starting with Xcode 7 (solves
     errors when targeting the iOS simulator, and warnings about object files
     being compiled for a different OS X version when targeting (Mac) OS X)
   o the old assembler is still selectable via -Aas-darwin (required with
     Xcode 3.1.x and older)
   o since the first Xcode version that shipped with Clang is Xcode 3.2, which
     is available for Mac OS X 10.6, most users should not encounter any issues
     with the new default (in fact, it fixes some tests for x86 because Clang
     supports some instructions that "as" doesn't). Clang does not support
     Stabs however, so -gs does require the use of -Aas-darwin

git-svn-id: trunk@31830 -
2015-09-25 18:31:54 +00:00
Jonas Maebe
1131b08d6d * changed idtext of as_darwin to AS-DARWIN, so it can be explicitly
selected via -Aas-darwin (since it compares uppercased strings)

git-svn-id: trunk@31808 -
2015-09-24 06:49:29 +00:00
Jonas Maebe
8155d759dc - reverted r31806, it breaks building on non-Darwin (mantis #28716)
git-svn-id: trunk@31807 -
2015-09-24 06:44:12 +00:00
Jonas Maebe
c0b451e788 - removed as_darwin, since there is no difference with as_gas (there is no
GNU as from binutils for Darwin, and Apple's "as" is based on an old
    version of GNU as)
   o this will not cause any backward compatibility problems, as the
     previous identifier for as_darwin was "AS-Darwin" and the compiler
     compared the uppercase value of the -A parameter to the identifier,
     so it was not explicitly selectable earlier. The new name is "AS",
     so it is explicitly selectable via -Aas like on other platforms.

git-svn-id: trunk@31806 -
2015-09-23 21:25:38 +00:00
Jonas Maebe
840c043c75 * always use unified assembler syntax on Darwin (required by Xcode 7+)
git-svn-id: trunk@31805 -
2015-09-23 20:38:18 +00:00
Jonas Maebe
c5f64a51da * also support unified syntax for non-thumb2 (not yet activatable/usable)
git-svn-id: trunk@31804 -
2015-09-23 20:38:14 +00:00
yury
61a1976e09 * Removed a leftover of my code. It is not needed anymore.
git-svn-id: trunk@31755 -
2015-09-18 10:34:27 +00:00
yury
432248cbf1 * Removed lot of unused vars.
git-svn-id: trunk@31732 -
2015-09-17 12:48:58 +00:00
yury
40628fa614 * Removed unused vars.
git-svn-id: trunk@31731 -
2015-09-17 12:24:59 +00:00
yury
80e5eb0c5d * ARM: I hope this is a final proper fix for GOT initialization. + Test.
git-svn-id: trunk@31730 -
2015-09-17 12:18:04 +00:00
yury
1dff9bf025 * ARM: Fixed GOT init when optimization is off.
git-svn-id: trunk@31728 -
2015-09-16 21:30:20 +00:00
yury
f2c8824963 * ARM: Do not use R9 as a fixed GOT register.
git-svn-id: trunk@31712 -
2015-09-16 13:52:15 +00:00
yury
df9d6db398 * Fixed instruction re-scheduler for ARM in case of PIC.
git-svn-id: trunk@31706 -
2015-09-16 11:54:12 +00:00
yury
61c0448903 * Big fix for ARM GOT support to make it work:
- Fixed access to symbols with offset.
  - Always use register R9 for GOT pointer to prevent bugs when free register limit is reached in a function.
  - GOT is not needed for function calls by name.

git-svn-id: trunk@31681 -
2015-09-14 23:15:10 +00:00
Jonas Maebe
991e1f49bd * store a pointer to the used tasminfo record in every assembler writer, so
that we can use assembler writers with different conventions from the
    currently set target_asm (e.g. an x86 assembler writer for inline assembly
    in LLVM IR)

git-svn-id: trunk@31628 -
2015-09-12 23:32:13 +00:00
Jonas Maebe
b3d0197f98 * factored out the output file handling (mostly writing data) from the
external assembler writer, so we can reuse the archtecture-specific
    writers to write inline assembly in LLVM IR files

git-svn-id: trunk@31625 -
2015-09-12 23:32:01 +00:00
Jeppe Johansen
3cb9be73bc Moved tcontrollerdatatype out into cpuinfo.
Added cputype and fputype info to tcontrollerdatatype arrays.

git-svn-id: trunk@31574 -
2015-09-07 20:36:54 +00:00
florian
4d349c9c71 * take care of limited offsets of stf/ldf, resolves issue #23620
git-svn-id: trunk@31572 -
2015-09-07 20:14:27 +00:00
Jeppe Johansen
297c17d4f0 Add missing prefix for VCMP for FPv4_S16.
git-svn-id: trunk@31562 -
2015-09-06 20:34:08 +00:00
Jeppe Johansen
dac294c680 Fix ARMv3/ARMv2A support.
git-svn-id: trunk@31561 -
2015-09-06 20:33:26 +00:00
Jonas Maebe
f374b81c12 * disabled ARM-specific code for smallset in-operations on big endian targets,
as it's also little endian-specific (mantis #28592)

git-svn-id: trunk@31466 -
2015-08-31 13:06:42 +00:00
Jonas Maebe
0fc1fd6ac1 * replaced current_procinfo.currtrue/falselabel with storing the true/false
labels of LOC_JUMP in the node's location. This generates some extra jumps
    for short circuit boolean and/or-expressions if optimizations are off, but
    with optimisations enabled the generated code is the same (except for JVM
    because the jump threading optimisation isn't enabled there yet).

git-svn-id: trunk@31431 -
2015-08-27 18:28:57 +00:00
Jonas Maebe
10b2ea3b1b * use handle_locjump() instead of local inlined version
git-svn-id: trunk@31430 -
2015-08-27 18:28:52 +00:00
Jeppe Johansen
2b80d46492 Added STM32F7xx controller units and types.
git-svn-id: trunk@31257 -
2015-07-31 22:21:16 +00:00
Jonas Maebe
f40ea04540 * changed getarraydef() into a tarraydef.getreusable() class method
git-svn-id: trunk@31147 -
2015-06-23 21:23:18 +00:00
Jonas Maebe
f402b0d7df * changed getpointerdef() into a tpointerdef.getreusable() class method
o allows removing the ugly x86 hacks

git-svn-id: trunk@31144 -
2015-06-22 08:17:49 +00:00
Jeppe Johansen
36dfe750d8 Added Freescale MK20D7 controller support.
git-svn-id: trunk@30925 -
2015-05-28 11:46:22 +00:00
florian
b4fc11fe06 * implemented r30870 for all platforms: pass dyn. array parameters like pointer parameters so typically in a register
git-svn-id: trunk@30878 -
2015-05-17 12:29:28 +00:00
Jeppe Johansen
6662cb6dd5 ARMv6M was missing alignments for jumptables
git-svn-id: trunk@30775 -
2015-05-03 16:16:32 +00:00
florian
b222d0b663 * correctly handle LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF in second_int_to_bool, resolves issue #28007
git-svn-id: trunk@30765 -
2015-05-02 13:52:50 +00:00
florian
7dd1d6aa77 o fixes handling of iso i/o parameters/program parameters:
* explicit reset is needed
  * variable must be declared again

git-svn-id: trunk@30757 -
2015-05-01 20:58:31 +00:00
Jeppe Johansen
b6729a8f0b Workaround for IE 20060521 when building the ARM compiler
git-svn-id: trunk@30733 -
2015-04-26 20:10:57 +00:00