Commit 5ecd431e authored by Kunshan Wang's avatar Kunshan Wang

Fixed print_stats's macro in muapi.h

parent 9a14926f
......@@ -62,3 +62,4 @@ clean:
veryclean:
rm *.so test_client test_client2 classpath.txt classpath.h
rm ../classpath.txt
......@@ -703,7 +703,7 @@ struct MuIRBuilder {
MuExcClause exc_clause); /// MUAPIPARSER exc_clause:optional
void (*new_atomicrmw)(MuIRBuilder *b, MuID id, MuID result_id,
MuBool is_ptr, MuMemOrd ord, MuAtomicRMWOptr optr,
MuTypeNode refTy, MuVarNode loc, MuVarNode opnd,
MuTypeNode ref_ty, MuVarNode loc, MuVarNode opnd,
MuExcClause exc_clause); /// MUAPIPARSER exc_clause:optional
void (*new_fence )(MuIRBuilder *b, MuID id, MuMemOrd ord);
......@@ -882,8 +882,8 @@ struct MuIRBuilder {
/// GEN:END:COMMINSTS
// Proprietary CommInsts specific to the refimpl
#define MU_CI_UVM_IRBUILDER_NEW_COMMINST ((MuCommInst)0xc001) /// MUAPIPARSER muname:@uvm.ext.print_stats
#define MU_CI_UVM_IRBUILDER_NEW_COMMINST ((MuCommInst)0xc002) /// MUAPIPARSER muname:@uvm.ext.clear_stats
#define MU_CI_UVM_EXT_PRINT_STATS ((MuCommInst)0xc001) /// MUAPIPARSER muname:@uvm.ext.print_stats
#define MU_CI_UVM_EXT_CLEAR_STATS ((MuCommInst)0xc002) /// MUAPIPARSER muname:@uvm.ext.clear_stats
#ifdef __cplusplus
}
......
......@@ -33,6 +33,8 @@ int main() {
".funcsig @write.sig = (@cint @cvoidptr @csize_t) -> (@csize_t)\n"
".typedef @write.fp = ufuncptr<@write.sig>\n"
".const @the_fd <@cint> = 1\n"
".typedef @i64 = int<64>\n"
".const @print_stat_point <@i64> = 92\n"
;
char bundle2[256];
......@@ -49,6 +51,7 @@ int main() {
".funcdef @hw VERSION %1 <@v_v> {\n"
" %entry():\n"
" %rv = CCALL #DEFAULT <@write.fp @write.sig> @the_write (@the_fd @the_string @the_length)\n"
" COMMINST @uvm.ext.print_stats (@print_stat_point)\n"
" COMMINST @uvm.thread_exit\n"
"}\n"
;
......@@ -76,6 +79,7 @@ int main() {
".typedef @refvoid = ref<@void>\n"
".funcdef @hw2 VERSION %1 <@v_v> {\n"
" %entry():\n"
" COMMINST @uvm.ext.clear_stats\n"
" %tl = COMMINST @uvm.get_threadlocal\n"
" %p = COMMINST @uvm.native.pin <@refvoid> (%tl)\n"
" %rv = CCALL #DEFAULT <@write.fp @write.sig> @the_write (@the_fd %p @the_length2)\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment