2
0
Эх сурвалжийг харах

* fix assembling with official binutils
* fix compilation on 32 bit hosts
+ compile with -Sew

git-svn-id: branches/laksen/riscv_new@39482 -

florian 7 жил өмнө
parent
commit
65a415c13e

+ 2 - 4
compiler/ppcriscv64.lpi

@@ -23,9 +23,6 @@
       <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
       <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
     </PublishOptions>
     </PublishOptions>
     <RunParams>
     <RunParams>
-      <local>
-        <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
-      </local>
       <FormatVersion Value="2"/>
       <FormatVersion Value="2"/>
       <Modes Count="1">
       <Modes Count="1">
         <Mode0 Name="default">
         <Mode0 Name="default">
@@ -74,7 +71,8 @@
       <ConfigFile>
       <ConfigFile>
         <StopAfterErrCount Value="50"/>
         <StopAfterErrCount Value="50"/>
       </ConfigFile>
       </ConfigFile>
-      <CustomOptions Value="-driscv64"/>
+      <CustomOptions Value="-driscv64
+-Sew"/>
     </Other>
     </Other>
   </CompilerOptions>
   </CompilerOptions>
 </CONFIG>
 </CONFIG>

+ 9 - 7
compiler/riscv64/cgcpu.pas

@@ -566,13 +566,15 @@ implementation
           if Count > 0 then
           if Count > 0 then
           begin
           begin
             tmpreg1 := GetIntRegister(list, OS_INT);
             tmpreg1 := GetIntRegister(list, OS_INT);
-            for count2 := 1 to Count do
-            begin
-              list.concat(taicpu.op_reg_ref(A_LD, tmpreg1, src));
-              list.concat(taicpu.op_reg_ref(A_SD, tmpreg1, dst));
-              Inc(src.offset, 8);
-              Inc(dst.offset, 8);
-            end;
+            count2 := 1;
+            while count2 <= Count do
+              begin
+                list.concat(taicpu.op_reg_ref(A_LD, tmpreg1, src));
+                list.concat(taicpu.op_reg_ref(A_SD, tmpreg1, dst));
+                Inc(src.offset, 8);
+                Inc(dst.offset, 8);
+                Inc(count2);
+              end;
             len := len mod 8;
             len := len mod 8;
           end;
           end;
           if (len and 4) <> 0 then
           if (len and 4) <> 0 then

+ 2 - 2
rtl/linux/riscv64/cprt0.as

@@ -50,9 +50,9 @@ _start:
 1:auipc gp, %pcrel_hi(__global_pointer$)
 1:auipc gp, %pcrel_hi(__global_pointer$)
         addi  gp, gp, %pcrel_lo(1b)
         addi  gp, gp, %pcrel_lo(1b)
         .option pop
         .option pop
-        
+
         /* Clear the frame pointer since this is the outermost frame.  */
         /* Clear the frame pointer since this is the outermost frame.  */
-        addi fp, x0, 0
+        addi x8, x0, 0
         ld   a2, 0(sp)
         ld   a2, 0(sp)
         addi sp, sp, 8
         addi sp, sp, 8