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
pierre
019da9517f
Set return value when calling inherited in ti8086inlinenode.pass_typecheck_cpu
...
git-svn-id: trunk@39100 -
2018-05-23 20:43:40 +00:00
nickysn
5417eb043d
* fix for the encoding of dwarf debug info of local variables, whose base is a
...
register that has a dwarf register number higher than 31
git-svn-id: trunk@39099 -
2018-05-23 15:58:51 +00:00
nickysn
e5de7d0eac
* set all 16/32-bit specific stabs/dwarf register numbers of x86_64-only
...
registers to -1 in x86reg.dat. The values that used to be there weren't used
at all (most were just copies of the 32-bit version of the register). This can
be easily demonstrated by the fact that running 'make regdat' in the compiler
directory doesn't change any of the generated files for i8086/i386/x86_64.
git-svn-id: trunk@39098 -
2018-05-23 15:29:33 +00:00
nickysn
a275d15da2
+ added an i8086-specific column in x86reg.dat for the dwarf register numbers
...
and filled it with the dwarf register mapping, used by Open Watcom (Watcom
also uses this mapping on i386, but we don't need to support their debugger on
i386 for now)
git-svn-id: trunk@39097 -
2018-05-23 15:12:58 +00:00
nickysn
6f44deb557
+ implemented the -Xg option for putting the debug information in a separate
...
file on i8086-msdos and i8086-win16
git-svn-id: trunk@39096 -
2018-05-22 15:33:26 +00:00
nickysn
0a01c0c76f
* autoswitch to writing 32-bit SEGDEF OMF records if there's a need to encode a
...
32-bit segment length
git-svn-id: trunk@39095 -
2018-05-22 14:03:59 +00:00
nickysn
70be0dc6e9
* changed internal error number to make it unique
...
git-svn-id: trunk@39094 -
2018-05-22 13:49:40 +00:00
nickysn
8c842c1337
* changed the type of the 'size' parameter of TOmfObjOutput.AddSegment to
...
TObjSectionOfs instead of aword
git-svn-id: trunk@39093 -
2018-05-22 13:48:55 +00:00
nickysn
f5862efcd4
+ support writing 32-bit LEDATA OMF records
...
git-svn-id: trunk@39092 -
2018-05-22 13:23:56 +00:00
nickysn
99f2f3d4b6
* changed the TObjRelocation.DataOffset and orgsize types to TObjSectionOfs instead of aword
...
git-svn-id: trunk@39091 -
2018-05-22 13:17:35 +00:00
nickysn
dcdfecbf35
* changed internal error number to make it unique
...
git-svn-id: trunk@39090 -
2018-05-22 12:55:53 +00:00
nickysn
a656d98657
* autoswitch to writing 32-bit PUBDEF OMF records if there's a need to encode a
...
32-bit offset
git-svn-id: trunk@39089 -
2018-05-22 12:54:11 +00:00
nickysn
ca50b14e21
* set the omf section size limit to 32-bit for the dwarf debug sections
...
git-svn-id: trunk@39088 -
2018-05-22 12:41:51 +00:00
nickysn
065a7b63d9
* changed the TObjSectionOfs type to be longword on i8086
...
+ introduced the TObjSection.SizeLimit property. This will allow setting
different size limits for different sections (e.g. 32-bit for the dwarf
sections, 16-bit for the regular code and data sections on i8086).
git-svn-id: trunk@39087 -
2018-05-22 09:48:28 +00:00
nickysn
584635c591
+ introduce align_objsecofs; use it to align integers of type TObjSectionOfs
...
git-svn-id: trunk@39086 -
2018-05-22 00:20:21 +00:00
nickysn
f9748e928b
* also changed the type of the 'DataPos' parameter of TObjData.layoutsections to TObjSectionOfs
...
git-svn-id: trunk@39085 -
2018-05-21 16:48:56 +00:00
nickysn
04129b8c6e
+ introduce the TObjSectionOfs type - an unsigned integer, representing an
...
offset in an obj file section on the current platform; equal to PUInt for now,
but will probably change to LongWord on i8086, in order to support 32-bit
sections (needed for dwarf debug info or when linking with 32-bit object files
in a mixed 16-bit/32-bit application, while using the internal linker)
git-svn-id: trunk@39084 -
2018-05-21 16:31:50 +00:00
florian
8f472d5212
* check for more controll flow statements before doing loop unrolling
...
git-svn-id: trunk@39083 -
2018-05-21 15:46:02 +00:00
nickysn
308e439d5d
+ emit segment information in the dwarf debug info for static variables on i8086
...
git-svn-id: trunk@39082 -
2018-05-21 15:30:58 +00:00
nickysn
76ff01beda
+ also emit the non-standard DW_LNE_set_segment watcom extended opcode in the
...
dwarf line info on i8086
git-svn-id: trunk@39081 -
2018-05-21 14:54:11 +00:00