Commit Graph

311 Commits

Author SHA1 Message Date
Jonas Maebe
ac883969a9 * synchronised with trunk till r41423
git-svn-id: branches/debug_eh@41424 -
2019-02-23 17:08:03 +00:00
pierre
d4e059bd41 Fix bug report #35065 using provided patch by J. Gareth Moreton
git-svn-id: trunk@41310 -
2019-02-12 07:19:04 +00:00
Jonas Maebe
8eb07ed7b1 * add support for custom calling conventions to LLVM function declarations
git-svn-id: branches/debug_eh@41211 -
2019-02-03 21:09:58 +00:00
Károly Balogh
1d7486748a tabs to spaces cleanup. no functional change
git-svn-id: trunk@40752 -
2019-01-04 01:35:36 +00:00
florian
9f16c34329 + initial work for tls-based threadvar support on arm-linux
git-svn-id: trunk@40267 -
2018-11-07 22:02:58 +00:00
florian
a092da723a + new fields for more precise control of alignment
+ support of new alignment control values for GNU AS writer
+ support of new alignment control values for binary writer
* better alignment settings on i386-win32
* improved inserted align directives for if nodes

git-svn-id: trunk@40159 -
2018-11-01 20:49:17 +00:00
florian
64e8557180 + introduce tai_align_abstract.create_max which limits the maximal number of bytes being inserted for alignment
git-svn-id: trunk@40158 -
2018-11-01 20:49:15 +00:00
florian
0cc3be49fa * GAS readers and writers can handle section flags
git-svn-id: trunk@39998 -
2018-10-20 18:23:24 +00:00
Jeppe Johansen
29ea4ed07d Add rounding mode operands.
Add support for trunc and round methods.

git-svn-id: branches/laksen/riscv_new@39698 -
2018-09-01 19:48:44 +00:00
Jeppe Johansen
f781c8942e Write real atomic operations, and add memory barrier operations.
Add support for fence, and acquire/release syntax to assembler reader.
Fix broken register aliases.

git-svn-id: branches/laksen/riscv_new@39524 -
2018-07-29 16:43:09 +00:00
florian
4f5f3c4a09 + support for vmov.xx vreg,#imm on arm
git-svn-id: trunk@39297 -
2018-06-24 12:39:59 +00:00
nickysn
61e6d2afec + introduce asd_omf_linnum_line directives; they will be used for writing LINNUM
entries in the OMF object format

git-svn-id: trunk@39007 -
2018-05-16 17:05:02 +00:00
nickysn
2cee948b72 + support segment overrides in inline asm references to local variables or parameters on x86
git-svn-id: trunk@38392 -
2018-03-01 17:59:57 +00:00
florian
3b779278e2 + (slightly) patch by Emelyanov Roman to add support of SEH directive in FPC internal assembler with INTEL syntax, resolves #29894
git-svn-id: trunk@38331 -
2018-02-24 16:14:08 +00:00
nickysn
44e29debee + introduce tai_const.Createname_near and .Createname_far on i8086
git-svn-id: trunk@38119 -
2018-02-05 16:06:12 +00:00
svenbarth
d50848174a + add putboolean and getboolean convenience methods to tentfile
* use putboolean and getboolean where approbiate

git-svn-id: trunk@37972 -
2018-01-14 21:36:02 +00:00
nickysn
2af5c9d508 * changed type used for section alignment from byte/shortint to longint, so the
internal object writer and the internal linker support object files with
  sections with alignment >=256

git-svn-id: trunk@37518 -
2017-10-25 15:47:29 +00:00
nickysn
67a0e9bdae + added x86 helper function get_default_segment_of_ref, which returns the
default segment base for the ref, in case there's no segment override
* in the internal assembler, use get_default_segment_of_ref to strip redundant
  prefixes, instead of always assuming all refs are DS-based

git-svn-id: trunk@37486 -
2017-10-18 14:24:58 +00:00
nickysn
baf492c7a5 + another helper function: x86_parameterized_string_op_param_count
* when generating x86 code for parameterized string instructions with the
  internal object writer, don't rely on the destination operand being [(r/e)di]
  when determining the segment prefix, because when using intel syntax, source
  and destination can be anything (only the operand size, the address size and
  the source segment is taken into account)

