WO2017016232A1 - Variable instruction set microprocessor and implementation method therefor - Google Patents

Variable instruction set microprocessor and implementation method therefor Download PDF

Info

Publication number
WO2017016232A1
WO2017016232A1 PCT/CN2016/078069 CN2016078069W WO2017016232A1 WO 2017016232 A1 WO2017016232 A1 WO 2017016232A1 CN 2016078069 W CN2016078069 W CN 2016078069W WO 2017016232 A1 WO2017016232 A1 WO 2017016232A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction set
variable
processor
register
program
Prior art date
Application number
PCT/CN2016/078069
Other languages
French (fr)
Chinese (zh)
Inventor
周海林
Original Assignee
成都腾悦科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都腾悦科技有限公司 filed Critical 成都腾悦科技有限公司
Publication of WO2017016232A1 publication Critical patent/WO2017016232A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead

Definitions

  • the present invention relates to a variable instruction set microprocessor and an implementation method thereof.
  • the instruction set is a hard program stored in the CPU to guide and optimize CPU operations. With these instruction sets, the CPU can run more efficiently.
  • Intel has x86, x86-64, MMX, SSE, SSE2, SS E3, SSSE3 (Supervisors)
  • the CPU relies on instructions to calculate and control the system, and each CPU design specifies an instruction system that is compatible with its hardware circuitry. The strength of the instruction is also an important indicator of the CPU.
  • the instruction set is one of the most effective tools for improving the efficiency of the microprocessor. From the current mainstream architecture, the instruction set can be divided into two parts: complex instruction set (CISC instruction set) and reduced instruction set (RISC instruction set). From the specific application, such as Intel's MMX (Multi Media Extended), SSE, SSE2 (Streaming-Single instruction multiple data-Extensions 2) and AMD's 3DNow! are all CPU extended instruction sets, which enhance the CPU's multimedia, graphics and Internet processing capabilities.
  • the CPU's extended instruction set is usually referred to as the "CPU instruction set".
  • the object of the present invention is to overcome the deficiencies of the prior art, and provide a variable instruction set microprocessor and an implementation method thereof.
  • the current program can change the variable instruction set, so that the illegal program cannot change the current program, and prevents Attacks by malware to improve the security of data processing.
  • variable instruction set microprocessor used to store a variable instruction set address
  • variable instruction set address refers to the memory address used to store the user variable instruction set, this register can only be written by the program, but can not be read by the program Otherwise, an exception is generated
  • Variable index register used to store the variable instruction set number. The value of this register starts from 0. Whenever the value of the processor variable instruction set register changes once, the value of this register is increased by 1. Read and write by threads or tasks;
  • Variable finger enable register When the value of the register is set, the processor uses a thread or a variable instruction set specified by a task; when the register is reset, the processor uses the processor's own instruction set;
  • variable instruction set storage unit for storing a user variable instruction set, stored in a main memory, an auxiliary memory or a processor; the processor instruction set (we put the processor to complete calculation or control instructions)
  • the instruction set is a processor instruction set corresponding to a fixed address offset, or is based on a processor instruction set corresponding to a fixed address program variable instruction set, or a program corresponding to a processor fixed instruction.
  • Variable Finger Clear Command When the program uses the command, the processor clears the variable instruction set number and the variable instruction set address corresponding to the variable instruction set number.
  • variable instruction set address is: an address of a processor variable instruction set in a main memory, an auxiliary memory, or a processor.
  • the processor instruction set is based on a fixed address offset corresponding processor instruction set, or based on a fixed address program variable instruction set corresponding processor instruction set, or based on a processor fixed instruction
  • the processor mechanically divides the memory unit of a certain capacity in the main memory or the auxiliary memory, and places the variable instruction set address and the variable instruction set corresponding to the number of the variable instruction set in the storage unit.
  • the processor encrypts the contents of the address segment and cannot be read or written by the program. Otherwise, an exception is generated.
  • a method for implementing a variable instruction set microprocessor includes the following steps:
  • the program establishes a variable instruction set in a suitable memory unit, and then the program places the variable instruction directory address into the processor variable instruction set register, and then replaces the program instruction with a variable instruction set that needs to be changed, and finally Enable the variable instruction set register, and the processor uses the instruction set provided by the program; [0016] (2) Abandoning the variable instruction set used by the processor:
  • the program abandons the variable instruction set. First, the program converts the variable instruction set code that the program is using into a fixed instruction set code of the processor, and then resets the variable enable register, and clears the variable instruction set instruction by clearing the variable instruction set instruction. Instruction set address and variable instruction set number;
  • S1 the program stores the variable instruction set corresponding to the variable instruction set of the processor in a suitable storage unit, and the variable instruction set is stored in the main memory, the on-chip buffer or the auxiliary storage;
  • S3 The program puts the variable instruction set address into the variable address register, and the processor will change the value of the index register to the port 1;
  • the program stores the variable instruction set register and the variable index register in the program structure, and when the thread context is to be restored, the value of the enable variable instruction set register in the program structure is enabled.
  • the variable instruction set register put the value of the variable index register into the variable index register.
  • the beneficial effects of the present invention are:
  • the reverse cracking program knows the instructions of the processor, thereby obtaining the source code of the software.
  • the application adopts a variable instruction set microprocessor, which can prevent the reverse cracking program from cracking the processor's instructions, thereby preventing malware attacks and improving data security.
  • variable instruction set microprocessor the register of the variable instruction set microprocessor is named as follows: [0028] variable address register: for storing a variable instruction set address (indicating a corresponding processor Variable instruction set, in main memory, or in auxiliary memory, or address in the processor), variable instruction set address is used for Stores the memory address of the user variable instruction set.
  • This register can only be written by the program, but cannot be read by the program (which prevents other programs from snooping the instruction set of other user programs), otherwise an exception is generated.
  • variable index register used to store a variable instruction set number. The value of this register starts from 0. Whenever the value of the processor variable instruction set register changes once, the value of this register is increased by 1. Read and write by thread or task; in order to ensure that the written data is correct, do not use unused values, and do not use the number of the variable instruction set of other programs, otherwise it will produce unpredictable errors;
  • Variable finger enable register When the value of the register is set, the processor uses a thread or a variable instruction set specified by the task; when the register is reset, the processor uses the processor's own instruction set;
  • a variable instruction set storage unit for storing a user variable instruction set, stored in a main memory, an auxiliary memory or a processor; the processor instruction set (we put the processor to complete calculation or control instructions)
  • the instruction set is a processor instruction set corresponding to a fixed address offset, or is based on a processor instruction set corresponding to a fixed address program variable instruction set, or a program corresponding to a processor fixed instruction.
  • Variable Finger Clear Command When the program uses the command, the processor clears the variable instruction set number and the variable instruction set address corresponding to the variable instruction set number.
  • variable instruction set address is an address of a processor variable instruction set in a main memory, an auxiliary memory, or a processor.
  • a method for implementing a variable instruction set microprocessor includes the following steps:
  • the program establishes a variable instruction set in a suitable memory unit, and then the program places the variable instruction directory address into the processor variable instruction set register, and then replaces the program instruction with a variable instruction set that needs to be changed, and finally Enable the variable instruction set register, and the processor uses the instruction set provided by the program;
  • the program abandons the variable instruction set. First, the program converts the variable instruction set code that the program is using into a fixed instruction set code of the processor, and then resets the variable enable register, and clears the variable instruction set instruction to clear the variable. Instruction set address and variable instruction set number;
  • S1 The program stores the variable instruction set corresponding to the variable instruction set of the processor in a suitable storage unit (variable The instruction set can be placed in main memory, on-chip cache, or in auxiliary storage);
  • S4 setting a pointer to an enable register, and the processor uses a new instruction set provided by the program
  • the program stores the variable instruction set register and the variable index register in the program structure, and when the thread context is to be restored, the value of the enable variable instruction set register in the program structure is enabled.
  • the variable instruction set register put the value of the variable index register into the variable index register.

