Commit Graph

14416 Commits

Author SHA1 Message Date
Jeppe Johansen
3ee29eb219 Fixed ARMv7-EM code generation and RTL compilation
Added LM4F120H5 controller type and startup code

git-svn-id: branches/laksen/arm-embedded@22903 -
2012-11-01 17:25:01 +00:00
Jeppe Johansen
b34915c4ad Disabled MLA/MLS optimization for now
git-svn-id: branches/laksen/arm-embedded@22829 -
2012-10-23 12:49:41 +00:00
Jeppe Johansen
818b43c060 Updated localalign values, and changed the behaviour of alignment of load/stores to not break aligned half-word copies
git-svn-id: branches/laksen/arm-embedded@22828 -
2012-10-23 12:45:40 +00:00
Jeppe Johansen
628d46f2d3 Fixed Bsf* functions on platforms that support RBIT
Fixed stackframe epilogue code for Thumb2 to allow proper processing of interrupts

git-svn-id: branches/laksen/arm-embedded@22813 -
2012-10-21 19:13:59 +00:00
Jeppe Johansen
4e84431dde Fix some optimizations which assume that there are 3 operands
Add simple Mul+Sub/Mul+Add into MLS/MLA optimizations
Fix some other small issues in the optimizer
Implement Interlocked* functions with proper use of LDREX/STREX

git-svn-id: branches/laksen/arm-embedded@22801 -
2012-10-21 16:20:52 +00:00
Jeppe Johansen
5751bbecee Properly do NR_DEFAULTFLAGS detection/allocation/deallocation
git-svn-id: branches/laksen/arm-embedded@22787 -
2012-10-20 20:00:36 +00:00
Jeppe Johansen
3558a40bf6 Fixed flags detections code for wide->short optimization code for Thumb-2
git-svn-id: branches/laksen/arm-embedded@22782 -
2012-10-20 05:44:55 +00:00
Jeppe Johansen
666332385d Added coprocessor registers, and support for 6 operands(MCR/MRC instructions, etc)
git-svn-id: branches/laksen/arm-embedded@22778 -
2012-10-19 18:23:14 +00:00
Jeppe Johansen
84ea70fddc Fixed some minor formating issues
Implemented a small heap mananger
Implemented console IO
Changed default LineEnding to CrLf(to ease console IO parsing)

git-svn-id: branches/laksen/arm-embedded@22646 -
2012-10-14 19:10:20 +00:00
Jeppe Johansen
14879a9e82 Added all STM32F1 configurations
git-svn-id: branches/laksen/arm-embedded@22599 -
2012-10-09 06:58:58 +00:00
Jeppe Johansen
a8f9b0dac4 Added initial support for the Cortex-M4F FPv4_S16 FPU
git-svn-id: branches/laksen/arm-embedded@22597 -
2012-10-08 20:10:45 +00:00
Jeppe Johansen
0087661fb5 Added FPv4_d16 FPU instructions, and a few extra registers
git-svn-id: branches/laksen/arm-embedded@22596 -
2012-10-08 20:04:14 +00:00
Jeppe Johansen
3e963a49e2 Added support for IT block merging
Added a peephole pattern check for UXTB->UXTH chains

git-svn-id: branches/laksen/arm-embedded@22592 -
2012-10-08 14:07:40 +00:00
Jeppe Johansen
9ec9b44784 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

git-svn-id: branches/laksen/arm-embedded@22590 -
2012-10-08 12:30:00 +00:00
Jeppe Johansen
b788ba660d 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.

git-svn-id: branches/laksen/arm-embedded@22582 -
2012-10-08 04:49:39 +00:00
Jeppe Johansen
80bb3febea 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

git-svn-id: branches/laksen/arm-embedded@22581 -
2012-10-08 03:15:40 +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
Jeppe Johansen
8b17a358e4 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: branches/laksen/arm-embedded@22579 -
2012-10-08 00:10:52 +00:00
florian
3d1fb1cc60 * reverted accidental commit in r22568
git-svn-id: trunk@22576 -
2012-10-07 19:46:59 +00:00
florian
9a5e64442f + support copy with two parameters, resolves #22964
git-svn-id: trunk@22575 -
2012-10-07 19:44:52 +00:00
florian
2e7fe1aebd * support of avx register requires now proper usage of R_SUBMMWHOLE
git-svn-id: trunk@22574 -
2012-10-07 18:47:17 +00:00
florian
65aa6fb379 * make check for registerhi more usefull
git-svn-id: trunk@22573 -
2012-10-07 18:47:13 +00:00
Jonas Maebe
76b0ee9925 * treat all "uninitialized" hints as warnings on JVM platforms, because
they generally result in fatal run time errors there

