Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
update to riscv 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
smsxgli committed Sep 19, 2021
1 parent 9813abf commit 2d8c949
Show file tree
Hide file tree
Showing 28 changed files with 37 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "ISC"

[dependencies]
r0 = "1.0.0"
riscv = "0.6"
riscv = "0.7"
riscv-rt-macros = { path = "macros", version = "0.1.6" }

[features]
Expand Down
19 changes: 15 additions & 4 deletions assemble.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
New-Item -Force -Name bin -Type Directory

# remove existing blobs because otherwise this will append object files to the old blobs
Remove-Item -Force bin/*.a

$crate = "riscv-rt"
$extension_sets = @("i", "im", "ic", "imc")

$extension_sets = @("i", "im", "ic", "imc", "if", "ifc", "imf", "imfc", "ifd", "ifdc", "imfd", "imfdc")

$pwd = Get-Location

foreach ($ext in $extension_sets) {
riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$pwd=/riscv-rt -c -mabi=ilp32 -march=rv32$ext asm.S -o bin/$crate.o
foreach ($ext in $extension_sets)
{
$abi = ""
if ($ext.contains("d"))
{$abi = "d"}
elseif ($ext.contains("f"))
{$abi = "f"}

riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$pwd=/riscv-rt -c "-mabi=ilp32$abi" "-march=rv32$ext" asm.S -o bin/$crate.o
riscv64-unknown-elf-ar crs bin/riscv32$ext-unknown-none-elf.a bin/$crate.o

riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$pwd=/riscv-rt -c -mabi=lp64 -march=rv64$ext asm.S -o bin/$crate.o
riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$pwd=/riscv-rt -c "-mabi=lp64$abi" "-march=rv64$ext" asm.S -o bin/$crate.o
riscv64-unknown-elf-ar crs bin/riscv64$ext-unknown-none-elf.a bin/$crate.o
}

Expand Down
23 changes: 20 additions & 3 deletions assemble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,29 @@ crate=riscv-rt
# remove existing blobs because otherwise this will append object files to the old blobs
rm -f bin/*.a

for ext in i ic im imc
exts=('i' 'ic' 'im' 'imc' 'if' 'ifc' 'imf' 'imfc' 'ifd' 'ifdc' 'imfd' 'imfdc')

for ext in ${exts[@]}
do
riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$(pwd)=/riscv-rt -c -mabi=ilp32 -march=rv32${ext} asm.S -o bin/$crate.o
case $ext in

*'d'*)
abi='d'
;;

*'f'*)
abi='f'
;;

*)
abi=''
;;
esac

riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$(pwd)=/riscv-rt -c -mabi=ilp32${abi} -march=rv32${ext} asm.S -o bin/$crate.o
riscv64-unknown-elf-ar crs bin/riscv32${ext}-unknown-none-elf.a bin/$crate.o

riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$(pwd)=/riscv-rt -c -mabi=lp64 -march=rv64${ext} asm.S -o bin/$crate.o
riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$(pwd)=/riscv-rt -c -mabi=lp64${abi} -march=rv64${ext} asm.S -o bin/$crate.o
riscv64-unknown-elf-ar crs bin/riscv64${ext}-unknown-none-elf.a bin/$crate.o
done

Expand Down
Binary file modified bin/riscv32i-unknown-none-elf.a
Binary file not shown.
Binary file modified bin/riscv32ic-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv32if-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv32ifc-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv32ifd-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv32ifdc-unknown-none-elf.a
Binary file not shown.
Binary file modified bin/riscv32im-unknown-none-elf.a
Binary file not shown.
Binary file modified bin/riscv32imc-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv32imf-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv32imfc-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv32imfd-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv32imfdc-unknown-none-elf.a
Binary file not shown.
Binary file modified bin/riscv64i-unknown-none-elf.a
Binary file not shown.
Binary file modified bin/riscv64ic-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv64if-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv64ifc-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv64ifd-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv64ifdc-unknown-none-elf.a
Binary file not shown.
Binary file modified bin/riscv64im-unknown-none-elf.a
Binary file not shown.
Binary file modified bin/riscv64imc-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv64imf-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv64imfc-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv64imfd-unknown-none-elf.a
Binary file not shown.
Binary file added bin/riscv64imfdc-unknown-none-elf.a
Binary file not shown.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main() {

if target.starts_with("riscv") {
let mut target = Target::from_target_str(&target);
target.retain_extensions("imc");
target.retain_extensions("imfdc");

let target = target.to_string();

Expand Down

0 comments on commit 2d8c949

Please sign in to comment.