Abstract

A variable instruction set microprocessor and an implementation method therefor. Register names comprise: a variable instruction address register, for storing a variable instruction set address; a variable instruction number register, for storing a variable instruction set number, a value of the register starting from 0, and each time the value of a variable instruction set register of a processor varies, the value of the register increasing by 1; a variable instruction enabling register, wherein when the value of the register is set, the processor uses a variable instruction set specified by a thread or a task, and when the register is reset, the processor uses an instruction set of the processor; a variable instruction set register, for storing a corresponding relation between a program variable instruction set and a processor instruction set; and a variable instruction number clearing instruction, wherein when a program uses the instruction, the processor will clear a variable instruction set address corresponding to a variable instruction set number. Adopting the variable instruction set microprocessor can prevent a reverse cracking program from cracking an instruction of a processor, thereby preventing an attack from malicious software, and improving the data security.

Description

说明书 发明名称:一种可变指令集微处理器及其实现方法 技术领域  Description: A variable instruction set microprocessor and an implementation method thereof
[0001] 本发明涉及一种可变指令集微处理器及其实现方法。  The present invention relates to a variable instruction set microprocessor and an implementation method thereof.
背景技术  Background technique
[0002] 指令集是存储在 CPU内部, 对 CPU运算进行指导和优化的硬程序。 拥有这些指 令集, CPU就可以更高效地运行。 Intel有 x86, x86-64, MMX, SSE, SSE2, SS E3, SSSE3 (Super  [0002] The instruction set is a hard program stored in the CPU to guide and optimize CPU operations. With these instruction sets, the CPU can run more efficiently. Intel has x86, x86-64, MMX, SSE, SSE2, SS E3, SSSE3 (Super
SSE3) , SSE4.1 , SSE4.2和针对 64位桌面处理器的 EM-64T。 AMD主要是 3D-Now !指令集。 CPU靠指令来计算和控制系统, 每款 CPU设计吋就规定了与其硬件电 路相配合的指令系统。 指令的强弱也是 CPU的重要指标, 指令集是提高微处理器 效率的最有效工具之一。 从现阶段的主流体系结构讲, 指令集可分为复杂指令 集 (CISC指令集)和精简指令集 (RISC指令集)两部分, 而从具体运用看, 如 Intel的 MMX (Multi Media Extended) 、 SSE、 SSE2 (Streaming-Single instruction multiple data-Extensions 2) 和 AMD的 3DNow!等都是 CPU的扩展指令集, 分别增 强了 CPU的多媒体、 图形图像和 Internet等处理能力。 通常把 CPU的扩展指令集 称为" CPU的指令集"。  SSE3), SSE4.1, SSE4.2 and EM-64T for 64-bit desktop processors. AMD is mainly 3D-Now! Instruction Set. The CPU relies on instructions to calculate and control the system, and each CPU design specifies an instruction system that is compatible with its hardware circuitry. The strength of the instruction is also an important indicator of the CPU. The instruction set is one of the most effective tools for improving the efficiency of the microprocessor. From the current mainstream architecture, the instruction set can be divided into two parts: complex instruction set (CISC instruction set) and reduced instruction set (RISC instruction set). From the specific application, such as Intel's MMX (Multi Media Extended), SSE, SSE2 (Streaming-Single instruction multiple data-Extensions 2) and AMD's 3DNow! are all CPU extended instruction sets, which enhance the CPU's multimedia, graphics and Internet processing capabilities. The CPU's extended instruction set is usually referred to as the "CPU instruction set".
[0003] 现有处理器都采用固定指令集, 这样破解程序通过分析二进制目标程序可以破 解程序的源代码, 这样容易导致数据安全隐患。  [0003] Existing processors use a fixed instruction set, so that the crack program can resolve the source code of the program by analyzing the binary target program, which easily leads to data security risks.
技术问题  technical problem
[0004] 本发明的目的在于克服现有技术的不足, 提供一种可变指令集微处理器及其实 现方法, 当前程序可以随吋更改可变指令集, 使得非法程序不能更改当前程序 , 防止恶意软件的攻击, 提高数据处理的安全性。  [0004] The object of the present invention is to overcome the deficiencies of the prior art, and provide a variable instruction set microprocessor and an implementation method thereof. The current program can change the variable instruction set, so that the illegal program cannot change the current program, and prevents Attacks by malware to improve the security of data processing.
问题的解决方案  Problem solution
技术解决方案  Technical solution
[0005] 本发明的目的是通过以下技术方案来实现的: 一种可变指令集微处理器, 所述 可变指令集微处理器的寄存器命名如下: [0006] 变指地址寄存器: 用于存放可变指令集地址, 可变指令集地址指用于存储用户 可变指令集的内存地址, 该寄存器只能被程序写入, 而不能被程序读取, 否则 产生异常; [0005] The object of the present invention is achieved by the following technical solutions: A variable instruction set microprocessor, the register of the variable instruction set microprocessor is named as follows: [0006] Variable address register: used to store a variable instruction set address, variable instruction set address refers to the memory address used to store the user variable instruction set, this register can only be written by the program, but can not be read by the program Otherwise, an exception is generated;
[0007] 变指号寄存器: 用于存放可变指令集号码, 该寄存器的值从 0幵始, 每当处理 器可变指令集寄存器的值改变一次, 该寄存器的值增加 1, 该寄存器能够被线程 或者任务读写;  [0007] Variable index register: used to store the variable instruction set number. The value of this register starts from 0. Whenever the value of the processor variable instruction set register changes once, the value of this register is increased by 1. Read and write by threads or tasks;
[0008] 变指使能寄存器: 当该寄存器的值被置位, 处理器使用线程或者任务规定的可 变指令集; 当该寄存器被复位, 处理器使用处理器自身的指令集;  [0008] Variable finger enable register: When the value of the register is set, the processor uses a thread or a variable instruction set specified by a task; when the register is reset, the processor uses the processor's own instruction set;
[0009] 可变指令集存储单元: 用于存放用户可变指令集, 存放在主存、 辅存或者处理 器中; 所述的处理器指令集 (我们把处理器完成计算或者控制的指令合称为指 令集) 为基于某一个固定地址偏移对应的处理器指令集, 或者是基于某一个固 定地址程序可变指令集处对应的处理器指令集, 或者是基于处理器固定指令对 应的程序可变指令集;  [0009] a variable instruction set storage unit: for storing a user variable instruction set, stored in a main memory, an auxiliary memory or a processor; the processor instruction set (we put the processor to complete calculation or control instructions) The instruction set is a processor instruction set corresponding to a fixed address offset, or is based on a processor instruction set corresponding to a fixed address program variable instruction set, or a program corresponding to a processor fixed instruction. Variable instruction set
[0010] 变指号清除指令: 当程序使用该指令后, 处理器会清除可变指令集号码以及可 变指令集号码对应的可变指令集地址。  [0010] Variable Finger Clear Command: When the program uses the command, the processor clears the variable instruction set number and the variable instruction set address corresponding to the variable instruction set number.
[0011] 所述的可变指令集地址为: 处理器可变指令集在主存、 辅存或者处理器中的地 址。  [0011] The variable instruction set address is: an address of a processor variable instruction set in a main memory, an auxiliary memory, or a processor.
[0012] 所述的处理器指令集为基于某一个固定地址偏移对应处理器指令集, 或者是基 于某一个固定地址程序可变指令集处对应处理器指令集, 或者是基于处理器固 定指令对应程序可变指令集, 处理器机械地在主存或者辅存中划分一定容量的 存储单元, 把可变指令集的号码对应的可变指令集地址, 可变指令集放在该存 储单元中, 处理器对该地址段内容进行了硬件加密, 不能被程序读写, 否则产 生异常。  [0012] The processor instruction set is based on a fixed address offset corresponding processor instruction set, or based on a fixed address program variable instruction set corresponding processor instruction set, or based on a processor fixed instruction Corresponding to the program variable instruction set, the processor mechanically divides the memory unit of a certain capacity in the main memory or the auxiliary memory, and places the variable instruction set address and the variable instruction set corresponding to the number of the variable instruction set in the storage unit. The processor encrypts the contents of the address segment and cannot be read or written by the program. Otherwise, an exception is generated.
[0013] 一种可变指令集微处理器的实现方法, 包括以下步骤:  [0013] A method for implementing a variable instruction set microprocessor includes the following steps:
[0014] (1) 幵启模式可变指令: [0014] (1) The start mode variable instruction:
[0015] 程序在合适的存储单元建立好可变指令集, 然后程序把可变指令目录地址放到 处理器可变指令集寄存器, 然后把程序的指令替换成需要更改的可变指令集, 最后使能可变指令集寄存器, 处理器使用程序提供的指令集; [0016] (2) 遗弃处理器使用的可变指令集: [0015] The program establishes a variable instruction set in a suitable memory unit, and then the program places the variable instruction directory address into the processor variable instruction set register, and then replaces the program instruction with a variable instruction set that needs to be changed, and finally Enable the variable instruction set register, and the processor uses the instruction set provided by the program; [0016] (2) Abandoning the variable instruction set used by the processor:
[0017] 程序要遗弃可变指令集, 首先程序将程序正在使用的可变指令集代码转换成处 理器的固定指令集代码, 然后复位变指使能寄存器, 使用清除可变指令集指令 清除可变指令集地址和可变指令集号码;  [0017] The program abandons the variable instruction set. First, the program converts the variable instruction set code that the program is using into a fixed instruction set code of the processor, and then resets the variable enable register, and clears the variable instruction set instruction by clearing the variable instruction set instruction. Instruction set address and variable instruction set number;
[0018] (3) 在程序运行过程中改变处理器指令集, 包括以下子步骤:  [0018] (3) changing the processor instruction set during the running of the program, including the following sub-steps:
[0019] S1 : 程序把对应处理器可变指令集的可变指令集存放在合适的储存单元, 可变 指令集存放在主存、 片上缓存或者辅存中;  [0019] S1: the program stores the variable instruction set corresponding to the variable instruction set of the processor in a suitable storage unit, and the variable instruction set is stored in the main memory, the on-chip buffer or the auxiliary storage;
[0020] S2: 把程序的指令替换成需要更改的可变指令集;  [0020] S2: replacing the instruction of the program with a variable instruction set that needs to be changed;
[0021] S3: 程序把可变指令集地址放到变指地址寄存器, 处理器将变指号寄存器的值 力口 1 ;  [0021] S3: The program puts the variable instruction set address into the variable address register, and the processor will change the value of the index register to the port 1;
[0022] S4: 把程序的指令替换成新的可变指令集, 置位变指使能寄存器, 处理器使用 程序提供的新的指令集;  [0022] S4: replacing the instruction of the program with a new variable instruction set, setting the variable enable register, and the processor uses the new instruction set provided by the program;
[0023] (4) 程序上下文的切换: [0023] (4) Switching of the program context:
[0024] 程序把使能可变指令集寄存器、 变指号寄存器存入程序结构中, 当要恢复线程 上下文的吋候, 把程序结构中的使能可变指令集寄存器的值放到使能可变指令 集寄存器中, 把变指号寄存器的值放到变指号寄存器中。  [0024] The program stores the variable instruction set register and the variable index register in the program structure, and when the thread context is to be restored, the value of the enable variable instruction set register in the program structure is enabled. In the variable instruction set register, put the value of the variable index register into the variable index register.
发明的有益效果  Advantageous effects of the invention
有益效果  Beneficial effect
[0025] 本发明的有益效果是: 逆向破解程序知道处理器的指令, 从而得到软件的源代 码。 本申请采用可变指令集微处理器, 可以避免逆向破解程序破解处理器的指 令, 从而防止恶意软件的攻击, 提高数据安全性。  [0025] The beneficial effects of the present invention are: The reverse cracking program knows the instructions of the processor, thereby obtaining the source code of the software. The application adopts a variable instruction set microprocessor, which can prevent the reverse cracking program from cracking the processor's instructions, thereby preventing malware attacks and improving data security.
本发明的实施方式 Embodiments of the invention
[0026] 下面进一步详细描述本发明的技术方案, 但本发明的保护范围不局限于以下所 述。  The technical solution of the present invention is described in further detail below, but the scope of protection of the present invention is not limited to the following.
[0027] 一种可变指令集微处理器, 所述可变指令集微处理器的寄存器命名如下: [0028] 变指地址寄存器: 用于存放可变指令集地址 (指示处理器对应的可变指令集, 在主存中, 或者在辅存中, 或者在处理器中的地址) , 可变指令集地址指用于 存储用户可变指令集的内存地址, 该寄存器只能被程序写入, 而不能被程序读 取 (可防止其他程序窥探其他用户程序的指令集) , 否则产生异常; [0027] A variable instruction set microprocessor, the register of the variable instruction set microprocessor is named as follows: [0028] variable address register: for storing a variable instruction set address (indicating a corresponding processor Variable instruction set, in main memory, or in auxiliary memory, or address in the processor), variable instruction set address is used for Stores the memory address of the user variable instruction set. This register can only be written by the program, but cannot be read by the program (which prevents other programs from snooping the instruction set of other user programs), otherwise an exception is generated.
[0029] 变指号寄存器: 用于存放可变指令集号码, 该寄存器的值从 0幵始, 每当处理 器可变指令集寄存器的值改变一次, 该寄存器的值增加 1, 该寄存器能够被线程 或者任务读写; 为了保证写的数据正确, 不使用未被使用的值, 并且也不要使 用其他程序的可变指令集的号码, 否则会产生不能预测的错误;  [0029] variable index register: used to store a variable instruction set number. The value of this register starts from 0. Whenever the value of the processor variable instruction set register changes once, the value of this register is increased by 1. Read and write by thread or task; in order to ensure that the written data is correct, do not use unused values, and do not use the number of the variable instruction set of other programs, otherwise it will produce unpredictable errors;
[0030] 变指使能寄存器: 当该寄存器的值被置位, 处理器使用线程或者任务规定的可 变指令集; 当该寄存器被复位, 处理器使用处理器自身的指令集;  [0030] Variable finger enable register: When the value of the register is set, the processor uses a thread or a variable instruction set specified by the task; when the register is reset, the processor uses the processor's own instruction set;
[0031] 可变指令集存储单元: 用于存放用户可变指令集, 存放在主存、 辅存或者处理 器中; 所述的处理器指令集 (我们把处理器完成计算或者控制的指令合称为指 令集) 为基于某一个固定地址偏移对应的处理器指令集, 或者是基于某一个固 定地址程序可变指令集处对应的处理器指令集, 或者是基于处理器固定指令对 应的程序可变指令集;  [0031] a variable instruction set storage unit: for storing a user variable instruction set, stored in a main memory, an auxiliary memory or a processor; the processor instruction set (we put the processor to complete calculation or control instructions) The instruction set is a processor instruction set corresponding to a fixed address offset, or is based on a processor instruction set corresponding to a fixed address program variable instruction set, or a program corresponding to a processor fixed instruction. Variable instruction set
[0032] 变指号清除指令: 当程序使用该指令后, 处理器会清除可变指令集号码以及可 变指令集号码对应的可变指令集地址。  [0032] Variable Finger Clear Command: When the program uses the command, the processor clears the variable instruction set number and the variable instruction set address corresponding to the variable instruction set number.
[0033] 所述的可变指令集地址为处理器可变指令集在主存、 辅存或者处理器中的地址 [0033] The variable instruction set address is an address of a processor variable instruction set in a main memory, an auxiliary memory, or a processor.
[0034] 一种可变指令集微处理器的实现方法, 包括以下步骤: [0034] A method for implementing a variable instruction set microprocessor includes the following steps:
[0035] (1) 幵启模式可变指令: [0035] (1) The start mode variable instruction:
[0036] 程序在合适的存储单元建立好可变指令集, 然后程序把可变指令目录地址放到 处理器可变指令集寄存器, 然后把程序的指令替换成需要更改的可变指令集, 最后使能可变指令集寄存器, 处理器使用程序提供的指令集;  [0036] The program establishes a variable instruction set in a suitable memory unit, and then the program places the variable instruction directory address into the processor variable instruction set register, and then replaces the program instruction with a variable instruction set that needs to be changed, and finally Enable the variable instruction set register, and the processor uses the instruction set provided by the program;
[0037] (2) 遗弃处理器使用的可变指令集:  [0037] (2) Abandoning the variable instruction set used by the processor:
[0038] 程序要遗弃可变指令集, 首先程序将程序正在使用的可变指令集代码转换成处 理器的固定指令集代码, 然后复位变指使能寄存器, 使用清除可变指令集指令 清除可变指令集地址和可变指令集号码;  [0038] The program abandons the variable instruction set. First, the program converts the variable instruction set code that the program is using into a fixed instruction set code of the processor, and then resets the variable enable register, and clears the variable instruction set instruction to clear the variable. Instruction set address and variable instruction set number;
[0039] (3) 在程序运行过程中改变处理器指令集, 包括以下子步骤: [0039] (3) Changing the processor instruction set during program execution, including the following sub-steps:
[0040] S1 : 程序把对应处理器可变指令集的可变指令集存放在合适的储存单元 (可变 指令集可以放在主存, 片上缓存, 或者辅存中) ; [0040] S1: The program stores the variable instruction set corresponding to the variable instruction set of the processor in a suitable storage unit (variable The instruction set can be placed in main memory, on-chip cache, or in auxiliary storage);
[0041] S2: 把程序的指令替换成需要更改的可变指令集; [0041] S2: replacing the instruction of the program with a variable instruction set that needs to be changed;
[0042] S3: 程序把可变指令集地址放到变指地址寄存器, 处理器将变指号寄存器的值 力口 1 ;  [0042] S3: The program puts the variable instruction set address into the variable address register, and the processor will change the value of the index register to the port 1;
[0043] S4: 置位变指使能寄存器, 处理器使用程序提供的新的指令集;  [0043] S4: setting a pointer to an enable register, and the processor uses a new instruction set provided by the program;
[0044] (4) 程序上下文的切换: [0044] (4) Switching of the program context:
[0045] 程序把使能可变指令集寄存器、 变指号寄存器存入程序结构中, 当要恢复线程 上下文的吋候, 把程序结构中的使能可变指令集寄存器的值放到使能可变指令 集寄存器中, 把变指号寄存器的值放到变指号寄存器中。  [0045] The program stores the variable instruction set register and the variable index register in the program structure, and when the thread context is to be restored, the value of the enable variable instruction set register in the program structure is enabled. In the variable instruction set register, put the value of the variable index register into the variable index register.
[0046] 以上所述仅是本发明的优选实施方式, 应当理解本发明并非局限于本文所披露 的形式, 不应看作是对其他实施例的排除, 而可用于各种其他组合、 修改和环 境, 并能够在本文所述构想范围内, 通过上述教导或相关领域的技术或知识进 行改动。 而本领域人员所进行的改动和变化不脱离本发明的精神和范围, 则都 应在本发明所附权利要求的保护范围内。  The above description is only a preferred embodiment of the present invention, and it should be understood that the present invention is not limited to the forms disclosed herein, and should not be construed as being excluded from the other embodiments, but may be used in various other combinations, modifications, and The environment, and can be modified by the above teachings or related art or knowledge within the scope of the teachings herein. All changes and modifications made by those skilled in the art are intended to be within the scope of the appended claims.