git-svn-id: trunk@22571 -
2012-10-07 09:10:08 +00:00
Jonas Maebe
42f6caa0d1 * allow accessing strict protected symbols from the extended struct inside
helpers (mantis #21811)

git-svn-id: trunk@22569 -
2012-10-06 20:31:43 +00:00
florian
283ff05127 * merged avx support in inline assembler developed by Torsten Grundke
git-svn-id: trunk@22568 -
2012-10-06 19:47:18 +00:00
Jonas Maebe
e9f4b095e1 + explanation for the parameters of is_visible_for_object
* fixed accessibility checking for strict_protected (the class
    in which the access occurs also has to be related to the
    objectdef of which a symbol is accessed) + test

git-svn-id: trunk@22565 -
2012-10-06 16:28:27 +00:00
Jonas Maebe
81b50af768 * fixed typo (overring -> overriding)
git-svn-id: trunk@22564 -
2012-10-06 16:22:31 +00:00
pierre
78d31eb3cd Add missing of pi_needs_got found by sparc compiler compiled with -dCHECK_PIC
git-svn-id: trunk@22548 -
2012-10-05 15:02:47 +00:00
pierre
b145028f35 Allow testing of delayed pi_needs_got by internal error generated if compiler compiled with -dCHECK_PIC
git-svn-id: trunk@22547 -
2012-10-05 14:59:18 +00:00
tom_at_work
f4ba47a1c8 Fixed --march parameter passed to GNU as for ARM processors
git-svn-id: trunk@22541 -
2012-10-04 21:47:28 +00:00
pierre
a1a171d7e8 Fix problems introduced by unaligned patch rev 22516 for 64bit systems
git-svn-id: trunk@22529 -
2012-10-03 21:11:21 +00:00
pierre
ff78c930c5 Fix problem in 64bit substraction
git-svn-id: trunk@22521 -
2012-10-02 23:35:02 +00:00
pierre
7c1db10df9 Handle new unaligned constant types
git-svn-id: trunk@22520 -
2012-10-02 22:30:22 +00:00
Jonas Maebe
ae56841ee6 * do not apply node CSE to nested loads on high level cpu targets, because
their nested tree already contains the load (subscriptn) for the variable
    itself and there is no clean/easy way to avoid that in a completely
    portable way in ncgnstld + test

git-svn-id: trunk@22519 -
2012-10-02 18:12:24 +00:00
pierre
a34c1ff22d Use only unaligned constants in dwarf debug info as specified by standard
git-svn-id: trunk@22516 -
2012-10-02 14:00:03 +00:00
pierre
42bd8d6bc1 Handle new unaligned ait_const
git-svn-id: trunk@22515 -
2012-10-02 13:58:32 +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
florian
420cd9bd27 + support for <text>^ in iso mode
git-svn-id: trunk@22512 -
2012-10-01 17:18:51 +00:00
florian
c95cfa20ba * disable non-iso tokens in iso mode
git-svn-id: trunk@22510 -
2012-10-01 17:18:42 +00:00
pierre
37a7c1fc25 Add Dwarf debug info generation by default for mips cpu
git-svn-id: trunk@22509 -
2012-10-01 14:23:14 +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
pierre
b851a5a065 Accept range/overflow for address computation inside unit
git-svn-id: trunk@22507 -
2012-10-01 14:20:54 +00:00
florian
f25f44605e - get rid of m_all, use a set instead for tokens, this allows to disable/enable tokens depending on the language mode
git-svn-id: trunk@22506 -
2012-09-30 21:03:35 +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
pierre
0a755be6fe * Fix assembler fileinfo position for x86 readers
git-svn-id: trunk@22501 -
2012-09-28 22:26:41 +00:00
pierre
d88ef103bb Fix IInterface virtual method helper code for PIC mode (no L7 needed)
git-svn-id: trunk@22500 -
2012-09-28 22:20:32 +00:00
pierre
c2a6fbbae3 Fix error in previous commit
git-svn-id: trunk@22491 -
2012-09-27 16:05:31 +00:00
pierre
7ea11f0171 Use SUPPORT_SAFECALL conditional
git-svn-id: trunk@22490 -
2012-09-27 15:59:57 +00:00
pierre
18698bc93d Fix safecall for cpus for which NR_FUNCTION_RESULT_REG is different from NR_FUNCTION_RETURN_REG
git-svn-id: trunk@22489 -
2012-09-27 15:59:31 +00:00