mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-17 15:44:18 +08:00
riscv64: consolidate riscv intrinsics into lib-riscv.c
Replace the single-purpose lib/riscvflush.c with lib/lib-riscv.c following the lib-arm64.c naming convention.
This commit is contained in:
parent
b8f680a3b4
commit
d8aee9b26e
@ -73,7 +73,7 @@ OBJ-arm-vfp = $(OBJ-arm)
|
|||||||
OBJ-arm-eabi = $(OBJ-arm)
|
OBJ-arm-eabi = $(OBJ-arm)
|
||||||
OBJ-arm-eabihf = $(OBJ-arm)
|
OBJ-arm-eabihf = $(OBJ-arm)
|
||||||
OBJ-arm-wince = $(ARM_O) $(WIN_O)
|
OBJ-arm-wince = $(ARM_O) $(WIN_O)
|
||||||
OBJ-riscv64 = $(RISCV64_O) riscvflush.o $(LIN_O)
|
OBJ-riscv64 = $(RISCV64_O) lib-riscv.o $(LIN_O)
|
||||||
|
|
||||||
OBJ-extra = $(filter $(EXTRA_O),$(OBJ-$T))
|
OBJ-extra = $(filter $(EXTRA_O),$(OBJ-$T))
|
||||||
OBJ-libtcc1 = $(addprefix $(X),$(filter-out $(OBJ-extra),$(OBJ-$T)))
|
OBJ-libtcc1 = $(addprefix $(X),$(filter-out $(OBJ-extra),$(OBJ-$T)))
|
||||||
|
|||||||
20
lib/lib-riscv.c
Normal file
20
lib/lib-riscv.c
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* TCC runtime library for riscv64.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2026
|
||||||
|
*
|
||||||
|
* Copying and distribution of this file, with or without modification,
|
||||||
|
* are permitted in any medium without royalty provided the copyright
|
||||||
|
* notice and this notice are preserved. This file is offered as-is,
|
||||||
|
* without any warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------- */
|
||||||
|
/* __clear_cache is used in tccrun.c. It is a built-in
|
||||||
|
intrinsic with gcc. However tcc in order to compile
|
||||||
|
itself needs this function */
|
||||||
|
|
||||||
|
void __clear_cache(void *beg, void *end)
|
||||||
|
{
|
||||||
|
__riscv64_clear_cache(beg, end);
|
||||||
|
}
|
||||||
@ -1,10 +0,0 @@
|
|||||||
/* riscvflush.c - flush the instruction cache
|
|
||||||
|
|
||||||
__clear_cache is used in tccrun.c, It is a built-in
|
|
||||||
intrinsic with gcc. However tcc in order to compile
|
|
||||||
itself needs this function */
|
|
||||||
|
|
||||||
void __clear_cache(void *beg, void *end)
|
|
||||||
{
|
|
||||||
__riscv64_clear_cache(beg, end);
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user