Skip to content

Commit 57d002b

Browse files
polarvidmysterywolf
authored andcommitted
feat: remove redundant codes under virt64, c906
Changes: - create new folder name `common64` and save all common codes of rv64 inside Signed-off-by: Shell <[email protected]>
1 parent 2d026a3 commit 57d002b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+16
-4614
lines changed

libcpu/risc-v/SConscript

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ from building import *
55

66
Import('rtconfig')
77

8+
common64_arch = ['virt64', 'c906']
89
cwd = GetCurrentDir()
910
group = []
1011
list = os.listdir(cwd)
1112

1213
# add common code files
13-
if rtconfig.CPU == "virt64" :
14-
group = group
15-
elif rtconfig.CPU == "c906" :
16-
group = group
14+
if rtconfig.CPU in common64_arch :
15+
group += SConscript(os.path.join('common64', 'SConscript'))
1716
else :
18-
group = group + SConscript(os.path.join('common', 'SConscript'))
17+
group += SConscript(os.path.join('common', 'SConscript'))
1918

2019
# cpu porting code files
2120
if rtconfig.CPU == "c906":

libcpu/risc-v/common64/SConscript

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from building import *
2+
3+
cwd = GetCurrentDir()
4+
src = Glob('*.c') + Glob('*.cpp') + Glob('*_gcc.S')
5+
CPPPATH = [cwd]
6+
7+
if not GetDepend('ARCH_USING_ASID'):
8+
SrcRemove(src, ['asid.c'])
9+
10+
group = DefineGroup('libcpu', src, depend = [''], CPPPATH = CPPPATH)
11+
12+
Return('group')
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

libcpu/risc-v/virt64/SConscript

-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ cwd = GetCurrentDir()
55
src = Glob('*.c') + Glob('*.cpp') + Glob('*_gcc.S')
66
CPPPATH = [cwd]
77

8-
if not GetDepend('ARCH_USING_ASID'):
9-
SrcRemove(src, ['asid.c'])
10-
118
if not GetDepend('ARCH_RISCV_VECTOR'):
129
SrcRemove(src, ['vector_gcc.S'])
1310

libcpu/risc-v/virt64/asid.c

-85
This file was deleted.

libcpu/risc-v/virt64/asm-generic.h

-26
This file was deleted.

libcpu/risc-v/virt64/backtrace.c

-127
This file was deleted.

0 commit comments

Comments
 (0)