Array processing method and device in virtual machine, electronic equipment and readable storage medium

By obtaining the boundary address of the virtual machine array and reassembling the memory access instructions, the problem of host machine performance degradation caused by array out-of-bounds checks in the virtual machine is solved, and more efficient array element memory access is achieved.

CN115309499BActive Publication Date: 2026-05-29LOONGSON TECH CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LOONGSON TECH CORP
Filing Date
2022-07-12
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, virtual machines need to insert multiple jump instructions, comparison instructions, and branch instructions when performing array out-of-bounds checks, which leads to a decrease in the performance of the host program.

Method used

By obtaining the boundary address of the array to be processed, writing it into the range register, and reassembling it into a second memory access instruction, the host machine performs array out-of-bounds detection and load or store operations based on this instruction, avoiding the insertion of multiple jump, compare, and branch instructions.

Benefits of technology

This reduces the number of instructions executed by the host machine, avoids instruction jumps, and improves program performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115309499B_ABST
    Figure CN115309499B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a kind of array processing method, device, electronic equipment and readable storage medium in virtual machine, method is by responding to the first memory access instruction of processing element corresponding, based on the boundary address of first memory access instruction acquisition to-be-processed array;Boundary address is written into specified range register, based on the instruction parameter carried in first memory access instruction and the relevant information of range register, recombination forms second memory access instruction;Second memory access instruction is sent to host computer;Host computer carries out array out-of-bound detection to to-be-processed element based on second memory access instruction, and in the case where the detection result is that to-be-processed element is not out-of-bound, to-be-processed element is loaded or stored based on second memory access instruction. Directly using memory access instruction with range register information realizes memory access operation, avoids possible instruction jump, improves the program performance of host computer.
Need to check novelty before this filing date? Find Prior Art