nickysn
1c5d0ed09a
+ support aitconst_farptr in tai_const.size
...
git-svn-id: trunk@30455 -
2015-04-05 23:33:41 +00:00
florian
02d9c676d3
* make offsets passed to tconst of type asizeint instead of aint
...
git-svn-id: trunk@30445 -
2015-04-05 19:18:52 +00:00
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