Jonas Maebe
9d4c8f68d4
* fixed first_fpu_immreg definition
...
git-svn-id: trunk@30427 -
2015-04-04 14:29:09 +00:00
Jonas Maebe
e12dff9a5e
* support top_para in trgllvm.get_spill_temp()
...
git-svn-id: trunk@30426 -
2015-04-04 14:29:06 +00:00
Jonas Maebe
e750678f37
* factored out spilling code that deals with operand types into virtual
...
methods so they can be overridden by platform-specific variants
for platform-specific operand types
git-svn-id: trunk@30425 -
2015-04-04 14:29:03 +00:00
Jonas Maebe
ee7198aa57
* fixed memory leak in case one tai operand is replaced by another
...
git-svn-id: trunk@30424 -
2015-04-04 14:29:00 +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
Jonas Maebe
2ef753faae
* support llvm spilling_get_reg_type() for the destination of call/invoke
...
git-svn-id: trunk@30422 -
2015-04-04 14:28:54 +00:00
nickysn
7f4c2c0cc2
* added missing 'private' declaration to TOmfRecord_SEGDEF
...
git-svn-id: trunk@30420 -
2015-04-04 12:48:05 +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
nickysn
ef9c15c165
+ write link pass 1 separator to omf obj output
...
git-svn-id: trunk@30415 -
2015-04-04 00:14:34 +00:00
nickysn
4fc55f97fc
* refactored adding groups to use a method with an 'array of const' parameter
...
git-svn-id: trunk@30414 -
2015-04-03 23:45:43 +00:00
nickysn
1521f88a9d
* fixed off by one error when writing a GRPDEF record
...
git-svn-id: trunk@30413 -
2015-04-03 22:56:49 +00:00
nickysn
a9f10f60eb
+ write the dgroup GRPDEF record
...
git-svn-id: trunk@30412 -
2015-04-03 22:56:09 +00:00
nickysn
a84537dd9b
+ create the default segments and write them in the OMF object file
...
git-svn-id: trunk@30411 -
2015-04-03 22:33:45 +00:00
nickysn
56621e6ee1
+ added class for writing GRPDEF omf records
...
git-svn-id: trunk@30410 -
2015-04-03 21:58:02 +00:00
nickysn
7c90285af1
* improved record length checking in the SEGDEF omf record parsing
...
git-svn-id: trunk@30409 -
2015-04-03 00:12:16 +00:00
nickysn
28d8e915b7
+ implemented parsing of SEGDEF omf records as well
...
git-svn-id: trunk@30408 -
2015-04-02 23:59:45 +00:00
nickysn
f380d67575
- rm unused var
...
git-svn-id: trunk@30407 -
2015-04-02 23:49:36 +00:00
nickysn
65212e7a34
+ added class for encoding a SEGDEF(32) omf record
...
git-svn-id: trunk@30406 -
2015-04-02 23:05:02 +00:00
Jeppe Johansen
7f34ab27d2
Fixed issue with COFF linker. The addend wasn't shifted up by four before being added.
...
git-svn-id: trunk@30405 -
2015-04-02 22:06:14 +00:00
nickysn
1a3bd5fde1
+ added enums for OMF segment alignment and combination
...
git-svn-id: trunk@30404 -
2015-04-02 20:20:47 +00:00
Jeppe Johansen
a3fd3ee3ab
Fixed bug in ARM coff writer. Relocations just ORed the offset onto the instruction instead of adding, but they are emitted as bl 0xFFFFFE, and not bl 0x0.
...
git-svn-id: trunk@30403 -
2015-04-02 18:28:42 +00:00
Jonas Maebe
197e5194b9
* don't crash if we have to spill a register of the last instruction in an
...
asmlist
git-svn-id: trunk@30402 -
2015-04-01 15:43:10 +00:00
Jonas Maebe
7b4bf9cc33
* fixed comment for emit_ansi/unicodestring_const() after changing those
...
class methods into instance methods
git-svn-id: trunk@30401 -
2015-04-01 15:43:07 +00:00
nickysn
72bfe8d2c4
+ implemented writing of the LNAMES omf record(s)
...
git-svn-id: trunk@30398 -
2015-03-31 23:46:15 +00:00
nickysn
e4c612611f
+ added class (and constants) for handling OMF COMENT records. Write a COMENT
...
"Translator" record with the FPC version immediately after the header in the
omf internal object writer.
git-svn-id: trunk@30396 -
2015-03-30 23:38:28 +00:00
nickysn
70577a55f3
+ write the omf header in the omf binary writer
...
git-svn-id: trunk@30395 -
2015-03-30 22:44:58 +00:00
nickysn
ae44d240a3
* updated ppc8086.lpi with the latest compiler source files
...
git-svn-id: trunk@30394 -
2015-03-30 21:02:54 +00:00
Jeppe Johansen
8c105d4c97
Fix off by 8 error.
...
git-svn-id: trunk@30393 -
2015-03-30 12:03:18 +00:00
Jeppe Johansen
7fe4b13248
Fix broken peephole optimization that was testing the wrong register for modifications.
...
Fix tests on unsigned values. The flags were swapped.
git-svn-id: trunk@30392 -
2015-03-30 11:17:38 +00:00
nickysn
9c52c98b77
* use default_settings.packrecords, instead of 0 (since that's different for
...
i8086) for the packrecords parameter of begin_anonymous_record in
intf_write_table. This fixes interfaces in i8086 far code or data memory
models.
git-svn-id: trunk@30389 -
2015-03-30 01:39:47 +00:00
florian
1f93c3aaa1
* get memory sizes on avr-embedded from controller info records
...
git-svn-id: trunk@30387 -
2015-03-29 21:41:52 +00:00
florian
dfd4d3656b
+ avrsim controller target requiring a special avr simulator with a certain memory location handling, see avrsim.pp controller helper unit for what it is needed
...
git-svn-id: trunk@30385 -
2015-03-29 21:13:36 +00:00
florian
b07ba5786b
* updated errord(u).msg files by Karl-Michael Schindler, resolves #27725
...
git-svn-id: trunk@30382 -
2015-03-29 20:02:06 +00:00
florian
873d88ba57
* fix 8 Bit*8 Bit multiplication according to #27737 using modified code supplied by Georg Hieber
...
git-svn-id: trunk@30381 -
2015-03-29 19:58:30 +00:00
Károly Balogh
72e1443081
+ don't abuse status.currentsourcepath to pass on PPU names if the source is unavailable, causes side effects with other frontends (like the IDE). Improved solution for Mantis #27588
...
git-svn-id: trunk@30373 -
2015-03-29 19:05:19 +00:00
florian
ad995eb121
* use correctly CALL/RCALL and JMP/RJMP on avr, resolves #27738
...
git-svn-id: trunk@30372 -
2015-03-29 18:26:32 +00:00
Jonas Maebe
c32b6b01ad
* make sure the calcparas() is called when calling getcopyas() on a
...
procvardef
git-svn-id: trunk@30371 -
2015-03-29 18:16:54 +00:00
Jonas Maebe
2112713579
* converted the remaining parts of tcginnode.pass_generate_code() to thlcg
...
git-svn-id: trunk@30370 -
2015-03-29 18:16:51 +00:00
Jonas Maebe
69e7b06cef
* converted rest of VMT generation to high level typed const builder
...
git-svn-id: trunk@30369 -
2015-03-29 18:16:48 +00:00
nickysn
c28184b697
* fixed comparison of far procvars after the hlcgllvm branch merge
...
git-svn-id: trunk@30357 -
2015-03-29 00:56:43 +00:00
nickysn
6b0a19c0ab
* fixed getting the address of a far proc on i8086 after the hlcgllvm branch merge
...
git-svn-id: trunk@30354 -
2015-03-28 17:31:52 +00:00
nickysn
0162b199f7
* fixed the i8086 g_intf_wrapper after the hlcgllvm branch merge
...
git-svn-id: trunk@30353 -
2015-03-28 14:33:22 +00:00
nickysn
003b283e55
* fixed thlcgcpu.g_exception_reason_save_const always generating a 286+ push
...
instruction on i8086, regardless of current cpu level
git-svn-id: trunk@30352 -
2015-03-28 13:59:10 +00:00
Jonas Maebe
a30f0bc289
* fixed -Oodfa warnings
...
git-svn-id: branches/hlcgllvm@30350 -
2015-03-28 12:28:21 +00:00
Jonas Maebe
201121d7c9
* synchronised with trunk till r30345
...
git-svn-id: branches/hlcgllvm@30349 -
2015-03-28 12:28:15 +00:00
Jonas Maebe
f631430775
* made the allocation of labels for internal data in typed const builders
...
overridable, and implement those routines for llvm
git-svn-id: branches/hlcgllvm@30348 -
2015-03-28 11:34:04 +00:00
Jonas Maebe
e12bd99b59
* fixed compilation with -dllvm after r30343
...
git-svn-id: branches/hlcgllvm@30347 -
2015-03-28 11:34:02 +00:00
Jonas Maebe
5a2609933f
* fixed crash in r30244 (we only have to get a new elementdef if we didn't
...
already initialise the location, and we won't get a new elementdef if
the location is already assigned)
git-svn-id: branches/hlcgllvm@30346 -
2015-03-28 11:33:59 +00:00
nickysn
131422b594
+ added methods for calculating and verifying the omf record checksum and
...
properties for accessing it
git-svn-id: trunk@30345 -
2015-03-28 01:55:03 +00:00
nickysn
359eaa4152
+ added class for encapsulating an omf raw record
...
git-svn-id: trunk@30344 -
2015-03-28 01:37:57 +00:00
Jonas Maebe
25e6eaf07f
* store the to be used recordalignmin and maxcrecordalign settings inside
...
(abstract)recordsymtables, so that these settings don't depend on the
current user settings when internally creating record definitions
git-svn-id: branches/hlcgllvm@30343 -
2015-03-27 21:25:56 +00:00
Jonas Maebe
419a97cce8
* changed emit_ansistring_const() and emit_unicodestring_const() into
...
instance methods that make use of the internal data builder
functionality so they automatically place all string data in the
same section if possible
git-svn-id: branches/hlcgllvm@30342 -
2015-03-27 21:25:53 +00:00
Jonas Maebe
6ed273eec5
* support specifying the name of an internal data section
...
git-svn-id: branches/hlcgllvm@30341 -
2015-03-27 21:25:50 +00:00
Jonas Maebe
a76aba4a20
* converted a number of string data generators to the internal data builder
...
functionality
git-svn-id: branches/hlcgllvm@30340 -
2015-03-27 21:25:47 +00:00
Jonas Maebe
158116392c
+ ttai_typedconstbuilder.start_internal_data_builder() and
...
ttai_typedconstbuilder.finish_internal_data_builder() to generate data
will only be referenced by the typed const that we are currently
generating. Takes care of creating an appropriate label/section for
this data, avoiding needless global symbols and sections.
git-svn-id: branches/hlcgllvm@30339 -
2015-03-27 21:25:43 +00:00
Jonas Maebe
be2f63aa97
+ tasmlabel.createstatic() constructor for creating static data labels
...
(object-local, but not starting with (.)L, so they're still treated as
the start of a subsection by Darwin's linker when dead-stripping)
+ tasmdata.getstaticdatalabel() that uses the above
git-svn-id: branches/hlcgllvm@30338 -
2015-03-27 21:25:40 +00:00
Jonas Maebe
560fe24c44
+ getlocaldatalabel()
...
git-svn-id: branches/hlcgllvm@30337 -
2015-03-27 21:25:37 +00:00
Jonas Maebe
687bb15299
* renamed getdatalabel() to getglobaldatalabel
...
git-svn-id: branches/hlcgllvm@30336 -
2015-03-27 21:25:34 +00:00
Jonas Maebe
5e1bb8e408
+ tcalo_make_dead_strippable to indicate that a typed constant data block
...
should be dead-strippable; may imply the creation of a separate section
(on platforms that dead-strip data based on sections), but does not
require it
* replaced all existing tcalo_new_section uses with
tcalo_make_dead_strippable, as that is their meaning/purpose
git-svn-id: branches/hlcgllvm@30335 -
2015-03-27 21:25:30 +00:00
Jonas Maebe
e924dbed90
* moved the specification of the options for a ttai_typedconstbuilder from
...
get_final_asmlist() to the constructor, in preparation of supporting the
creation of internal builders for local data that will ignore some of the
irrelevant flags (at creation time)
git-svn-id: branches/hlcgllvm@30334 -
2015-03-27 21:25:27 +00:00
nickysn
49d501a798
+ added unit omfbase for omf definitions; currently contains all the omf record
...
type constants
git-svn-id: trunk@30331 -
2015-03-27 00:44:01 +00:00
nickysn
f9d3e0c8d6
+ the beginnings of an i8086-msdos internal obj writer
...
git-svn-id: trunk@30330 -
2015-03-27 00:01:11 +00:00
nickysn
85cb180d80
* prepend "+" to each file name to be added to the library by wlib. This
...
indicates an "add" command, instead of "replace".
git-svn-id: trunk@30287 -
2015-03-23 01:19:19 +00:00
nickysn
931f5a0b54
* fixed passing of the wlib output file parameter (-o requires an equal sign)
...
git-svn-id: trunk@30286 -
2015-03-23 01:10:32 +00:00
Károly Balogh
87deec105d
m68k: implemented 68k specific a_bit_set_const_ref and a_bit_set_reg_ref, using BSET/BCLR
...
git-svn-id: trunk@30278 -
2015-03-22 17:44:59 +00:00
nickysn
069fa51445
* use separate input and output files when invoking wlib to create a static
...
library. This resolves a problem with parallel building of a i8086 cross
compiler, due to a race condition in wlib, when running several instances of
wlib in the same directory. The problem is in the way wlib creates a temp file
in the current directory using non-atomic operations and with a high
probability of a name collision. Using separate input and output files avoids
this temp file creation by wlib.
git-svn-id: trunk@30277 -
2015-03-22 17:42:19 +00:00
Jeppe Johansen
fa5bd1c513
ARMv7M supports UMULL.
...
Fix missing conflicts for multiplication instructions for >=ARMv6.
git-svn-id: trunk@30276 -
2015-03-22 14:39:43 +00:00
Károly Balogh
c49c8210a3
m68k: some initial HLCG, use BSET/BCLR instructions for simple bit manipulation
...
git-svn-id: trunk@30275 -
2015-03-22 14:01:14 +00:00
florian
5f4dc5e54f
* parentheses after an @-operator can contain a full expression, resolves #27517
...
git-svn-id: trunk@30272 -
2015-03-22 13:00:43 +00:00
florian
3396e2e1f4
* interpret -daaa:=bbb after -Sm was passed as a macro definition, resolves #27529
...
git-svn-id: trunk@30271 -
2015-03-22 10:20:37 +00:00
florian
36e79a874e
* when creating code for an iso mod operator, use create_internal for the helper nodes
...
to avoid unnecessary warnings
git-svn-id: trunk@30270 -
2015-03-21 22:57:19 +00:00
florian
a8e001d4ad
* do not warn about disjunct ranges for internally created cmp nodes
...
git-svn-id: trunk@30269 -
2015-03-21 22:56:30 +00:00
florian
0bc63c438e
+ tifnode.create_internal
...
git-svn-id: trunk@30268 -
2015-03-21 22:55:35 +00:00
Károly Balogh
ad301f8fa1
m68k: implemented t68kvecnode.update_reference_reg_packed. same as the generic one, but allocates int registers instead of address registers, because on 68k IMUL,SHR/SHL and AND can't work on address registers, which results in a lot of register shuffling
...
git-svn-id: trunk@30267 -
2015-03-21 20:09:35 +00:00
Jeppe Johansen
5ca1740bee
Fix issue in is_thumb32_imm. imm<11:10> have to be non-zero meaning the rotate only works from 8 to 31. Caused 0x8000001F to be mistaken for a valid immediate.
...
git-svn-id: trunk@30266 -
2015-03-21 12:46:45 +00:00
Jonas Maebe
39594adae1
* different, simpler fix for #27691 fixed in r30261; should fix the
...
internalerrors on some platforms after that revision
git-svn-id: trunk@30265 -
2015-03-20 14:23:28 +00:00
Jonas Maebe
ea3a306da8
* never say that an automatically added unit is unused (mantis #27691 )
...
git-svn-id: trunk@30261 -
2015-03-19 17:48:57 +00:00
Károly Balogh
258b42de26
m68k: added support for FSIN/FCOS. these are software supported on the 68040, so we should have a separate 68040/060 FPU option too, to avoid these in the future.
...
git-svn-id: trunk@30257 -
2015-03-17 22:52:53 +00:00
Jeppe Johansen
09acd9b1ab
Add workaround for ARM thumb when using GAS.
...
git-svn-id: trunk@30254 -
2015-03-17 21:24:07 +00:00
Károly Balogh
b617345e43
m68k: disabled premature MOVEA #0,Ax to SUBA Ax,Ax in the CG, because it breaks with spilling temp replacement and moved it to the optimizer, where it belongs. this fixes some code with potentially heavy address register pressure, like the IDE.
...
git-svn-id: trunk@30245 -
2015-03-16 02:04:58 +00:00
Jonas Maebe
765044aede
* fixed a number of (mostly false) warnings regarding uninitialised
...
variables with -Oodfa
git-svn-id: branches/hlcgllvm@30244 -
2015-03-15 21:10:50 +00:00
Jonas Maebe
bc7ba58798
* fixed compilation after removal of ait_set, ait_thumb_set and ait_symbol_pair
...
git-svn-id: branches/hlcgllvm@30243 -
2015-03-15 21:10:47 +00:00
florian
f6f8e1b83e
* write ppu+source file name in case the source file is not available instead of inserting an invalid absolute path, resolves #27588
...
git-svn-id: trunk@30242 -
2015-03-15 19:51:17 +00:00
Jonas Maebe
bd203a5b57
* synchronised with trunk till r30240
...
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
florian
f07969245b
* fix warning about uninitialized variable
...
git-svn-id: trunk@30240 -
2015-03-15 17:10:01 +00:00
florian
331ace25c6
* handle undefineddef in classify_argument, resolves #27658
...
git-svn-id: trunk@30239 -
2015-03-15 16:19:58 +00:00
Jeppe Johansen
60f24739fc
Fixed typo
...
git-svn-id: trunk@30238 -
2015-03-15 15:47:45 +00:00
florian
38a72f2ddb
* renamed arm->avr to match the cpu
...
git-svn-id: trunk@30237 -
2015-03-15 15:10:37 +00:00
Jonas Maebe
f633d094ee
* perform interface dispatches via R12 instead of R11 as expected for
...
indirect function calls for ELFv2 (and other ABIs don't care about
the register)
git-svn-id: trunk@30236 -
2015-03-15 14:00:32 +00:00
Jeppe Johansen
2bcef2daee
Fix break caused by r30233
...
git-svn-id: trunk@30235 -
2015-03-15 13:34:01 +00:00
Jeppe Johansen
f92f0751f4
Fix selection of LDR/STR instructions in thumb mode. Most forms don't support pre or post indexing.
...
Fix emission of offsets.
git-svn-id: trunk@30234 -
2015-03-15 12:12:13 +00:00
Jeppe Johansen
155998fe89
Support .set and .weak in internal assembler.
...
Fix problem with fpc_initialHeap getting put in .data instead of .bss.
git-svn-id: trunk@30233 -
2015-03-15 12:10:54 +00:00
Károly Balogh
2555f12394
m68k: improved handling of moves and sign/zero extensions targeting address regs
...
git-svn-id: trunk@30232 -
2015-03-15 01:44:43 +00:00
Jonas Maebe
6230119140
- removed self-assignment of cur_stack_offset introduced by refactoring in
...
r30221
git-svn-id: trunk@30230 -
2015-03-14 21:55:48 +00:00
Jonas Maebe
8334597476
* a homogeneous float aggregate can maximally contain 4 elements
...
(mantis #27665 )
git-svn-id: trunk@30229 -
2015-03-14 21:46:45 +00:00
Jonas Maebe
0c394eb6f4
* ensure we don't call a_load_cgparaloc_anyreg() to move an fpu register
...
into an integer register
git-svn-id: trunk@30227 -
2015-03-14 18:36:57 +00:00
Jonas Maebe
622852b8c9
* check that a_load_cgparaloc_anyreg() is not used to try to move an fpu
...
register into a non-fpu register, as this is not (yet) supported
git-svn-id: trunk@30226 -
2015-03-14 18:36:54 +00:00
Jonas Maebe
a02d52f533
* support thlcg2ll.gen_loadfpu_loc_cgpara() from LOC_REGISTER to
...
LOC_FPUREGISTER (can happen with certain ABIs due to records
having to be passed in floating point registers)
git-svn-id: trunk@30225 -
2015-03-14 18:36:52 +00:00
Jonas Maebe
c50c822e13
* fixed destination size when loading fpu temp paralocs
...
git-svn-id: trunk@30224 -
2015-03-14 18:36:49 +00:00
Jonas Maebe
6d02aedf70
* support multiple register paralocs in tcgobj.a_loadfpu_ref_cgpara()
...
git-svn-id: trunk@30223 -
2015-03-14 18:36:46 +00:00