Pierre Muller
a4240a0c62
Fix compilation of i8086/n8086add.pas unit after introduction of get_int_value function
2024-04-17 07:52:05 +00:00
florian
f29ff58ab9
+ get_int_value
2024-04-16 23:11:16 +02:00
J. Gareth "Curious Kit" Moreton
b804fc5164
* Flags specific to TAddNode have been moved to their own field
2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
2dc0995067
- Bug fix to new ADD/SUB optimisation where conditions are concerned
...
- Register allocation fixes for overflow checks
2021-11-17 20:18:57 +00:00
Yuriy Sydorov
b78761efd3
* Removed obsolete OLDREGVARS ifdefs.
2021-11-02 17:08:08 +02:00
florian
637976e83f
* patch by Marģers to unify internal error numbers, resolves #37888
...
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
yury
2186846ab1
* 8086: Fixed an internal error for cases like FarPtr2 := FarPointer($12345678) + int16;
...
git-svn-id: trunk@46477 -
2020-08-18 09:19:20 +00:00
Jonas Maebe
ce598c15ec
* factored out the conditions under which add nodes need to perform
...
overflow checks
o in particular ensure that cpu-specific overrides don't perform overflow
checks when nf_internal is set
git-svn-id: trunk@42573 -
2019-08-03 12:19:50 +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
0b246f3dbd
* converted Boolean8 to an internal type, and mapped Boolean to the
...
new internal pasbool1(type) (part of mantis #34411 )
o apply the _Bool x86-64 parameter passing rules only to pasbool1
git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
nickysn
ddba821561
* GetNextReg(), used by 16-bit and 8-bit code generators (i8086 and avr) moved
...
from cpubase unit to a method in the tcg class. The reason for doing that is
that this is now a standard part of the 16-bit and 8-bit code generators and
moving to the tcg class allows doing extra checks (not done yet, but for
example, in the future, we can keep track of whether there was an extra
register allocated with getintregister and halt with an internalerror in case
GetNextReg() is called for registers, which weren't allocated as a part of a
sequence, therefore catching a certain class of 8-bit and 16-bit code
generator bugs at compile time, instead of generating wrong code).
- removed GetLastReg() from avr's cpubase unit, because it isn't used for
anything. It might be added to the tcg class, in case it's ever needed, but
for now I've left it out.
* GetOffsetReg() and GetOffsetReg64() were also moved to the tcg unit.
git-svn-id: trunk@37180 -
2017-09-11 14:53:06 +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
nickysn
863daace35
+ implemented correct simplification of far pointer comparison of two pointer const nodes
...
git-svn-id: trunk@32122 -
2015-10-22 14:07:45 +00:00
florian
79619df936
+ use the or instruction to compare 32 bit values with 0
...
git-svn-id: trunk@31862 -
2015-09-27 20:50:59 +00:00
Jonas Maebe
0fc1fd6ac1
* replaced current_procinfo.currtrue/falselabel with storing the true/false
...
labels of LOC_JUMP in the node's location. This generates some extra jumps
for short circuit boolean and/or-expressions if optimizations are off, but
with optimisations enabled the generated code is the same (except for JVM
because the jump threading optimisation isn't enabled there yet).
git-svn-id: trunk@31431 -
2015-08-27 18:28:57 +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
Károly Balogh
dd67fa8c5c
* fixed DFA warnings for i8086
...
git-svn-id: trunk@28504 -
2014-08-20 15:49:27 +00:00
nickysn
4ea551a0f7
* is_farpointer and is_hugepointer moved from defutil to symcpu
...
git-svn-id: trunk@28328 -
2014-08-06 20:32:41 +00:00
nickysn
99c555cea8
+ implemented huge pointer subtraction
...
* the result of far pointer subtraction changed to word (for TP7 compatibility)
git-svn-id: trunk@28218 -
2014-07-13 23:40:43 +00:00
nickysn
200df7a136
* set expectloc correctly for far pointer comparison as well
...
git-svn-id: trunk@28217 -
2014-07-13 16:25:20 +00:00
nickysn
04234c733f
* set expectloc correctly (LOC_JUMP instead of LOC_FLAGS) for non-normalized
...
huge pointer comparison
git-svn-id: trunk@28216 -
2014-07-13 15:20:58 +00:00
nickysn
5818451bb5
* non-normalized huge pointer comparison made unsigned
...
git-svn-id: trunk@28214 -
2014-07-13 12:54:12 +00:00
nickysn
8604372da3
+ implemented far pointer comparison operating only on the offset (+ added test)
...
git-svn-id: trunk@28179 -
2014-07-06 22:45:19 +00:00
nickysn
3bb730d5b9
+ implemented normalized huge pointer comparison
...
git-svn-id: trunk@28157 -
2014-07-04 23:22:33 +00:00
nickysn
aee568e6fc
* cs_hugeptr_normalization renamed to cs_hugeptr_arithmetic_normalization,
...
because we're going to also introduce cs_hugeptr_comparison_normalization as
an independent option
git-svn-id: trunk@28149 -
2014-07-04 13:14:06 +00:00
nickysn
d9e94ffab7
+ implemented huge pointer arithmetic
...
git-svn-id: trunk@28139 -
2014-07-03 16:53:22 +00:00
nickysn
9f2e59de3a
+ implemented far pointer arithmetic in the i8086 add node simplify method
...
git-svn-id: trunk@27495 -
2014-04-06 18:51:53 +00:00
nickysn
8d1ed088c8
+ implemented far pointer arithmetic (operating only on the offset, without
...
touching the segment)
git-svn-id: trunk@27485 -
2014-04-06 13:12:29 +00:00
nickysn
2602f379d7
* fixes in the 16 to 32-bit multiplication in ti8086addnode.second_mul
...
git-svn-id: trunk@26497 -
2014-01-18 00:38:46 +00:00
nickysn
3f4111ac37
* emit MUL instead of IMUL in ti8086addnode.second_mul when overflow checking is
...
off and the multiplication is 16->16
git-svn-id: trunk@26495 -
2014-01-17 23:04:46 +00:00
nickysn
2a64ba0ad3
* do a 32-bit comparison on far and huge pointers
...
git-svn-id: trunk@25110 -
2013-07-16 07:57:49 +00:00
nickysn
ec76b2cf40
* refactored the segment-in-integer-register reference support, so it's handled in make_simple_ref, instead of all over the place in the code generator
...
git-svn-id: trunk@24752 -
2013-06-01 22:18:09 +00:00
nickysn
1e8b192b3d
* support far references in second_cmp32bit for i8086
...
git-svn-id: trunk@24736 -
2013-06-01 17:51:18 +00:00
nickysn
10b3ce1ba5
* fixed an opsize bug in ti8086addnode.second_add64bit, which caused 32-bit instructions to be emitted
...
git-svn-id: trunk@24670 -
2013-05-31 17:13:38 +00:00
nickysn
5dd5add67a
* proper implementation of ti8086addnode.second_cmp64bit
...
git-svn-id: branches/i8086@23871 -
2013-03-16 19:01:15 +00:00
nickysn
56d2830beb
+ implemented 32-bit comparisons on the i8086
...
git-svn-id: branches/i8086@23870 -
2013-03-16 18:13:11 +00:00
nickysn
c438f3b53a
* 386 changed to 8086 in various class names and comments
...
git-svn-id: branches/i8086@23813 -
2013-03-12 23:22:52 +00:00
nickysn
ea282ab4b3
* many int64 fixes
...
git-svn-id: branches/i8086@23812 -
2013-03-12 23:18:36 +00:00
nickysn
d0c43f50f0
* fixed ti8086addnode.second_add64bit
...
git-svn-id: branches/i8086@23809 -
2013-03-12 16:25:44 +00:00
nickysn
2872fb95b5
* i8086 multiplication fixes; 16-bit multiplication now works; 32-bit still doesn't
...
git-svn-id: branches/i8086@23795 -
2013-03-11 22:31:17 +00:00
nickysn
8d346d162b
added n8086add.pas (copy of n386add.pas), TODO: adapt to i8086
...
git-svn-id: branches/i8086@23762 -
2013-03-09 23:17:23 +00:00