record field). This makes e.g.
test [di + recordtype], 1
work and use the size of recordtype to determine the operand size; recordtype
itself is evaluated to 0, so if recordtype's size is 2 bytes, the above
instruction assembles as:
test word ptr [di], 1
Ugly, but TP7 compatible.
git-svn-id: trunk@38176 -
which allows const symbol expressions to also have a size sometimes. Why?
Because TP7 (and perhaps Delphi) allows not specifying the size in e.g.
test [di+recordtype.recordfield], 1
in this case, the operand size (byte ptr, word ptr, dword ptr, qword ptr) is
determined by the size of recordtype.recordfield; this already happens with
variables, but in this case, this is a type.field, which is resolved to a
constant.
This commit only adds a dummy 'size' parameter, which is always initialized to
0 and not used. The actual implementation of the above will follow in separate
commits.
git-svn-id: trunk@38173 -
tx86intreader.BuildConstSymbolExpression; it returns whether the 'OFFSET'
keyword has been used in the expression. This will be used for disambiguation
between 'dd xx' and 'dd offset xx', because they should produce different
results on i8086 (the first generates a far pointer, i.e. the same as
'dw xx, SEG xx', the second - a 32-bit offset)
git-svn-id: trunk@38147 -
inline assembly, and fixed check after r35959 (mantis #32318)
o can also subscript parameters passed by value on the stack
o can also subscript local variables, the parameters passed by reference
that are subsequently copied into a local
git-svn-id: trunk@37886 -
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 -
* 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 -
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 -
determine whether it's in a register if it's a pure assembler routine
* you can't "index" implicit pointers either using their fields
git-svn-id: trunk@36287 -
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 -
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)
git-svn-id: trunk@35424 -
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 -
o 'DB SEG symbol' produces an error
o 'DD SEG symbol' (and anything larger than DW, like DQ) adds extra high zeros
to the segment constant (this is Turbo Pascal 7 compatible)
git-svn-id: trunk@32283 -
the i8086, as 'near' and 'far' actually work there. Some forms may even work
on the i386, but that's not tested very well for now, so we leave the messages
there on i386 and x86_64.
git-svn-id: trunk@32195 -