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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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 ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com