svenbarth
be0d51d64c
* allow $MinEnumSize, $PackSet and $PackRecords to be used with $Push and $Pop
...
+ added tests
git-svn-id: trunk@39215 -
2018-06-12 19:40:45 +00:00
svenbarth
da672d1344
* instead of using separate booleans use a set to keep track of pending changes for popped settings
...
git-svn-id: trunk@39214 -
2018-06-12 19:40:41 +00:00
nickysn
b3e4ace4e3
* fixed compilation of .com files in the i8086 tiny memory model, when used with
...
section based smartlinking
git-svn-id: trunk@39213 -
2018-06-12 00:38:51 +00:00
nickysn
420a57ddc6
* use upper case OMF section names when using i8086 section-based smart linking
...
git-svn-id: trunk@39212 -
2018-06-12 00:14:08 +00:00
nickysn
b9ab9e5782
+ initial (experimental) implementation of section-based smartlinking for i8086.
...
Use -dI8086_SMARTLINK_SECTIONS to enable.
git-svn-id: trunk@39211 -
2018-06-11 16:56:33 +00:00
nickysn
bfdd75eabf
+ support AB_LOCAL symbols in OMF object files, by implementing support for
...
LPUBDEF/LPUBDEF32 OMF records
git-svn-id: trunk@39210 -
2018-06-11 15:29:23 +00:00
nickysn
188e9ff64a
* only read the first OMF record in TOmfLibObjectWriter.closefile, since we no
...
longer copy the entire file there, so we parse the file only to get the module
name, and the THEADR record should always be the first record in the OMF file.
git-svn-id: trunk@39198 -
2018-06-08 14:21:18 +00:00
nickysn
3f5577077a
* automatically create omf libraries with the smallest page size possible. This
...
greatly reduces the size of i8086 snapshots by keeping the amount of padding
in the library files to the minimum.
git-svn-id: trunk@39195 -
2018-06-07 22:27:47 +00:00
nickysn
345713c1fa
* refactored omf library writing, so that the whole library is written in
...
TOmfLibObjectWrite.WriteLib, after determining the page size (currently still
fixed to 512 bytes). Prerequisite for OMF lib page size optimization.
git-svn-id: trunk@39194 -
2018-06-07 22:11:03 +00:00
nickysn
00c6826896
* moved the PageNum property of TOmfLibObjectWriter.TOmfLibDictionaryEntry to
...
TOmfLibObjectWriter.TOmfLibObjectModule. Instead, store the module index (in
FObjectModules) in TOmfLibDictionaryEntry. This is a prerequisite for
implementing OMF library page size optimization.
git-svn-id: trunk@39193 -
2018-06-07 18:32:50 +00:00
nickysn
4bcfe8dbb2
* refactored TOmfLibObjectWriter, so it keeps all object modules in a
...
TFPObjectList. This will allow implementing omf library page size optimization
later.
git-svn-id: trunk@39192 -
2018-06-07 15:03:05 +00:00
nickysn
af5e6e182d
* the TOmfLibDictionaryEntry class in unit owomflib converted to two identical
...
nested classes inside TOmfLibObjectWriter and TOmfLibObjectReader. The reason
is I'm planning to change the class, used in TOmfLibObjectWriter, but not the
one in TOmfLibObjectReader. And using nested classes keeps things clean and
avoids exposing implementation details in the interface of the owomflib unit.
* also changed 'private' to 'strict private' in the classes of the owomflib to
reduce the risk of interference between TOmfLibObjectWriter and TOmfLibObjectReader.
git-svn-id: trunk@39191 -
2018-06-07 12:24:36 +00:00
Károly Balogh
bbbaa39d79
ncginl: another approach to fix the same issue #39184 supposed to address. keep left.resultdef, but try to make the target def always ordinal of an equal size, so it ends up in a data register on m68k
...
git-svn-id: trunk@39188 -
2018-06-07 06:43:02 +00:00
Károly Balogh
3286623c3c
ncginl: revert the previous commit, it seems to cause some issues on other CPUs
...
git-svn-id: trunk@39186 -
2018-06-07 06:21:46 +00:00
Károly Balogh
42efddc481
ncginl: in inc/dec, do not use left.resultdef as the dest to force a register location, because if left is a pointer, then an ordinal value might get forced into an address register on m68k, which results in a lot of unnecessary register shuffling to complete the operation
...
git-svn-id: trunk@39184 -
2018-06-07 06:04:19 +00:00
Károly Balogh
ddf8788c7a
m68k: try to generate better code from some pointermath - when the left is an address register and we do add/sub, also allocate an address register as temp, also only require that left and right sizes are same, when right is not a const
...
git-svn-id: trunk@39174 -
2018-06-05 16:45:02 +00:00
nickysn
e6a8c058e0
* moved the handling of LIDATA OMF records (which currently only produces a
...
'LIDATA records are not supported' error) to TOmfObjInput.ReadLeOrLiDataAndFixups
git-svn-id: trunk@39171 -
2018-06-04 14:20:07 +00:00
nickysn
02fc2827e0
* TOmfObjInput.ReadLEDataAndFixups renamed ReadLeOrLiDataAndFixups
...
git-svn-id: trunk@39170 -
2018-06-04 14:10:11 +00:00
nickysn
e410a0aefb
+ support OMF FIXUPP records, containing only THREAD subrecords to occur without
...
a preceding LEDATA or LIDATA record (this is allowed by the OMF spec)
git-svn-id: trunk@39169 -
2018-06-04 14:00:36 +00:00
nickysn
002b116322
* use a case statement, instead of 'if', based on the OMF record type in
...
TOmfObjInput.ReadLEDataAndFixups. This is to allow (in the future) handling of
LIDATA records and FIXUPP records without preceding LEDATA/LIDATA. No
functional changes in this commit.
git-svn-id: trunk@39166 -
2018-06-04 13:11:55 +00:00
florian
21d785e41b
* do not unroll loops if the counter variable is accessed outside the current scope
...
git-svn-id: trunk@39163 -
2018-06-03 15:12:48 +00:00
florian
3b3e33d863
+ correctly set var state of addr and frame in raise statements, resolves #33818
...
git-svn-id: trunk@39162 -
2018-06-03 09:31:19 +00:00
florian
f03a396757
* target classic MacOS builds again
...
git-svn-id: trunk@39156 -
2018-05-31 19:31:36 +00:00
nickysn
98634899f2
+ support OMF fixups, determined by thread
...
git-svn-id: trunk@39151 -
2018-05-30 15:49:27 +00:00
nickysn
2fb73de404
+ support reading OMF files with THREAD FIXUPP subrecords; note that fixups,
...
determined by thread are still not yet implemented
git-svn-id: trunk@39150 -
2018-05-30 14:30:54 +00:00
nickysn
ebecfb1ce9
+ added a FFixupThreads property with a TOmfThreads object to TOmfObjInput
...
git-svn-id: trunk@39149 -
2018-05-30 14:10:12 +00:00
nickysn
189cba817e
+ added method TOmfSubRecord_THREAD.ApplyTo, which applies the data in the
...
current thread subrecord to a TOmfThreads object
git-svn-id: trunk@39148 -
2018-05-30 13:52:34 +00:00
nickysn
26e808e155
+ added classes for maintaining the OMF fixup thread state
...
git-svn-id: trunk@39147 -
2018-05-30 13:35:52 +00:00
nickysn
49b414ffee
+ support ugly constructs like 'DD BYTE PTR 5' in the x86 intel syntax inline
...
assembler; these are TP7 and Delphi compatible
git-svn-id: trunk@39143 -
2018-05-29 15:43:08 +00:00
nickysn
54a8d8de58
+ added class for decoding/encoding THREAD OMF subrecords
...
git-svn-id: trunk@39142 -
2018-05-29 15:05:07 +00:00
pierre
b1537a7f40
Add some more debug information to temp-generation when compiled with -dEXTDEBUG
...
git-svn-id: trunk@39141 -
2018-05-28 22:39:21 +00:00
nickysn
052da5c921
* use DW_OP_reg0..DW_OP_reg31 instead of DW_OP_regx in TDebugInfoDwarf.append_seg_reg
...
in case the dwarf register number is 31 or smaller
git-svn-id: trunk@39131 -
2018-05-28 14:21:53 +00:00
svenbarth
f077c7d950
+ add support for Unicode code point constants > $FFFF; they are converted to a surrogate pair so they are in
...
fact a UnicodeString constant
+ added tests
git-svn-id: trunk@39123 -
2018-05-27 14:06:19 +00:00
pierre
a1bbd4c02d
Try to avoid inserting all RTTI symbols into executables on targets not supporting smartlinked sections
...
git-svn-id: trunk@39121 -
2018-05-25 20:44:24 +00:00
nickysn
ad96cf758b
+ emit a DW_AT_address_class dwarf attribute on i8086 for procdefs, indicating
...
their call model (near or far)
git-svn-id: trunk@39120 -
2018-05-25 20:03:15 +00:00
svenbarth
199b5809a3
* optimize "dynarr := dynarr + [elem]" to "Insert(elem, dynarr, High(SizeInt))" and "dynarr := [elem] + dynarr" to "Insert(elem, dynarr, 0)" (we need to do this in the typecheck of taddnode as otherwise the array constructor is already converted)
...
+ added test
* adjusted test for Mantis #30463 as p1 triggers the optimization as well
git-svn-id: trunk@39119 -
2018-05-25 16:03:56 +00:00
svenbarth
85439a0fa0
* also check for nf_assign_done_in_right flag after typechecking the right side
...
git-svn-id: trunk@39118 -
2018-05-25 15:54:41 +00:00
nickysn
22e8763100
+ generate script code for creating the dwarf exe sections when using the
...
internal linker with dwarf debug info enabled on i8086-msdos
git-svn-id: trunk@39117 -
2018-05-25 15:35:17 +00:00
nickysn
f505718e6c
+ started implementing TMZExeOutput.writeDebugElf; nothing is written yet, only
...
the elf header fields are filled with the values, generated by wlink
git-svn-id: trunk@39115 -
2018-05-25 14:20:13 +00:00
nickysn
6bd99b65bf
+ emit DW_AT_frame_base dwarf attributes on i8086. Even though the Watcom
...
Debugger doesn't require them (it uses BP as the frame register by default),
the dwarf spec requires that we emit them on i8086, because we also use
DW_OP_fbreg on i8086.
git-svn-id: trunk@39112 -
2018-05-24 22:49:12 +00:00
nickysn
c5fe78201c
+ emit DW_OP_bregx dwarf ops for local variables and parameters, relative to BP
...
on i8086. This fixes Watcom Debugger not showing them right in memory models,
where DS<>SS (Watcom seems to ignore the DW_AT_segment attribute for register
relative variables, even though we emit it correctly :/ )
git-svn-id: trunk@39111 -
2018-05-24 22:27:11 +00:00
nickysn
855c810c09
+ emit a DW_AT_WATCOM_memory_model dwarf attribute, when compiling for i8086
...
git-svn-id: trunk@39110 -
2018-05-24 21:59:50 +00:00
nickysn
87e1fa8fc7
+ added enum with the values for DW_AT_WATCOM_memory_model
...
git-svn-id: trunk@39109 -
2018-05-24 21:50:55 +00:00
nickysn
dc12d4d789
+ added constants with the watcom dwarf attribute extensions
...
git-svn-id: trunk@39108 -
2018-05-24 21:49:28 +00:00
nickysn
749872aaf7
+ generate DW_AT_segment dwarf attribute for local variables and parameters on i8086
...
git-svn-id: trunk@39107 -
2018-05-24 21:30:37 +00:00
nickysn
217c75f84e
+ generate dwarf DW_AT_address_class attributes for pointer types on i8086
...
git-svn-id: trunk@39106 -
2018-05-24 20:22:59 +00:00
nickysn
76fb8c3afd
* fix for dwarf debug info generation of localsym vars with offset (thx Pierre for spotting this)
...
git-svn-id: trunk@39104 -
2018-05-24 16:31:01 +00:00
nickysn
69fbf0e0d8
* use unaligned constants, when writing the final dwarf arange record on i8086
...
git-svn-id: trunk@39103 -
2018-05-24 15:43:02 +00:00
pierre
a5a6b70658
Add tf_no_pic_supported to go32v2 target (was generating wrong code)
...
git-svn-id: trunk@39102 -
2018-05-23 21:12:56 +00:00
pierre
f80e73eac2
Remove references to sym variable when not set (revealed warning generated when compiling with -O4 option)
...
git-svn-id: trunk@39101 -
2018-05-23 20:45:21 +00:00