Claims

权利要求书 Claim
[权利要求 1] 一种可变指令集微处理器, 其特征在于, 所述可变指令集微处理器的 寄存器命名如下:  [Claim 1] A variable instruction set microprocessor, wherein the register of the variable instruction set microprocessor is named as follows:
变指地址寄存器: 用于存放可变指令集地址, 可变指令集地址指用于 存储用户可变指令集的内存地址, 该寄存器只能被程序写入, 而不能 被程序读取, 否则产生异常;  Variable address register: used to store the variable instruction set address. The variable instruction set address refers to the memory address used to store the user variable instruction set. This register can only be written by the program and cannot be read by the program. Otherwise, it will be generated. Abnormal
变指号寄存器: 用于存放可变指令集号码, 该寄存器的值从 0幵始, 每当处理器可变指令集寄存器的值改变一次, 该寄存器的值增加 1, 该寄存器能够被线程或者任务读写;  Variable index register: used to store the variable instruction set number. The value of this register starts from 0. Whenever the value of the processor variable instruction set register changes once, the value of this register is increased by 1. This register can be threaded or Task reading and writing;
变指使能寄存器: 当该寄存器的值被置位, 处理器使用线程或者任务 规定的可变指令集; 当该寄存器被复位, 处理器使用处理器自身的指 令集;  Variable finger enable register: When the value of this register is set, the processor uses a thread or a variable instruction set specified by the task; when the register is reset, the processor uses the processor's own instruction set;
可变指令集存储单元: 用于存放用户可变指令集, 存放在主存、 辅存 或者处理器中; 所述的处理器完成计算或者控制的指令集为基于某一 个固定地址偏移对应的处理器指令集, 或者是基于某一个固定地址程 序可变指令集处对应的处理器指令集, 或者是基于处理器固定指令对 应的程序可变指令集;  The variable instruction set storage unit is configured to store a variable instruction set of the user, and is stored in the main memory, the auxiliary memory or the processor; wherein the processor completes the calculation or the control instruction set is based on a fixed address offset a processor instruction set, or a processor instruction set corresponding to a variable instruction set based on a fixed address program, or a program variable instruction set corresponding to a processor fixed instruction;
变指号清除指令: 当程序使用该指令后, 处理器会清除可变指令集号 码以及可变指令集号码对应的可变指令集地址。  Variable finger clear command: When the program uses the command, the processor clears the variable instruction set number and the variable instruction set address corresponding to the variable instruction set number.
[权利要求 2] 根据权利要求 1所述的一种可变指令集微处理器, 其特征在于: 所述 的可变指令集地址为: 处理器可变指令集在主存、 辅存或者处理器中 的地址。  [Claim 2] A variable instruction set microprocessor according to claim 1, wherein: said variable instruction set address is: processor variable instruction set in main memory, auxiliary memory or processing The address in the device.
[权利要求 3] 根据权利要求 1所述的一种可变指令集微处理器, 其特征在于: 所述 的处理器指令集为基于某一个固定地址偏移对应处理器指令集, 或者 是基于某一个固定地址程序可变指令集处对应处理器指令集, 或者是 基于处理器固定指令对应程序可变指令集, 处理器机械地在主存或者 辅存中划分一定容量的存储单元, 把可变指令集的号码对应的可变指 令集地址, 可变指令集放在该存储单元中, 处理器对该地址段内容进 行了硬件加密, 不能被程序读写, 否则产生异常。 [Claim 3] A variable instruction set microprocessor according to claim 1, wherein: said processor instruction set is based on a fixed address offset corresponding to a processor instruction set, or is based on A fixed address program variable instruction set corresponds to a processor instruction set, or a processor fixed instruction corresponding program variable instruction set, and the processor mechanically divides a certain size of the storage unit in the main memory or the auxiliary memory, The variable instruction set address corresponding to the number of the instruction set, the variable instruction set is placed in the storage unit, and the processor enters the content of the address segment Hardware encryption is performed and cannot be read or written by the program, otherwise an exception is generated.
[权利要求 4] 根据权利要求 1-3中任意一项所述的一种可变指令集微处理器的实现 方法, 其特征在于, 包括以下步骤: [Claim 4] A method for implementing a variable instruction set microprocessor according to any one of claims 1 to 3, characterized in that it comprises the following steps:
( 1) 幵启模式可变指令:  (1) 幵Start mode variable instruction:
程序在合适的存储单元建立好可变指令集, 然后程序把可变指令目录 地址放到处理器可变指令集寄存器, 然后把程序的指令替换成需要更 改的可变指令集, 最后使能可变指令集寄存器, 处理器使用程序提供 的指令集;  The program establishes a variable instruction set in the appropriate memory location, and then the program places the variable instruction directory address in the processor variable instruction set register, and then replaces the program instruction with a variable instruction set that needs to be changed, and finally enables it. Variable instruction set register, the processor uses the instruction set provided by the program;
(2) 遗弃处理器使用的可变指令集:  (2) Abandoning the variable instruction set used by the processor:
程序要遗弃可变指令集, 首先程序将程序正在使用的可变指令集代码 转换成处理器的固定指令集代码, 然后复位变指使能寄存器, 使用清 除可变指令集指令清除可变指令集地址和可变指令集号码;  The program abandons the variable instruction set. First, the program converts the variable instruction set code that the program is using into the processor's fixed instruction set code, then resets the variable enable register, and clears the variable instruction set address by clearing the variable instruction set instruction. And variable instruction set numbers;
(3) 在程序运行过程中改变处理器指令集, 包括以下子步骤: (3) Changing the processor instruction set during program execution, including the following substeps:
S1 : 程序把对应处理器可变指令集的可变指令集存放在合适的储存单 元, 可变指令集存放在主存、 片上缓存或者辅存中; S1: The program stores the variable instruction set corresponding to the variable instruction set of the processor in a suitable storage unit, and the variable instruction set is stored in the main memory, the on-chip buffer or the auxiliary storage;
S2: 把程序的指令替换成需要更改的可变指令集; S2: Replace the program's instructions with a variable instruction set that needs to be changed;
S3: 程序把可变指令集地址放到变指地址寄存器, 处理器将变指号寄 存器的值加 1 ; S3: The program places the variable instruction set address into the variable address register, and the processor increments the value of the variable register register by one;
S4: 把程序的指令替换成新的可变指令集, 置位变指使能寄存器, 处 理器使用程序提供的新的指令集;  S4: Replace the program instruction with a new variable instruction set, set the variable enable register, and the processor uses the new instruction set provided by the program;
(4) 程序上下文的切换:  (4) Switching the program context:
程序把使能可变指令集寄存器、 变指号寄存器存入程序结构中, 当要 恢复线程上下文的吋候, 把程序结构中的使能可变指令集寄存器的值 放到使能可变指令集寄存器中, 把变指号寄存器的值放到变指号寄存 器中。  The program stores the variable instruction set register and the variable index register in the program structure. When the thread context is to be restored, the value of the enable variable instruction set register in the program structure is placed to enable the variable instruction. In the set register, put the value of the variable index register into the variable index register.
PCT/CN2016/078069 2015-07-28 2016-03-31 Variable instruction set microprocessor and implementation method therefor WO2017016232A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510449099.8 2015-07-28
CN201510449099.8A CN104991759B (en) 2015-07-28 2015-07-28 A kind of variable order collection microprocessor and its implementation

