diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-07-22 13:10:24 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-07-22 13:10:24 +0000 |
commit | 65c01806a1a26e325ffd2f8cf0b4d5e885c792f9 (patch) | |
tree | a9472e0822131526bdb99d87509d1db5898775d5 | |
parent | 392aa0946dbe7b0dfd74877da9eecd7157b48aaa (diff) | |
download | fpc-65c01806a1a26e325ffd2f8cf0b4d5e885c792f9.tar.gz |
* fix assembling with official binutils
* fix compilation on 32 bit hosts
+ compile with -Sew
git-svn-id: https://svn.freepascal.org/svn/fpc/branches/laksen@39482 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | riscv_new/compiler/ppcriscv64.lpi | 6 | ||||
-rw-r--r-- | riscv_new/compiler/riscv64/cgcpu.pas | 16 | ||||
-rw-r--r-- | riscv_new/rtl/linux/riscv64/cprt0.as | 4 |
3 files changed, 13 insertions, 13 deletions
diff --git a/riscv_new/compiler/ppcriscv64.lpi b/riscv_new/compiler/ppcriscv64.lpi index 479f39e551..04ff31e24d 100644 --- a/riscv_new/compiler/ppcriscv64.lpi +++ b/riscv_new/compiler/ppcriscv64.lpi @@ -23,9 +23,6 @@ <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> - </local> <FormatVersion Value="2"/> <Modes Count="1"> <Mode0 Name="default"> @@ -74,7 +71,8 @@ <ConfigFile> <StopAfterErrCount Value="50"/> </ConfigFile> - <CustomOptions Value="-driscv64"/> + <CustomOptions Value="-driscv64 +-Sew"/> </Other> </CompilerOptions> </CONFIG> diff --git a/riscv_new/compiler/riscv64/cgcpu.pas b/riscv_new/compiler/riscv64/cgcpu.pas index 3e58547145..04db2fa21a 100644 --- a/riscv_new/compiler/riscv64/cgcpu.pas +++ b/riscv_new/compiler/riscv64/cgcpu.pas @@ -566,13 +566,15 @@ implementation if Count > 0 then begin 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; end; if (len and 4) <> 0 then diff --git a/riscv_new/rtl/linux/riscv64/cprt0.as b/riscv_new/rtl/linux/riscv64/cprt0.as index d6f1065ce8..522e484b85 100644 --- a/riscv_new/rtl/linux/riscv64/cprt0.as +++ b/riscv_new/rtl/linux/riscv64/cprt0.as @@ -50,9 +50,9 @@ _start: 1:auipc gp, %pcrel_hi(__global_pointer$) addi gp, gp, %pcrel_lo(1b) .option pop - + /* Clear the frame pointer since this is the outermost frame. */ - addi fp, x0, 0 + addi x8, x0, 0 ld a2, 0(sp) addi sp, sp, 8 |