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

Toggle realization method and device

A realization method and technology of set lock, applied in the computer field, can solve problems such as the inapplicability of the MIPS framework

Active Publication Date: 2016-06-15
LOONGSON TECH CORP
View PDF5 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The present invention provides a method and device for implementing a set lock to solve the problem that the set lock implementation based on the X86 framework in the prior art is not applicable to the MIPS framework with fixed-length instructions

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
  • Toggle realization method and device
  • Toggle realization method and device
  • Toggle realization method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 2

[0048] figure 2 It is a flow chart of a method for implementing a set lock provided in Embodiment 2 of the present invention. Such as figure 2 As shown, the method of this embodiment may include:

[0049] S210. When executing the compiler program added to the set of lock instructions, according to the switch parameters, send the corresponding execution instructions to the instruction buffer, where the set of lock instructions includes the execution instructions corresponding to the switch parameters.

[0050] In this embodiment, when the switch parameter indicates an on parameter or an off parameter, it corresponds to different execution instructions, that is, when the indications of the switch parameters are different, the execution instructions sent to the instruction buffer are also different.

[0051] S220, when the switch parameter is a parameter indicating to enable, analyze the compiler program through the corresponding execution instruction in the instruction buffe...

Embodiment 3

[0081] Figure 5 It is a schematic structural diagram of a set-lock realization device provided by Embodiment 3 of the present invention. Such as Figure 5 As shown, the set-lock implementation device of this embodiment specifically includes: an execution module 11 and an optimization module 12 .

[0082] Wherein, the execution module 11 is configured to analyze the compiler program according to the switch parameters in the set of lock instructions when executing the compiler program added to the set of lock instructions.

[0083] The optimization module 12 is configured to optimize the compiler program according to the analysis result of the compiler program.

[0084] The set lock implementation device provided by the embodiment of the present invention is used to implement the set lock implementation method provided by the first embodiment of the present invention, and has corresponding functional modules. Its implementation principle and technical effect are similar, and ...

Embodiment 4

[0086] Figure 6 It is a schematic structural diagram of a set-lock realization device provided by Embodiment 4 of the present invention. Such as Figure 6 As shown, the set lock realization device provided by this embodiment is in Figure 5 On the basis of the device structure shown, the set of lock instructions also includes: the execution instruction corresponding to the switch parameter. The instruction buffer sends the corresponding execution instruction; the execution unit 14 is configured to analyze the compiler program through the corresponding execution instruction in the instruction buffer when the switch parameter is an indication enable parameter.

[0087] In a specific implementation, in the device provided by this embodiment, when the switch parameter is a parameter indicating that the switch is turned on, the execution command sent to the command buffer may include the target address; correspondingly, the execution unit 14 is specifically configured to When 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 provides a toggle realization method and device; the method comprises the following steps: in execution of a compiler program with an added toggle order set, analyzing the compiler program according to switch parameters in the toggle order set; optimizing the compiler program according to the analysis result of the compiler program. The invention provides the toggle realization method suitable for a MIPS framework, thus solving the problems in the prior art that a toggle realization method based on an X86 framework is not suitable for the MIPS framework with a fixed length order; by using the novel toggle realization method and device, the development of the compiler program in the MIPS framework can be more convenient and effective.

Description

technical field [0001] The invention relates to computer technology, in particular to a method and device for realizing a set lock. Background technique [0002] In the development process of computer hardware and software, usually by adding a compiler to the client-side scripting language (JavaScript, referred to as: JS) engine of the browser, the purpose of accelerating the jump function of the browser is realized. [0003] Currently, detection and optimization of the compiler program are usually implemented by adding a toggle to the compiler program of the JS engine. For example, in the X86 architecture, the set lock function is realized by calling the call instruction and the nop instruction. Since the length of the instruction in the X86 architecture is variable, the function call instruction is 5 bytes as an example. One byte represents the call Instructions, such as calling the call instruction, the other 4 bytes represent the address of the called instruction. Howev...

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
IPC IPC(8): G06F9/30G06F9/45
Inventor 汪清薛双百黄文君屈秋雯魏振伟
Owner LOONGSON TECH CORP
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