IP Library › Granted Patent US 12,693,865
Granted Patent B2
US 12,693,865 · App. 18/472,457 · Granted Jul 28, 2026

Method and processor for executing target instructions

Inventors: Weilin Wang (Beijing, CN); Yingbing Guan (Beijing, CN); Mengchen Yang (Beijing, CN)
Assignee: SHANGHAI ZHAOXIN SEMICONDUCTOR CO., LTD.
G06F9/3818G06F9/223G06F9/3004G06F9/30145G06F9/3017G06F9/30174G06F9/30189G06F9/455G06F9/45508
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,693,865
App. No.
18/472,457
Filed
Sep 22, 2023
Granted
Jul 28, 2026
Kind
B2
Examiner
NAM, HYUN
Art Unit
2183
USPC
712/211
Abstract

A method for executing target instructions and being used in a processor includes the steps of: receiving an instruction; determining whether the received instruction is a target instruction according to an operation code of the received instruction; when the received instruction is not the target instruction, executing the received instruction in a first mode; and when the received instruction is the target instruction, simulating the execution of the target instruction according to basic decoding information of the target instruction in a second mode. The basic decoding information includes the operation code, and is stored in an internal register.

Claims (44)

1 . A method for executing target instructions, used in a processor, comprising the steps of:

receiving an instruction;

determining whether the received instruction is a target instruction according to an operation code of the received instruction;

when the received instruction is not the target instruction, executing the received instruction in a first mode, wherein the first mode is a system management mode; and

when the received instruction is the target instruction, simulating the execution of the target instruction and checking whether the target instruction is supported according to basic decoding information of the target instruction in a second mode;

wherein the basic decoding information comprises the operation code, and is stored in an internal register.

2 . The method for executing target instructions of claim 1 , wherein the second mode includes a system management mode, when the received instruction is the target instruction, the method further comprises:

decoding the received instruction to obtain the basic decoding information;

storing the basic decoding information into the internal register;

reading the basic decoding information from the internal register; and

storing the basic decoding information into a system management memory.

3 . The method for executing target instructions of claim 1 , wherein the target instruction is not natively supported by the processor, but natively supported by other processors.

4 . The method for executing target instructions of claim 1 , wherein when the received instruction is the target instruction and an operand of the target instruction is a new architecture register, the new architecture register is simulated by a special register in the second mode.

5 . The method for executing target instructions of claim 4 , wherein when the new architecture register is a destination operand of the target instruction, the method further comprises:

after simulation execution of the target instruction is completed, storing the simulation execution result of the target instruction into the special register.

6 . The method for executing target instructions of claim 5 , wherein when the new architecture register is a destination operand of the target instruction, the method further comprises:

when exiting the second mode, doing not store the simulation execution result stored in the special register into an architecture register.

7 . The method for executing target instructions of claim 5 , further comprising:

receiving another instruction; and

when the another instruction is another target instruction and the new architecture register is the source operand of the another instruction, directly using the simulation execution result stored in the special register to simulate the execution of the another target instruction.

8 . The method for executing target instructions of claim 1 , when the received instruction is the target instruction, the method further comprising:

decoding the target instruction into a microinstruction, wherein the microinstruction comprises an emulation flag; and

setting the emulation flag of the microinstruction to a first value.

9 . The method for executing target instructions of claim 8 , wherein when the received instruction is the target instruction, the microinstruction is a special microinstruction if the received instruction needs to access memory, the method further comprises:

using the special microinstruction to check permissions of the target instruction, and generating a check result;

storing the check result into the internal register; and

simulating the execution of the target instruction according to the check result stored in the internal register.

10 . The method for executing target instructions of claim 9 , wherein the check result comprises a virtual address, a physical address, and an error code.

11 . A processor for executing target instructions, comprising:

an instruction monitoring unit, configured to receive an instruction, and to determine whether the received instruction is a target instruction according to an operation code of the received instruction; and

an internal register;

