Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
868 B
6
Indexable
Never

"improved_loop:\n\t"

    "vsetvli t0, %[arr_size], e16\n\t"

    "addi %[others_cnt],%[others_cnt],1;"

    "vle16.v v0,(%[h]);"

    "addi %[lw_cnt],%[lw_cnt],1;"

    	"sub %[arr_size],%[arr_size],t0;"

    	"addi %[sub_cnt],%[sub_cnt],1;"

    	"slli t0,t0,1;"

    	"addi %[others_cnt],%[others_cnt],1;"

    	

    	"add %[h],%[h],t0;"

    	"addi %[add_cnt],%[add_cnt],1;"

    	

    "vle16.v v1,(%[x]);"

    "addi %[lw_cnt],%[lw_cnt],1;"

    

    	"add %[x],%[x],t0;"

    	"addi %[add_cnt],%[add_cnt],1;"

    	

    "vmul.vv v2,v0,v1;"

    "addi %[mul_cnt],%[mul_cnt],1;"

    

    "vadd.vx v2,v2,%[id];"

    "addi %[add_cnt],%[add_cnt],1;"



    "vse16.v v2,(%[y]);"

    "addi %[sw_cnt],%[sw_cnt],1;"

    	

    	"add %[y],%[y],t0;"

	"addi %[add_cnt],%[add_cnt],1;"

	

"addi %[others_cnt],%[others_cnt],1;"

"bnez %[arr_size],improved_loop;"

Leave a Comment