Commit 15c3a167 authored by John Zhang's avatar John Zhang

cast reference to ref<void> before pass to set_threadlocal

parent 49ba1676
...@@ -1523,7 +1523,9 @@ class LL2MuMapper: ...@@ -1523,7 +1523,9 @@ class LL2MuMapper:
ref = varof(mutype.MuRef(self.TLStt)) ref = varof(mutype.MuRef(self.TLStt))
ops.append(self.gen_mu_new(self.TLStt, ref)) ops.append(self.gen_mu_new(self.TLStt, ref))
ops.append(self.gen_mu_comminst('SET_THREADLOCAL', [ref], varof(mutype.MU_VOID))) tlref_void = varof(mutype.MuRef(mutype.MU_VOID))
ops.extend(self.map_op(SpaceOperation('cast_pointer', [ref], tlref_void)))
ops.append(self.gen_mu_comminst('SET_THREADLOCAL', [tlref_void], varof(mutype.MU_VOID)))
return ops return ops
def map_op_mu_thread_exit(self, llop): def map_op_mu_thread_exit(self, llop):
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment