summaryrefslogtreecommitdiff
path: root/compiler/m68k
diff options
context:
space:
mode:
authornickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-27 23:11:09 +0000
committernickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-27 23:11:09 +0000
commita491c935588745154b576226b73833bac78fcb6e (patch)
tree973289073fb5d21573a6be2b5cfeba9abd2a9472 /compiler/m68k
parent38b5e0606069cc5985e995e1da5b6855db67f507 (diff)
parentae5b0de491a91321675f73eae5db628d068f4e05 (diff)
downloadfpc-unicodekvm.tar.gz
* synchronized with trunkunicodekvm
git-svn-id: https://svn.freepascal.org/svn/fpc/branches/unicodekvm@49282 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/m68k')
-rw-r--r--compiler/m68k/ag68kvasm.pas3
-rw-r--r--compiler/m68k/cpubase.pas8
-rw-r--r--compiler/m68k/r68kgri.inc16
-rw-r--r--compiler/m68k/r68ksri.inc36
-rw-r--r--compiler/m68k/ra68kmot.pas7
5 files changed, 41 insertions, 29 deletions
diff --git a/compiler/m68k/ag68kvasm.pas b/compiler/m68k/ag68kvasm.pas
index a37e24fe35..7c1a7bf9bc 100644
--- a/compiler/m68k/ag68kvasm.pas
+++ b/compiler/m68k/ag68kvasm.pas
@@ -96,8 +96,7 @@ unit ag68kvasm;
result:=asminfo^.asmcmd;
case target_info.system of
- { a.out doesn't support named sections, a.out is limited
- (no named sections) lets use ELF for interoperability }
+ { a.out doesn't support named sections, lets use ELF for interoperability }
system_m68k_amiga,
system_m68k_atari,
system_m68k_sinclairql: objtype:='-Felf';
diff --git a/compiler/m68k/cpubase.pas b/compiler/m68k/cpubase.pas
index 6ecf62ec53..cf592f19a2 100644
--- a/compiler/m68k/cpubase.pas
+++ b/compiler/m68k/cpubase.pas
@@ -331,6 +331,10 @@ implementation
{$i r68kstd.inc}
);
+ std_regfullname_table : TRegNameTable = (
+ {$i r68kstdf.inc}
+ );
+
regnumber_index : array[tregisterindex] of tregisterindex = (
{$i r68krni.inc}
);
@@ -484,6 +488,10 @@ implementation
function std_regnum_search(const s:string):Tregister;
begin
result:=regnumber_table[findreg_by_name_table(s,std_regname_table,std_regname_index)];
+ if result=NR_NO then
+ begin
+ result:=regnumber_table[findreg_by_name_table(s,std_regfullname_table,std_regname_index)];
+ end;
end;
diff --git a/compiler/m68k/r68kgri.inc b/compiler/m68k/r68kgri.inc
index 0e386d3f1a..31c8bf302e 100644
--- a/compiler/m68k/r68kgri.inc
+++ b/compiler/m68k/r68kgri.inc
@@ -16,30 +16,30 @@
56,
57,
34,
+3,
1,
2,
-3,
+6,
4,
5,
-6,
+9,
7,
8,
-9,
12,
-11,
10,
+11,
+15,
13,
14,
-15,
+18,
16,
17,
-18,
+21,
19,
20,
-21,
24,
-23,
22,
+23,
38,
25,
26,
diff --git a/compiler/m68k/r68ksri.inc b/compiler/m68k/r68ksri.inc
index 47fd3b2f30..0f66a7b772 100644
--- a/compiler/m68k/r68ksri.inc
+++ b/compiler/m68k/r68ksri.inc
@@ -1,46 +1,46 @@
{ don't edit, this file is generated from m68kreg.dat }
0,
-43,
42,
-45,
+43,
44,
-47,
+45,
46,
-49,
+47,
48,
-51,
+49,
50,
-53,
+51,
52,
-55,
+53,
54,
-57,
+55,
56,
+57,
34,
-1,
3,
+1,
2,
-5,
-4,
6,
-7,
+4,
+5,
9,
+7,
8,
-11,
12,
10,
-13,
+11,
15,
+13,
14,
-17,
-16,
18,
-19,
+16,
+17,
21,
+19,
20,
-23,
24,
22,
+23,
38,
25,
26,
diff --git a/compiler/m68k/ra68kmot.pas b/compiler/m68k/ra68kmot.pas
index ba7f0a3b4e..184a9742ae 100644
--- a/compiler/m68k/ra68kmot.pas
+++ b/compiler/m68k/ra68kmot.pas
@@ -216,6 +216,11 @@ const
actasmregister:=std_regnum_search(lower(s));
if actasmregister<>NR_NO then
begin
+ { this is a hack. if the reg is valid, and its string doesn't
+ contain a dot, we make sure it's a full size reg (KB) }
+ if (getregtype(actasmregister) in [R_ADDRESSREGISTER,R_INTREGISTER]) and
+ (Pos('.',s) = 0) then
+ setsubreg(actasmregister,R_SUBWHOLE);
result:=true;
actasmtoken:=AS_REGISTER;
end;
@@ -1196,7 +1201,7 @@ const
while actasmtoken <> AS_SEPARATOR do
Consume(actasmtoken);
end;
- exit;
+ exit;
end;
{ // (reg,reg .. // }
Consume(AS_COMMA);