def Call(self, i): """Generate code to Call a function""" if isinstance(i.a.type, il.Func): code = [x.call(i.a.type.entry)] else: # Otherwise it is a function pointer. code = [x.call(x.loc(i.a.type, deref=True))] return code
def Call(self, i): if isinstance(i.a.type, il.Func): code = [ x.call(i.a.type.entry), ] else: code = [ x.call(x.loc(i.a.type, True)), ] return code
def Print(self, i): code = self.emit(x.pushl, i.a) code += [ x.pushl('$printf_msg'), x.call("printf"), x.addl(x.cint(8), x.esp), ] return code
def ExitCode(self): """Exits the program and returns to the OS. Currently implemented by calling into the libc exit function. In the past it directly generated the syscall.""" return [x.push("$0"), x.call("exit")]
def ExitCode(self): return [ x.push('$0'), x.call("exit"), ]