Unlock instant, AI-driven research and patent intelligence for your innovation.

An optimized memset standard library function assembly code generation method

A code generation and standard library technology, applied in the direction of electrical digital data processing, program control design, instruments, etc., can solve problems such as excessive redundancy and insufficient optimization

Inactive Publication Date: 2015-10-28
INST OF ACOUSTICS CHINESE ACAD OF SCI
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, this optimization method for the standard library function is based on the assembly code obtained by compiling the high-level language with the compiler, which is redundant and the optimization is not thorough enough.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • An optimized memset standard library function assembly code generation method
  • An optimized memset standard library function assembly code generation method
  • An optimized memset standard library function assembly code generation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017] The technical solutions of the present application will be described in further detail below with reference to the drawings and embodiments.

[0018] The initialization of the array is usually done by the memset standard library function in the C standard. Due to compatibility considerations, the memset standard library function in the C language lags behind the assembly code written according to the target machine of the specific architecture in terms of speed. Based on the theoretical basis of optimization, the lower the program is, the easier the code is to schedule, and the more effective the use of the instruction set. The assembly code is generated by the compiler in combination with the hardware characteristics of the target machine, after compiling and optimizing the high-level language, merging code blocks and other operations. Therefore, in order to improve the processing performance of modern microprocessors, many standard library functions are embedded in t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for generating an optimized memset standard library function assembly code. The method comprises the steps as follows: determining the attributes and the size of an optimized filling execution segment to be generated according to the hardware characteristics of a target machine; constructing a centralized jump table according to the size of the optimized filling execution segment to be generated; carrying out branch judgment on a target filling address and a filling size in an input parameter according to the centralized jump table, and establishing a mapping relation from the input parameter to the centralized jump table; generating a filling mode set meeting the filling requirements according to the available data transmission instruction set of the target machine and the attributes of the optimized filling execution segment to be generated; and carrying out performance screening on the filling mode set according to the hardware characteristics of the target machine to obtain a filling mode with the optimal filling performance so as to generate the optimized filling execution segment. According to the method, the optimized data filling effect is achieved, the data filling performance of a memset standard library function is improved, and the portability is good.

Description

technical field [0001] The invention relates to a standard library function assembly code generation technology, in particular to an optimized memset standard library function assembly code generation method. Background technique [0002] Digital signal processing tasks usually need to complete a large number of data calculations, such as FIR (Finite Impulse Response, finite-length unit impulse response) filters and FFT (Fast Fourier Transformation, Fast Fourier Transform) algorithms commonly used in digital signal processing, and the array The initialization work of is generally completed by the memset standard library function in the C standard. In the C11 standard, the memset standard library function is defined to fill a memory area of ​​a certain size with specific single-byte data. Since the speed of the memory is much slower than that of the microprocessor, and for the microprocessor oriented to data-intensive applications, the memset standard library function used f...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/45
Inventor 应欢朱浩王东辉洪缨
Owner INST OF ACOUSTICS CHINESE ACAD OF SCI