Commit Graph

141 Commits

Author SHA1 Message Date
pierre
acf2567bda Second trial to fix commit 48688
git-svn-id: trunk@48691 -
2021-02-17 09:46:37 +00:00
pierre
34fd36f817 Fix previous commit 48688 to avoid accessing 'invalid' positions in sym.value.valueptr
git-svn-id: trunk@48689 -
2021-02-17 07:09:55 +00:00
pierre
6a408fe97e Avoid writing characters after sym.value.len for conststring constant symbols
git-svn-id: trunk@48688 -
2021-02-16 23:15:08 +00:00
pierre
4fd1c9ec42 Correct check of stringtype inside use_tag_prefix function
git-svn-id: trunk@48140 -
2021-01-11 22:17:09 +00:00
svenbarth
b8578f804f * fix compilation on targets that use Stabs debug information: ignore generic dummy symbols with no procdefs for generating stabs data
git-svn-id: trunk@48007 -
2021-01-03 12:11:44 +00: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
Jonas Maebe
e7d1a77f9a * rename the ARM/AArch64-Darwin targets to ARM/AArch64-iOS
* rename the m68k/PowerPC-MacOS targets to m68k/PowerPC-MacOSClassic
  * repurpose the AArch64/Darwin target for AArch64/macOS
   o make AArch64-Darwin default target for a hosted AArch64-Darwin compiler

git-svn-id: trunk@45758 -
2020-07-10 21:52:24 +00:00
nickysn
3d81dd0b00 * ReplaceForbiddenAsmSymbolChars renamed ApplyAsmSymbolRestrictions, because now it also applies the
label length limit

git-svn-id: branches/z80@45085 -
2020-04-26 10:42:07 +00:00
Jonas Maebe
1a9e246c29 * added is_normal_fieldvarsym() helper and use it
o fixes several places where there was a check whether something is a
     fieldvarsym, but not whether it's an instance rather than a class field

git-svn-id: trunk@43786 -
2019-12-24 22:12:44 +00:00
pierre
14b9032ef2 Use use_tag_types everywhere to get consistent results for 'Tt' versus 't' for stabs for string definitions
git-svn-id: trunk@42199 -
2019-06-09 20:59:06 +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
0b61b5d4cf * added extra header to ppu inside a subsection, so we won't run into
trouble when the ppu version hits 255
  * also moved several ppu flags to a set inside that section