Publications (1)

Publication Number Publication Date
WO2017016232A1 true WO2017016232A1 (en) 2017-02-02

Family

ID=54303575

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/078069 WO2017016232A1 (en) 2015-07-28 2016-03-31 Variable instruction set microprocessor and implementation method therefor

Country Status (2)

Country Link
CN (1) CN104991759B (en)
WO (1) WO2017016232A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991759B (en) * 2015-07-28 2018-01-16 成都腾悦科技有限公司 A kind of variable order collection microprocessor and its implementation
CN109685731B (en) * 2018-12-13 2023-07-18 浪潮通用软件有限公司 Method for accelerating gradual change speed of picture based on SSE4 instruction set

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1147307A (en) * 1994-05-03 1997-04-09 先进Risc机器有限公司 Data processing with multiple instruction sets
US5854913A (en) * 1995-06-07 1998-12-29 International Business Machines Corporation Microprocessor with an architecture mode control capable of supporting extensions of two distinct instruction-set architectures
CN1450450A (en) * 2003-05-15 2003-10-22 复旦大学 32-bit embedded microprocessor adopting double instruction set
CN104991759A (en) * 2015-07-28 2015-10-21 成都腾悦科技有限公司 Variable instruction set microprocessor and implementation method therefor

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100573334B1 (en) * 2005-08-31 2006-04-24 주식회사 칩스앤미디어 Computer having dynamically changeable instruction set in realtime

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1147307A (en) * 1994-05-03 1997-04-09 先进Risc机器有限公司 Data processing with multiple instruction sets
US5854913A (en) * 1995-06-07 1998-12-29 International Business Machines Corporation Microprocessor with an architecture mode control capable of supporting extensions of two distinct instruction-set architectures
CN1450450A (en) * 2003-05-15 2003-10-22 复旦大学 32-bit embedded microprocessor adopting double instruction set
CN104991759A (en) * 2015-07-28 2015-10-21 成都腾悦科技有限公司 Variable instruction set microprocessor and implementation method therefor

