Commit Graph

17863 Commits

Author SHA1 Message Date
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
Jonas Maebe
cea2741339 * correct paraloc size for 3-byte records passed in the lower bits of a
register (32 bit instead of 64 bit register)

git-svn-id: trunk@30222 -
2015-03-14 18:36:43 +00:00
Jonas Maebe
3d6fcd8815 + ppc64le/ELFv2 ret_in_param implementation
* fixed ret_in_param for other ppc64 ABIs

git-svn-id: trunk@30221 -
2015-03-14 18:36:40 +00:00
Jonas Maebe
a02fb7c794 * fixed misplaced braces that caused all records to be passed by reference
on ppc64 with the mwpascal calling convention, instead of only the const
    ones

git-svn-id: trunk@30219 -
2015-03-14 18:36:35 +00:00
Jonas Maebe
7bc66a5142 + ELF/ppc64le resource support
git-svn-id: trunk@30218 -
2015-03-14 18:36:32 +00:00
Jonas Maebe
6b9b575b74 * choose between arm (little endian) and armeb for fpcres based on the
target_info rather than based on the source_info

git-svn-id: trunk@30217 -
2015-03-14 18:36:29 +00:00
Jonas Maebe
eee83ebb4a * use generic code for a_load_subsetref_regs_noindex on ppc64le
git-svn-id: trunk@30216 -
2015-03-14 18:36:26 +00:00
Jonas Maebe
cf5b42b4b2 * use generic code for set+setelement on ppc64le
git-svn-id: trunk@30214 -
2015-03-14 18:36:20 +00:00
Jonas Maebe
399ffb2005 * allocate enough room in assembler routines for a complete linkage area
so that potential callees have enough room to store their LR etc
    if needed

git-svn-id: trunk@30212 -
2015-03-14 18:36:14 +00:00
Jonas Maebe
3ab62dcfed * switched Linux/PowerPC64 to Pascal startup code so that we can used ifdefs
to detect whether we're compiling for ELFv1/SYSV or ELFv2

git-svn-id: trunk@30210 -
2015-03-14 18:36:08 +00:00
Jonas Maebe
d6499b4bc0 + rldcl., rldicl., rldcr[.] and rldicr[.] opcodes (needed for new
bootstrapping code)

git-svn-id: trunk@30208 -
2015-03-14 18:36:02 +00:00
Jonas Maebe
5a6b9c9f16 * store/reload toc around indirect calls for ELFv2 ABI
* ensure that register calls happen via R12 on the ELFv2 ABI

git-svn-id: trunk@30207 -
2015-03-14 18:35:59 +00:00
Jonas Maebe
33ed32b024 * when targeting the ELFv2 ABI, don't reserve space for the (never used)
words in the linkage area reserved for use by the compiler and linker

git-svn-id: trunk@30206 -
2015-03-14 18:35:56 +00:00
Jonas Maebe
3d9713b9c8 * has_single_field() now looks recursively into fields that are aggregate
types until it finds a non-aggregate type, and then returns "true" if
    that aggregate (record or array) contains one element
  * it now also returns the type of that element directly rather than a
    tfieldvarsym, since we only care about the type and in case of an array
    there is no field

git-svn-id: trunk@30205 -
2015-03-14 18:35:53 +00:00
Jonas Maebe
2e126bb723 - removed darwin/i386 special case code from i8086 code generator
git-svn-id: trunk@30204 -
2015-03-14 18:35:50 +00:00
Jonas Maebe
9788b01d31 * rewrote most of the special case handling of parameter passing on ppc64,
documenting the pecularities of the various calling conventions and
    marking what we do and don't support currently
  * also handle arrays for the ELFv2 ABI when determining whether an aggregate
    only contains floating values of a single type

git-svn-id: trunk@30203 -
2015-03-14 18:35:47 +00:00
Jonas Maebe
165aaea8a4 * made a separate abi entry for powerpc_darwin, as it's not exactly the same
as the AIX abi (especially on ppc64)
   o replaced (for now) all checks for the AIX abi with a check for either the
     AIX or Darwin abi
   o changed the ABI of Darwin/ppc, Darwin/ppc64 and Mac OS/ppc to
     abi_powerpc_darwin

git-svn-id: trunk@30202 -
2015-03-14 18:35:44 +00:00
Jonas Maebe
25340480b0 * factored out creating a single paraloc, so we can reuse it for creating
function return locations

git-svn-id: trunk@30201 -
2015-03-14 18:35:41 +00:00
Jonas Maebe
f0ee1a9ee3 * pass records that (recursively) only contain floating point values of the
same type (even in other records or in arrays), with 8 or less such
    values, as if those values were passed individually on ppc64/ELFv2

