Skip to content

Commit

Permalink
feat: remove redundant codes under virt64, c906
Browse files Browse the repository at this point in the history
Changes:

- create new folder name `common64` and save all common codes of rv64
  inside

Signed-off-by: Shell <[email protected]>
  • Loading branch information
polarvid authored and mysterywolf committed Sep 13, 2024
1 parent 2d026a3 commit 57d002b
Show file tree
Hide file tree
Showing 55 changed files with 16 additions and 4,614 deletions.
9 changes: 4 additions & 5 deletions libcpu/risc-v/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ from building import *

Import('rtconfig')

common64_arch = ['virt64', 'c906']
cwd = GetCurrentDir()
group = []
list = os.listdir(cwd)

# add common code files
if rtconfig.CPU == "virt64" :
group = group
elif rtconfig.CPU == "c906" :
group = group
if rtconfig.CPU in common64_arch :
group += SConscript(os.path.join('common64', 'SConscript'))
else :
group = group + SConscript(os.path.join('common', 'SConscript'))
group += SConscript(os.path.join('common', 'SConscript'))

# cpu porting code files
if rtconfig.CPU == "c906":
Expand Down
12 changes: 12 additions & 0 deletions libcpu/risc-v/common64/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from building import *

cwd = GetCurrentDir()
src = Glob('*.c') + Glob('*.cpp') + Glob('*_gcc.S')
CPPPATH = [cwd]

if not GetDepend('ARCH_USING_ASID'):
SrcRemove(src, ['asid.c'])

group = DefineGroup('libcpu', src, depend = [''], CPPPATH = CPPPATH)

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.
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.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions libcpu/risc-v/virt64/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ cwd = GetCurrentDir()
src = Glob('*.c') + Glob('*.cpp') + Glob('*_gcc.S')
CPPPATH = [cwd]

if not GetDepend('ARCH_USING_ASID'):
SrcRemove(src, ['asid.c'])

if not GetDepend('ARCH_RISCV_VECTOR'):
SrcRemove(src, ['vector_gcc.S'])

Expand Down
85 changes: 0 additions & 85 deletions libcpu/risc-v/virt64/asid.c

This file was deleted.

26 changes: 0 additions & 26 deletions libcpu/risc-v/virt64/asm-generic.h

This file was deleted.

127 changes: 0 additions & 127 deletions libcpu/risc-v/virt64/backtrace.c

This file was deleted.

Loading

0 comments on commit 57d002b

Please sign in to comment.