git-svn-id: trunk@41846 -
2019-04-06 21:28:43 +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
florian
6a2cb0bbbd * more compilation fixes
git-svn-id: trunk@39350 -
2018-06-30 12:48:54 +00:00
pierre
6f6139609d Add explicit '.set nompis16' at front of stabs debug information to solve bug report 32138
git-svn-id: trunk@36781 -
2017-07-24 07:31:31 +00:00
svenbarth
3a9f8e88fd * don't write or reference debug information for a unit if it belongs to a/another package
git-svn-id: trunk@34382 -
2016-08-26 15:09:24 +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
3177199d94 * changed all debug info labels from AT_DATA to AT_METADATA
git-svn-id: trunk@34150 -
2016-07-19 11:57:52 +00:00
Jonas Maebe
d44100448c * add support in the debug info for the dummy s128bit/u128bit types added
in r32735 (mantis #29259)

git-svn-id: trunk@32758 -
2015-12-27 11:45:24 +00:00
florian
64dafdb1de * stabn writing code simplified
* write 0 instead of "label-label" in stabn, arm thumb assemblers do not like "label-label", for other targets writing 0 should make no difference

git-svn-id: trunk@28539 -
2014-08-30 16:56:01 +00:00
pierre
0d3bccaa1b Do not consider ansi/wide/unicode strings as taggable for stabs
git-svn-id: trunk@27637 -
2014-04-22 22:32:14 +00:00
pierre
356ea656e4 Try to avoid problems with generic types for stabs/stabx
git-svn-id: trunk@27635 -
2014-04-22 21:28:45 +00:00
pierre
b258b6dc04 Fix constant string stabx writing
git-svn-id: trunk@27626 -
2014-04-21 21:02:55 +00:00
florian
4d5119bf1c * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
paul
51825b6f2e compiler: change ret_in_param to accept tabstractprocdef instead of tproccalloption to allow check more options (required for record constructor implementation)
git-svn-id: trunk@23394 -
2013-01-16 01:14:23 +00:00
Jonas Maebe
eeb98ae2f8 * write objectdef fieldtypes in appenddef_object() instead of in
beforeappenddef() to prevent endless loops in certain circular
    class reference situations (mantis #22527)

git-svn-id: trunk@22233 -
2012-08-24 16:52:46 +00:00
Jonas Maebe
df2eddd169 * correctly deal with writing debug information in the Stabs writer for class
hierarchies from other units that were compiled without debug information
    in case not all classes from the hierarchy are explicitly used
    (mantis #22495, #21503, #21259)

git-svn-id: trunk@21972 -
2012-07-26 14:27:10 +00:00
pierre
84214d1249 * Use mips_extra_offset function to give offsets expected by GDB for MIPS cpu
git-svn-id: trunk@21588 -
2012-06-12 22:57:19 +00:00
Jonas Maebe
14cfe770a4 * replaced most (if not all) remaining fields/parameters in the compiler
that deal with paths/filenames with TPathStr (= ansistring) to prevent
    cutting off long paths (no change in speed when compiling the compiler,
    1% extra memory usage)

git-svn-id: trunk@21120 -
2012-04-29 17:36:23 +00:00
Jonas Maebe
834026bfb5 * synchronised with trunk up to r21067
git-svn-id: branches/jvmbackend@21068 -
2012-04-26 21:24:20 +00:00
Jonas Maebe
6502717e67 * align all code/data sections to sizeof(pint), instead of sometimes
to 0 or 1 (section alignment <> alignment of individual data
    elements in section on some platforms, such as AIX)
  * set constalignmin and varalignmin to 8 bytes for AIX/ppc64

git-svn-id: trunk@21044 -
2012-04-25 20:27:41 +00:00
pierre
84cd32a593 * Add more explicit sizes for array types
git-svn-id: trunk@20948 -
2012-04-20 22:22:29 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
Jonas Maebe
210eac085a * do not perform stabstr replacements on mangled names of typed constants
(fixes stabs after r20842)

git-svn-id: trunk@20855 -
2012-04-12 16:13:27 +00:00
Jonas Maebe
247033cce1 + stabx support for AIX, which is a variant of stabs. Note that we only
support the stabx as understood by gdb, which is a mixture of regular
    stabs and stabx (e.g., class/object definitions are completely different
    in real stabx). This means that gdb can be used to debug aix programs,
    but the native dbx will complain about lots of debug information
    constructs

git-svn-id: trunk@20842 -
2012-04-11 18:06:38 +00:00
Jonas Maebe
ac43eb9b70 + generic implementation of ReplaceForbiddenAsmSymbolChars() instead
of the AVR-specific ifdef'ed variant
   o since the only special character we use in mangled names on all platforms
     is $, added a new field to tasminfo called "dollarsign" that holds the
     character $'s should be replaced with (if it doesn't have to be replaced,
     leave it at $)

git-svn-id: trunk@20801 -
2012-04-11 18:01:57 +00:00
florian
f1f0cb033a * move ReplaceForbiddenChars to cpubase of avr so it can be used in dbgstabs as well
* tried to fix dbgstabs so that it doesn't emit illegal chars using ReplaceForbiddenChars, however, dbgstabs accesses symbol names quite often, so this failed

git-svn-id: trunk@18972 -
2011-09-04 19:36:43 +00:00
Jonas Maebe
67c2c7c166 * renamed cchartype to cansichartype
git-svn-id: branches/jvmbackend@18779 -
2011-08-20 08:35:24 +00:00
Jonas Maebe
28740dce2d - removed extra "fordefinition" parameter again from tprocdef.mangledname(),
since the definition-specific adorning of JVM mangled names is Jasmin-
    specific, and such code has no place in symdef
  * moved code to adorn JVM mangled names for Jasmin definitions to agjasmin

git-svn-id: branches/jvmbackend@18346 -
2011-08-20 07:49:31 +00:00
Jonas Maebe
0ee702b3a2 * tprocdef.mangledname now gets an extra boolean parameter indicating
whether the mangled name is for defining a symbol, or for referencing
    it later (e.g. for a call or load of its address). The reason is that
    on the JVM both cases are different.
  + jvmdef unit to encode types according to the JVM rules
  + tprocdef.jvmmangledname() to encode a procdef's JVM mangled name
    (the common part of defining/referencing it; tprocdef.mangledname
     afterwards adorns it as required)

git-svn-id: branches/jvmbackend@18288 -
2011-08-20 07:22:00 +00:00
florian
8bc94610c7 + tai_stab.create_ansistr
* write vmt info using create_ansistr, resolves #20003
* replaced move/getmem sequences in dbgstabs.pas by create_ansistr

git-svn-id: trunk@18230 -
2011-08-16 20:27:54 +00:00
florian
d35d1ed357 + initial support for pascal booleans with sizes 2, 4 and 8
git-svn-id: branches/pasboolxx@17836 -
2011-06-26 15:02:37 +00:00
svenbarth
35b47e491c Rebase to revision 17306
git-svn-id: branches/svenbarth/classhelpers@17314 -
2011-04-13 10:04:14 +00:00
florian
4d19f6c532 * patch by Jeppe Johansen to be able to generate debug info if an rtl without variant support is used, resolves #18483
git-svn-id: trunk@17300 -
2011-04-10 21:11:03 +00:00
svenbarth
96116a6c3a Several adjustments because virtual methods in helpers are just normal methods and a VMT isn't generated for them either.
* $CPU/cgcpu.pas: disable the generation of VMT loading code
* dbgstabs.pas, dbgdwarf.pas: treat virtual methods of helpers as normal methods
* ncgcal.pas: don't register virtual helper methods for WPO 
* ncgrtti.pas: write virtual helper methods as normal methods to RTTI
* nobj.pas: correctly handle final and override cases in helpers
* pdecvar.pas: property getters
* rautils.pas: no VMT offset in records

git-svn-id: branches/svenbarth/classhelpers@17150 -
2011-03-20 10:41:45 +00:00
svenbarth
80e6498921 Rebase to revision 17096
git-svn-id: branches/svenbarth/classhelpers@17099 -
2011-03-09 16:29:47 +00:00
florian
26fbfaf5a7 + introduce the usage of asizeint/asizeuint for cpus with sizeof("alu")<>sizeof(pointer)
git-svn-id: trunk@17011 -
2011-02-26 20:10:03 +00:00
paul
915c412ae3 compiler: generate debug info for record methods:
- extended write_symtable_procdefs to handle record definitions
  - fix stabs info generator to use prefixed symbol names for record methods, also handle records static symbols the same way as for object types
  - fix dwarf info record generation: add visibility info and write methods, also prefix record members the same way as object members

git-svn-id: branches/paul/extended_records@16570 -
2010-12-16 06:12:05 +00:00
paul
289c9bd192 compiler: remove unneeded checks and typecasting caused by move of objectoptions into tabstractrecorddef
git-svn-id: branches/paul/extended_records@16542 -
2010-12-11 07:00:46 +00:00
paul
56bf42de57 compiler: implement record methods and class methods:
- rename tprocdef._class to tprocdef.struct and change the type from tobjectdef to tabstractrecorddef because methods can belong not to classes only now but to records too
  - replace in many places use of current_objectdef to current_structdef with typcast where is needed
  - add an argument to comp_expr, expr, factor, sub_expr to notify that we are searching type only symbol to solve the problem with records,objects,classes which contains fields with the same name as previosly declared type (like:
  HWND = type Handle;
  rec = record 
    hWnd: HWND;
  end;)
  - disable check in factor_read_id which was made for object that only static fields can be accessed as TObjectType.FieldName outside the object because it makes SizeOf(TObjectType.FieldName) imposible and since the same method was extended to handle records it also breaks a52 package compilation
  - rename tcallcandidates.collect_overloads_in_class to tcallcandidates.collect_overloads_in_struct and addapt the code to handle overloads in records too
  - fix searchsym_type to search also in object ancestors if we found an object symtable
  - add pd_record, pd_notrecord flags to mark procedure modifies which can or can't be used with records. Disallow the next modifiers for records: abstract, dynamic, export, external, far, far16, final, forward, internconst, internproc, interrupt, message, near, override, public, reintroduce, virtual, weakexternal,
Allow the next modifiers for records: static

git-svn-id: branches/paul/extended_records@16526 -
2010-12-09 02:24:46 +00:00