wherein when the received instruction is not the target instruction, the processor executes the received instruction in a first mode, and the first mode is a system management mode; when the received instruction is the target instruction, the processor simulates the execution of the target instruction and checks whether the target instruction is supported according to basic decoding information of the target instruction in a second mode; wherein the basic decoding information comprises the operation code, and is stored in the internal register.

12 . The processor for executing target instructions of claim 11 , further comprises:

an instruction decoding unit, wherein the second mode includes a system management mode, when the received instruction is a target instruction, the instruction decoding unit decodes the received instruction to obtain the basic decoding information;

wherein the processor reads the basic decoding information from the internal register, and stores the basic decoding information into a system management memory.

13 . The processor for executing target instructions of claim 11 , wherein the target instruction is not natively supported by the processor, but natively supported by other processors.

14 . The processor for executing target instructions of claim 11 , further comprising:

a special register, wherein when the received instruction is the target instruction, and an operand of the target instruction is a new architecture register, the new architecture register is simulated using the special register.

15 . The processor for executing target instructions of claim 14 , wherein when the new architecture register is a destination operand of the target instruction, after the processor simulates the execution of the target instruction, the processor stores the simulation execution result of the target instruction into the special register.

16 . The system for executing new instructions of claim 15 , wherein when the new architecture register is the destination operand of the target instruction, when exiting the second mode, the processor does not store the simulation execution result stored in the special register into an architecture register.

17 . The processor for executing target instructions of claim 15 , wherein the instruction monitoring unit receives another instruction; when the another instruction is another target instruction and the new architecture register is the source operand of the another instruction, the processor directly uses the simulation execution result stored in the special register to simulate the execution of the another target instruction.

18 . The processor for executing target instructions of claim 11 , wherein the instruction decoding unit decodes the received instruction into a microinstruction; wherein the microinstruction comprises an emulation flag; and the processor sets the emulation flag of the microinstruction to a first value.

19 . The processor for executing target instructions of claim 18 , wherein when the received instruction is the target instruction, the microinstruction is a special microinstruction if the received instruction needs to access memory; the processor uses the special microinstruction to check permissions of the target instruction, generates a check result, stores the check result into the internal register, and simulates the execution of the target instruction according to the check result stored in the internal register.

