Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Code positioning method and device

A positioning method and code technology, applied in image data processing, instrumentation, computing, etc., can solve problems such as abnormal compilation process, inability to prefetch new program code blocks, and inability of the processor to forcibly abandon original program code blocks, so as to ensure normal operation. effect of execution

Active Publication Date: 2018-04-13
ALIBABA (CHINA) CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If the processor has already prefetched the original program code block into the high-speed cache at this time, due to hardware defects, the processor cannot forcibly abandon the cached original program code block, which further leads to the inability to prefetch the new program code block, that is, the high-speed memory cannot be completed. cache cleaning
The processor can only read and execute the original function instructions in the original program code block, so that the execution of the machine language program is abnormal, which further causes the compilation process to be abnormal

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
  • Code positioning method and device
  • Code positioning method and device
  • Code positioning method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] see figure 1 , this figure is the method flow chart of the first embodiment of the code location method provided by the embodiment of the present invention. In this embodiment, the same program code block is stored in two addresses in the memory. When the program code block exists When updating, the program code blocks stored in the two addresses are updated at the same time. After the program code block in one of the addresses has been stored in the cache, if the program code block is updated before execution, the updated program code block in the other address can be stored in the cache to ensure that the program is normal implement. The method comprises the steps of:

[0026] Step S101: Store the first program code block in the memory into the cache.

[0027] This embodiment can be applied to multiple scenarios, wherein the high-level language program can be a program written in any assembly language, for example: programs written in C language, Java, .net and other...

Embodiment approach

[0039] see figure 2 , the figure shows the second implementation of the code locating method provided by the embodiment of the present invention. This embodiment is an extension of the first embodiment. For the content of the method steps in this embodiment that are repetitive with the first embodiment, please refer to the implementation The content of Example 1 will not be repeated in this embodiment. In this embodiment, the method includes the following steps:

[0040] Step S201: Store the first program code block in the memory into the cache.

[0041] Step S202: Respectively acquire update parameters in the target program code and update parameters in the first program code block at the current moment.

[0042] Step S203: Store the second program code block in the memory into the cache.

[0043] Step S204: Respectively acquire the update parameters in the target program code and the update parameters in the second program code block at the current moment.

[0044] On t...

Embodiment 3

[0053] In order to make those skilled in the art understand the technical solution of the present invention in more detail and clearly, the present invention describes the technical solution of the present invention in detail through the following specific examples.

[0054] In this embodiment, M represents a high-level language program block, N11 and N12 represent machine language program code blocks formed by compiling M, and its data structure is as follows image 3 shown. Wherein, the storage address number of N11 in the memory is 0-30, and the storage address number of N12 in the memory is 80-110. When the processor is about to execute the machine code block corresponding to M, according to the preset execution flow, first, jump to the storage address of the first instruction of N11 in the memory, which can be the address of 0-5 in this embodiment , with the storage address 0-5 as the starting address, store the data in the address 0-50 into the cache. That is to store ...

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 code locating method disclosed in the present invention includes: storing the first program code block in the internal memory into a cache; respectively obtaining update parameters in the target program code and update parameters in the first program code block at the current moment; When the update parameter in the target program code is different from the update parameter in the first program code block at the current moment, storing the second program code block in the internal memory into the cache. The invention also provides a code positioning device. In the code location method and device provided by the present invention, when the first program code block is updated, the second program code block stored in another address is updated simultaneously with the first program code block, therefore, the second program code block is stored to the cache, and use the second program code block in the cache as the target program code, so as to ensure the normal execution of the machine language program and further enable the normal progress of the compilation process.

Description

technical field [0001] The present invention relates to the technical field of mobile communication, and more specifically, to a method and device for locating codes in a compiling process. Background technique [0002] A compiler is a bridge that converts a high-level language program into a machine language program executable by the processor. Usually, when compiling, the compiler compiles the execution steps in the high-level language program to form a machine-executable program code block, and stores the program code block in memory. Wherein, the program code block includes auxiliary information such as a functional instruction and a storage address of the functional instruction. When executing a machine language program, the processor reads the program code blocks according to the execution flow, and executes the functional instructions in the program code blocks. Because the program code block is stored in the memory, and when the processor executes the machine langu...

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): G06T5/00
Inventor 杨琦
Owner ALIBABA (CHINA) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products