git-svn-id: trunk@30200 -
2015-03-14 18:35:38 +00:00
Jonas Maebe
9a73c9a460 * avoid string truncation for ait_symbolpair in assembler writer
git-svn-id: trunk@30199 -
2015-03-14 18:35:34 +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
Jonas Maebe
1e227f78fe * factored out the check for whether we have to generate dotted function
names, and disabled them for ppc64 ELFv2
  * disabling those also disables the function descriptors, so use the
    _CALL_ELF compiler variable to check whether there is in fact a
    function descriptor

git-svn-id: trunk@30196 -
2015-03-14 18:35:25 +00:00
Jonas Maebe
cc071ded4b * define _CALL_ELF=1 or _CALL_ELF=2 symbol when targeting ppc(64)
ELFv1/ELFv2, like GCC

git-svn-id: trunk@30195 -
2015-03-14 18:35:22 +00:00
Jonas Maebe
05f6660a25 * set the correct dynamic linker for the ppc64 ELFv2 abi
* specify the correct linker emulation to use for ppc64 ELFv2 little endian
  * specify the correct default library directories to search for ELFv2 little
    endian

git-svn-id: trunk@30194 -
2015-03-14 18:35:19 +00:00
Jonas Maebe
3946971c73 * default to ppc64le/elfv2 when compiling on a ppc64le platform
* default to elfv2 abi when targeting ppc64le and no abi has been specified

git-svn-id: trunk@30193 -
2015-03-14 18:35:16 +00:00
Jonas Maebe
0e76a84e04 + "ELFv2" abi identifier for ppc64
git-svn-id: trunk@30192 -
2015-03-14 18:35:13 +00:00
Károly Balogh
918c4add06 m68k: in do_spill_replace, exclude the case where the source register would be an address and the destination is a reference
git-svn-id: trunk@30191 -
2015-03-14 17:19:14 +00:00
Károly Balogh
935820293c m68k: in tm68ktypeconvnode.int_to_real, fix the reference before using it, and if the source is a register, make sure it's a data register
git-svn-id: trunk@30190 -
2015-03-14 17:14:10 +00:00
Károly Balogh
1121c2e6ce m68k: before doing a reg->ref operation, make sure the source is a datareg
git-svn-id: trunk@30189 -
2015-03-14 16:36:02 +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
439027a8de Add most pre-UAL VFP instruction forms.
Add fused mac instructions for VFPv4.

git-svn-id: trunk@30187 -
2015-03-14 14:59:13 +00:00
Jeppe Johansen
64f127141f Add VFPv4 FPU type for ARM.
Fix assembler reader so it can read instructions longer than 5 characters.

git-svn-id: trunk@30186 -
2015-03-14 12:49:07 +00:00
Jeppe Johansen
73abf5e630 Merge from armiw branch.
Update ARM internal assembler to support most ARM, Thumb and Thumb-2 instructions.
Changed generation of VFP instructions to use UAL mnemonics.
Added divided and unified assembler syntax support to ARM assembly reader.

git-svn-id: trunk@30181 -
2015-03-13 19:22:27 +00:00
Jeppe Johansen
b75330760d Merged from trunk.
git-svn-id: branches/laksen/armiw@30180 -
2015-03-13 18:58:57 +00:00
Jeppe Johansen
5f622752ce Disable internal assembler
git-svn-id: branches/laksen/armiw@30179 -
2015-03-13 18:56:59 +00:00
Jonas Maebe
d4bc74ecc0 * support for -WM10.XX (for 10.10) and defining the correct associated
version macro

git-svn-id: trunk@30178 -
2015-03-13 08:35:30 +00:00
Jonas Maebe
5b3c511467 * don't crash when "return exitvalue" is used in a procedure
git-svn-id: trunk@30177 -
2015-03-13 08:35:26 +00:00
Jonas Maebe
2dcd42d4f1 * fixed detection of an objcprotocols descending from a forward-defined
objcprotocol

