florian
1a69c49e81
* fix range check errors by explicit casts
...
git-svn-id: trunk@37945 -
2018-01-11 21:00:18 +00:00
nickysn
29558a74cd
+ support exporting labels from asm blocks in intel syntax asm blocks via the
...
'public' directive
git-svn-id: trunk@37530 -
2017-10-30 16:44:13 +00:00
florian
4cf2a2672a
changes to fix #32043
...
* 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 -
2017-10-06 21:07:19 +00:00
Jonas Maebe
aa82e00615
* fixed check to determine whether a record parameter can be subscripted
...
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 -
2017-04-26 19:43:35 +00:00
Jonas Maebe
aa1be3276f
- removed default value of _typ parameter of TAsmData.(Weak)RefAsmSymbol():
...
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 -
2016-08-05 07:09:16 +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
sergei
cc3e09ee46
* Handle possible relocation types in assembler reader using a single AS_RELTYPE token, rather than with individual tokens for each case. Since possible relocations are target-dependent, this will allow to support any amount of them without modifying the base tattreader class.
...
git-svn-id: trunk@33117 -
2016-02-23 21:28:46 +00:00
Jonas Maebe
110a5642c0
- removed ait_weak/tai_weak, and replaced it with the previously existing
...
asd_weak_reference/asd_weak_definition directives
git-svn-id: trunk@32879 -
2016-01-07 22:05:38 +00:00
sergei
f69f6336e9
* Replaced hacks with resetting 'c' to zero and decreasing inputpointer by boolean parameter to skipcomment and skipoldtpcomment. This parameter specifies whether first character of comment should be read.
...
- in_asm_string also rendered useless by r32828, removed.
git-svn-id: trunk@32836 -
2016-01-03 17:07:15 +00:00
sergei
bbfbab7e0c
* Moved handling of comments and line breaks in assembler blocks from scanner to tokenizer level. Handling them at character level was causing compiler to accept comments in the middle of any assembler token, which should never happen. It was also causing Mantis #27459 : a newline immediately after closing 'end' token was first handled in asmgetchar and then by normal parser, causing all subsequent line numbering to be off by one.
...
git-svn-id: trunk@32828 -
2016-01-02 06:17:14 +00:00
Jonas Maebe
8445381929
* merged ait_set and ait_thumb_set into a single tai class
...
(tai_symbolpair)
git-svn-id: trunk@30197 -
2015-03-14 18:35:28 +00:00
Jeppe Johansen
914e9e7b49
Merged from trunk
...
git-svn-id: branches/laksen/armiw@30146 -
2015-03-08 12:33:46 +00:00
Jonas Maebe
558b8967b6
+ Aarch64 assembler reader
...
git-svn-id: trunk@29913 -
2015-02-23 22:52:36 +00:00
Jonas Maebe
1dd5f579e6
* support record fields with the same name as registers in subscripts in
...
the assembler reader
git-svn-id: trunk@29822 -
2015-02-23 22:47:53 +00:00
Jeppe Johansen
7390acc426
Merged from recent trunk.
...
git-svn-id: branches/laksen/armiw@29369 -
2015-01-01 23:54:40 +00:00
sergei
d2187257e7
- removed unused type and variable
...
git-svn-id: trunk@29323 -
2014-12-25 10:25:21 +00:00
Jeppe Johansen
9e5979e8be
Implemented UAL syntax support in the ARM assembler reader. Can be toggled with a field for now, but not implemented yet. Still using pre-UAL syntax for now.
...
Switched codegeneration of VFPv2 and VFPv3 to use UAL mnemonics and syntax.
Updated VFP code in RTL to use UAL syntax too.
Added preliminary ELF support for ARM.
Added support for linking of WinCE COFF files. Should work for with a standard ARMv4-I target.
git-svn-id: branches/laksen/armiw@29247 -
2014-12-10 20:44:34 +00:00
sergei
5c48804240
* Moved local label infrastructure into tasmreader, reduces number of global vars. Functionality is not changed.
...
git-svn-id: trunk@27477 -
2014-04-05 09:43:13 +00:00
Jeppe Johansen
d89b9a4311
Add support in ARM assembler reader for ldr reg, =literal syntax
...
git-svn-id: trunk@25157 -
2013-07-21 16:06:57 +00:00
Jeppe Johansen
0977d76f42
Mark global symbols with assembler references as non-regable
...
git-svn-id: trunk@25155 -
2013-07-21 13:41:10 +00:00
sergei
d2995cbf14
- Removed ConcatPasString procedure, it duplicates ConcatString (it the past they probably used to differ, but today both preserve null characters).
...
git-svn-id: trunk@23662 -
2013-02-25 22:09:39 +00:00
florian
6fb90850e9
* lastdirective should be always AS_END
...
* changed some helper variables into aints
git-svn-id: trunk@22793 -
2012-10-21 10:03:04 +00:00
Jeppe Johansen
8e00978108
Added support for .section, .set, .weak, and .thumb_set directive for GAS assembler reader
...
IFDEF'ed JVM specific assembler directives, to prevent ait_* set to exceed 32 elements
git-svn-id: branches/laksen/arm-embedded@22580 -
2012-10-08 03:10:44 +00:00
pierre
c0690d1bdc
+ New virtual method TATTReader.HandleDollar, useful for MIPS reader
...
git-svn-id: trunk@20220 -
2012-02-02 23:45:22 +00:00
sergei
6a3fe72de9
+ Support .rva directive in AT&T reader. Put it into base class because it generally applies to all targets with COFF output, but enabled for Windows targets only (others need additional testing).
...
+ Support .seh_handlerdata directive in Win64.
git-svn-id: trunk@19546 -
2011-10-25 15:18:47 +00:00
sergei
89c0663c56
+ AT&T asmreader: added methods that can be overridden in descendant readers to handle target-specific directives.
...
git-svn-id: trunk@19364 -
2011-10-04 12:12:06 +00:00
Jonas Maebe
780e75bfac
o patch by Jeppe Johansen to fix mantis #17472 :
...
* generate add.w instead of add for thumb-2 in case one of the registers
is > r8
* add register interferences for the "add" instruction so the register
allocator can detect invalid instruction forms (even for assembler code)
* fixed error in thumb2.inc detected by the previous change
git-svn-id: trunk@16633 -
2010-12-24 15:54:39 +00:00
Jonas Maebe
025ec34e4d
+ "CExtended" type that is the same as "extended", but conforming to the
...
properties/behaviour of the equivalent of Extended in C (i.e., to
"long double" on i386 and x86_64 platforms that support a 10 byte
long double, and to "double" elsewhere)
git-svn-id: trunk@14912 -
2010-02-14 13:45:58 +00:00
tom_at_work
cc911887a8
* undo accidently committed changes from r11398
...
git-svn-id: trunk@11399 -
2008-07-18 15:33:48 +00:00
tom_at_work
6958bbfdda
* allow explicit conversion of enumeration values (in addition to integers) to object references in Delphi mode
...
git-svn-id: trunk@11398 -
2008-07-18 15:30:20 +00:00
Jonas Maebe
f36e5411af
* split cpu64bit compiler define into
...
a) cpu64bitaddr, which means that we are generating a compiler which
will generate code for targets with a 64 bit address space/abi
b) cpu64bitalu, which means that we are generating a compiler which
will generate code for a cpu with support for 64 bit integer
operations (possibly running in a 32 bit address space, depending
on the cpu64bitaddr define)
All cpus which had cpu64bit set now have both the above defines set,
and none of the 32 bit cpus have cpu64bitalu set (and none will
compile with it currently)
+ pint and puint types, similar to aint/aword (not pword because that
that conflicts with pword=^word)
* several changes from aint/aword to pint/pword
* some changes of tcgsize2size[OS_INT] to sizeof(pint)
git-svn-id: trunk@10320 -
2008-02-13 20:44:00 +00:00
florian
4151029ee5
+ .fini section support
...
git-svn-id: trunk@8174 -
2007-07-28 08:40:10 +00:00
tom_at_work
99bc1ccb75
* merged some code which was ifdefed separately for POWERPC and POWERPC64 code but is equal
...
git-svn-id: trunk@6383 -
2007-02-08 22:52:11 +00:00
Jonas Maebe
c866400823
+ support for VMTOFFSET in assembler readers to get VMT offset of virtual
...
methods (mantis #8153 )
git-svn-id: trunk@6168 -
2007-01-24 18:26:23 +00:00
Jonas Maebe
302a2a3ec2
* fixed calling qualified methods in assembler + tests for ppc/ppc64/
...
i386/x86_64
git-svn-id: trunk@6112 -
2007-01-21 22:16:42 +00:00
florian
c238bb15d1
* .init section support
...
git-svn-id: trunk@5835 -
2007-01-07 10:03:52 +00:00
yury
4092321ae9
* Compiler directives {$...} are allowed in ARM inline assembler. It fixes tb0142.pp and tb0193.pp.
...
git-svn-id: trunk@5664 -
2006-12-21 20:48:18 +00:00
peter
0557ddc342
* removed typed const, it is now handled by staticvarsym
...
* globalvarsym renamed to staticvarsym
* fixed invalid regvar use in init when the finalize also uses the var
git-svn-id: trunk@5290 -
2006-11-08 21:04:22 +00:00
peter
e17b424e28
* refactor procsym procdef list
...
git-svn-id: trunk@5210 -
2006-11-03 18:44:46 +00:00
peter
658c46b903
* remove tdictionary and tindexarray
...
* symtables based on TFPHashObjectList and TFPObjectList
* rename torddef.typ to torddef.ordtype
* rename tfloatdef.typ to tfloatdef.floattype
* rename tdef.deftype to tdef.typ
* remove obsolete browser code, browcol is kept so the ide
can still be compiled
git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
peter
1684a6fc32
* replaced tdictionary with tfphashlist
...
git-svn-id: trunk@5148 -
2006-11-01 14:26:50 +00:00
peter
3078a1927f
* remove ttype
...
* rename old ttype variables *type to *def
* rename resulttypepass to pass_typecheck
* rename pass_2 to pass_generate_code
git-svn-id: trunk@5077 -
2006-10-29 22:19:39 +00:00
peter
0ec2921bbe
* split newasmsymbol to refasmsymbol and defineasmsymbol
...
git-svn-id: trunk@3057 -
2006-03-27 11:45:18 +00:00
peter
b7fe6797bf
Merged revisions 2921-2922,2925 via svnmerge from
...
http://svn.freepascal.org/svn/fpc/branches/linker/compiler
........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines
* pass ObjectWriter to ObjectOuput
........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines
* refactor asmdata
........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines
* add cfi to asmdata
* move asmlist, asmcfi, asmdata to own unit
........
git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
785550d7e3
Merged revisions 2669,2673,2677,2683,2696,2699-2702,2704,2708,2712-2715,2718,2722-2723,2728-2730,2740,2769 via svnmerge from
...
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler
........
r2669 | peter | 2006-02-23 09:31:21 +0100 (Thu, 23 Feb 2006) | 2 lines
* add compiler dir
........
r2673 | peter | 2006-02-23 17:08:56 +0100 (Thu, 23 Feb 2006) | 2 lines
* enabled more code
........
r2677 | peter | 2006-02-24 17:46:29 +0100 (Fri, 24 Feb 2006) | 2 lines
* pe stub and headers
........
r2683 | peter | 2006-02-25 23:13:24 +0100 (Sat, 25 Feb 2006) | 2 lines
* section options cleanup
........
r2696 | peter | 2006-02-26 20:27:41 +0100 (Sun, 26 Feb 2006) | 2 lines
* fixed typecasts
........
r2699 | peter | 2006-02-26 23:04:32 +0100 (Sun, 26 Feb 2006) | 2 lines
* simple linking works
........
r2700 | peter | 2006-02-27 09:44:50 +0100 (Mon, 27 Feb 2006) | 2 lines
* internal linker script
........
r2701 | peter | 2006-02-27 12:05:12 +0100 (Mon, 27 Feb 2006) | 2 lines
* make elf working again
........
r2702 | peter | 2006-02-27 14:04:43 +0100 (Mon, 27 Feb 2006) | 3 lines
* disable dwarf for smartlinking with .a
* fix section start in new .a file
........
r2704 | peter | 2006-02-27 18:30:43 +0100 (Mon, 27 Feb 2006) | 2 lines
* stab section fixes
........
r2708 | peter | 2006-02-28 19:29:17 +0100 (Tue, 28 Feb 2006) | 2 lines
* basic work to merge stabs sections
........
r2712 | peter | 2006-02-28 23:17:48 +0100 (Tue, 28 Feb 2006) | 2 lines
* unload tmodules before linking
........
r2713 | peter | 2006-02-28 23:18:51 +0100 (Tue, 28 Feb 2006) | 2 lines
* fixed stabs linking
........
r2714 | peter | 2006-02-28 23:19:19 +0100 (Tue, 28 Feb 2006) | 2 lines
* show code and data size
........
r2715 | peter | 2006-02-28 23:25:35 +0100 (Tue, 28 Feb 2006) | 2 lines
* unload .stabs from objdata after it is merged
........
r2718 | peter | 2006-03-01 12:24:38 +0100 (Wed, 01 Mar 2006) | 3 lines
* memsize/datasize cleanup
* check for exports/resources when adding module to linker
........
r2722 | peter | 2006-03-03 09:12:20 +0100 (Fri, 03 Mar 2006) | 2 lines
* new TObjSymbol splitted from TAsmSymbol
........
r2723 | peter | 2006-03-03 14:08:55 +0100 (Fri, 03 Mar 2006) | 2 lines
* coff fixes after recent objsymbol changes
........
r2728 | peter | 2006-03-03 22:43:04 +0100 (Fri, 03 Mar 2006) | 2 lines
* fixed coff writer
........
r2729 | peter | 2006-03-04 01:10:32 +0100 (Sat, 04 Mar 2006) | 2 lines
* fix read-only opening
........
r2730 | peter | 2006-03-04 01:11:16 +0100 (Sat, 04 Mar 2006) | 2 lines
* Read edata from DLLs, basic work
........
r2740 | peter | 2006-03-04 21:13:43 +0100 (Sat, 04 Mar 2006) | 3 lines
* deletedef added
* don't remove defs from index when we are already clearing everything
........
r2769 | peter | 2006-03-05 21:42:33 +0100 (Sun, 05 Mar 2006) | 4 lines
* moved TObj classes to ogbase
* ObjSection.SymbolRefs and SymbolDefines list
* DLL importing
........
git-svn-id: trunk@2771 -
2006-03-05 21:10:37 +00:00
tom_at_work
28381b1287
* new assembler symbol type AT_LABEL needed for PowerPc64 target
...
+ added automatic definition of FPC_REQUIRES_PROPER_ALIGNMENT define for PowerPC64 target
git-svn-id: trunk@1278 -
2005-10-03 22:13:45 +00:00
peter
6bf3269b41
* powerpc64 port from Thomas Schatzl
...
git-svn-id: trunk@1193 -
2005-09-25 17:19:44 +00:00
peter
c3727c29b2
* rename al_code to al_procedures, al_bss/al_data to al_globals
...
* more work for section smartlinking
git-svn-id: trunk@1083 -
2005-09-15 06:51:12 +00:00
fpc
790a4fe2d3
* log and id tags removed
...
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3
initial import
...
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00