ソースを参照

* some more tiny m68k hacks...

git-svn-id: trunk@2804 -
Károly Balogh 19 年 前
コミット
3b2fe2b622

+ 1 - 1
.gitattributes

@@ -165,7 +165,7 @@ compiler/impdef.pas svneol=native#text/plain
 compiler/import.pas svneol=native#text/plain
 compiler/link.pas svneol=native#text/plain
 compiler/m68k/aasmcpu.pas svneol=native#text/plain
-compiler/m68k/agcpugas.pas svneol=native#text/plain
+compiler/m68k/ag68kgas.pas svneol=native#text/plain
 compiler/m68k/aoptcpu.pas svneol=native#text/plain
 compiler/m68k/aoptcpub.pas svneol=native#text/plain
 compiler/m68k/aoptcpud.pas svneol=native#text/plain

+ 1 - 1
compiler/m68k/aasmcpu.pas

@@ -107,7 +107,7 @@ type
       globtype;
 
 
-{$WARNING FIX ME!! useful for debug, remove it, same table as in agcpugas }
+{$WARNING FIX ME!! useful for debug, remove it, same table as in ag68kgas }
     const
       gas_op2str:op2strtable=
     {  warning: CPU32 opcodes are not fully compatible with the MC68020. }

+ 1 - 1
compiler/m68k/agcpugas.pas → compiler/m68k/ag68kgas.pas

@@ -21,7 +21,7 @@
 }
 { This unit implements an asmoutput class for i386 AT&T syntax
 }
-unit agcpugas;
+unit ag68kgas;
 
 {$i fpcdefs.inc}
 

+ 13 - 3
compiler/m68k/cpubase.pas

@@ -417,11 +417,21 @@ implementation
             cgsize2subreg:=R_SUBWHOLE;
           OS_64,OS_S64:
             begin
-             writeln('64bit regsize?');
+//             writeln('64bit regsize?');
              cgsize2subreg:=R_SUBWHOLE;
             end;
+          OS_F32 :
+            cgsize2subreg:=R_SUBFS;
+          OS_F64 :
+            cgsize2subreg:=R_SUBFD;
+{            
+            begin
+              // is this correct? (KB)
+              cgsize2subreg:=R_SUBNONE;
+            end;
+}
           else begin
-            writeln('hmm!?');
+            writeln('M68K: invalid register size');
     // this supposed to be debug
     //        p:=nil; dword(p^):=0;
     //        internalerror(200301231);
@@ -438,7 +448,7 @@ implementation
           R_INTREGISTER :
             result:=OS_32;
           R_FPUREGISTER :
-            result:=OS_F32;
+            result:=OS_F64;
           else
             internalerror(200303181);
         end;

+ 2 - 2
compiler/m68k/cpupara.pas

@@ -374,7 +374,7 @@ unit cpupara;
                 else if (loc = LOC_FPUREGISTER) and
                         (nextfloatreg <= RS_FP2) then
                   begin
-		    writeln('loc fpuregister');
+//		    writeln('loc fpuregister');
                     paraloc^.loc:=loc;
                     paraloc^.size := paracgsize;
                     paraloc^.register:=newreg(R_FPUREGISTER,nextfloatreg,R_SUBWHOLE);
@@ -384,7 +384,7 @@ unit cpupara;
                 else { LOC_REFERENCE }
 }
                   begin
-		    writeln('loc reference');
+//		    writeln('loc reference');
                     paraloc^.loc:=LOC_REFERENCE;
                     paraloc^.size:=int_cgsize(paralen);
                     if (side = callerside) then

+ 1 - 1
compiler/m68k/cputarg.pas

@@ -55,7 +55,7 @@ implementation
              Assemblers
 **************************************}
 
-      ,agcpugas
+      ,ag68kgas
       ;
 
 end.

+ 1 - 1
compiler/m68k/ra68kmot.pas

@@ -105,7 +105,7 @@ Implementation
        { pass 1 }
        nbas,
        { parser }
-       scanner,agcpugas,
+       scanner,ag68kgas,
        itcpugas
        ;