Esempio n. 1
0
    def add_function(self, function):
        import peachpy.x86_64.function
        assert isinstance(function, peachpy.x86_64.function.ABIFunction), \
            "Function must be finalized with an ABI before its assembly can be used"

        function_lines = function.format(self.assembly_format, line_separator=None, line_number=self.prologue_lines + len(self.content))
        self.content += function_lines
Esempio n. 2
0
    def add_function(self, function):
        import peachpy.x86_64.function
        assert isinstance(function, peachpy.x86_64.function.ABIFunction), \
            "Function must be bindinded to an ABI before its assembly can be used"

        function_code = function.format(self.assembly_format)

        import os
        self.output_file.write(function_code + os.linesep)
        self.output_file.flush()
Esempio n. 3
0
    def add_function(self, function):
        import peachpy.x86_64.function
        assert isinstance(function, peachpy.x86_64.function.ABIFunction), \
            "Function must be finalized with an ABI before its assembly can be used"

        self.content.append(function.format(self.assembly_format))
Esempio n. 4
0
    def add_function(self, function):
        import peachpy.x86_64.function
        assert isinstance(function, peachpy.x86_64.function.ABIFunction), \
            "Function must be finalized with an ABI before its assembly can be used"

        self.content.append(function.format(self.assembly_format))