diff --git a/libclc/generic/include/clc/synchronization/cl_mem_fence_flags.h b/libclc/generic/include/clc/synchronization/cl_mem_fence_flags.h index e57513c06ef6..6652372a7e7b 100644 --- a/libclc/generic/include/clc/synchronization/cl_mem_fence_flags.h +++ b/libclc/generic/include/clc/synchronization/cl_mem_fence_flags.h @@ -1,5 +1,4 @@ typedef uint cl_mem_fence_flags; -typedef uint memory_scope; #define CLK_LOCAL_MEM_FENCE 1 #define CLK_GLOBAL_MEM_FENCE 2 #define CLK_IMAGE_MEM_FENCE 4 diff --git a/libclc/riscv32/lib/crt0.S b/libclc/riscv32/lib/crt0.S index 74397f457a76..7a3bcda03c9f 100644 --- a/libclc/riscv32/lib/crt0.S +++ b/libclc/riscv32/lib/crt0.S @@ -28,7 +28,6 @@ _start: # allocate warp and per-thread level stack pointers, both # stacks grows upwards - vsetvli x0,x0,e32,m1,ta,ma csrr sp, CSR_LDS # sp points to baseaddr of local memory of each SM csrr tp, CSR_PDS # tp points to baseaddr for lower bound of private memory(1K) of each thread @@ -43,10 +42,8 @@ _start: 2: csrr t0, CSR_KNL # get addr of kernel metadata - la t1, test # all the tested function is named to be test - # lw t1, KNL_ENTRY(t0) # get kernel program address - # lw a0, KNL_ARG_BASE(t0) # get kernel arg buffer base address - # WORKAROUND: when buffer is ready, restore lines above + lw t1, KNL_ENTRY(t0) # get kernel program address + lw a0, KNL_ARG_BASE(t0) # get kernel arg buffer base address jalr t1 # call kernel program # call exit routine @@ -55,3 +52,19 @@ _start: # End of warp execution endprg x0, x0, x0 .size _start, .-_start + + + .section ".tohost","aw",@progbits + .align 6 + .globl tohost + tohost: .dword 0 + .align 6 + .globl fromhost + fromhost: .dword 0 + + .global spike_end + .type spike_end,function +spike_end: + li t1,1 + la t0,tohost + sw t1,0(t0)