git-svn-id: trunk@30169 -
2015-03-12 19:37:43 +00:00
florian
f0984fb628 * abstractrecorddef.contains_float_field should search recursively, resolves #27580
git-svn-id: trunk@30168 -
2015-03-11 22:05:14 +00:00
pierre
b0d8f487c1 Makefile regenerated after previous commit: Fix fullinstall for win64 and disable 8086 and i386 compiler for win64 os source only for fullcycle and fullinstall
git-svn-id: trunk@30167 -
2015-03-11 22:03:52 +00:00
pierre
999436c5e6 Fix fullinstall for win64 and disable 8086 and i386 compiler for win64 os source only for fullcycle and fullinstall
git-svn-id: trunk@30166 -
2015-03-11 21:57:47 +00:00
Jonas Maebe
fc21845686 * fixed the allocation of R12 on ppc32/ppc64 when used to hold the value of
the stack pointer during the prolog. This was done previously in
    tcg.g_proc_entry(), but that routine is called after register allocation
    and hence has no influence. Also cleaned up the deallocation of that
    register by moving the previously ifdef'd code to thlcgppcgen
    (mantis #27634)

git-svn-id: trunk@30164 -
2015-03-11 17:49:44 +00:00
pierre
21fe7616a4 Avoid line longer than 255 characters, to be able to edit inside FP IDE
git-svn-id: trunk@30158 -
2015-03-10 07:56:18 +00:00
Jonas Maebe
6a70c84258 + internal bsr/bsf support for ppc32 and ppc64
git-svn-id: trunk@30152 -
2015-03-09 16:48:34 +00:00
Jeppe Johansen
3d7dce81fe Make MRS and MSR use the right encoding on Thumb architectures.
Set regnumber_count_bsstart to 128 to be able to search all registers.

git-svn-id: branches/laksen/armiw@30150 -
2015-03-08 17:30:38 +00:00
Jeppe Johansen
03b9e5117f Fix off by 1 error in assembler reader which prevented B instructions from being parsed.
git-svn-id: branches/laksen/armiw@30147 -
2015-03-08 12:52:43 +00:00
Jeppe Johansen
914e9e7b49 Merged from trunk
git-svn-id: branches/laksen/armiw@30146 -
2015-03-08 12:33:46 +00:00
Jeppe Johansen
d12b913e70 Add initial support in ARM-embedded for Allwinner A20.
git-svn-id: trunk@30144 -
2015-03-08 12:22:57 +00:00
Károly Balogh
0021ad714f * fixed some ancient code behind cpu_uses_separate_address_registers define to at least compile again, for some m68k experiment
git-svn-id: trunk@30130 -
2015-03-07 22:11:43 +00:00
Jonas Maebe
b931f78b4b * insert a type conversion from ordinal to pointer for pointerconstn
git-svn-id: branches/hlcgllvm@30129 -
2015-03-07 21:44:01 +00:00
Jonas Maebe
c1e7c9de02 * support for flushing a ttai_typedconstbuilder queue with an ordinal
constant at the end (in case of e.g. ordinal -> pointer type
    conversions)

git-svn-id: branches/hlcgllvm@30128 -
2015-03-07 21:43:57 +00:00
Jonas Maebe
eba3f534de * correctly handle empty ansistring constants for llvm
git-svn-id: branches/hlcgllvm@30127 -
2015-03-07 21:43:52 +00:00
Jonas Maebe
935c0c86aa * write all ait_const's of value 0 as 'zeroinitializer' so they also work
for pointer constants

git-svn-id: branches/hlcgllvm@30126 -
2015-03-07 21:43:47 +00:00
Legolas
ffd03563d0 * Updated Wii rtl (unicode support broken .dol executables) and libogcfpc to ver.1.8.12. Fixed a dependency to Mad library too
git-svn-id: trunk@30125 -
2015-03-07 21:34:51 +00:00
Jonas Maebe
9c42437326 * moved tasmlisttypedconstbuilder.tc_emit_string_offset() to
ttai_typedconstbuilder.emit_string_offset() so it can also be used outside
    the context of parsing a Pascal-level typed constant

git-svn-id: branches/hlcgllvm@30111 -
2015-03-06 19:45:04 +00:00
sergei
a709a9b637 * MIPS peephole: check that operand is present before accessing its fields, also check that it's not a branch target. Mantis #27608.
git-svn-id: trunk@30110 -
2015-03-06 00:04:06 +00:00
Jonas Maebe
511e878606 * fixed pointer plus/minus integer on llvm (since a_op_* only gets a single
def, we have to ensure that both arguments have in fact the same type)

git-svn-id: branches/hlcgllvm@30108 -
2015-03-05 22:45:32 +00:00
Jonas Maebe
f9ae2aadac * fixed llvm unsigned greater/lower than condition mnemoniics
git-svn-id: branches/hlcgllvm@30107 -
2015-03-05 22:20:50 +00:00
Jonas Maebe
ea00e559f8 * fixed compilation after previous merge
git-svn-id: branches/hlcgllvm@30106 -
2015-03-05 22:20:45 +00:00
Jonas Maebe
06dd396a2f * fixed writing float values using the internal assembler after r28105
git-svn-id: branches/hlcgllvm@30105 -
2015-03-05 21:41:56 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Károly Balogh
a71fcd290b * allocate a temp addressreg instead of a temp intreg in callnode. improves code generation on m68k for these cases
git-svn-id: trunk@30080 -
2015-03-02 22:21:53 +00:00