Jonas Maebe
dcf4e4cb2c
* support taking the address of labels defined in assembler blocks in the
...
LLVM code genrator (for the rtti unit's thunk hacking)
git-svn-id: trunk@42969 -
2019-09-09 18:33:33 +00:00
Jonas Maebe
98f55b1d86
* also register symbols referenced from assembler via asolutevarsyms
...
git-svn-id: trunk@42307 -
2019-06-29 16:27:10 +00:00
Jonas Maebe
853e622fb7
* fix case completeness warnings
...
git-svn-id: branches/debug_eh@42051 -
2019-05-12 18:46:47 +00:00
Jonas Maebe
1b6425176b
* synchronised with trunk till r42049
...
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +00:00
Jonas Maebe
281b3ad276
* fix case completeness and unreachable code warnings in compiler that would
...
be introduced by the next commit
git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
Jonas Maebe
016882ca82
* do not add references to external procedures and variables to the used
...
compiler symbols of the current module (useless, and moreover crashes
clang)
git-svn-id: branches/debug_eh@41215 -
2019-02-03 21:10:11 +00:00
Jonas Maebe
b3a8543a56
* synchronised with trunk till r40942
...
git-svn-id: branches/debug_eh@40943 -
2019-01-20 17:37:07 +00:00
Jonas Maebe
51e68eb302
* fixed several places where the interface crc could change:
...
o unsetting po_inline while parsing the implementation for various reasons
(interprocedural goto/label, accessing a local in a parent frame,
having nested procedures)
o instead handle this via the pio_inline_not_possible flag
o noreturn can no longer be specified only in the implementation
git-svn-id: trunk@40789 -
2019-01-06 20:35:56 +00:00
Jonas Maebe
68ce5dc91f
* register static symbols references from assembly code as "used" so that LLVM won't
...
remove them if there are no references from regular code
git-svn-id: branches/debug_eh@40432 -
2018-12-01 20:30:27 +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
nickysn
d1fc31de94
+ add support for '[' and ']' parenthesis in addition to '(' and ')' in
...
rautils.TExprParse. They behave exactly like '(' and ')'. However, you cannot
nest '(' with ']' and '[' with ')'. This is introduced in order to help
implementing support for BP7 asm constants that are parsed like references,
e.g. 'dd Rec.Str[5]' or 'dd 5[7]'.
git-svn-id: trunk@38849 -
2018-04-26 14:13:30 +00:00
nickysn
bbc364b245
* inline asm fix for accessing record variables when using the unitname (e.g.
...
'mov ax, unitname.varname.fieldname')
git-svn-id: trunk@38755 -
2018-04-12 16:35:21 +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
nickysn
10cbeafd7d
+ always allow using @Result in inline asm sections of pascal routines (only in
...
pure assembler routines it is disallowed in certain cases)
git-svn-id: trunk@38292 -
2018-02-20 04:07:53 +00:00
florian
8731854165
* test code for avr assembler by Christo Crause
...
* fix size of val field in TOprRec for avr, resolves #32946
git-svn-id: trunk@38291 -
2018-02-19 21:23:28 +00:00
nickysn
6c69e10613
+ fix for using the function name (as the function's entry point address,
...
instead of the function result variable, which is already accessible, using
the @Result directive) in inline asm
git-svn-id: trunk@38289 -
2018-02-19 18:04:00 +00:00
nickysn
b9e41330d4
+ ensure the callee size paraloc info is available, when setting up a local var
...
or parameter in RAUtils.TOperand.SetupVar(). This fixes a compiler crash, when
a parent parameter or local var is accessed (in certain ways) inside a nested
inline asm routine.
git-svn-id: trunk@38236 -
2018-02-14 14:14:34 +00:00
nickysn
b49c09b84c
* convert the 'var' parameters of RAUtils.AsmSearchSym to 'out'
...
git-svn-id: trunk@38170 -
2018-02-09 15:59:18 +00:00
nickysn
4d0d143501
* converted the 'size' parameter to RAUtils.SearchType to 'out' instead of 'var'
...
git-svn-id: trunk@38169 -
2018-02-09 15:51:35 +00:00
nickysn
85c0b3854d
* converted the 'var' parameters of RAUtils.GetRecordOffsetSize to 'out',
...
because they are output only
git-svn-id: trunk@38168 -
2018-02-09 15:49:00 +00:00
nickysn
11b1da0b9b
+ generate correct output on i8086 for 'DW xx', 'DW OFFSET xx', 'DD xx' and 'DD OFFSET xx'
...
git-svn-id: trunk@38151 -
2018-02-07 16:11:20 +00:00
nickysn
d591e698ac
+ added parameter 'hasofs' to ConcatConstSymbol. Will be used to support 'dd xx'
...
vs 'dd offset xx' being different on i8086.
git-svn-id: trunk@38148 -
2018-02-07 15:23:48 +00:00
nickysn
629be9cee1
+ add a 'constsize' parameter to ConcatConstSymbol, so it can be used to
...
distinguish between e.g. 16-bit and 32-bit offsets on i8086
git-svn-id: trunk@38141 -
2018-02-06 16:22:41 +00:00
nickysn
24d447716e
* fixed support for access from inline asm to absolute vars, pointing to an
...
array element (previously, it would always point to the start of the array)
git-svn-id: trunk@37558 -
2017-11-06 16:06:34 +00:00
nickysn
9450beb99c
* fixed bug in intel syntax i8086 inline asm, when certain 'jmp/call [v]'
...
instructions got erroneously converted to 'jmp/call v', if 'v' is an external
far variable that points to certain things (like a local label, exported via
public)
git-svn-id: trunk@37538 -
2017-10-31 16:49:38 +00:00
nickysn
d318ab086a
* when handling absolute vars from within intel inline assembly, take the
...
absolute var size into account (not the type of the var it points to or no
size at all, if it points to a fixed address)
git-svn-id: trunk@37525 -
2017-10-26 15:58:48 +00:00
nickysn
325e66287c
* fix for inline asm of instructions with 32-bit constant operands on i8086
...
git-svn-id: trunk@37519 -
2017-10-25 18:03:22 +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
Jonas Maebe
744facb7fc
* properly support accepting register parameters of assembler routines in
...
the intel assembler reader: no longer parse them as register tokens,
but as local operands that are later converted into registers. This
ensures in particular that the type of the operand is set, which is
necessary in case this operand later subscripted (as in tasm10a)
git-svn-id: trunk@36288 -
2017-05-21 20:17:15 +00:00
Jonas Maebe
aa82e00615
* fixed check to determine whether a record parameter can be subscripted
...
directly in inline assembly: that's only possible if it's a register
parameter where the address of the record was passed (rather than the
record itself), or if a parameter has been explicitly typecasted in
Intel-style assembly using ".size"
git-svn-id: trunk@35959 -
2017-04-26 19:43:35 +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
Jonas Maebe
aa1be3276f
- removed default value of _typ parameter of TAsmData.(Weak)RefAsmSymbol():
...
it was AT_NONE, which is invalid and should never be used
* explicitly pass the correct value for all calls to those methods elsewhere
in the compiler
git-svn-id: trunk@34250 -
2016-08-05 07:09:16 +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
2e0fea94b8
* set operand size information when accessing fields in assembly
...
(mantis #29096 )
git-svn-id: trunk@32567 -
2015-12-02 15:53:22 +00:00
nickysn
ba66456bdb
* properly determine the operand size for inline assembler references to procvar
...
variables without a manually specified size override such as 'dword ptr'.
Mantis #29010 .
git-svn-id: trunk@32379 -
2015-11-20 16:29:40 +00:00
nickysn
9e110e8e7e
* treat interrupt procedures as 'near' in the i8086 inline assembler for TP7
...
compatibility
git-svn-id: trunk@32194 -
2015-10-29 22:43:41 +00:00
nickysn
dd9e5ea6f6
* convert 'call/jmp [proc]' properly to a near or far call/jmp, depending on
...
proc's call model
git-svn-id: trunk@32193 -
2015-10-29 22:05:09 +00:00
nickysn
ef5e368327
+ support local label data access in the i8086 inline asm (fixes test tlbldat1.pp)
...
git-svn-id: trunk@32179 -
2015-10-28 17:22:37 +00:00
nickysn
cb36b2d3bd
* i8086 inline asm: convert 'call symbol' to 'call far symbol' only for symbols
...
that are an entry point of a function with a far call model
git-svn-id: trunk@32169 -
2015-10-28 00:17:54 +00:00
nickysn
e9c790f4eb
+ support 'SEG' in the i8086 inline assembler
...
git-svn-id: trunk@31428 -
2015-08-26 15:57:44 +00:00
Jonas Maebe
67b8aceaee
* synchronized with privatetrunk till r30095
...
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Jonas Maebe
00b819307a
+ condition and shifterop operands for AArch64 assembler reader
...
git-svn-id: trunk@29895 -
2015-02-23 22:51:38 +00:00
florian
726a78be08
* fix possible range check errors, resolves #27461
...
git-svn-id: trunk@29743 -
2015-02-17 21:14:47 +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
sergei
475a9e1617
* Asm readers: allow using procedure symbols in references, resolves #22376 .
...
* rax86int.pas: reject RIP-relative references to locals/parameters.
git-svn-id: trunk@29087 -
2014-11-17 05:34:55 +00:00
sergei
42d251da1c
- x86 assembler readers: cleaned out operand swapping code. Operands of TInstruction are kept in AT&T order, Intel reader attaches operands right-to-left. It was effectively the same way before the change (except Intel reader attaching operands left-to-right, followed by a single swap), operand order checks all over the place were just reducing readability.
...
git-svn-id: trunk@29081 -
2014-11-16 16:37:26 +00:00
Jonas Maebe
b18ba8e85b
* syncrhonised with trunk up till r28471
...
git-svn-id: branches/hlcgllvm@28495 -
2014-08-19 20:23:11 +00:00
Jonas Maebe
4005290b54
* aint -> asizeint (immediate operand vs offset size)
...
git-svn-id: trunk@28459 -
2014-08-18 23:00:17 +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
sergei
5c48804240
* Moved local label infrastructure into tasmreader, reduces number of global vars. Functionality is not changed.
...
git-svn-id: trunk@27477 -
2014-04-05 09:43:13 +00:00