git-svn-id: trunk@37452 -
2017-10-12 16:07:15 +00:00
nickysn
4c75b15afe * shortened the names of the is_x86_string_instruction_op,
is_x86_parameterless_string_instruction_op and
  is_x86_parameterized_string_instruction_op by removing 'instruction' from
  their names

git-svn-id: trunk@37451 -
2017-10-12 15:20:22 +00:00
nickysn
2f28768d2d * simplify some code, by using is_x86_parameterized_string_instruction_op
git-svn-id: trunk@37448 -
2017-10-12 13:26:07 +00:00
nickysn
0fb79946a5 + added support for the parameterized versions of the x86 string instructions
(movs, cmps, scas, lods, stos, ins, outs) in the inline asm of the i8086, i386
  and x86_64 targets. Both intel and at&t syntax is supported.
* NEC V20/V30 instruction 'ins' (available only on the i8086 target, because it
  is incompatible with 386+ instructions) renamed 'nec_ins', to avoid conflict
  with the 186+ 'ins' instruction.

git-svn-id: trunk@37446 -
2017-10-12 00:07:02 +00:00
florian
4cf2a2672a changes to fix #32043
* changed most of the variables in the assembler readers used to store constants from aint to tcgint 
  as aint has only the size of the accumular while some CPUs (AVR) allow larger constants in instructions
+ allow access to absolute symbols with address type in inline assembler
* allow absolute addresses in avr inline assembler
+ tests

git-svn-id: trunk@37411 -
2017-10-06 21:07:19 +00:00
svenbarth
c6bfb0064f * keep track of the sections that are created in the asmlists
git-svn-id: trunk@35408 -
2017-02-10 14:38:53 +00:00
Károly Balogh
69a502db37 instead of stringdup(ppufile.getstring), have a getpshortstring function in entfile, and use it whereever possible. this avoids an extra shortstring copy, compared to the earlier solution
git-svn-id: trunk@35233 -
2017-01-04 19:19:50 +00:00
florian
c2af5a104e * patch by Emelyanov Roman to allow 64 byte alignment in the $codealign directive, resolves #30934
git-svn-id: trunk@35033 -
2016-12-01 21:21:42 +00:00
Jonas Maebe
a25ebbba3e + added volatility information to all memory references
o separate information for reading and writing, because e.g. in a
     try-block, only the writes to local variables and parameters are
     volatile (they have to be committed immediately in case the next
     instruction causes an exception)
   o for now, only references to absolute memory addresses are marked
     as volatile
   o the volatily information is (should be) properly maintained throughout
     all code generators for all archictures with this patch
   o no optimizers or other compiler infrastructure uses the volatility
     information yet
   o this functionality is not (yet) exposed at the language level, it
     is only for internal code generator use right now

git-svn-id: trunk@34996 -
2016-11-27 18:17:37 +00:00
Jonas Maebe
d2873e433e + top_asmlist operand type for LLVM inline assembly "call" instructions
git-svn-id: trunk@34889 -
2016-11-13 16:06:23 +00:00
nickysn
77dedfdcf5 - removed tai_const.create_pint and .create_pint_aligned, because they use the
pint type, which is now deprecated (as it does not always represent the
  correct pointer type in all i8086 memory models); replacements methods, which
  should be used instead are .create_sizeint, .create_int_dataptr or
  .create_int_codeptr (or their _unaligned counterparts)

git-svn-id: trunk@34838 -
2016-11-07 15:52:52 +00:00
nickysn
594290a16e + added *_unaligned counterparts to taiconst.create_[int|nil]_[code|data]ptr
git-svn-id: trunk@34836 -
2016-11-07 15:28:52 +00:00
Károly Balogh
5237a4d5e2 m68k: support register pair operands in assembler reader and writer, as used by some instructions (mainly DIVS/DIVU and friends) so we don't have to hack them as three operand instructions
git-svn-id: trunk@34782 -
2016-11-05 17:07:18 +00:00
nickysn
710c830859 + added constructors taiconst.Create_sizeint and .Create_sizeint_unaligned. They
create constants, corresponding to the SizeInt type for the current target and
  are intended to eventually replace .Create_pint, since the pint type is now
  deprecated (because it does not correspond to the size of a pointer in certain
  i8086 memory models).

git-svn-id: trunk@34620 -
2016-10-04 14:08:33 +00:00
Jonas Maebe
1cb8c0d00c * specify the def of assembler level symbols defined via
tasmdata.DefineAsmSymbol() and all routines that call it
   o will be used to automatically generate AB_INDIRECT sybols when
     necessary

git-svn-id: trunk@34164 -
2016-07-20 20:52:59 +00:00
Jonas Maebe
60fe7c2888 - removed unused section_symbol_start/end() routines
git-svn-id: trunk@34161 -
2016-07-20 20:52:50 +00:00
Jonas Maebe
ee5a64c2f8 - removed tai_varloc.oldlocation: it is not used anywhere
git-svn-id: trunk@34083 -
2016-07-08 07:46:41 +00:00
Károly Balogh
e7838dad39 m68k: initial asm-level infrastructure to let the codegenerator output float consts as operands, which is supported on 88x/040/060
git-svn-id: trunk@33667 -
2016-05-10 13:47:46 +00:00
Károly Balogh
3e2319ff3a m68k: do not allocate/free the regset dynamically having it as a normal field is perfectly fine
git-svn-id: trunk@33665 -
2016-05-10 13:03:17 +00:00
nickysn
178dab45d3 + added new asm directive 'asd_cpu' (specifies the CPU's instruction set) in the
compiler's internal assembly representation. It is not yet generated by the
  compiler and is only implemented properly in the NASM writer (but will
  eventually be implemented in the other assembler writers as well, including
  the internal assembler). In the future, it is intended to allow:
  1) catching instructions, generated by the compiler and not supported by the
     target CPU, due to a bug in the code generator
  2) allowing a different instruction set to be used in inline asm blocks (I'm
     planning a new directive for that - {$asmcpu XXX}), because the code
     generator will be able to switch target CPU in the middle of the asm output
     stream

git-svn-id: trunk@33121 -
2016-02-25 21:47:13 +00:00
marcus
fc2069eca8 - Removed the string for tai_labeled_instruction, repairs m68k building after revision 33074
git-svn-id: trunk@33075 -
2016-02-09 08:08:18 +00:00
sergei
36043d13ae - Removed remains of tai_labeled_instruction, already commented out probably in 1.0 times.
git-svn-id: trunk@33074 -
2016-02-09 02:25:27 +00:00
Jonas Maebe
110a5642c0 - removed ait_weak/tai_weak, and replaced it with the previously existing
asd_weak_reference/asd_weak_definition directives

git-svn-id: trunk@32879 -
2016-01-07 22:05:38 +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
nickysn
995ca4fb12 + implemented the 'SEG @DATA' inline assembler directive for i8086
git-svn-id: trunk@32280 -
2015-11-10 17:26:21 +00:00
Jonas Maebe
c3a7d76c68 * ait_jcatch should not be skipped by optimizers, as it does result in
control flow

git-svn-id: trunk@31447 -
2015-08-29 10:08:15 +00:00
Jonas Maebe
3f9f498e0d - removed leftover alpha, ia64 and vis code
git-svn-id: trunk@31446 -
2015-08-28 22:31:29 +00:00
nickysn
e9c790f4eb + support 'SEG' in the i8086 inline assembler
git-svn-id: trunk@31428 -
2015-08-26 15:57:44 +00:00
Jeppe Johansen
59f164b948 Changed type of size argument from aint to asizeint. This previously broke things on 8bit targets.
git-svn-id: trunk@31319 -
2015-08-13 01:57:09 +00:00
Jonas Maebe
07141e92d3 + support for llvm "undef" operand
git-svn-id: trunk@30669 -
2015-04-19 21:37:27 +00:00
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