Commit Graph

55 Commits

Author SHA1 Message Date
pierre
7d12e8cc6d Avoid warnings for m68k compiler
git-svn-id: trunk@43391 -
2019-11-05 10:00:48 +00:00
pierre
1bed61195e Fix m68k errors with -CriotR option
git-svn-id: trunk@43165 -
2019-10-10 21:57:07 +00:00
Károly Balogh
5eee29e5d1 m68k: refactor some code to not fail when the tasmop set will be bigger than 256 elements
git-svn-id: trunk@42926 -
2019-09-05 21:49:27 +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
Károly Balogh
37f43d3604 m68k: cleanup of the BuildRefExpression method in the assembler reader
git-svn-id: trunk@34784 -
2016-11-05 19:58:06 +00:00
Károly Balogh
64650261d1 m68k: refactor of the reglist and the regpair support in the assembler reader. also added support for float register lists for FMOVEM
git-svn-id: trunk@34783 -
2016-11-05 18:53:20 +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
sergei
36043d13ae - Removed remains of tai_labeled_instruction, already commented out probably in 1.0 times.
git-svn-id: trunk@33074 -
2016-02-09 02:25:27 +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
Károly Balogh
92e7c0b03f m68k: assembler reader changes
* don't reimplement BuildStringConst, use the inherited one
* findopcode's string argument is now const, simplified the function and removed some dead code
* removed an intentional null ptr write in an error path, which was debug code and left in accidentally

git-svn-id: trunk@32829 -
2016-01-02 15:51:42 +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
sergei
b1ee3dd5e5 * m68k assembler reader: call tscannerfile.illegal_char instead of reimplementing it.
git-svn-id: trunk@32819 -
2016-01-01 10:49:38 +00:00
Károly Balogh
c47c6c0270 m68k: use std_regnum_search instead of prefixing the regname with % and calling gas_regnum_search
git-svn-id: trunk@32656 -
2015-12-13 18:04:30 +00:00
Károly Balogh
392da9e43f * fix warnings when compiling the compiler with DFA optimizer enabled on m68k
git-svn-id: trunk@28499 -
2014-08-20 13:49:47 +00:00
sergei
cfe13734e0 * m68k: Fixed damage caused by r27573 and r28177:
* longjmp: restored loading of function result (d0) which got removed in r28177.
  * While at the point, added test for zero, because longjmp must never return zero values.
  * Assembler reader: 'fp' refers to frame pointer, not the stack pointer.

git-svn-id: trunk@28183 -
2014-07-08 15:04:54 +00:00
Károly Balogh
e5656a6f7e m68k assembler reader: fixed parsing of slash-separated movem/fmovem register lists. only the first register was stored.
git-svn-id: trunk@28174 -
2014-07-06 11:29:45 +00:00
sergei
1678fcdc2d - m68k assembler reader: removed Oper.InitRef which was causing failure of tbs/tb0142.pp and, in general, making impossible calls/jumps to non-alias procedure names.
git-svn-id: trunk@28173 -
2014-07-06 10:35:35 +00:00
Károly Balogh
633eeb79ed m68k/ra68kmot.pas: fixed a pointer to signed int cast warning, so it now compiles with warnings on
git-svn-id: trunk@27735 -
2014-05-04 22:22:03 +00:00
Károly Balogh
daefb42925 m68k: don't find helper 'opcodes' as real opcodes... (i guess is the right solution for the problem which r22796 originally aimed to fix)
git-svn-id: trunk@27577 -
2014-04-13 23:20:29 +00:00
Károly Balogh
9ad7540ddf reverted change in r22796, the previously disabled code is actually required by the amunits package
git-svn-id: trunk@27574 -
2014-04-13 22:06:51 +00:00
Károly Balogh
5535df29d4 support SP and FP alias in the assembler reader too
git-svn-id: trunk@27573 -
2014-04-13 21:03:06 +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
florian
babbc21afd * fix handling of register sets on m68k: it is required that they are stored as two tcpuregistersets because address registers and data registers have different register types
git-svn-id: trunk@25726 -
2013-10-09 18:15:06 +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
svenbarth
05fc3bc427 * m68k/ra68kmot.pas, tm68kmotreader.gettoken:
if "firsttoken" isn't set we must not take the possibility into account that the token could be an opcode

git-svn-id: trunk@22796 -
2012-10-21 13:54:55 +00:00
svenbarth
a01677e546 Removed debug line
git-svn-id: trunk@22751 -
2012-10-18 20:12:37 +00:00
svenbarth
ca6ca31953 The message scan_f_illegal_char seems to have gained additional parameters since it was
introduced. Take that into account to avoid an access violation.

git-svn-id: trunk@22749 -
2012-10-18 20:12:28 +00:00
svenbarth
e87f0e1df4 m68k/ra68kmot.pas, tm68kmotreader.Assemble:
the asmr_d_*_reading messages need an argument which specifies in which style the assembler code
  is read; this is most importantly used on i386; on m68k we currently don't have multiple styles,
  so simply disable these messages

git-svn-id: trunk@22725 -
2012-10-18 20:10:29 +00:00
Jonas Maebe
0fc422f244 * moved definition of maxcpuregister and tcpuregisterset from cgbase to
cgutils, and define them so they are no larger than what is required by
    the current target platform
  * added cgutils to the uses clause of several units that use the
    tcpuregisterset type

git-svn-id: trunk@21624 -
2012-06-15 18:24:35 +00:00
pierre
7f200ab27e * Use asmsearchsym in assembler readers
git-svn-id: trunk@16104 -
2010-10-08 07:58: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
florian
4cbb67aa00 * some fpu emulation code from arm to generic code generator moved
* several m68k fixes

git-svn-id: trunk@5218 -
2006-11-04 10:23:35 +00:00
peter
4ea7562084 * compile fix
git-svn-id: trunk@5216 -
2006-11-04 00:31:39 +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
9eb07499bf * fix non-x86 for iasmop
git-svn-id: trunk@5151 -
2006-11-01 16:23:43 +00:00
peter
cb246eb781 * Remove dos,strings units, use SysUtils instead
* replace split* functions with Extract* functions
  * Add Directory caching

git-svn-id: trunk@5102 -
2006-10-30 23:29:35 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +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
d8dc5679e3 * aktcputype and aktoptimizecputype was missing in the previous optimization commits
git-svn-id: trunk@2907 -
2006-03-13 12:29:56 +00:00
peter
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Károly Balogh
3b2fe2b622 * some more tiny m68k hacks...
git-svn-id: trunk@2804 -
2006-03-07 23:01:55 +00:00
Károly Balogh
db07870443 totally messy m68k changes. cleanup in progress
git-svn-id: trunk@2352 -
2006-01-27 14:20:35 +00:00
Károly Balogh
238964e443 Various m68k fixes/additions:
- fixes in asmreader, basic stuff works again, the rest is untested
  - removed lot of unnecessary ungetcpuregister()s
  - various other fixes i forgot
  + basic amigaos syscalls support. still lacks explicit funcretloc

git-svn-id: trunk@1943 -
2005-12-13 20:42:15 +00:00
peter
1f8c074ab4 * make m68k compile
git-svn-id: trunk@1138 -
2005-09-19 11:46:23 +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
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
6c9c4c686c * small m68k updates to bring it up2date
* give better error for external local variable
2004-11-09 22:32:59 +00:00