cc: fix load bug
This commit is contained in:
parent
a4005ade77
commit
6825ce464f
@ -892,7 +892,7 @@ class CcInterp(lark.visitors.Interpreter):
|
||||
s = self._lookup_symbol(ident)
|
||||
assert s is not None, f'unknown identifier {ident}'
|
||||
if isinstance(s, FunctionSpec) or ident in self.global_scope.symbols:
|
||||
reg = reg or self._get_reg()
|
||||
reg = self.cur_fun.regs.take(reg=reg, orwhatever=True)
|
||||
return SetAddr(self.cur_fun, [reg, ident])
|
||||
else:
|
||||
if s.type.volatile:
|
||||
|
Loading…
Reference in New Issue
Block a user