20 . The processor for executing target instructions of claim 19 , wherein the check result comprises a virtual address, a physical address, and an error code.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 22, 2023
From: WANG, WEILIN; GUAN, YINGBING; YANG, MENGCHEN
To: SHANGHAI ZHAOXIN SEMICONDUCTOR CO., LTD.
Reel/Frame 064994/0289 →
Priority Claims (2)
CN 202011591545.6 · Dec 29, 2020 · national
CN 202011591546.0 · Dec 29, 2020 · national
Continuity (2)
Continuation 17471423 · Sep 10, 2021
Related Publication 20240012650A1 · Jan 11, 2024
References Cited (157)
US 4514803A · Agnew · 1985 [cited by applicant]
US 4839797A · Katori et al. · 1989 [cited by applicant]
US 4873629A · Harris et al. · 1989 [cited by applicant]
US 5630052A · Shah · 1997 [cited by applicant]
US 5701442A · Ronen · 1997 [cited by applicant]
US 5781750A · Blomgren et al. · 1998 [cited by applicant]
US 5794063A · Favor · 1998 [cited by applicant]
US 5838987A · Brightman et al. · 1998 [cited by applicant]
US 5881258A · Arya · 1999 [cited by applicant]
US 5896519A · Worrell · 1999 [cited by applicant]
US 5909567A · Novak et al. · 1999 [cited by applicant]
US 5983337A · Mahalingaiah et al. · 1999 [cited by applicant]
US 6009261A · Scalzi · 1999 [cited by applicant]
US 6093213A · Favor et al. · 2000 [cited by applicant]
US 6496922B1 · Borrill · 2002 [cited by applicant]
US 6711667B1 · Ireton · 2004 [cited by applicant]
US 6928536B2 · Duesterwald et al. · 2005 [cited by applicant]
US 7047394B1 · Van Dyke · 2006 [cited by applicant]
US 7831807B1 · Johnson et al. · 2010 [cited by applicant]
US 9128701B2 · Henry · 2015 [cited by applicant]
US 9317301B2 · Henry · 2016 [cited by applicant]
US 9442794B1 · Tian · 2016 [cited by applicant]
US 9563424B2 · Sehr et al. · 2017 [cited by applicant]
US 9594927B2 · Zimmer et al. · 2017 [cited by applicant]
US 11513818B1 · Chen · 2022 [cited by applicant]
US 11604643B2 · Wang · 2023 [cited by examiner]
US 11803387B2 · Wang · 2023 [cited by examiner]
US 11816487B2 · Wang · 2023 [cited by examiner]
US 20010010072A1 · Yoshida · 2001 [cited by applicant]
US 20030221035A1 · Adams · 2003 [cited by applicant]
US 20040025165A1 · Desoli · 2004 [cited by applicant]
US 20040111717A1 · Abdulhayoglu · 2004 [cited by applicant]
US 20060206694A1 · Ehrman · 2006 [cited by applicant]
US 20060259291A1 · Dunham · 2006 [cited by applicant]
US 20080091923A1 · Fulton · 2008 [cited by examiner]
US 20080216073A1 · Yates · 2008 [cited by applicant]
US 20080282241A1 · Dong · 2008 [cited by applicant]
US 20090119748A1 · Yao · 2009 [cited by applicant]
US 20090158015A1 · Hillman et al. · 2009 [cited by applicant]
US 20090187904A1 · Serebrin · 2009 [cited by examiner]
US 20090204785A1 · Yates, Jr. et al. · 2009 [cited by applicant]
US 20090222654A1 · Hum et al. · 2009 [cited by applicant]
US 20100058034A1 · Zaks · 2010 [cited by applicant]
US 20100192137A1 · Inglis et al. · 2010 [cited by applicant]
US 20100262743A1 · Zimmer · 2010 [cited by applicant]
US 20100268916A1 · Hu · 2010 [cited by applicant]
US 20110093627A1 · De et al. · 2011 [cited by applicant]
US 20110302395A1 · Hall · 2011 [cited by examiner]
US 20120198122A1 · Abdallah · 2012 [cited by applicant]
US 20120260042A1 · Henry · 2012 [cited by applicant]
US 20130028332A1 · Le · 2013 [cited by applicant]
US 20130047050A1 · Kuwamura · 2013 [cited by applicant]
US 20130246768A1 · Gschwind · 2013 [cited by applicant]
US 20130305013A1 · Ebersole · 2013 [cited by applicant]
US 20140122847A1 · Henry · 2014 [cited by examiner]
US 20140129808A1 · Naveh · 2014 [cited by applicant]
US 20140274305A1 · Shimabukuro · 2014 [cited by applicant]
US 20140281398A1 · Rash · 2014 [cited by examiner]
US 20140281399A1 · Rash et al. · 2014 [cited by applicant]
US 20140304493A1 · Zhong · 2014 [cited by applicant]
US 20140325516A1 · Ventroux · 2014 [cited by applicant]
US 20150178076A1 · Sudhakar · 2015 [cited by applicant]
US 20150186170A1 · Jennings · 2015 [cited by applicant]
US 20150356297A1 · Guri · 2015 [cited by applicant]
US 20160026482A1 · Abdallah · 2016 [cited by applicant]
US 20160026486A1 · Abdallah · 2016 [cited by applicant]
US 20160070932A1 · Zimmer et al. · 2016 [cited by applicant]
US 20160092236A1 · Kanapathipaillai et al. · 2016 [cited by applicant]
US 20160357657A1 · Zhang · 2016 [cited by applicant]
US 20170134347A1 · Kupreev · 2017 [cited by applicant]
US 20170192788A1 · Margulis · 2017 [cited by examiner]
US 20170323098A1 · Denier · 2017 [cited by examiner]
US 20180121220A1 · Lei · 2018 [cited by applicant]
US 20180159747A1 · Chang · 2018 [cited by applicant]
US 20180322313A1 · Yao et al. · 2018 [cited by applicant]
US 20190034316A1 · Levit-Gurevich · 2019 [cited by applicant]
US 20190043159A1 · Levit-Gurevich et al. · 2019 [cited by applicant]
US 20190220279A1 · McNeeney et al. · 2019 [cited by applicant]
US 20190287205A1 · Ramadoss · 2019 [cited by examiner]
US 20190391904A1 · Sabharwal · 2019 [cited by applicant]
US 20200073643A1 · Tsirkin · 2020 [cited by applicant]
US 20200082491A1 · Harris · 2020 [cited by applicant]
US 20200174794A1 · Golla · 2020 [cited by applicant]
US 20210117251A1 · Cristofi · 2021 [cited by applicant]
US 20210182073A1 · Karageorgos · 2021 [cited by applicant]
US 20210182401A1 · Paolino · 2021 [cited by applicant]
US 20210182724A1 · Zou et al. · 2021 [cited by applicant]
US 20210397425A1 · Zwarich et al. · 2021 [cited by applicant]
US 20220066933A1 · Kamand · 2022 [cited by applicant]
US 20220100527A1 · Viste · 2022 [cited by applicant]
US 20220197678A1 · Poornachandran et al. · 2022 [cited by applicant]
US 20220206794A1 · Wang · 2022 [cited by applicant]
US 20220206808A1 · Wang · 2022 [cited by applicant]
US 20220206810A1 · Wang · 2022 [cited by applicant]
US 20220206812A1 · Wang · 2022 [cited by applicant]
US 20220206813A1 · Wang · 2022 [cited by applicant]
US 20220206815A1 · Wang · 2022 [cited by applicant]
US 20230221957A1 · Pool · 2023 [cited by applicant]
CN 1431586A · 2003 [cited by applicant]
CN 1869920A · 2006 [cited by applicant]
CN 101196869A · 2008 [cited by applicant]
CN 102707926A · 2012 [cited by applicant]
CN 102937889A · 2013 [cited by applicant]
CN 103098020A · 2013 [cited by applicant]
CN 103154883A · 2013 [cited by applicant]
CN 103218203A · 2013 [cited by applicant]
CN 104025034A · 2014 [cited by applicant]
CN 104615411A · 2015 [cited by applicant]
CN 104679481A · 2015 [cited by applicant]
CN 105468333A · 2016 [cited by applicant]
CN 106371890A · 2017 [cited by applicant]
CN 106406819A · 2017 [cited by applicant]
CN 107077368A · 2017 [cited by applicant]
CN 109451130A · 2019 [cited by applicant]
CN 110221862A · 2019 [cited by applicant]
EP 2508982A1 · 2012 [cited by applicant]
IN 201947023217A · 2019 [cited by applicant]
JP 2002049482A · 2002 [cited by applicant]
WO 0045257A3 · 2001 [cited by applicant]
WO 0161476A2 · 2001 [cited by applicant]
WO 2012138950A2 · 2012 [cited by applicant]
WO 2015024432A1 · 2015 [cited by applicant]
Thach et al., “Fast Cycle Estimation Methodology for Instruction-Level Emulator”, Dec. 2012, IEEE Xplore (Year: 2012). [cited by examiner]
Chinese language office action date Sep. 11, 2024, issued in application No. CN 202011589763.6. [cited by applicant]
Lu, J.; “University Computer Information Technology Study Guide and Experimental Tutorial;” Jul. 2008; p. 24. [cited by applicant]
English language translation of p. 24 of “University Computer Information Technology Study Guide and Experimental Tutorial”. [cited by applicant]
Non-Final Office Action dated Oct. 21, 2024, issued in U.S. Appl. No. 18/465,189. [cited by applicant]
Chinese language office action dated Oct. 30, 2024, issued in application No. CN 202011588885.3. [cited by applicant]
Chinese language office action dated Apr. 12, 2024, issued in application No. CN 202011589763.6. [cited by applicant]
Non-Final Office Action dated Dec. 10, 2024, issued in U.S. Appl. No. 18/474,207. [cited by applicant]
Ruihe XIE: 32-bit Microcomputer Principle and Interface Technology (p. 279-280); Higher Education Press; Jul. 31, 2004. [cited by applicant]
Chinese language office action dated Jan. 14, 2026, issued in application No. CN 202011591546.0. [cited by applicant]
Wen, Q.; “Assembly Language Programming-ARM architecture-based (3rd Edition);” Beijing University of Aeronautics and Astronautics Press; Apr. 2016; pp. 208-210 (English language translation, pp. 1-5 of attachment). [cited by applicant]
Office Action dated Oct. 23, 2025, issued in U.S. Appl. No. 17/471,371. [cited by applicant]
Non-Final Office Action dated Jun. 27, 2022, issued in U.S. Appl. No. 17/471,343. [cited by applicant]
Notice of Allowance dated Jul. 11, 2022, issued in U.S. Appl. No. 17/471,387. [cited by applicant]
Non-Final Office Action dated Sep. 21, 2022, issued in U.S. Appl. No. 17/471,440. [cited by applicant]
Notice of Allowance dated Oct. 19, 2022, issued in U.S. Appl. No. 17/471,400. [cited by applicant]
Non-Final Office Action dated Oct. 31, 2022, issued in U.S. Appl. No. 17/471,167. [cited by applicant]
Non-Final Office Action dated Dec. 21, 2022, issued in U.S. Appl. No. 17/471,359. [cited by applicant]
Non-Final Office Action dated Dec. 1, 2022, issued in U.S. Appl. No. 17/471,170. [cited by applicant]
Non-Final Office Action dated Jan. 19, 2023, issued in U.S. Appl. No. 17/471,454. [cited by applicant]
Non-Final Office Action dated Jan. 26, 2023, issued in U.S. Appl. No. 17/471,371. [cited by applicant]
Final Office Action dated Mar. 16, 2023, issued in U.S. Appl. No. 17/471,170. [cited by applicant]
Final Office Action dated Apr. 18, 2023, issued in U.S. Appl. No. 17/471,454. [cited by applicant]
Notice of Allowance dated Jun. 22, 2023, issued in U.S. Appl. No. 17/471,454. [cited by applicant]
Non-Final Office Action dated Jul. 18, 2023, issued in U.S. Appl. No. 17/471,371. [cited by applicant]
Cao, H.Y., et al.; “Highly Portable Light-Weight x86 Emulator;” Computer Systems Applications; vol. 20; No. 5; May 2011; pp. 101-104 (English language abstract, p. 1 of publication). [cited by applicant]
Hu, W.W., et al.; “LoongISA for compatibility with mainstream instruction set architecture;” Science China Press; vol. 45; No. 4; Apr. 2015; pp. 459-479 (English language abstract, p. 21 of publication). [cited by applicant]
Office Action dated Sep. 29, 2025, issued in U.S. Appl. No. 18/474,207. [cited by applicant]
Jie, F., et al.; “An instruction dispatch approach using hardware-software co-design for interpreters;” High Technology Letters; vol. 26; No. 3; 2016; pp. 226-234. [cited by applicant]
Chinese language office action dated Jan. 14, 2026, issued in application No. CN 202011588921.6. [cited by applicant]
Huang, Z.; “A Practical Course in the Assembly and Maintenance of Computers;” Jun. 2005; pp. 15-20 (English Translation from the last paragraph of P15 to P16 of A Practical Course in the Assembly and Maintenance of Comp… [cited by applicant]
CN Office Action dated Mar. 28, 2025 in Chinese application No. 202011588921.6. [cited by applicant]
CN Office Action dated Apr. 3, 2025 in Chinese application No. 202011591891.4. [cited by applicant]
CN Office Action dated Apr. 11, 2025 in Chinese application No. 202011589298.6. [cited by applicant]
CN Office Action dated Apr. 17, 2025 in Chinese application No. 202011591545.6. [cited by applicant]