minor update

This commit is contained in:
Blaise Tine 2024-05-27 20:21:37 -07:00
parent 9dbff0e77c
commit 0426856ab4
9 changed files with 124 additions and 129 deletions

View file

@ -19,13 +19,11 @@ LLVM_CFLAGS += -Xclang -target-feature -Xclang +vortex -mllvm -vortex-branch-div
#LLVM_CFLAGS += --rtlib=libgcc
#CC = $(LLVM_VORTEX)/bin/clang $(LLVM_CFLAGS)
#CXX = $(LLVM_VORTEX)/bin/clang++ $(LLVM_CFLAGS)
#AR = $(LLVM_VORTEX)/bin/llvm-ar
#DP = $(LLVM_VORTEX)/bin/llvm-objdump
#CP = $(LLVM_VORTEX)/bin/llvm-objcopy
CC = $(RISCV_TOOLCHAIN_PATH)/bin/$(RISCV_PREFIX)-gcc
CXX = $(RISCV_TOOLCHAIN_PATH)/bin/$(RISCV_PREFIX)-g++
AR = $(RISCV_TOOLCHAIN_PATH)/bin/$(RISCV_PREFIX)-gcc-ar
DP = $(RISCV_TOOLCHAIN_PATH)/bin/$(RISCV_PREFIX)-objdump
CP = $(RISCV_TOOLCHAIN_PATH)/bin/$(RISCV_PREFIX)-objcopy
@ -48,9 +46,6 @@ $(PROJECT).dump: $(PROJECT).a
%.S.o: $(SRC_DIR)/%.S
$(CC) $(CFLAGS) -c $< -o $@
%.cpp.o: $(SRC_DIR)/%.cpp
$(CXX) $(CFLAGS) -c $< -o $@
%.c.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -c $< -o $@

View file

@ -21,15 +21,7 @@ extern "C" {
#endif
int vx_vprintf(const char* format, va_list va);
inline int vx_printf(const char * format, ...) {
int ret;
va_list va;
va_start(va, format);
ret = vx_vprintf(format, va);
va_end(va);
return ret;
}
int vx_printf(const char * format, ...);
void vx_putchar(int c);
void vx_putint(int value, int base);

View file

@ -93,6 +93,15 @@ int vx_vprintf(const char* format, va_list va) {
return arg.ret;
}
int vx_printf(const char * format, ...) {
int ret;
va_list va;
va_start(va, format);
ret = vx_vprintf(format, va);
va_end(va);
return ret;
}
#ifdef __cplusplus
}
#endif

View file

@ -74,4 +74,3 @@ label_join:
addi sp, sp, 28
#endif
ret

View file

@ -1382,7 +1382,7 @@ void pb_sig_clmem(char* s, cl_command_queue command_queue, cl_mem memobj, int ty
printf ("Something wrong.\n");
assert(0);
} else {
printf ("size = %d\n", sz);
printf ("size = %ld\n", sz);
}
char* hp; // = (char*) malloc(sz);
//posix_memalign((void**)&hp, 64, sz);

View file

@ -139,7 +139,7 @@ static void cleanup() {
if (kernel_bin) free(kernel_bin);
}
int size = 32;
uint32_t size = 32;
static void show_usage() {
printf("Usage: [-n size] [-h: help]\n");

View file

@ -139,7 +139,7 @@ static void cleanup() {
if (kernel_bin) free(kernel_bin);
}
int size = 16;
uint32_t size = 16;
static void show_usage() {
printf("Usage: [-n size] [-h: help]\n");

View file

@ -139,8 +139,8 @@ static void cleanup() {
if (kernel_bin) free(kernel_bin);
}
int size = 16;
int tile_size = 8;
uint32_t size = 16;
uint32_t tile_size = 8;
static void show_usage() {
printf("Usage: [-n size] [-t tile size] [-h: help]\n");

View file

@ -133,7 +133,7 @@ static void cleanup() {
if (kernel_bin) free(kernel_bin);
}
int size = 64;
uint32_t size = 64;
static void show_usage() {
printf("Usage: [-n size] [-h: help]\n");