Also Published As

Publication number Publication date
CN104991759B (en) 2018-01-16
CN104991759A (en) 2015-10-21

Similar Documents

Publication Publication Date Title
US9690640B2 (en) Recovery from multiple data errors
US20200327241A1 (en) Support for increased number of concurrent keys within multi-key cryptographic engine
US20210357213A1 (en) Hardware apparatuses and methods to switch shadow stack pointers
US20160335090A1 (en) Apparatus and method for accelerating operations in a processor which uses shared virtual memory
US9112537B2 (en) Content-aware caches for reliability
EP3394757A1 (en) Hardware apparatuses and methods for memory corruption detection
US9207940B2 (en) Robust and high performance instructions for system call
US20180173437A1 (en) Memory-to-memory instructions to accelerate sparse-matrix by dense-vector and sparse-vector by dense-vector multiplication
US10642711B2 (en) Apparatus and method for pausing processor trace for efficient analysis
US10324852B2 (en) System and method to increase availability in a multi-level memory configuration
WO2013101229A1 (en) Structure access processors, methods, systems, and instructions
TWI620122B (en) Apparatuses and methods for data speculation execution
US10628315B2 (en) Secure memory repartitioning technologies
WO2017016232A1 (en) Variable instruction set microprocessor and implementation method therefor
US8938606B2 (en) System, apparatus, and method for segment register read and write regardless of privilege level
WO2019067115A1 (en) Apparatus and method for multi-level cache request tracking
EP3798854B1 (en) Apparatuses, methods, and systems for processor non-write-back capabilities
US20140189322A1 (en) Systems, Apparatuses, and Methods for Masking Usage Counting
WO2017112315A1 (en) Non-tracked control transfers within control transfer enforcement
US9330020B2 (en) System, apparatus, and method for transparent page level instruction translation
WO2019133091A1 (en) Apparatus and method for vectored machine check bank reporting
EP4020237B1 (en) 64-bit virtual addresses having metadata bit(s) and canonicality check that does not fail due to non-canonical values of metadata bit(s)
GB2514885A (en) Systems, apparatuses, and methods for zeroing of bits in a data element

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16829600

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18.07.2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16829600

Country of ref document: EP

Kind code of ref document: A1