KR100513138B1 - A processor for executing instruction sets received from a network or from a local memory - Google Patents

A processor for executing instruction sets received from a network or from a local memory Download PDF

Info

Publication number
KR100513138B1
KR100513138B1 KR10-2005-7005493A KR20057005493A KR100513138B1 KR 100513138 B1 KR100513138 B1 KR 100513138B1 KR 20057005493 A KR20057005493 A KR 20057005493A KR 100513138 B1 KR100513138 B1 KR 100513138B1
Authority
KR
South Korea
Prior art keywords
instruction
stack
instructions
value
virtual machine
Prior art date
Application number
KR10-2005-7005493A
Other languages
Korean (ko)
Other versions
KR20050037609A (en
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 KR20050037609A publication Critical patent/KR20050037609A/en
Application granted granted Critical
Publication of KR100513138B1 publication Critical patent/KR100513138B1/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
    • 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
    • G06F9/3818Decoding for concurrent execution
    • G06F9/3822Parallel decoding, e.g. parallel decode units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0875Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with dedicated cache, e.g. instruction or stack
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1416Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
    • G06F12/1425Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights the protection being physical, e.g. cell, word, block
    • G06F12/1441Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights the protection being physical, e.g. cell, word, block for a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7839Architectures of general purpose stored program computers comprising a single central processing unit with memory
    • G06F15/7842Architectures of general purpose stored program computers comprising a single central processing unit with memory on one IC chip (single chip microcontrollers)
    • G06F15/7846On-chip cache and off-chip main memory
    • 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/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/30021Compare instructions, e.g. Greater-Than, Equal-To, MINMAX
    • 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/30098Register arrangements
    • G06F9/3012Organisation of register space, e.g. banked or distributed register file
    • G06F9/30134Register stacks; shift registers
    • 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/3017Runtime instruction translation, e.g. macros
    • G06F9/30174Runtime instruction translation, e.g. macros for non-native instruction set, e.g. Javabyte, legacy code
    • 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/30181Instruction operation extension or modification
    • G06F9/30189Instruction operation extension or modification according to execution mode, e.g. mode flag
    • 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/34Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes
    • G06F9/345Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes of multiple operands or results
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44589Program code verification, e.g. Java bytecode verification, proof-carrying code
    • 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/45Caching of specific data in cache memory
    • G06F2212/451Stack data

Abstract

본 발명의 듀얼 명령 세트 프로세서는 네트워크로부터 수신된 코드 및 로컬 메모리로부터 공급된 다른 코드 모두를 해석 및 실행 할 수 있어서, 두 개의 다른 소스로부터의 두 개의 다른 타입을 최대 효율로 실행할 수 있고, 앞서 설명한 인터넷 또는 인트라넷 등의 네트워크와의 접속을 위한 모뎀 등의 통신 인터페이스 장치, 로컬 메모리 및 듀얼 명령 세트 프로세서가 있는 컴퓨터 시스템은 네트워크로부터의 JAVA 코드 및 지역적으로 저장되거나 네트워크 상에 있는 그러나 신뢰성있는 환경 또는 인증된 환경내에 있는 비-JAVA 코드를 실행하는데 최적화 될 수 있는 것을 특징으로 한다. The dual instruction set processor of the present invention can interpret and execute both code received from the network and other code supplied from local memory, so that two different types from two different sources can be executed at maximum efficiency, as described above. Computer systems with communication interface devices, such as modems for connection to a network such as the Internet or an intranet, local memory and dual instruction set processors, have a JAVA code from the network and a locally stored or on-network but reliable environment or authentication. It can be optimized to run non-JAVA code in a built-in environment.

Description

네트워크 또는 로컬 메모리로부터 수신된 명령 세트를 실행하는 프로세서 및 컴퓨터 시스템{A PROCESSOR FOR EXECUTING INSTRUCTION SETS RECEIVED FROM A NETWORK OR FROM A LOCAL MEMORY}PROCESSOR FOR EXECUTING INSTRUCTION SETS RECEIVED FROM A NETWORK OR FROM A LOCAL MEMORY}

부록 Ⅰ 참조See Appendix I

부록 Ⅰ을 포함하는 본 특허 공보의 개시부분, JAVA 가상 머신 명세와 부록 A는 저작권 보호를 목적으로 하는 내용을 포함한다. 저작권자는, 미국 특허청에 특허 파일 또는 기록이 있기 때문에 특허공보나 공개공보가 복사되더라도 이의가 없지만, 그렇지 않다면 저작권자가 모든 저작권을 갖는다.The opening portion of this patent publication, including the appendix I, the JAVA Virtual Machine Specification and Appendix A, includes content for copyright protection purposes. The copyright holder has no objection, even if the patent publication or the publication is copied, because the patent office has a patent file or record, otherwise the copyright holder has all copyrights.

본 발명은 컴퓨터 및 정보 시스템에 관련된 것으로, 특히 로컬 메모리와 인터넷 또는 인트라넷 등의 네트워크 모두로부터의 명령 세트(instruction set)를 실행하는 향상된 프로세서 및 컴퓨터 시스템에 관한 것이다.TECHNICAL FIELD The present invention relates to computers and information systems, and more particularly, to improved processors and computer systems for executing instruction sets from both local memory and networks such as the Internet or intranets.

컴퓨터와 통신 산업분야에서 많은 개인과 단체들은 전세계적으로 빠르게 성장하고 있는 시장인 인터넷을 권하고 있다. 1990년대에 인터넷 사용자의 수가 기하급수적으로 증가하고 있다. 1995년 6월에는 대략 6,642,000개의 호스트가 인터넷에 연결되었고, 이는 1995년 1월의 대략 4,852,000개의 호스트보다 증가된 것이다. 호스트의 수는 매년 75%정도 증가하고 있다. 호스트들 사이에는 약 120,000의 네트워크와 27,000 이상의 웹 서버가 있다. 웹 서버의 수는 53일마다 두 배로 증가하고 있다.Many individuals and organizations in the computer and telecommunications industry recommend the Internet, a rapidly growing market worldwide. In the 1990s, the number of Internet users has grown exponentially. In June 1995, approximately 6,642,000 hosts were connected to the Internet, an increase from approximately 4,852,000 hosts in January 1995. The number of hosts is increasing by 75% every year. There are about 120,000 networks and more than 27,000 web servers among the hosts. The number of web servers is doubling every 53 days.

1995년 7월에 1,000,000 이상의 활동하고 있는 인터넷 사용자, 12,505 이상의 유즈넷 뉴스 그룹 및 10,000,000 이상의 유즈넷 리더를 가지고 있어 인터넷이 방대하고 다양한 정보와 멀티미디어 서비스를 위한 큰 시장으로 폭발적으로 커질 것임을 나타내고 있다.With more than 1,000,000 active Internet users, more than 12,505 Usenet newsgroups, and more than 10,000,000 Usenet readers in July 1995, the Internet will explode into a large market for a vast and diverse set of information and multimedia services.

게다가, 인터넷이나 공용 반송파 네트워크에 대해 많은 단체와 회사들이 전용 네트워크나 회사내의 보다 효과적인 정보 분배의 방법으로써 그들의 내부 정보 시스템을 인트라넷으로 바꾸고 있다. 인트라넷을 위한 기본적인 하부 구조는 서버와 데스크탑을 연결하는 내부 네트워크이고, 이는 방화벽을 지나 인터넷에 연결될 수도 있고 그렇지 않을 수도 있다. 이들 인트라넷은 기업내에 잘 구축되어 있는 표준 개방 네트워크 프로토콜을 경유하여 데스크탑으로 서비스를 제공한다. 인트라넷은 내부 정보 관리를 간소화하고 브라우저 패러다임을 사용하는 내부 커뮤니케이션을 개선하는 것을 통해 인트라넷을 사용하는 기업에 많은 이익을 제공한다. 기존의 시스템과 회사의 기업체계 하부구조에 인터넷 기술을 통합하는 것은 인트라넷을 채용하는 측에 대한 현재 기술 투자에 영향을 미친다. 상술한 바와 같이, 인트라넷과 인터넷은 밀접한 관계가 있으며, 인트라넷은 사업상 안전한 의사소통을 하는데 사용되고, 인터넷은 사업과 다른 분야사이의 외부 트랜잭션을 위해 사용된다. 본원의 목적을 위해, "네트워크"라는 용어는 인터넷과 인트라넷을 포함한다. 그러나, 인터넷과 인트라넷의 차이는 어디에 사용가능한지에 따라 발생한다.In addition, many organizations and companies over the Internet or public carrier networks are turning their internal information systems into intranets as a means of more efficient distribution of information within dedicated networks or companies. The basic infrastructure for an intranet is an internal network connecting servers and desktops, which may or may not be connected to the Internet through a firewall. These intranets provide services to the desktop via standard open network protocols that are well established within the enterprise. Intranets benefit companies that use intranets by simplifying internal information management and improving internal communications using the browser paradigm. Integrating Internet technology into existing systems and the company's corporate infrastructure will impact current technology investments for those employing intranets. As noted above, intranets and the Internet are closely related, intranets are used for secure business communication, and the Internet is used for external transactions between the business and other areas. For the purposes of this application, the term "network" includes the Internet and an intranet. However, the difference between the Internet and intranets depends on where they are available.

1990년대에 선 마이크로시스템즈의 프로그래머는 보편적인 프로그래밍 언어를 썼다. 이 언어는 JAVA 프로그래밍 언어로 이름지어졌다. (JAVA는 CA의 Mountain View에 있는 선 마이크로시스템즈의 상표이다) JAVA 프로그래밍 언어는 초기부터 C++ 프로그래밍 언어로 코딩되도록 의도되었던 프로그래밍 노력에 기인한 것이며, 그 결과 JAVA 프로그래밍 언어는 C++ 프로그래밍 언어와 호환된다. 그러나, JAVA 프로그래밍 언어는 단순하고, 객체지향이고, 분산형이고, 해석되지만 고성능이며, 강력하지만 안전하고, 보안되고, 능동적이고, 중간 구조이고, 호환가능하며, 다중 스레드 언어이다.In the 1990s, Sun Microsystems programmers used a common programming language. This language was named JAVA programming language. JAVA is a trademark of Sun Microsystems in Mountain View, CA. The JAVA programming language is due to a programming effort that was originally intended to be coded as a C ++ programming language, and as a result the JAVA programming language is compatible with the C ++ programming language. However, the JAVA programming language is a simple, object-oriented, distributed, interpreted but high performance, powerful but secure, secure, active, intermediate, compatible, multithreaded language.

JAVA 프로그래밍 언어는 선 마이크로시스템즈로부터 라이센스받은 많은 큰 하드웨어 및 소프트웨어 회사에 의해 인터넷을 위한 프로그래밍 언어로 선택되어졌다. JAVA 프로그래밍 언어와 환경은 현재 프로그래밍 실무에서의 많은 문제점을 해결하기 위해 고안되어졌다. JAVA 프로그래밍 언어는 혼란스럽고 이해가 난해하고 별로 사용되지 않는 C++ 프로그래밍 언어의 특징들을 생략한다. 이들 생략된 특징은 주로 연산자 과부하, 다중 상속 및 광범한 자동 강제를 포함한다. JAVA 프로그래밍 언어는 C 프로그래밍 언어에서처럼 더 이상 메모리를 할당하거나 프리(free)시킬 필요가 없기 때문에 프로그래밍의 작업을 단순화하는 자동 무용정보 수집을 포함한다. JAVA 프로그래밍 언어는 C 프로그래밍 언어에서 정의된 바와 같은 포인터의 사용을 제한하고 대신에 어레이 바운드가 명확히 검사되는 정확한 어레이를 가지며, 그것에 의해 많은 바이러스와 귀찮은 버그에 대한 취약점을 없앤다. JAVA 프로그래밍 언어는 객체-C 인터페이스와 특수 예외 처리기를 포함한다.The JAVA programming language has been selected as the programming language for the Internet by many large hardware and software companies licensed from Sun Microsystems. The JAVA programming language and environment are designed to solve many problems in current programming practice. The JAVA programming language omits the confusing, incomprehensible, and underused features of the C ++ programming language. These omitted features mainly include operator overload, multiple inheritance, and extensive automatic enforcement. The JAVA programming language includes automatic dance information collection that simplifies the task of programming because you no longer need to allocate or free memory as in the C programming language. The JAVA programming language restricts the use of pointers as defined in the C programming language and instead has an exact array whose array bounds are explicitly checked, thereby eliminating vulnerabilities to many viruses and annoying bugs. The JAVA programming language includes an object-C interface and a special exception handler.

JAVA 프로그래밍 언어는 TCP/IP 프로토콜(Transmission Control Protocol based on Internet protocol), HTTP(Hypertext Transfer Protocol) 및 FTP(File Transfer Protocol)과 쉽게 카피될 수 있도록 루틴의 광범한 라이브러리를 가진다. JAVA 프로그래밍 언어는 네트워크된/배분된 환경에서 사용되는 경향이 있다. JAVA 프로그래밍 언어는 바이러스가 없고 탬퍼가 없는 시스템의 구조가 가능하다. 인증 기술은 공중-키 암호화에 기초한다.The JAVA programming language has an extensive library of routines for easy copying with the Transmission Control Protocol based on Internet protocol (TCP / IP) protocol, Hypertext Transfer Protocol (HTTP), and File Transfer Protocol (FTP). JAVA programming language tends to be used in networked / distributed environments. JAVA programming language allows the construction of a virus-free and tamper-free system. Authentication techniques are based on public-key cryptography.

본 발명은 네트워크로부터 수신된 가상 컴퓨팅 머신 아키텍처용 명령 세트 등의 가상 머신 명령(컴퓨터 플랫폼 독립 명령)을 해독(decode) 및 실행(execute)을 하기 위해 고안된 프로세서에 관한 것이다. 그러나, 상기 프로세서는 로컬 메모리 등에서 공급된 컴퓨터 명령의 제2 세트를 해독 및 실행하는 능력도 가지고 있다. 상기 컴퓨터 명령의 제2 세트는 상기 가상 컴퓨팅 머신 아키텍처와는 다른 컴퓨터 프로세서 아키텍처용이다. 두 개의 다른 소스로부터의 두 가지 명령 세트를 실행할 수 있는 프로세서의 개념은 프로세서가 여러 기능을 수행하는 애플리케이션을 실행하는데 최대 효율을 가지게 한다.The present invention relates to a processor designed to decode and execute virtual machine instructions (computer platform independent instructions), such as instruction sets for virtual computing machine architectures received from a network. However, the processor also has the ability to decrypt and execute a second set of computer instructions supplied from local memory or the like. The second set of computer instructions is for a computer processor architecture different from the virtual computing machine architecture. The concept of a processor capable of executing two instruction sets from two different sources allows the processor to have maximum efficiency in running applications that perform multiple functions.

본 발명에는 앞서 설명한 프로세서, 로컬 메모리 및 인터넷 또는 인트라넷 등의 네트워크와의 접속을 위한 모뎀 등의 통신 인터페이스 장치가 포함되어 있다. 마지막으로, 본 발명은 컴파일된 코드가 네트워크상을 통과하고 실행되는지 또는 로컬 메모리 등의 신뢰되는 환경으로부터 검색되고 실행되는지 여부에 따라, 어레이 경계 검증 등의 보안 특징을 가지거나 보안 특징 없이 상기 컴파일된 코드가 실행되도록 하는 JAVA 소스 코드 프로그램으로 기록된 애플리케이션을 컴파일하는 방법이 포함되어 있다. The present invention includes a communication interface device such as a processor, a local memory, and a modem for connection to a network such as the Internet or an intranet. Finally, the present invention provides the compiled code with or without security features, such as array boundary validation, depending on whether the compiled code is run and executed over a network or retrieved and executed from a trusted environment such as local memory. Includes a way to compile an application written with a JAVA source code program that allows code to run.

한 실시예에서, 상기 가상 머신 명령은 번역 유닛(translation unit)에 의해 처리된다. 상기 번역 유닛은 각각의 가상 머신 명령을 원시 명령, 원시 명령들 또는 선 마이크로시스템즈사의 SPARC 계열, 디지털 이큅먼트사의 Alpha, 실리콘 그래픽스사의 MIPS 계열, 모토롤라/IBM/애플 파워 PC 계열, 또는 인텔 x86 및 iA4 프로세서 계열의 종래 프로세서의 실행 유닛용 마이크로코드(microcode) 루틴으로 변환한다. 따라서, 상기 첫 번째 예의 가상 머신 명령들은 RISC 프로세서용 원시 명령으로 번역되고, 두 번째 예는 CISC 프로세서용 원시 명령으로 번역되며, 세 번째 예는 VLIW(very long instruction word) 프로세서로 번역된다. 상기 예 각각에서, 상기 번역 유닛으로부터의 원시 명령들은 종래 디코드 유닛에 의해 디코딩되고 상기 디코딩된 원시 명령들은 종래의 실행 유닛에 의해 실행된다. 선택적으로, 만일 상기 번역 유닛이 가상 머신 명령 또는 가상 머신 명령의 세트를 위한 마이크로코드 루틴을 제공한다면, 상기 명령 디코더는 바이패스 되고 상기 마이크로코드 루틴은 종래의 실행 유닛에 의해 바로 실행될 것이다.In one embodiment, the virtual machine instructions are processed by a translation unit. The translation unit may be configured to convert each virtual machine instruction into a native instruction, primitive instructions or SPARC series from Sun Microsystems, Alpha from Digital Technology, MIPS series from Silicon Graphics, Motorola / IBM / Apple Power PC series, or Intel x86 and iA4. Converts to microcode routines for execution units of conventional processors of the processor family. Thus, the virtual machine instructions of the first example are translated into native instructions for a RISC processor, the second example is translated into native instructions for a CISC processor, and the third example is translated into a very long instruction word (VLIW) processor. In each of the above examples, the primitive instructions from the translation unit are decoded by a conventional decode unit and the decoded primitive instructions are executed by a conventional execution unit. Optionally, if the translation unit provides a microcode routine for a virtual machine instruction or a set of virtual machine instructions, the instruction decoder is bypassed and the microcode routine will be executed immediately by a conventional execution unit.

다른 실시예에서, 본 발명의 프로세서는 네트워크 및 로컬 메모리로 통신 접속을 하기 위해 구성된다. 이 프로세서의 제1 명령 디코더는 제1 명령 세트내의 다수의 제1 명령들을 디코딩하기 위해 구성된다. 이 프로세서의 제2 명령 디코더는 제2 명령 세트 내의 다수의 제2 명령을 디코딩하기 위해 구성된다. 상기 제2 명령 세트와 제1 명령 세트는 다르다. 이 프로세서의 명령 실행 유닛은 상기 제1 명령 디코더에 의해 디코딩된 다수의 제1 명령을 실행하고, 상기 제2 명령 디코더에 의해 디코딩된 상기 다수의 제2 명령에 의해 실행하도록 구성된다. In another embodiment, the processor of the present invention is configured for making a communication connection to a network and local memory. The first instruction decoder of the processor is configured to decode a plurality of first instructions in the first instruction set. The second instruction decoder of the processor is configured to decode a plurality of second instructions in the second instruction set. The second instruction set and the first instruction set are different. The instruction execution unit of this processor is configured to execute a plurality of first instructions decoded by the first instruction decoder and to execute by the plurality of second instructions decoded by the second instruction decoder.

상기 제1 명령 디코더는 상기 첫 번째 명령 세트내의 세트 모드 명령을 디코딩하기 위해 구성된다. 이 세트 모드 명령에 응답하여, 상기 세트 모드 명령으로의 다음 명령이 상기 제2 명령 디코더로 전달된다. The first instruction decoder is configured to decode a set mode instruction in the first instruction set. In response to this set mode command, the next command to the set mode command is passed to the second command decoder.

한 실시예에서, 상기 제1 명령 세트 각각은 가상 머신 명령이다. 가상 머신 명령에는 연산부호(opcode)가 포함되어 있다. 더욱이, 이 실시예에서, 상기 제1 실행은 스택-기반 실행 유닛이다.In one embodiment, each of the first instruction sets is a virtual machine instruction. Virtual machine instructions contain opcodes. Moreover, in this embodiment, the first execution is a stack-based execution unit.

아래에 더 자세히 설명하겠지만, JAVA 프로그래밍 언어로 작성된 애플리케이션은 특히 가상 머신 명령의 타입 내의 실행가능한 코드의 소스를 발생시키는데 사용되는데 매우 적합하고, 하드웨어 프로세서(100)(도 1) 등의 프로세서에 의해 실행을 위한 인터넷 또는 인트라넷 등의 네트워크상에서 전송될 수 있다. 그러나, 일부 애플리케이션에서는, 가상 머신 명령보다도 예를들어 로컬 메모리 또는 심지어 네트워크 상에서 제공된 명령을 디코딩 및 실행하는 능력도 가지고 있는 프로세서가 요구된다. As will be described in more detail below, applications written in the JAVA programming language are particularly well suited for generating sources of executable code within the type of virtual machine instructions, and are executed by processors such as hardware processor 100 (FIG. 1). Can be transmitted over a network such as the Internet or an intranet. However, some applications require a processor that has the ability to decode and execute instructions provided, for example, on local memory or even over a network rather than virtual machine instructions.

한 실시예에서, 하드웨어 프로세서(100)는 상기 가상 머신 명령을 실행하기위해 사용되지 않는다. 오히려, 선 마이크로시스템사 아키텍처의 SPARC 계열, 디지털 이큅먼트사의 Alpha 아키텍처, 실리콘 그래픽스사의 MIPS 아키텍처, 모토롤라/IBM/애플 파워 PC 아키텍처, 또는 인텔 x86 및 iA4 아키텍처 등의 종래 마이크로프로세서 아키텍처는 번역 유닛과 함께 사용된다.In one embodiment, hardware processor 100 is not used to execute the virtual machine instructions. Rather, conventional microprocessor architectures such as the SPARC family of Sun Microsystems architecture, Alpha from Digital Technology, MIPS architecture from Silicon Graphics, Motorola / IBM / Apple Power PC architectures, or Intel x86 and iA4 architectures, along with translation units Used.

특히, 번역 유닛이 종래의 마이크로프로세에 더해져서 이 종래의 마이크로프로세서가 가상 머신 명령 및 그 마이크로프로세서용 원시 명령을 실행할 수 있게 함으로써, 상기 종래의 마이크로프로세서는 듀얼 명령 세트 마이크로프로세서가 된다. 물론, 추가적인 마이크로코드가 상기 번역된 명령의 실행을 지원하기 위해 그리고 상기 가상 머신 명령에 의해 요구된 환경을 지원하기 위해 종래 프로세서내에 요구되기도 한다. 상기 특별한 추가가 요구되는 것은 가상 머신 명령의 세트 및 종래의 프로세서 아키텍처의 선택에 따라 달라진다.In particular, the translation unit is added to a conventional microprocessor to enable this conventional microprocessor to execute virtual machine instructions and native instructions for the microprocessor, thereby making the conventional microprocessor a dual instruction set microprocessor. Of course, additional microcode may be required in conventional processors to support the execution of the translated instructions and to support the environment required by the virtual machine instructions. The particular addition required depends on the set of virtual machine instructions and the choice of conventional processor architecture.

아래에 더 자세히 설명되겠지만, 상기 번역 유닛은 상기 가상 머신 명령을 종래의 마이크로프로세서에 의해 바로 교대로 실행되는 종래 마이크로프로세서의 원시 명령 세트 내부의 명령으로 변환한다. 그러나 일부 가상 머신 명령은 상기 종래의 마이크로프로세서에 의해 교대로 실행된 마이크로코드내로 번역되기도 한다. 그래서 아래에 좀 더 자세히 설명하겠지만, 본 발명의 듀얼 명령 세트 프로세서는 네트워크 및 로컬 메모리 등의 두 가지 다른 소스로부터의 두 개의 다른 명령 세트를 실행할 수 있다. 본 명세서에서, 명령의 세트는 컴퓨터 프로세서 아키텍처의 특정 타입용 명령을 가리킨다.As will be described in more detail below, the translation unit translates the virtual machine instructions into instructions within a set of primitive instructions of a conventional microprocessor that are directly executed alternately by the conventional microprocessor. However, some virtual machine instructions may be translated into microcode executed alternately by the conventional microprocessor. Thus, as will be described in more detail below, the dual instruction set processor of the present invention can execute two different instruction sets from two different sources, such as network and local memory. In this specification, a set of instructions refers to instructions for a particular type of computer processor architecture.

다른 실시예에서, 본 발명의 상기 듀얼 명령 세트 프로세서에는 하드웨어 프로세서(100) 등의 가상 머신 명령 프로세서 및 가상 머신 명령과 다른 명령을 실행하는 제2 프로세서가 포함되어 있다. 이 듀얼 명령 세트 프로세서에는 여러 장점이 있다. 예를들면, 사용가능한 명령의 수가 향상된다. 특히, 바이트코드 제한에 기초하여, JAVA 가상 머신 명령 세트내의 명령의 수는 256 명령 이하로 제한된다. 이 제한은 몇 몇 애플리케이션을 위해서는 최적값이 아니다. 상기 듀얼 명령 세트 프로세서에 제2 명령 세트가 있기 때문에, 상기 가상 머신 명령 세트가 제공한 것 이상의 더 많은 기능이 요구되는 경우에, 상기 애플리케이션은 상기 제2 명령 세트내의 명령 세트를 호출할 수 있고, 또는 상기 제2 명령 세트내로 완전히 기록될 수 있다.In another embodiment, the dual instruction set processor of the present invention includes a virtual machine instruction processor such as a hardware processor 100 and a second processor for executing instructions different from the virtual machine instructions. This dual instruction set processor has several advantages. For example, the number of instructions available is improved. In particular, based on the bytecode limitation, the number of instructions in the JAVA virtual machine instruction set is limited to 256 instructions or less. This limit is not optimal for some applications. Since the dual instruction set processor has a second instruction set, the application can call the instruction set in the second instruction set if more functionality is required than that provided by the virtual machine instruction set, Or completely written into the second instruction set.

특히, 상기 JAVA 가상 머신 명령의 세트는 데이터스트림내의 상기 제2 프로세서를 위한 원시 명령을 포함함으로서 확장될 수 있다. 상기 데이터스트림내의 원시 명령을 실행하기에 앞서, 상기 듀얼 명령 세트 프로세서의 모드는 상기 제2 프로세서상의 명령 및 상기 제2 프로세서에 의해 실행된 상기 데이터스트림내의 원시 명령을 실행하도록 설정된다. 상기 제2 프로세서에 의해 원시 명령의 실행이 완료되고 나면, 상기 듀얼 명령 세트 프로세서의 모드는 상기 가상 머신 명령을 바로 실행하는 모드로 돌아온다. 이러한 방법에서, 상기 가상 머신의 명령 공간은 상기 제2 프로세서의 원시 명령을 상기 가상 머신의 명령 공간으로 효과적으로 매핑함으로서 향상된다.In particular, the set of JAVA virtual machine instructions may be extended by including native instructions for the second processor in the datastream. Prior to executing the primitive instruction in the datastream, the mode of the dual instruction set processor is set to execute the instruction on the second processor and the primitive instruction in the datastream executed by the second processor. After execution of the primitive instruction is completed by the second processor, the mode of the dual instruction set processor returns to the mode of directly executing the virtual machine instruction. In this way, the instruction space of the virtual machine is enhanced by effectively mapping the primitive instructions of the second processor to the instruction space of the virtual machine.

또한, JAVA 가상 머신 명세(JAVA Virtual Machine Specification)는 어레이의 경계 제한의 검사 등의 보안 검사를 엄격히 하여 바이러스 및 다른 소프트웨어 문제점들이 상기 네트워크로부터 사용자의 컴퓨터 시스템으로 전송되지 않도록 하는 것을 보장한다. 그러나, 일부 애플리케이션에서는, 이러한 보안 검사는 귀찮으며 불필요한 시간이 소비된다. 이러한 애플리케이션을 위해, 멀티미디어 라이브러리들의 애플리케이션 또는 다른 실행가능한 코드가 로컬 메모리 또는 다른 신뢰된 환경으로부터 로드될 수 있다. 실행가능한 코드가 상기 신뢰된 환경으로부터 로드되면, 상기 보안 검사는 사용되지 않고 수행능력이 향상된다.In addition, the JAVA Virtual Machine Specification strictly enforces security checks, such as checking the array boundaries, to ensure that viruses and other software problems are not transmitted from the network to the user's computer system. However, in some applications, such security checks are cumbersome and waste unnecessary time. For such an application, an application of multimedia libraries or other executable code can be loaded from local memory or other trusted environment. When executable code is loaded from the trusted environment, the security check is not used and performance is improved.

선택적으로, 아래에 좀 더 자세히 설명하겠지만, JAVA 프로그래밍 언어로 기록된 애플리케이션의 두 버전은 두 개의 다른 가상 머신 애플리케이션을 제공하기 위해 컴파일 될 수 있다. 상기 첫 번째 가상 머신 애플리케이션은 공중 캐리어상에서 정보를 이동시키는 네트워크 등의 안전하지 못한 환경에서 사용되어 상기 JAVA 가상 머신 명세에 의해 제공된 안전한 특성 모두를 포함하고 있다. 상기 두 번째 가상 머신 애플리케이션은 지역 네트워크 또는 단일 컴퓨터 등의 안전한 환경에서 사용되어 코드 인증을 포함하지 않는 안전한 특성들 모두 또는 일부를 포함하지 않아 보다 빠르게 실행된다.Optionally, as described in more detail below, two versions of an application written in the JAVA programming language can be compiled to provide two different virtual machine applications. The first virtual machine application is used in an insecure environment, such as a network for moving information over a public carrier, and includes all of the secure features provided by the JAVA virtual machine specification. The second virtual machine application is used in a secure environment, such as a local network or a single computer, to run faster because it does not include all or some of the secure features that do not include code authentication.

아래에 보다 자세히 설명하겠지만, 본 발명의 상기 듀얼 명령 세트 프로세서는 명령을 프로세서에 제공된 명령내의 정보에 기초하여 적절한 실행 유닛으로 자동적으로 경로설정을 한다. 듀얼 명령 세트 프로세서를 자세히 살펴보기 전에, 하드웨어 프로세서(100)의 실시예를 아래에 설명하도록 하고, 다음으로 하드웨어 프로세서(100) 또는 가상 머신 명령을 실행하는 같은 프로세서를 포함하는 본 발명의 상기 듀얼 명령 세트 프로세서의 보다 더 자세한 설명을 하도록 하겠다. As will be described in more detail below, the dual instruction set processor of the present invention automatically routes instructions to appropriate execution units based on information in instructions provided to the processor. Before considering the dual instruction set processor in detail, an embodiment of the hardware processor 100 will be described below, and then the dual instruction of the present invention comprising the same processor executing the hardware processor 100 or virtual machine instructions. A more detailed description of the set processor is provided.

도 1은 가상 머신 명령 하드웨어 프로세서(100)(이하 하드웨어 프로세서(100))의 한 실시예를 설명하는 도면으로서, 본 발명에 따른 듀얼 명령 프로세서로 사용될 수 있으며, 프로세서 아키텍처 독립인 가상 머신 명령을 직접 실행한다. JAVA 가상 머신 명령을 실행하는 하드웨어 프로세서(100)의 수행능력은 인텔사의 PENTIUM 마이크로프로세서 또는 썬 마이크로시스템사의 ULTRASPARC 프로세서(ULTRASPARK 는 캘리포니아주 마운틴 뷰에 위치한 썬 마이크로시스템스사의 등록상표이고, PENTIUM 은 캘리포니아주 서니베일에 위치한 인텔사의 등록상표임)와 같은 소프트웨어 JAVA 인터프리터, 또는 JAVA 실시간 컴파일러를 가지고 동일한 가상 머신 명령을 디코딩하는 하이-앤드 CPU 보다 더 우수하며, 가격이 저렴하고, 그리고 소비전력이 적다. 그 결과, 하드웨어 프로세서(100)는 이동 애플리케이션에 더 적합하다. 하드웨어 프로세서(100)는 불필요한 정보 수집(garbage collection), 스레드 동기화(thread synchronization) 등의 특징을 사용하는 가상 머신을 위해서 뿐만 아니라 다른 가상 머신 스택-기반 아키텍처를 위해서도 비슷한 장점을 제공한다.1 is a diagram illustrating an embodiment of a virtual machine instruction hardware processor 100 (hereinafter referred to as hardware processor 100), which may be used as a dual instruction processor in accordance with the present invention, and directly directs virtual machine instructions that are independent of the processor architecture. Run The performance of the hardware processor 100 executing JAVA virtual machine instructions is either Intel's PENTIUM microprocessor or Sun Microsystems' ULTRASPARC processor (ULTRASPARK is a registered trademark of Sun Microsystems, Inc., Mountain View, California, PENTIUM is Sunny, California It is better, cheaper, and consumes less power than a software JAVA interpreter (such as Intel's trademark in Vale) or a high-end CPU that decodes the same virtual machine instructions with a JAVA real-time compiler. As a result, the hardware processor 100 is more suitable for mobile applications. The hardware processor 100 provides similar advantages for other virtual machine stack-based architectures as well as for virtual machines that use features such as garbage collection, thread synchronization, and the like.

이러한 특징으로, 하드웨어 프로세서(100)에 기초한 시스템은, 소프트웨어 인터프리터 및 실시간 컴파일러를 포함하는 선택적 가상 머신 실행 환경과 비교하여, 최상의 수행능력은 아니더라도, 수행능력 특성을 위해서 매력적인 가격대를 제공한다. 그럼에도 불구하고, 본 발명은 가상 머신 하드웨어 프로세서 실시예로 제한되지 않으며, JAVA 가상 머신을 소프트웨어 인터프리터로서 에뮬레이팅하거나, JAVA 가상 머신 명령(배치(batch) 또는 적시(just-in-time) 중 어느 하나)을 특정 하드웨어 프로세서에 원시적인 머신 명령으로 컴파일하거나, 또는 마이크로코드내에서, 직접적으로 실리콘내에서 또는 그들의 어떤 조합에서 JAVA 가상 머신을 실현하는 하드웨어를 제공하는 구현을 포함하여, 적절한 스택-기반 또는 비스택-기반 머신 구현을 포함한다. With this feature, a system based on hardware processor 100 provides an attractive price point for performance characteristics, if not the best performance, compared to an optional virtual machine execution environment that includes a software interpreter and a real-time compiler. Nevertheless, the present invention is not limited to virtual machine hardware processor embodiments, and emulates a JAVA virtual machine as a software interpreter, or JAVA virtual machine instructions (batch or just-in-time). Appropriate stack-based or implementations, including hardware that implements JAVA virtual machines in native code, or in microcode, directly in silicon, or any combination thereof. Non-stack-based machine implementations.

수행능력 특성을 위한 가격을 고려하면, 하드웨어 프로세서(100)는, 예를 들어 소프트웨어 인터프리터로 요구되는 RAM 또는 ROM 메모리 등의 저장장치의 250 킬로바이트에서 500 킬로바이트(Kbyte)가 제거되는 장점을 가진다. Considering the price for the performance characteristic, the hardware processor 100 has an advantage that 250 kilobytes to 500 kilobytes (Kbytes) of storage devices such as RAM or ROM memory required by a software interpreter are removed.

본원의 하드웨어 프로세서(100)의 시뮬레이션에 의하면, 하드웨어 프로세서(100)가 가상 머신 명령을 실행하는 속도는, 하드웨어 프로세서(100)와 같은 클럭 레이트에서 클럭되는 펜티엄 프로세서상에서 여러 애플리케이션을 구동하면서 동일한 가상 머신 명령을 실행하는 소프트웨어 인터프리터의 속도보다 20배나 빠르다는 것을 보여주었다. 하드웨어 프로세서(100)의 다른 시뮬레이션은 하드웨어 프로세서(100)가 하드웨어 프로세서(100)와 같은 클록율에서 구동되고 동일한 가상 머신 명령을 실행하는 PENTIUM 프로세서상에서 구동하는 실시간 컴파일러보다 5배 빠르게 가상 머신 명령을 실행함을 보여준다.According to the simulation of the hardware processor 100 of the present application, the speed at which the hardware processor 100 executes the virtual machine instructions is the same virtual machine while running several applications on the Pentium processor clocked at the same clock rate as the hardware processor 100. It shows that it is 20 times faster than the software interpreter executing the command. Another simulation of the hardware processor 100 executes virtual machine instructions five times faster than a real-time compiler running on a PENTIUM processor where the hardware processor 100 runs at the same clock rate as the hardware processor 100 and executes the same virtual machine instructions. Shows.

소프트웨어 가상 머신 명령 인터프리터에 요구되는 메모리의 비용 환경에서, 하드웨어 프로세서(100)는 장점을 가진다. 이러한 애플리케이션은, 예를 들어 네트워크 애플리케이션용 인터넷 칩, 셀룰러 전화 프로세서, 다른 전기통신 집적회로, 또는 프로세서에 포함되고 이동가능한 장치인 다른 저전력, 저비용 애플리케이션을 포함한다. In the cost environment of memory required for the software virtual machine instruction interpreter, the hardware processor 100 has an advantage. Such applications include, for example, Internet chips for network applications, cellular telephone processors, other telecommunication integrated circuits, or other low-power, low-cost applications that are embedded and mobile devices in the processor.

여기서 사용된 바와 같이, 가상 머신은 실제 컴퓨팅 장치처럼 명령 세트를 가지고, 다양한 메모리 영역을 사용하는 이론적인 컴퓨팅 머신이다. 가상 머신 명세는 하드웨어 프로세서(100)와 같은 가상 머신 구현에 의해 실행되어지는 프로세서 아키택처 독립 가상 머신 명령 세트를 정의한다. 각 가상 머신 명령은 실행되는 특별한 작동을 정의한다. 가상 컴퓨팅 머신은 가상 머신의 기초가 되는 구현이나 가상 머신 명령을 발생하기 위해 사용되는 컴퓨터 언어를 이해할 필요가 없다. 단지 가상 머신 명령을 위한 특정 파일 포맷을 이해할 필요가 있다.As used herein, a virtual machine is a theoretical computing machine that has a set of instructions like a real computing device and uses various memory regions. The virtual machine specification defines a processor architecture independent virtual machine instruction set that is executed by a virtual machine implementation, such as hardware processor 100. Each virtual machine command defines a special operation to be executed. The virtual computing machine does not need to understand the underlying language of the virtual machine or the computer language used to generate the virtual machine instructions. You just need to understand the specific file format for the virtual machine instructions.

한 실시예에서, 가상 머신 명령은 JAVA 가상 머신 명령이다. 각 JAVA 가상 머신 명령은 명령 확인 정보, 오퍼랜드 및 다른 필요 정보를 부호화하는 하나 이상의 바이트를 포함한다. 참조로 여기에 기재되어 있는 부록 Ⅰ은 JAVA 가상 머신 명령의 실례(實例)가 되는 세트를 포함한다. 이용되는 가상 머신 명령의 특정 세트는 본 발명의 중요한 특색은 아니다. 부록 Ⅰ과 상기 설명의 가상 머신 명령의 측면에서 당업자라면 가상 머신 명령의 특별한 세트나 JAVA 가상 머신 명세로의 전환을 위한 본 발명의 변형이 가능하다.In one embodiment, the virtual machine command is a JAVA virtual machine command. Each JAVA virtual machine command includes one or more bytes that encode command confirmation information, operands, and other necessary information. Appendix I, which is described herein by reference, includes an illustrative set of JAVA virtual machine instructions. The particular set of virtual machine instructions used is not an important feature of the present invention. Those skilled in the art in view of the virtual machine instructions in Appendix I and the foregoing description are capable of modifying the invention for a special set of virtual machine instructions or for switching to the JAVA virtual machine specification.

컴퓨터 플랫폼상에서 실행되는 JAVA 컴파일러 JAVAC(도 2)은, JAVA 가상 머신 설명에 따라 컴파일된 명령 세트를 포함하는 컴파일된 명령 시퀀스(203)를 부호화하는 아키택쳐 중립 오브젝트 파일 포맷으로 JAVA 컴퓨터 언어로 쓰여진 애플리케이션(201)을 변환한다. 그러나, 본 발명을 위해, 단지 관계 정보와 가상 머신 명령의 소스만이 필요하다. 관계 정보와 가상 머신 명령의 소스를 발생시키기 위해 사용된 본 방법 또는 기술은 관련 정보는 본 발명에 중요하지 않다.JAVA compiler running on a computer platform JAVAC (FIG. 2) is an application written in JAVA computer language in an architecture-neutral object file format that encodes a compiled instruction sequence 203 containing a set of instructions compiled according to a JAVA virtual machine description. Convert 201. However, for the present invention, only source of relationship information and virtual machine instructions is needed. In the present method or technique used to generate the relationship information and the source of the virtual machine instruction, the relevant information is not important to the present invention.

컴파일된 명령 시퀀스(203)는 소프트웨어 인터프리터나 적시 컴파일러와 같은 JAVA 가상 머신 이용을 구현하는 컴퓨터 플랫폼뿐만 아니라 하드웨어 프로세서(100)상에서도 실행가능하다. 그러나 상술한 바와 같이, 하드웨어 프로세서(100)는 소프트웨어 구현을 능가하는 중요한 실행 이점을 제공한다. The compiled instruction sequence 203 can be executed on the hardware processor 100 as well as on a computer platform implementing JAVA virtual machine usage such as a software interpreter or a timely compiler. However, as noted above, the hardware processor 100 provides significant execution advantages over software implementation.

상기 실시예에서, 하드웨어 프로세서(100)(도 1)는 바이트코드를 포함하는 JAVA 가상 머신 명령을 처리한다. 하드웨어 프로세서(100)는 아래에 보다 정확히 설명한 바와 같이, 바이트코드의 대부분을 직접 실행한다. 그러나 일부 바이트코드의 실행은 마이크로코드를 통해 실행된다.In this embodiment, hardware processor 100 (FIG. 1) processes JAVA virtual machine instructions that include bytecode. The hardware processor 100 executes most of the bytecode directly, as described more precisely below. However, some bytecode execution is done through microcode.

하드웨어 프로세서(100)에 의해 직접 실행되는 가상 머신 명령을 선택하기 위한 방법이 예로써 여기에 기술되어 있다. JAVA 가상 머신 명령의 30퍼센트는 진정한 하드웨어 번역이고, 상기 방법에서 구현된 명령은 일정한 부하와 단순한 스택 작동을 포함한다. 가상 머신 명령의 다음 50%는 대부분 하드웨어에서 실행되지만, 전체는 아니고, 하드웨어에서 약간의 펌웨어 보조를 필요로 하고, 이들은 어레이 명령과 스택 기반 동작을 포함한다. JAVA 가상 머신 명령의 다음 10%는 하드웨어에서 구현되지만, 특별한 펌웨어 지원을 필요로 할 뿐만 아니라, 이들은 함수 리턴과 함수 호출을 포함한다. JAVA 가상 머신 명령의 나머지 10%는 하드웨어에서 지원되지 않지만, 마이크로코드 및/또는 펌웨어 트랩에 의해 지원되고, 이들은 예외 조작자(handler)와 같은 함수를 포함한다. 여기서 펌웨어는 실행이 하드웨어 프로세서(100)의 작동을 제어할 때 ROM내에 마이크로코드가 저장되는 것을 의미한다. A method for selecting virtual machine instructions executed directly by hardware processor 100 is described herein as an example. Thirty percent of JAVA virtual machine instructions are true hardware translations, and the instructions implemented in this method include constant load and simple stack operation. The next 50% of the virtual machine instructions are mostly executed in hardware, but require some firmware assistance in hardware, not entirely, and these include array instructions and stack-based operations. The next 10% of JAVA virtual machine instructions are implemented in hardware, but not only require special firmware support, but they also include function returns and function calls. The remaining 10% of JAVA virtual machine instructions are not supported in hardware, but are supported by microcode and / or firmware traps, which include functions such as exception handlers. Firmware here means that the microcode is stored in the ROM when execution controls the operation of the hardware processor 100.

한 실시예에서, 하드웨어 프로세서(100)는 I/O 버스와 메모리 인터페이스 유닛(110), 명령 캐시(125)를 포함하는 명령 캐시 유닛(120), 명령 디코드 유닛(130), 통일된 실행 유닛(140), 스택 캐시(155)를 포함하는 스택 관리 유닛(150), 데이터 캐시(165)를 포함하는 데이터 캐시 유닛(160), 프로그램 카운터 및 트랩 제어 논리(170)를 포함한다. 이들 각 유닛은 아래에 보다 상세히 설명된다.In one embodiment, hardware processor 100 includes an I / O bus and memory interface unit 110, an instruction cache unit 120 including instruction cache 125, an instruction decode unit 130, a unified execution unit ( 140, stack management unit 150 including stack cache 155, data cache unit 160 including data cache 165, program counter and trap control logic 170. Each of these units is described in more detail below.

또한, 도 1에 도시된 바와 같이, 각 유닛은 다양한 요소를 포함한다. 본 발명으로부터 혼돈을 피하고 명백히 하기 위해, 각 유닛 내의 요소들 사이의 관계는 도 1에 도시되지 않는다. 그러나 다음 설명에 있어서, 당업자라면 유닛과 다양한 유닛 사이에서 각 요소 사이의 결합과 상호관계를 잘 이해할 수 있을 것이다. In addition, as shown in FIG. 1, each unit includes various elements. In order to avoid and clarify the chaos from the present invention, the relationship between the elements in each unit is not shown in FIG. However, in the following description, those skilled in the art will be able to understand the coupling and interrelationships between the elements between the units and the various units.

파이프라인 단계는 패치, 디코드, 실행 및 라이트-백 단계를 포함하는 도 1에 도시된 유닛을 사용하여 구현된다. 바람직하게는 메모리 액세스나 예외 해법을 위한 추가 단계가 하드웨어 프로세서(100)에 제공되어진다.The pipeline stage is implemented using the unit shown in FIG. 1, including the patch, decode, execute, and write-back stages. Preferably additional steps are provided to the hardware processor 100 for memory access or exception resolution.

도 3은 프로세서(100)의 실시예에서 명령의 실행을 위한 4 단계 파이프라인의 도면이다. 패치 단계(301)에서 가상 머신 명령은 명령 버퍼(124)(도 1)에 위치하고 패치된다. 가상 머신 명령은 (ⅰ)명령 캐시(125)로부터 고정된 크기의 캐시 라인이나 (ⅱ)내부 메모리중 하나로부터 패치된다.3 is a diagram of a four stage pipeline for execution of instructions in an embodiment of the processor 100. In patch step 301 virtual machine instructions are located in the command buffer 124 (FIG. 1) and patched. The virtual machine instructions are patched from either (i) a fixed size cache line from the instruction cache 125 or (ii) internal memory.

패치에 대해, 명령 테이블 스위치와 룩업스위치는 제외하고(부록 Ⅰ 참조),각 가상 머신 명령은 1과 5 바이트 길이 사이에 있다. 그래서 이것을 간단하게 유지하기 위해, 주어지는 명령 모두가 패치 내에 유지되는 것을 보장하기 위해서는 적어도 40바이트가 필요하다.For patches, except for the command table switch and the lookup switch (see Appendix I), each virtual machine command is between 1 and 5 bytes long. So to keep this simple, at least 40 bytes are needed to ensure that all of the given instructions are kept in the patch.

대안 실시예는 연산부호로 시작되는, 예를 들면 4 바이트와 같은 소정수의 바이트를 항상 패치한다. 이는 JAVA 가상 머신 명령(부록 Ⅰ 참조)의 95%를 위해 충분하다. 3 바이트 이상의 오퍼랜드를 요구하는 명령을 위해, 4 바이트가 패치된다면 전단부의 다른 사이클은 허용된다. 상기 경우에, 명령 실행은 오퍼랜드의 전체 세트가 아직 이용가능하지 않더라도 패치된 제1 오퍼랜드 패치로 시작되어질 수 있다.Alternative embodiments always patch a predetermined number of bytes, such as 4 bytes, beginning with an opcode. This is sufficient for 95% of JAVA virtual machine commands (see Appendix I). For instructions that require more than 3 bytes of operand, another cycle of the front end is allowed if 4 bytes are fetched. In that case, instruction execution may begin with a patched first operand patch even if the entire set of operands is not yet available.

디코드 단계(302)에서(도 3), 명령 버퍼(124)(도 1)의 전단의 가상 머신 명령은 디코딩되고 가능하다면 명령 폴딩이 수행된다. 스택 캐시(155)는 필요할 때만 가상 머신 명령에 액세스한다. 스택(400)(도 4a 및 4B)의 최상위로 포인터 옵탑(OPTOP)을 유지하는 레지스터 옵탑은 디코드 단계(302)(도 3)에서도 업데이트된다.In decode step 302 (FIG. 3), the virtual machine instructions preceding the instruction buffer 124 (FIG. 1) are decoded and possibly instruction folding is performed. Stack cache 155 accesses virtual machine instructions only when needed. The register optop that holds the pointer optop to the top of the stack 400 (FIGS. 4A and 4B) is also updated in the decode step 302 (FIG. 3).

여기서 종래에는 레지스터의 값과 레지스터가 동일한 번호로 할당되었다. 더구나 다음의 논의에서 포인터를 저장하기 위한 레지스터의 사용은 한 실시예일 뿐이다. 본 발명의 특별한 실행에 따르면, 포인터는 당업자에게 알려진 다른 실시예, 소프트웨어 포인터, 소프트웨어 카운터, 하드웨어 카운터 또는 하드웨어 레지스터를 사용하여 구현되어진다. 선택된 특정 구현은 본 발명에 중요치 않고, 전형적으로 성능 절충을 위한 가격에 근거하여 만들어진다.Here, conventionally, register values and registers are assigned the same numbers. Moreover, the use of registers to store pointers in the following discussion is just one embodiment. According to a particular implementation of the invention, the pointer is implemented using other embodiments known to those skilled in the art, software pointers, software counters, hardware counters or hardware registers. The particular implementation chosen is not critical to the invention and is typically made based on price for performance tradeoffs.

실행 단계(303)에서 가상 머신 명령은 하나 이상의 사이클을 위해 실행된다. 일반적으로, 실행 단계(303)에서 정수 유닛(142)(도 1)의 ALU는 데이터 캐시 유닛(DCU)(160)으로부터 저장 또는 로딩의 어드레스를 계산하기 위해, 또는 산술 연산을 위해 사용되어진다. 만약 필요하다면 트랩은 실행 단계(303)(도 3)의 실행 끝에 순서가 정해지고 선택된다. 제어 흐름 명령을 위해, 분기 어드레스는, 분기가 종속하는 상태뿐만 아니라 실행 단계(303)에서 계산된다.In execution step 303, virtual machine instructions are executed for one or more cycles. In general, in execution step 303, the ALU of integer unit 142 (FIG. 1) is used to calculate the address of the storage or loading from data cache unit (DCU) 160, or for an arithmetic operation. If necessary, the traps are ordered and selected at the end of execution of execution step 303 (FIG. 3). For the control flow command, the branch address is calculated at execution step 303 as well as the state the branch is dependent on.

캐시 단계(304)는 비 파이프라인된 단계이다. 데이터 캐시(165)(도 1)는 실행 단계(303)(도 3)중에 필요하다면 액세스된다. 단계(304)가 비 파이프라인인 이유는 하드웨어 프로세서(100)가 스택 기반 장치이기 때문이다. 그러므로 부하 다음의 명령은 부하에 의해 리턴되는 값에 거의 항상 종속된다. 따라서 상기 실시예에서 파이프라인은 데이터 캐시 액세스를 위해 하나의 사이클로 고정된다. 이는 파이프라인 단계와, 바이패스와 특별 레지스터를 위한 파이프라인에 의해 채택된 다이 영역을 줄인다.The cache step 304 is a non-pipelined step. Data cache 165 (FIG. 1) is accessed if necessary during execution step 303 (FIG. 3). The reason why step 304 is non-pipeline is that hardware processor 100 is a stack based device. Therefore, the command following the load is almost always dependent on the value returned by the load. Thus in this embodiment the pipeline is fixed in one cycle for data cache access. This reduces the die area adopted by the pipeline stage and pipeline for bypass and special registers.

라이트-백 단계(305)는 파이프라인의 마지막 단계이다. 단계(305)에서 계산된 데이터는 스택 캐시(155)로 돌아와 작성된다.Write-back stage 305 is the final stage of the pipeline. The data calculated in step 305 is written back to the stack cache 155.

상기 실시예의 하드웨어 프로세서(100)는 JAVA 가상 머신 스택 기반 구조를 지지하는(부록 Ⅰ 참조) 스택(400)(도 4a)을 직접 구현한다. 스택(400)상의 64 엔트리는 스택 관리 유닛(150)내의 스택 캐시(155)상에 포함된다. 스택(400)내의 일부 엔트리는 스택 캐시(155)상에 복사될 수도 있다. 데이터상의 작동은 스택 캐시(155)를 통해 실행되어진다.The hardware processor 100 of this embodiment directly implements the stack 400 (FIG. 4A) supporting the JAVA virtual machine stack infrastructure (see Appendix I). 64 entries on the stack 400 are included on the stack cache 155 in the stack management unit 150. Some entries in stack 400 may be copied onto stack cache 155. Operation on the data is performed through the stack cache 155.

하드웨어 프로세서(100)의 스택(400)은 매서드에 대한 정보의 저장소로써 주로 사용된다. 시간에 따른 어떠한 위치에서 하드웨어 프로세서(100)는 단일 매서드를 실행한다. 각 매서드는 스택(400)상의 매서드 프레임과 같은 메모리 공간을 가지고, 실행 환경 구조와 오퍼랜드 스택, 로컬 변수의 세트를 위해 할당되어진다. Stack 400 of hardware processor 100 is primarily used as a repository of information about methods. At any location over time, the hardware processor 100 executes a single method. Each method has the same memory space as the method frame on stack 400 and is allocated for the execution environment structure, operand stack, and set of local variables.

새로운 매서드 프레임, 즉 매서드 프레임 2(410)는 실행 단계(303)(도 3)내의 매서드 호출(invocation)상에서 하드웨어 프로세서(100)에 의해 할당되고 현재 매서드의 프레임과 같은 현재 프레임이 된다. 다른 매서드 프레임 뿐만 아니라 현재 프레임(410)(도 4a)도 다음 6 엔트리중 일부 또는 전부를 포함할 수 있고, 다양한 매서드 호출 상황에 따른다.A new method frame, that is, method frame 2 410, is allocated by the hardware processor 100 on the method invocation in execution step 303 (FIG. 3) and becomes the current frame, such as the frame of the current method. The current frame 410 (FIG. 4A) as well as other method frames may include some or all of the following six entries, depending on the various method call situations.

오브젝트 레퍼런스;Object reference;

인커밍 인수;Incoming argument;

로컬 변수;Local variables;

호출자의 매서드 배경(context);The method context of the caller;

오퍼랜드 스택; 및Operand stack; And

매서드로부터의 리턴 값.Return value from the method.

도 4a에서, 오브젝트 레퍼런스, 인커밍 인수 및 로컬 변수는 인수와 로컬 변수 영역(421)에서 포함된다. 호출자의 매서드 배경은 실행 환경(422)에서 포함되고, 때로는 프레임 상태라 일컬어지고, 매서드 호출 명령 다음으로 JAVA 옵탑과 같은 가상 머신 명령의 주소인 리턴 프로그램 카운터 값(431), 소집(calling) 매서드의 프레임의 위치인 리턴 프레임(432), 소집 매서드의 상수 풀 테이블로의 포인터인 리턴 상수 풀 포인터(433), 현재 매서드 벡터 테이블의 기본 어드레스인 현재 매서드 벡터(434), 및 현재 매서드 모니터의 어드레스인 현재 모니터 어드레스(435)를 차례로 포함한다.In FIG. 4A, object references, incoming arguments, and local variables are included in the argument and local variable regions 421. The caller's method background is included in the execution environment 422, sometimes referred to as the frame state, followed by the method call command followed by the return program counter value 431, the address of the virtual machine command, such as a JAVA optop, of the calling method. The return frame 432, which is the location of the frame, the return constant pool pointer 433, which is a pointer to the constant pool table of the calling method, the current method vector 434, which is the base address of the current method vector table, and the address of the current method monitor. It includes the current monitor address 435 in turn.

오브젝트 레퍼런스는 매서드 호출을 위해 목표가 된 오브젝트를 나타내는 오브젝트 저장에 대한 간접 포인터이다. JAVA 컴파일러 JAVAC(도 2 참조)은 호출 명령을 발생하기 전에 오퍼랜드 스택(423)상으로 상기 포인터를 푸쉬하기 위한 명령을 발생한다. 상기 오브젝트 레퍼런스는 매서드가 실행되는 동안 로컬 변수 제로로써 액세스 가능하다. 상기 간접 포인터는 정적 매서드 호출을 위해 정의되는 목표 오브젝트가 없을 때 정적 매서드 호출을 위해 유효하지 않다.The object reference is an indirect pointer to an object store that represents the object targeted for the method call. JAVA compiler JAVAC (see FIG. 2) generates an instruction to push the pointer onto operand stack 423 before generating a call instruction. The object reference is accessible as local variable zero while the method is running. The indirect pointer is not valid for a static method call when there is no target object defined for the static method call.

인커밍 인수의 목록은 소집 매서드로부터 호출된 매서드로 정보를 전송한다. 오브젝트 레퍼런스와 같이, 인커밍 인수는 JAVA 컴파일러 발생 명령에 의해 스택(400)상으로 푸쉬되고, 로컬 변수로써 액세스될 수도 있다. JAVA 컴파일러 JAVAC(도 2 참조)는 현재 매서드(410)(도 4a)를 위한 인수 목록을 통계적으로 발생시키고, 하드웨어 프로세서(100)는 목록으로부터 인수의 수를 결정한다. 오브젝트 레퍼런스가 비정적 매서드 호출을 위한 프레임에 나타날 때, 제 1 인수는 로컬 변수의 하나로써 액세스 가능하다. 정적 매서드 호출에서, 제 1 인수는 로컬 변수 0이 된다.The list of incoming arguments sends information from the calling method to the called method. Like object references, incoming arguments are pushed onto stack 400 by JAVA compiler generated instructions and may be accessed as local variables. JAVA compiler JAVAC (see FIG. 2) statistically generates a list of arguments for the current method 410 (FIG. 4A), and the hardware processor 100 determines the number of arguments from the list. When an object reference appears in a frame for a non-static method call, the first argument is accessible as one of the local variables. In a static method call, the first argument is a local variable zero.

64비트 인수에서, 일반적으로 64비트 엔티티뿐만 아니라, 64비트 엔티티중 상측 32비트, 즉 32 최상위 비트는 스택(400)의 상측에 위치된다, 즉 스택에 마지막으로 푸시된다. 예를 들어, 64비트 엔티티가 스택(400)의 최상위에 위치하는 경우, 64비트 엔티티의 상위 32비트부는 스택의 최상위에 있고, 64비트 엔티티의 하위 32비트부는 스택(400)의 최상위에 바로 인접한 저장 위치에 있다.In a 64-bit argument, the upper 32 bits, or 32 most significant bits, of the 64-bit entities, as well as the 64-bit entities in general, are placed on top of the stack 400, ie pushed last on the stack. For example, if a 64-bit entity is located at the top of the stack 400, the upper 32-bit portion of the 64-bit entity is at the top of the stack, and the lower 32-bit portion of the 64-bit entity is immediately adjacent to the top of the stack 400. It is in a storage location.

현재 매서드(410)를 위한 스택(400)(도 4a)의 로컬 변수 영역은 할당되는 임시 변수 저장 공간을 나타내고 매서드(410)를 호출하는 동안 유효하게 유지된다. JAVA 컴파일러 JAVAC(도 2)는 요구된 로컬 변수의 수를 통계적으로 결정하고, 하드웨어 프로세서(100)는 그에 따라 임시 변수 저장 공간을 할당한다.The local variable area of the stack 400 (FIG. 4A) for the current method 410 represents the temporary variable storage space allocated and remains valid during the method 410 call. The JAVA compiler JAVAC (FIG. 2) statistically determines the number of local variables required, and the hardware processor 100 allocates temporary variable storage space accordingly.

매서드가 하드웨어 프로세서(100)에서 실행되는 경우, 로컬 변수는 일반적으로 스택 캐시(155)에 있게 되고, 포인터 VARS(도 1 및 도 4a)로부터의 오프셋으로서 어드레스되며, VARS는 로컬 변수의 위치를 제로로 포인트한다. 명령은 오퍼랜드 스택(423)으로 로컬 변수 값을 로드하기 위해 제공되고, 오퍼랜드 스택으로부터 로컬 변수 영역(421)으로 값을 저장한다.When the method is executed on the hardware processor 100, the local variable is generally in the stack cache 155, addressed as an offset from the pointer VARS (FIGS. 1 and 4A), and the VARS zeros the position of the local variable. To point. Instructions are provided to load local variable values into operand stack 423 and store the values from operand stack into local variable area 421.

실행 환경(422)내 정보는 호출자의 매서드 배경을 포함한다. 새로운 프레임이 현재 매서드를 위해 설계되는 경우, 하드웨어 프로세서(100)는 호출자 매서드 배경을 새로 할당된 프레임(410)으로 푸시하고, 그 뒤에 리턴 전에 호출자의 매서드 배경을 복구하기 위해 정보를 이용한다. 포인터 FRAME(도 1 및 도 4a)는 현재 매서드의 실행 환경으로의 포인터이다. 실시예에서, 레지스터 세트(144)(도 1)내 각각의 레지스터는 32비트 폭이다.The information in execution environment 422 includes the caller's method background. If a new frame is designed for the current method, hardware processor 100 pushes the caller method background to the newly assigned frame 410 and then uses the information to recover the caller's method background before returning. The pointer FRAME (FIGS. 1 and 4A) is a pointer to the execution environment of the current method. In an embodiment, each register in register set 144 (FIG. 1) is 32 bits wide.

오퍼랜드 스택(423)은 현재 매서드 내 가상 머신 명령의 실행을 지원하기 위해 할당된다. 프로그램 카운터 레지스터 PC(도 1)는 연산부호와 같은 실행될 다음 명령의 주소를 포함한다. 오퍼랜드 스택(423)(도 4a)상의 위치는 명령 실행을 위한 소스 및 타겟 저장 위치 모두를 제공하는 가상 머신 명령의 오퍼랜드를 저장하기 위해 사용된다. 오퍼랜드 스택(423)의 크기는 JAVA 컴파일러 JAVAC(도 2)에 의해 통계적으로 결정되고, 하드웨어 프로세서(100)는 그에 따라 오퍼랜드 스택(423)을 위한 공간을 할당한다. 레지스터 옵탑(도 1 및 도 4a)는 오퍼랜드 스택(423)의 최상위로의 포인터를 보유한다.Operand stack 423 is allocated to support the execution of virtual machine instructions within the current method. The program counter register PC (Fig. 1) contains the address of the next instruction to be executed, such as an opcode. The location on operand stack 423 (FIG. 4A) is used to store operands of virtual machine instructions that provide both source and target storage locations for instruction execution. The size of the operand stack 423 is statistically determined by the JAVA compiler JAVAC (FIG. 2), and the hardware processor 100 allocates space for the operand stack 423 accordingly. The register optops (FIGS. 1 and 4A) hold a pointer to the top of the operand stack 423.

호출된 매서드는 그 실행 결과를 호출자의 스택 최상위로 반환할 수 있어서, 호출자는 오퍼랜드 스택 레퍼런스로 반환값을 액세스할 수 있다. 반환값은 오브젝트 레퍼런스 또는 인수가 매서드 실행전에 푸시되는 영역에 위치된다.The invoked method can return the result of its execution to the top of the caller's stack so that the caller can access the return value with the operand stack reference. The return value is placed in the area where the object reference or argument is pushed before the method executes.

JAVA 가상 머신의 시뮬레이션 결과는 매서드 호출이 실행 시간의 주요부분(20-40%)을 소모한다는 것을 나타낸다. 가상 머신 명령의 실행을 가속시키기 위해 이러한 흥미있는 타겟을 제공하면, 매서드 실행을 위한 하드웨어 지원은 좀더 완전하게 후술되는 바와 같이 하드웨어 프로세서(100)에 포함된다. Simulation results of the JAVA virtual machine show that method calls consume a major portion of execution time (20-40%). Providing such interesting targets to accelerate the execution of virtual machine instructions, hardware support for method execution is included in hardware processor 100 as described more fully below.

새롭게 호출된 매서드의 스택 프레임의 시작, 즉 호출자에 의해 전달된 오브젝트 레퍼런스 및 인수는 오브젝트 레퍼런스 및 인커밍 인수가 호출자(caller)의 스택의 최상위로부터 나오기 때문에 스택(400)에 이미 저장된다. 상기한 바와 같이, 스택(400)상에 이러한 아이템들에 이어서, 로컬 변수들이 로드되고, 실행 환경이 로드된다.The start of the newly called method's stack frame, that is, the object reference and arguments passed by the caller, are already stored in stack 400 because the object reference and incoming arguments come from the top of the caller's stack. As noted above, following these items on the stack 400, local variables are loaded, and the execution environment is loaded.

이러한 처리를 가속화하기 위한 한가지 방법은 하드웨어 프로세서(100)가 백그라운드에서 실행 환경을 로드하고, 간단한 1비트 스코어보딩과 같이 지금까지 로드된 것을 나타내는 것이다. 하드웨어 프로세서(100)는 스택(400)이 완전히 로드되지 않을지라도 가능한 한 빨리 호출(call)된 매서드의 바이트코드를 실행하려고 시도한다. 만일 이미 로드된 변수로 액세스가 이뤄지면, 스택(400)의 로드와 실행의 중첩이 이뤄지고, 그렇지 않으면 하드웨어 인터록이 발생하며 하드웨어 프로세서(100)는 실행 환경 내 변수(들)가 로드되기를 기다리기만 한다.One way to speed up this process is for the hardware processor 100 to load the execution environment in the background, indicating that it has been loaded so far, such as simple 1-bit scoreboarding. The hardware processor 100 attempts to execute the bytecode of the called method as soon as possible even if the stack 400 is not fully loaded. If access is made to a variable that has already been loaded, then the stack 400's load and execution overlap, otherwise a hardware interlock occurs and the hardware processor 100 only waits for the variable (s) in the execution environment to be loaded.

도 4b는 매서드 호출을 가속화하기 위한 또다른 방법를 설명하고 있다. 전체 매서드 프레임을 스택(400)에 저장하는 대신, 각각의 매서드 프레임의 실행 환경은 매서드 프레임의 오퍼랜드 스택 및 로컬 변수 영역으로부터 분리되어 저장된다. 따라서 이 실시예에서, 스택(400B)은 로컬 변수 영역(421) 및 오퍼랜드 스택(423)만을 갖는 수정된 매서드 프레임(410B)과 같은 수정된 매서드 프레임을 포함한다. 매서드 프레임의 실행 환경(422)은 실행 환경 메모리(440)에 저장된다. 실행 환경 메모리(440)에 실행 환경을 저장하는 것은 스택 캐시(155)내 데이터의 양을 감소시킨다. 따라서 스택 캐시(155)의 크기가 감소될 수 있다. 또한, 실행 환경 메모리(440) 및 스택 캐시(155)가 동시에 액세스될 수 있다. 따라서 매서드 실행은 스택(400B)으로의 데이터의 로드 또는 저장과 동시에 실행 환경을 로드 또는 저장함으로써 가속화될 수 있다.4B illustrates another method for accelerating method calls. Instead of storing the entire method frame on the stack 400, the execution environment of each method frame is stored separately from the operand stack and local variable regions of the method frame. Thus, in this embodiment, the stack 400B includes a modified method frame, such as a modified method frame 410B having only a local variable area 421 and an operand stack 423. The execution environment 422 of the method frame is stored in the execution environment memory 440. Storing the execution environment in the execution environment memory 440 reduces the amount of data in the stack cache 155. Therefore, the size of the stack cache 155 can be reduced. In addition, execution environment memory 440 and stack cache 155 may be accessed simultaneously. Thus method execution can be accelerated by loading or storing the execution environment concurrently with loading or storing data into the stack 400B.

스택 관리 유닛(150)의 한 실시예에서, 실행 환경 메모리(440)의 메모리 구조 또한 스택이 된다. 수정된 매서드 프레임이 스택 캐시(155)를 통해 스택(400B)으로 푸시됨에 따라, 대응하는 실행 환경은 실행 환경 메모리(440)로 푸시된다. 예를 들어, 도 4b에 도시된 바와 같이, 수정된 매서드 프레임(0 내지 2)이 스택(400B)에 있기 때문에, 실행 환경(EE)(0 내지 2)은 각각 실행 환경 메모리 회로(440)에 저장된다.In one embodiment of the stack management unit 150, the memory structure of the execution environment memory 440 is also a stack. As the modified method frame is pushed to stack 400B through stack cache 155, the corresponding execution environment is pushed to execution environment memory 440. For example, as shown in FIG. 4B, since modified method frames 0-2 are on the stack 400B, the execution environment EEs 0-2 are each stored in the execution environment memory circuit 440. Stored.

매서드 실행을 좀더 향상시키기 위해, 실행 환경 캐시는 매서드 호출동안 실행 환경을 보존하고 검색하는 속도를 개선하기 위해 추가될 수 있다. 스택(400)을 캐시하기 위한 스택 캐시(155), 드리블 관리 유닛(151), 및 스택 제어 유닛(152)에 대한 아래에서 좀더 상세히 후술된 구조는 실행 환경 메모리(440)를 캐시하는데 적용될 수도 있다.To further improve method execution, execution environment caches can be added to improve the speed of preserving and retrieving the execution environment during method invocations. The structure described below in more detail below for the stack cache 155, the dribble management unit 151, and the stack control unit 152 for caching the stack 400 may be applied to cache the execution environment memory 440. .

도 4c는 스택(400b) 및 실행 환경 메모리(440) 모두를 지원하도록 수정된 스택 관리 유닛(150)의 실시예를 설명하고 있다. 특히, 도 4c의 스택 관리 유닛(150)의 실시예에서는 실행 환경 스택 캐시(450), 실행 환경 드리블 관리 유닛(460), 및 실행 환경 스택 제어 유닛(470)을 추가한다. 일반적으로, 실행 드리블 관리 유닛(460)은 스필(spill) 연산 또는 충전(fill) 연산동안 실행 환경 캐시(450)와 실행 환경 메모리(440) 사이에 전체 실행 환경을 전송한다.4C illustrates an embodiment of the stack management unit 150 modified to support both stack 400b and execution environment memory 440. In particular, the embodiment of stack management unit 150 in FIG. 4C adds execution environment stack cache 450, execution environment dribble management unit 460, and execution environment stack control unit 470. In general, execution dribble management unit 460 transfers the entire execution environment between execution environment cache 450 and execution environment memory 440 during a spill or fill operation.

I/O 버스 및 메모리 인터페이스 유닛(I/O Bus and Memory Interface Unit)I / O Bus and Memory Interface Unit

I/O 버스 및 때때로 인터페이스 유닛(110)으로 불리는 메모리 인터페이스 유닛(110)(도 1)은 실시예에서 외부 메모리를 포함하고 선택적으로 하드웨어 프로세서(100)와 동일한 다이(die)에 메모리 기억장치 및/또는 인터페이스를 포함할 수 있는 메모리 계층구조와 하드웨어 프로세서(100) 사이에 인터페이스를 구현한다. 이 실시예에서, I/O 제어기(111)는 외부 I/O 장치와 인터페이스하고, 메모리 제어기(112)는 외부 메모리와 인터페이스한다. 본 명세서에서, 외부 메모리는 하드웨어 프로세서(100) 외부에 있는 메모리를 의미한다. 그러나, 외부 메모리는 하드웨어 프로세서(100)와 동일한 다이상에 포함될 수 있거나, 하드웨어 프로세서(100)를 포함하는 다이의 외부에 있을 수 있거나, 또는 온 및 오프 다이 부분 모두를 포함할 수 있다.Memory interface unit 110 (FIG. 1), which is sometimes referred to as I / O bus and interface unit 110, includes an external memory and optionally includes a memory storage device on a die that is identical to hardware processor 100. Implement an interface between the hardware processor 100 and a memory hierarchy that may include an interface. In this embodiment, I / O controller 111 interfaces with external I / O devices, and memory controller 112 interfaces with external memory. In this specification, the external memory refers to a memory external to the hardware processor 100. However, the external memory may be included on the same die as the hardware processor 100, may be external to the die including the hardware processor 100, or may include both on and off die portions.

또다른 실시예에서, I/O 장치로의 요구는 하드웨어 프로세서(100)를 포함하는 전체 시스템의 어드레스 맵을 유지하는 메모리 제어기(112)를 통한다. 이 실시예의 메모리 버스에서, 하드웨어 프로세서(100)는 유일한 마스터이고, 메모리 버스를 사용하는 것을 중재할 필요가 없다.In another embodiment, the request to the I / O device is through a memory controller 112 that maintains an address map of the entire system, including the hardware processor 100. In the memory bus of this embodiment, the hardware processor 100 is the only master and does not need to mediate using the memory bus.

그러므로, I/O 버스 및 메모리 인터페이스 유닛(110)과 인터페이스하는 입출력 버스의 대안은 PCI, PCMCIA, 또는 다른 표준 버스의 직접 지원을 제공하는 메모리 맵 설계를 지원하는 것을 포함한다. 빠른 그래픽(w/ VIS 또는 다른 기술)은 하드웨어 프로세서(100)를 갖는 다이상에 선택적으로 포함될 수 있다.Therefore, alternatives to the I / O bus and the input / output bus that interfaces with the memory interface unit 110 include supporting memory map designs that provide direct support of PCI, PCMCIA, or other standard buses. Fast graphics (w / VIS or other techniques) may optionally be included on the die with hardware processor 100.

I/O 버스 및 메모리 인터페이스 유닛(110)은 외부 메모리로의 읽기 및 쓰기 요구를 생성한다. 특히, 인터페이스 유닛(110)은 명령 캐시 및 데이터 캐시 제어기(121,161)를 위한 인터페이스를 외부 메모리에 제공한다. 인터페이스 유닛(110)은 외부 메모리로 액세스하기 위해 명령 캐시 제어기(121) 및 데이터 캐시 제어기(161)로부터의 외부 요구를 위한 중재 로직을 포함하고, 요구에 응하여 메모리 버스상의 외부 메모리로 읽기 또는 쓰기 요구를 초기화한다. 데이터 캐시 제어기(161)로부터의 요구는 항상 명령 캐시 제어기(121)로부터의 요구에 관련하여 더 높은 우선순위로 처리된다.I / O bus and memory interface unit 110 generates read and write requests to external memory. In particular, the interface unit 110 provides interfaces to the external memory for the instruction cache and data cache controllers 121 and 161. The interface unit 110 includes arbitration logic for external requests from the command cache controller 121 and the data cache controller 161 to access the external memory, and in response to the request, read or write requests to the external memory on the memory bus. Initialize Requests from the data cache controller 161 are always processed at a higher priority with respect to requests from the command cache controller 121.

인터페이스 유닛(110)은 요구하는 제어기가 데이터를 래치할 수 있도록 요구하는 명령 캐시 제어기(121) 또는 읽기 사이클상의 데이터 캐시 제어기(161)로 인지 신호를 제공한다. 쓰기 사이클에서, 인터페이스 유닛(110)으로부터의 인지 신호는 요구하는 명령 캐시 제어기(121) 또는 데이터 캐시 제어기(161)가 하나의 미결이 있는 경우 새로운 요구를 생성하지 않도록 흐름 제어를 위해 사용된다. 인터페이스 유닛(110)은 또한 메모리 버스상에서 외부 메모리로 생성된 에러를 처리한다.The interface unit 110 provides an acknowledgment signal to the command cache controller 121 or the data cache controller 161 in a read cycle that the requesting controller can latch data. In a write cycle, an acknowledgment signal from the interface unit 110 is used for flow control so that the requesting command cache controller 121 or the data cache controller 161 does not generate a new request if there is one outstanding. The interface unit 110 also handles errors generated in the external memory on the memory bus.

명령 캐시 유닛(Instruction Cache Unit)Instruction Cache Unit

명령 캐시 유닛(ICU)(120)(도 1)은 명령 캐시(125)로부터 가상 머신 명령을 패치하고, 명령 디코드 유닛(130)으로 명령을 제공한다. 이러한 실시예에서, 명령 캐시 히트(hit)인 경우, 한 사이클에서 명령 캐시 제어기(121)는 명령 캐시(125)로부터 좀더 상세히 후술되는 정수 실행 유닛(IEU)이 명령을 프로세싱할 준비가 될 때까지 명령이 보유되는 명령 버퍼(124)로 명령을 전송한다. 이것은 하드웨어 프로세서(100)내 파이프라인(300)의 나머지를 패치 단계(301)로부터 분리시킨다. 만일 배치의 명령 버퍼 타입을 지원하는 복잡도를 초래하는 것이 바람직하지 않은 경우, 임의의 한 명령 레지스터는 대부분의 오브젝트에 충분하다. 그러나, 명령 패칭, 캐싱, 및 버퍼링은 후술된 바와 같이 명령 폴딩(folding)을 지원하기 위해 충분한 명령 대역폭을 제공해야 한다.Instruction cache unit (ICU) 120 (FIG. 1) fetches virtual machine instructions from instruction cache 125 and provides instructions to instruction decode unit 130. In this embodiment, in the case of an instruction cache hit, the instruction cache controller 121 in one cycle until the integer execution unit (IEU) described below in more detail from the instruction cache 125 is ready to process the instruction. The command is sent to the command buffer 124 where the command is held. This separates the rest of pipeline 300 in hardware processor 100 from patch step 301. If it is not desirable to incur the complexity of supporting the instruction buffer type of batch, any one instruction register is sufficient for most objects. However, instruction patching, caching, and buffering must provide sufficient instruction bandwidth to support instruction folding as described below.

하드웨어 프로세서(100)의 전단은 하드웨어 프로세서(100)의 나머지로부터 폭넓게 분리된다. 이상적으로, 사이클당 하나의 명령이 실행 파이프라인으로 배출된다.The front end of the hardware processor 100 is widely separated from the rest of the hardware processor 100. Ideally, one instruction per cycle is emitted to the execution pipeline.

명령은 명령 디코드 유닛(130)으로부터의 신호에 응하여 바이트 정렬기 회로(122)에 의해 임의의 8비트 경계에서 정렬된다. 따라서, 하드웨어 프로세서(100)의 전단은 어떠한 바이트 위치로부터 패치하는 것을 충분히 처리한다. 또한, 하드웨어 프로세서(100)는 캐시(125)의 다중 캐시 라인에 걸리는 명령의 문제를 처리한다. 이러한 경우, 연산부호가 제 1 바이트이기 때문에, 디자인은 오퍼랜드를 위한 패치 잠재의 여분의 사이클을 묵인할 수 있다. 따라서, 바이트 코드의 패치와 실행간의 매우 간단한 연결 단절이 가능하다.The instructions are aligned at any 8-bit boundary by the byte aligner circuit 122 in response to the signal from the instruction decode unit 130. Thus, the front end of the hardware processor 100 fully handles patching from any byte position. The hardware processor 100 also handles the problem of instructions across multiple cache lines in the cache 125. In this case, since the opcode is the first byte, the design can tolerate the extra cycle of patch potential for the operand. Thus, a very simple disconnection between patch and execution of bytecode is possible.

명령 캐시 미스(miss)의 경우, 명령 캐시 제어기(121)는 놓쳐진 명령을 위한 외부 메모리 요구를 I/O 버스 및 메모리 인터페이스 유닛(110)으로 생성한다. 만일 명령 버퍼(124)가 비어있거나 또는 거의 비어있으면, 명령 캐시 미스가 있는 경우, 명령 디코드 유닛(130)은 정지된다, 즉 파이프라인이 정지된다. 특히, 명령 캐시 제어기(121)는 파이프라인(300)을 정지할지 여부를 결정하기 위해 명령 버퍼 비어있음 신호에 따라 사용되는 캐시 미스 때 정지 신호를 생성한다. 명령 캐시(125)는 자기 수정 코드를 조정하기 위해 무효화될 수 있는데, 예를 들어 명령 캐시 제어기(121)는 명령 캐시(125)내 특정 라인을 무효화할 수 있다.In the case of an instruction cache miss, the instruction cache controller 121 generates an external memory request for the missed instruction to the I / O bus and memory interface unit 110. If the instruction buffer 124 is empty or nearly empty, then if there is an instruction cache miss, the instruction decode unit 130 is stopped, ie the pipeline is stopped. In particular, the instruction cache controller 121 generates a stop signal when a cache miss is used in accordance with the instruction buffer empty signal to determine whether to stop the pipeline 300. The instruction cache 125 may be invalidated to adjust self-correcting code, for example the instruction cache controller 121 may invalidate certain lines in the instruction cache 125.

따라서, 명령 캐시 제어기(121)는 패치될 다음 명령, 즉 액세스될 필요가 있는 명령 캐시(125)내 명령어를 결정하고, 명령 캐시(125)내 태그 RAM 및 데이터를 위한 어드레스, 데이터, 및 제어 신호를 생성한다. 캐시 히트의 경우, 4바이트의 데이터는 한 사이클에서 명령 캐시(125)로부터 패치되고, 최대 4바이트는 명령 버퍼(124)로 쓰여질 수 있다.Thus, the instruction cache controller 121 determines the next instruction to be patched, i.e., instructions in the instruction cache 125 that need to be accessed, and addresses, data, and control signals for tag RAM and data in the instruction cache 125. Create In the case of a cache hit, four bytes of data may be fetched from the instruction cache 125 in one cycle, and up to four bytes may be written to the instruction buffer 124.

바이트 정렬기 회로(122)는 명령 캐시 RAM의 외부에 데이터를 정렬하고, 정렬된 데이터를 명령 버퍼(124)로 공급한다. 좀더 상세히 후술된 바와 같이, 명령 버퍼(124)내 앞의 두 개 바이트는 가상 머신 명령의 길이를 결정하기 위해 디코드된다. 좀더 상세히 후술된 바와 같이 명령 버퍼(124)는 대기행렬의 유효 명령을 탐지하고, 엔트리를 갱신한다.The byte aligner circuit 122 aligns the data outside of the instruction cache RAM and supplies the aligned data to the instruction buffer 124. As described in more detail below, the preceding two bytes in the instruction buffer 124 are decoded to determine the length of the virtual machine instruction. As described in more detail below, the command buffer 124 detects valid commands in the queue and updates the entries.

명령 캐시 제어기(121)는 또한 데이터 경로를 제공하고, 명령 캐시 미스를 처리하기 위한 제어를 제공한다. 명령 캐시 미스의 경우, 명령 캐시 제어기(121)는 I/O 버스 및 메모리 인터페이스 유닛(110)으로 캐시 충전 요구를 생성한다.The instruction cache controller 121 also provides a data path and provides control for handling instruction cache misses. In the case of an instruction cache miss, the instruction cache controller 121 generates a cache charge request to the I / O bus and memory interface unit 110.

외부 메모리로부터 데이터를 수신하는 경우, 명령 캐시 제어기(121)는 명령 캐시(125)로 데이터를 쓰고, 상기 데이터는 또한 명령 버퍼(124)로 우회된다. 데이터가 외부 메모리로부터 유효하게 되자마자, 그리고 캐시 충전 완료전에 데이터는 명령 버퍼(124)로 우회된다.When receiving data from the external memory, the instruction cache controller 121 writes data to the instruction cache 125, which is also bypassed to the instruction buffer 124. As soon as the data is available from external memory and before the cache filling is complete, the data is bypassed into the command buffer 124.

명령 캐시 제어기(121)는 명령 버퍼(124)가 가득 차거나 또는 분기 또는 트랩이 발생할 때까지 연속적인 데이터를 패치하기를 계속한다. 한 실시예에서, 명령 버퍼(124)는 만일 버퍼(124)내에 8바이트 이상의 유효 엔트리가 있는 경우 가득찬 것으로 간주된다. 따라서, 일반적으로 8바이트의 데이터는 명령 캐시 유닛(120)에 의해 인터페이스 유닛(110)으로 전송된 캐시 충전 요구에 응하여 외부 메모리로부터 명령 캐시(125)로 쓰여진다. 만일 명령 캐시 미스를 처리하는 동안 분기 또는 트랩이 발생하는 경우, 미스 프로세싱이 완료된 후에만 트랩 또는 분기가 실행된다.The instruction cache controller 121 continues to patch consecutive data until the instruction buffer 124 is full or a branch or trap occurs. In one embodiment, command buffer 124 is considered full if there are more than 8 bytes of valid entries in buffer 124. Thus, in general, eight bytes of data are written from the external memory to the instruction cache 125 in response to a cache charge request sent by the instruction cache unit 120 to the interface unit 110. If a branch or trap occurs while processing an instruction cache miss, the trap or branch is executed only after the miss processing is complete.

명령 캐시 충전 트랜잭션 동안 에러가 발생되는 경우, 오류 표시가 생성되고 가상 머신 명령에 따라 명령 버퍼(124)에 저장된다, 즉 오류 비트가 설정되다. 라인은 명령 캐시(125)로 쓰여지지 않는다. 따라서, 잘못된 캐시 충전 트랜잭션은 오류 비트가 설정되는 것을 제외하고 캐시가능하지 않은 것처럼 동작한다. 명령이 디코드되는 경우, 트랩이 발생된다.If an error occurs during an instruction cache filling transaction, an error indication is generated and stored in the instruction buffer 124 according to the virtual machine instruction, ie the error bit is set. The line is not written to the instruction cache 125. Thus, a bad cache fill transaction behaves as if it is not cacheable except that an error bit is set. If the instruction is decoded, a trap is generated.

명령 캐시 제어기(121)는 또한 캐시 불가능 명령 읽기를 서비스한다. 레지스터 세트(144)내 프로세서 상태 레지스터의 ICE(instruction cache enable)비트는 로드가 캐시될 수 있는지 여부를 정의하기 위해 사용된다. 만일 ICE 비트가 클리어되면, 명령 캐시 유닛(120)은 모든 로드를 캐시 불가능한 로드로 취급한다. 명령 캐시 제어기(121)는 캐시 불가능한 명령을 위해 인터페이스 유닛(110)으로 캐시 불가능한 요구를 발생한다. 데이터가 캐시 불가능한 명령을 위해 캐시 충전 버스상에서 유효한 경우, 데이터는 명령 버퍼(124)로 우회되고, 명령 캐시(125)로 쓰여지지 않는다.The instruction cache controller 121 also services non-cacheable instruction reads. The instruction cache enable (ICE) bit of the processor status register in register set 144 is used to define whether the load can be cached. If the ICE bit is cleared, the instruction cache unit 120 treats all loads as non-cacheable loads. The instruction cache controller 121 issues a noncacheable request to the interface unit 110 for a noncacheable instruction. If data is valid on the cache charge bus for non-cacheable instructions, the data is bypassed into the instruction buffer 124 and not written to the instruction cache 125.

이 실시예에서, 명령 캐시(125)는 직접 매핑되는, 8바이트 라인 크기 캐시이다. 명령 캐시(125)는 하나의 사이클 잠재(latency)를 갖는다. 캐시 크기는 K가 킬로를 의미할 때 0K, 1K, 2K, 4K, 8K, 및 16K 바이트로 구성가능하다. 디폴트 크기는 4K 바이트이다. 각각의 라인은 라인과 관련된 캐시 태그 엔트리를 갖는다. 각각의 캐시 태그는 20비트 어드레스 태그 필드 및 디폴트 4K 바이트 크기를 위한 1 유효비트를 포함한다. In this embodiment, the instruction cache 125 is an 8 byte line size cache that is mapped directly. The instruction cache 125 has one cycle latency. The cache size is configurable into 0K, 1K, 2K, 4K, 8K, and 16K bytes when K stands for kilo. The default size is 4K bytes. Each line has a cache tag entry associated with the line. Each cache tag contains a 20-bit address tag field and one valid bit for the default 4K byte size.

한 실시예에서 12바이트 딥 FIFO(first-in, first-out) 버퍼인 명령 버퍼(124)는 성능상의 이유로 파이프라인(300)의 나머지로부터 패치 단계(301)(도 3)를 단절한다. 버퍼(124)(도 1)내 각각의 명령은 관련된 유효 비트 및 에러 비트를 갖는다. 유효 비트가 설정되는 경우, 그 유효 비트와 관련된 명령은 유효 명령이다. 에러 비트가 설정되는 경우, 그 에러 비트와 관련된 명령의 패치는 잘못된 트랙잭션이다. 명령 버퍼(124)는 명령 버퍼(124)까지 그리고 명령 버퍼로부터 데이터를 통과시키기 위해 신호를 생성하고, 명령 버퍼(124)내 유효 엔트리, 즉 유효 비트 세트를 갖는 엔트리를 기억하는 명령 버퍼 제어 회로(도시되지 않음)를 포함한다.In one embodiment, the instruction buffer 124, which is a 12-byte deep FIFO (first-in, first-out) buffer, disconnects the patch step 301 (FIG. 3) from the rest of the pipeline 300 for performance reasons. Each instruction in buffer 124 (FIG. 1) has an associated valid bit and an error bit. If the valid bit is set, the instruction associated with that valid bit is a valid instruction. If an error bit is set, the patch of the instruction associated with that error bit is an invalid transaction. The command buffer 124 generates a signal for passing data to and from the command buffer 124, and stores a valid entry in the command buffer 124, i.e., an entry having a set of valid bits. Not shown).

한 실시예에서, 4바이트는 주어진 사이클에서 명령 버퍼(124)로 수신될 수 있다. 최대 5바이트까지, 최대 2개 가상 머신 명령을 표시하는 것은 주어진 사이클에서 명령 버퍼(124)로 읽혀질 수 있다. 다중 바이트 가상 머신 명령의 폴딩 제공 및/또는 두 개 이상의 가상 머신 명령의 폴딩을 제공하는 대안적인 실시예는 더 높은 입출력 대역폭을 제공한다. 당업자는 정렬 논리, 순환 버퍼 디자인 등을 포함하는 다수의 적절한 명령 버퍼 디자인을 인식할 것이다. 분기 또는 트랩이 발생되는 경우, 명령 버퍼(124)내 모든 엔트리가 비어지고, 분기/트랩 데이터는 명령 버퍼(124)의 최상위로 이동한다.In one embodiment, four bytes may be received into the command buffer 124 in a given cycle. Up to five bytes, indicating up to two virtual machine instructions can be read into the instruction buffer 124 in a given cycle. Alternative embodiments that provide for folding of multi-byte virtual machine instructions and / or for providing folding of two or more virtual machine instructions provide higher input / output bandwidth. Those skilled in the art will recognize many suitable instruction buffer designs, including alignment logic, circular buffer designs, and the like. If a branch or trap occurs, all entries in the command buffer 124 are empty and the branch / trap data moves to the top of the command buffer 124.

도 1의 실시예에 통합된 실행 유닛(140)이 도시되어 있다. 그러나, 또다른 실시예에서, 명령 디코드 유닛(130), 정수 유닛(142) 및 스택 관리 유닛(150)은 단정도 정수 실행 유닛으로 간주되고, 부동소수점 실행 유닛(143)은 분리된 선택적 유닛이 된다. 다른 실시예에서, 실행 유닛내 여러 요소는 또다른 프로세서의 실행 유닛을 사용하여 구현될 수 있다. 일반적으로, 도 1의 여러 유닛내에 포함된 여러 요소는 한 실시예에서만 예시적이다. 각각의 유닛은 도시된 요소 모두 또는 일부로 구현될 수 있다. 다시, 비용 대 성능 절충(trade-off)에 종속하여 결정이 이뤄진다. An execution unit 140 is shown integrated in the embodiment of FIG. 1. However, in another embodiment, the instruction decode unit 130, integer unit 142 and stack management unit 150 are considered single precision integer execution units, and floating point execution unit 143 is a separate optional unit. do. In other embodiments, various elements in an execution unit may be implemented using the execution unit of another processor. In general, the various elements included in the various units of FIG. 1 are illustrative only in one embodiment. Each unit may be implemented in all or part of the elements shown. Again, decisions are made based on cost-performance trade-offs.

명령 디코드 유닛(Instruction Decode Unit)Instruction Decode Unit

전술한 바와 같이, 가상 머신 명령은 파이프라인(300)의 디코드 단계(302)(도 3)에서 디코드된다. 실시예에서, 두 개의 가상 머신 명령에 대응하는, 2 바이트는, 명령 버퍼(124)(도 1)로부터 인출된다. 두 개의 바이트는 병렬적으로 디코드되어 두 개의 바이트가 두 개의 가상 머신 명령 예를 들면 단일의 동등한 오퍼레이션 안으로 폴드될수 있는 스택 명령의 제 1 로드 탑 및 제 2 애드 탑의 두 개의 스택 엔트리 명령에 대응하는지 결정한다. 폴딩은 두 개 또는 그 이상의 가상 머신 명령에 대응하는 단일의 동등한 오퍼레이션의 공급에 관한 것이다. As mentioned above, the virtual machine instructions are decoded in the decode stage 302 (FIG. 3) of the pipeline 300. In an embodiment, two bytes, corresponding to two virtual machine instructions, are fetched from the instruction buffer 124 (FIG. 1). Two bytes are decoded in parallel so that the two bytes correspond to two stack entry instructions of the first load top and the second add-top of the stack instruction, which can be folded into two virtual machine instructions, for example a single equivalent operation. Decide Folding relates to the supply of a single equivalent operation corresponding to two or more virtual machine instructions.

하드웨어 프로세서(100)의 실시예에 있어서, 단일-바이트 제 1 명령은 제 2 명령과 폴드된다. 그러나, 다른 실시예는, 명령 디코더 복잡성 및 증가된 명령 대역폭에 의한 비용에도 불구하고, 두개 이상의 가상 머신 명령, 예를 들면 두 개 내지 네 개의 가상 머신 명령 및 멀티-바이트 가상 머신 명령의 폴딩을 제공한다. 발명의 명칭이 "INSTRUCTION FOLDING FOR A STACK-BASED MACHINE"이고, 마크 트렘블레이 및 제임스 마이클 오'코너등이 발명자이며, 본 출원의 양수인에게 양도되고, 본 출원과 동일자로 출원되었으며, 여기서는 참고로 소개된 미국특허출원 제 08/786,351 호를 참조하라. 실시예 프로세서(100)의 실시예에 있어서, 제 1 가상 머신 명령에 대응하는 제 1 바이트가 멀티-바이트 명령이면, 제 1 및 제 2 명령은 폴드되지 않는다.In an embodiment of the hardware processor 100, the single-byte first instruction is folded with the second instruction. However, other embodiments provide for folding of two or more virtual machine instructions, for example two to four virtual machine instructions and multi-byte virtual machine instructions, despite the cost of instruction decoder complexity and increased instruction bandwidth. do. The title of the invention is "INSTRUCTION FOLDING FOR A STACK-BASED MACHINE", the inventors Mark Tremblay and James Michael O'Corner and the like are assigned to the assignee of the present application and filed as the same as the present application and are hereby incorporated by reference. See US patent application Ser. No. 08 / 786,351. Embodiments In the embodiment of processor 100, if the first byte corresponding to the first virtual machine instruction is a multi-byte instruction, the first and second instructions are not folded.

선택적인 현재 오브젝트 로더 폴더(132)는, 전술한 발명의 명칭이 "INSTRUCTION FOLDING FOR A STACK-BASED MACHINE"이고, 마크 트렘블레이 및 제임스 마이클 오'코너등이 발명자이며, 본 출원의 양수인에게 양도되고, 본 출원과 동일자로 출원되었으며, 여기서는 참고로 소개된 미국특허출원 제 08/786,351 호에 보다 상세히 설명된 바와 같은 명령 폴딩, 그 모의 결과가 특히 빈번한 것으로 나타나서 최적화를 위한 바람직한 타겟이 되는 가상 머신 명령 시퀀스를 이용한다. 특히, 전형적으로 이 매서드 호출은 전형적으로 대응되는 오브젝트의 오브젝트 레퍼런스를 오퍼랜드 스택으로 로딩하고 오브젝트로부터 필드를 패치한다.The optional current object loader folder 132 is named “INSTRUCTION FOLDING FOR A STACK-BASED MACHINE” and the inventors such as Mark Tremblay and James Michael O'Connor are assigned to the assignee of the present application. , An instruction folding as described in more detail in US patent application Ser. No. 08 / 786,351, incorporated herein by reference, the simulation results of which appear to be particularly frequent, making virtual machine instructions the preferred target for optimization. Use a sequence. In particular, this method call typically loads the object reference of the corresponding object into the operand stack and fetches the fields from the object.

퀵 변이는 가상 머신 명령 세트의 부분이 아니며(3장의 부록 I 참조), 자바 가상 머신 구현 밖에서는 보이지 않는다. 그러나, 가상 머신 구현 내에서는, 퀵 변이는 효과적인 최적화로 판명되었다. (부록 I의 부록 A 참조; 이들은 본 명세서의 일부분임.) 논-퀵 투 퀵 트랜슬레이터 캐시(131)에서 퀵 변이에 대한 다양한 명령을 갱신하기 위하여 기록을 유지하는 것은 퀵 가상 머신 명령에 대한 정상적인 가상 머신 명령을 변화시켜 퀵 변이로부터 얻어지는 큰 이점을 취하게 한다. 특히, 발명의 명칭이 "NON-QUICK INSTRUCTION ACCELERATOR AND METHOD OF IMPLEMENTING SAME"이고, 마크 트렘블레이 및 제임스 마이클 오'코너등이 발명자이며, 본 출원의 양수인에게 양도되고, 본 출원과 동일자로 출원되었으며, 여기서는 참고로 소개된 미국특허출원 제 08/788,805 호에 보다 상세히 설명된 바와같이, 명령의 실행 개시에 필요한 정보가 처음으로 집합되었을 때, 정보는 논-퀵 투 퀵 트랜슬레이터 캐시(131)에서의 태그로서 프로그램 카운터 PC의 값에 따라 캐시에 저장되고 명령은 퀵-변이로 인식된다. 한 실시예에서, 이는 자가-수정 코드로 실행된다. Quick mutations are not part of the virtual machine instruction set (see Appendix I in Chapter 3) and are not visible outside the Java virtual machine implementation. However, within virtual machine implementations, quick mutations have proven to be effective optimizations. (See Appendix A of Appendix I; these are part of this specification.) Maintaining records in order to update various instructions for quick transitions in the non-quick to quick translator cache 131 is normal for Quick virtual machine instructions. Changing the virtual machine instructions takes the big advantage that comes from quick mutations. In particular, the invention is named "NON-QUICK INSTRUCTION ACCELERATOR AND METHOD OF IMPLEMENTING SAME", Mark Tremblay and James Michael O'Corner and others are inventors, assigned to the assignee of the present application and filed on the same day as the present application, As described in more detail in US patent application Ser. No. 08 / 788,805, which is hereby incorporated by reference, when information required for initiating execution of instructions is first gathered, the information is stored in the non-quick to quick translator cache 131. As a tag, it is stored in the cache according to the value of the program counter PC and the instruction is recognized as a quick-variant. In one embodiment, this is executed with self-modifying code.

그와 같은 명령의 뒤이은 호출이 있게 되면, 명령 디코드 유닛(130)은 명령이 퀵-변이로 인식되었는지와 논-퀵 투 퀵 트랜슬레이터 캐시(131)로부터 명령의 실행 개시에 필요한 정보를 단순히 검색했는지를 검지한다. 논-퀵 투 퀵 트랜슬레이터 캐시는 하드웨어 프로세서(100)의 선택적인 부분이다.When there is a subsequent call of such an instruction, the instruction decode unit 130 simply retrieves the instruction as recognized as a quick-variance and the information needed to initiate execution of the instruction from the non-quick-to-quick translator cache 131. Detect if The non-quick to quick translator cache is an optional part of the hardware processor 100.

분기와 관련하여, 퀵 분기 해상도의 매우 짧은 파이프는 대부분의 구현에 충분하다. 그러나 예를 들면, 분기 예측기 회로(133)등의 적절한 단순한 분기 예측 매커니즘이 도입될 수 있다. 분기 예측기 회로(133)를 위한 실행은 연산부호에 기초한 분기, 오프셋에 기초한 분기, 또는 투-비트 카운터 매커니즘에 기인한 분기를 포함한다. In terms of branching, very short pipes with quick branch resolution are sufficient for most implementations. However, for example, a suitable simple branch prediction mechanism such as branch predictor circuit 133 may be introduced. Execution for the branch predictor circuit 133 includes branches based on opcodes, branches based on offsets, or branches due to a two-bit counter mechanism.

JAVA 가상 컴퓨터 명세는 명령을 인보크넌버츄얼(invokenonvirtual) 로 규정하고, 연산부호(183)는 실행될 때 매서드를 호출한다. 연산부호의 뒤에는 인덱스 바이트 1 과 인덱스 바이트 2가 뒤따른다.(부록 I 참조) 오퍼랜드 스택(423)은 이 명령이 실행될 때 오브젝트에 대한 레퍼런스와 몇 개의 인수를 포함한다.JAVA virtual machine specification defines a command to invoke the virtual keuneon (invokenonvirtual), and the operation code 183 calls the maeseodeu when executed. The opcode is followed by index byte 1 and index byte 2 (see Appendix I). Operand stack 423 contains a reference to the object and some arguments when this instruction is executed.

인덱스 바이트 1 및 2는 현재 클래스의 상수 풀 내로의 인덱스를 생성한다. 그 인덱스에서의 상수 풀내의 항목은 완전한 매서드 기호 및 클래스를 가리킨다. 기호는 부록 I에 규정되었고 그 설명은 여기서 참고로 소개되었다. Index bytes 1 and 2 create an index into the constant pool of the current class. The item in the constant pool at that index points to the complete method symbol and class. The symbols are defined in Appendix I, the description of which is introduced here by reference.

각 매서드용의 매서드 기호인 짧고 특이한 인식기는 지시된 클래스의 매서드 테이블 내에서 향상된다. 룩업의 결과는 매서드의 타입과 매서드용의 인수의 수를 나타내는 매서드의 블럭이다. 오브젝트 레퍼런스 및 인수는 이 매서드의 스택을 팝하고 새로운 매서드의 로컬 변수의 초기 값이 된다. 그 후 실행은 새로운 매서드의 제 1 명령과 함께 다시 시작한다. 실행되면, 명령 인보크버츄얼(invokevirtual), 연산부호(182) 및 인보크스태틱(invokestatic), 연산부호(184)는 방금 설명한 바와 동일한 처리를 호출한다. 각 경우, 포인터는 매서드 블럭을 향상시키기 위해 사용된다.The short, unusual identifier, the method symbol for each method, is enhanced within the method table of the indicated class. The result of the lookup is a block of methods indicating the type of the method and the number of arguments for the method. Object references and arguments pop the stack of this method and are the initial values of the new method's local variables. Execution then resumes with the first instruction of the new method. When executed, the instruction invokevirtual , operator 182 and invokestatic , operator 184 invoke the same processing as just described. In each case, pointers are used to enhance method blocks.

하드웨어 프로세서(100)의 선택적 특징이기도 한 매서드 인수 캐시(134)는, 제 1 실시예에서 사용되어, 태그로서의 매서드 블럭에 대한 포인터를 따라, 매서드에 대한 제 1 호출 이후에 사용하기 위한 매서드의 매서드 블럭을 저장한다. 명령 디코드 유닛(130)은 인덱스 바이트 1 과 2를 사용하여 포인터를 생성하고 그 후 포인터를 사용하여 캐시(134)내에서 그 포인터를 위한 매서드 블럭을 검색한다. 이는 이후의 상기 매서드 호출의 배경에서 새롭게 호출된 매서드를 위한 스택 프레임의 구축을 보다 빠르게 한다. 다른 실시예는 캐시(134)로의 레퍼런스로서 프로그램 카운터 또는 매서드 인식기를 사용할 수 있다. 캐시 미스가 있는 경우, 명령은 정상 패션에서 실행되고 따라서 캐시(134)는 갱신된다. 어느 캐시 엔트리가 재기록되었는지 결정하기 위해 사용된 특정 처리는 본 발명의 특징 국면이 아니다. 예를 들면, 적어도 최근에 사용된 기준이 실행될 수 있다.The method argument cache 134, which is also an optional feature of the hardware processor 100, is used in the first embodiment to follow the pointer to the method block as a tag, the method's method for use after the first call to the method. Save the block. The instruction decode unit 130 creates a pointer using index bytes 1 and 2 and then uses the pointer to retrieve a method block for that pointer in the cache 134. This makes it faster to build a stack frame for a newly invoked method in the background of subsequent method calls. Another embodiment may use a program counter or method recognizer as a reference to the cache 134. If there is a cache miss, the instruction is executed in the normal fashion and thus cache 134 is updated. The particular process used to determine which cache entry has been rewritten is not a feature aspect of the present invention. For example, at least recently used criteria may be implemented.

다른 실시예에 있어서, 매서드에 대한 제 1 호출 이후에 태그로서 매서드의 프로그램 카운터 PC 값에 따라 사용하기 위해, 매서드 블럭에 대한 포인터를 저장하기 위해 매서드 인수 캐시(134)가 사용된다. 명령 디코드 유닛(130)은 프로그램 카운터 PC 값을 사용하여 캐시(134)에 액세스한다. 프로그램 카운터 PC 값이 캐시(134)내의 하나의 태그와 같으면, 캐시(134)는 그 포인터와 함께 저장된 태그를 명령 디코드 유닛(130)에 공급한다. 명령 디코드 유닛(130)은 공급된 포인터를 사용하여 매서드용 매서드 블럭을 검색한다. 이들 두 실시예를 고려하면, 다른 실시예는 본 기술분야의 당업자에게 명확해질 것이다.In another embodiment, the method argument cache 134 is used to store a pointer to a method block for use in accordance with the method's program counter PC value as a tag after the first call to the method. The instruction decode unit 130 accesses the cache 134 using the program counter PC value. If the program counter PC value is equal to one tag in the cache 134, the cache 134 supplies the instruction decode unit 130 with the tag stored with the pointer. The instruction decode unit 130 retrieves the method block for the method using the supplied pointer. Considering these two embodiments, other embodiments will be apparent to those skilled in the art.

하드웨어 프로세서(100)의 선택적인 요소인 와이드 인덱스 진행기(136)는 명령 와이드(wide)를 위한 명령 폴딩의 특정 실시예이다. 와이드 인덱스 진행기(136)는 연산부호 인코딩을 바로 뒤이은 가상 머신 명령을 위한 인덱스 오퍼랜드의 연장으로 취급한다. 이 방식으로, 와이드 인덱스 진행기(136)는 명령 디코드 유닛(130)이 로컬 변수의 수가 명령 와이드를 위한 분리된 실행 사이클을 야기하지 않고 단일 바이트 인덱스와 어드레스 가능한 수를 초과할 때 로컬 변수 스토리지(421)로 인덱스들을 제공할 수 있게 한다.Wide index progressor 136, which is an optional element of hardware processor 100, is a particular embodiment of instruction folding for instruction wide . Wide index progressor 136 treats the opcode encoding as an extension of the index operand for the immediately following virtual machine instruction. In this manner, the wide index advancer 136 is responsible for storing the local variable storage 421 when the instruction decode unit 130 exceeds the single byte index and addressable number without causing a separate execution cycle for the instruction wide . To provide indexes.

명령 디코더(135)의 국면들, 특히 명령 폴딩, 논-퀵 투 퀵 트랜슬레이터 캐시(131), 현재 오브젝트 로더 폴더(132), 분기 예측기(133), 매서드 인수 캐시(134), 및 와이드 인덱스 진행기(136)는 소프트웨어 인터프리터 또는 적시 컴파일러를 사용하는 실행에 있어서도 유용하며, 이는 이들 요소들은 소프트웨어 인터프리터 또는 적시 컴파일러의 동작을 가속하기 위해 사용될 수 있기 때문이다. 상기 실행에 있어서, 전형적으로 가상 머신 명령은 예를 들면 선 프로세서, DEC 프로세서, 인텔 프로세서, 또는 모토로라 프로세서중 어느 하나를 사용하는 인터프리터 또는 컴파일러를 실행시키는 프로세서를 위한 명령으로 변환되고, 예를 들면 요소들의 동작은 그 프로세서의 실행 유지를 위해 수정된다. 가상 머신 명령으로부터 다른 프로세서 명령으로의 변환은 ROM 내의 변환기 또는 단순한 소프트웨어 변환기에 의해 가능하다.Aspects of instruction decoder 135, in particular instruction folding, non-quick to quick translator cache 131, current object loader folder 132, branch predictor 133, method argument cache 134, and wide index progression 136 is also useful in execution using a software interpreter or timely compiler, since these elements can be used to accelerate the operation of the software interpreter or timely compiler. In the above execution, the virtual machine instructions are typically translated into instructions for a processor that executes an interpreter or compiler using, for example, a Sun processor, a DEC processor, an Intel processor, or a Motorola processor, for example an element Their operation is modified to keep the processor running. Conversion from virtual machine instructions to other processor instructions is possible by translators in ROM or by simple software translators.

정수 실행 유닛(Integer Execution Unit)Integer Execution Unit

정수 실행 유닛(IEU)은, 명령 디코드 유닛(130), 정수 유닛(142) 및 스택 관리 유닛(150)을 포함하고, 부동소수점 관련 명령을 제외한 모든 가상 머신 명령의 실행에 책임이 있다. 부동소수점 관련 명령은 부동소수점 유닛(143)에서 실행된다.The integer execution unit (IEU) includes an instruction decode unit 130, an integer unit 142, and a stack management unit 150, and is responsible for the execution of all virtual machine instructions except floating point related instructions. Floating point related instructions are executed in the floating point unit 143.

정수 실행 유닛(IEU)은 전방 종단에서 명령 캐시 유닛(120)과 상호작용하여 명령을 패치하고, 부동소수점 유닛(FPU)(143)과 상호작용하여 부동소수점 명령을 실행하고, 마지막으로 데이터 캐시 유닛(DCU)(160)과 상호작용하여 관련 명령을 로드하고 저장한다. 정수 실행 유닛(IEU)은 또한 정수 동작과 관련된 특정 가상 머신 명령을 실행시키기 위한 명령을 포함하는 마이크로코드 ROM(141)을 포함한다.The integer execution unit (IEU) interacts with the instruction cache unit 120 at the front end to patch the instruction, interacts with the floating point unit (FPU) 143 to execute the floating point instruction, and finally the data cache unit Interact with (DCU) 160 to load and store relevant instructions. The integer execution unit (IEU) also includes a microcode ROM 141 that contains instructions for executing specific virtual machine instructions related to integer operations.

정수 실행 유닛(IEU)은 스택(400)의 캐시된 부분, 즉 스택 캐시(155)를 포함한다. 스택 캐시(155)는 오퍼랜드 스택과 오퍼랜드 스택(423) 및 로컬 변수 스토리지(421) 엔트리 등의 현재 매서드와 관련된 로컬 변수 엔트리를 위한 빠른 저장을 제공한다. 그럼에도 불구하고, 스택 캐시(155)는, 스택 캐시(155)내에 나타날 수 있는 오퍼랜드 스택 엔트리 및 로컬 변수 엔트리 모두 또는 모든 로컬 변수 엔트리 보다 적은 로컬 변수 엔트리 및 오퍼랜드 스택의 수에 따라, 현재 매서드와 관련된 로컬 변수 엔트리 및 모든 오퍼랜드 스택을 위한 충분한 기억영역을 제공할 수 있다. 마찬가지로, 부가 엔트리 예를 들면 매서드를 호출하기 위한 로컬 변수 엔트리 및 또는 오퍼랜드 스택은, 공간이 허용되면 스택 캐시(155)내에 나타날 수 있다.The integer execution unit (IEU) includes a cached portion of the stack 400, ie stack cache 155. Stack cache 155 provides fast storage for local variable entries associated with the current method, such as operand stack and operand stack 423 and local variable storage 421 entries. Nevertheless, the stack cache 155 is associated with the current method, depending on the number of local variable entries and operand stacks that are less than all or all local variable entries or all operand stack entries and local variable entries that may appear in the stack cache 155. It can provide enough storage for local variable entries and all operand stacks. Likewise, local entries and / or operand stacks for invoking additional entries, such as methods, may appear in stack cache 155 if space permits.

스택 캐시(155)는, 한 실시예에서 레지스터 파일로서 물리적으로 실행되는 64 엔트리 32 비트 와이드 어레이이다. 스택 캐시(155)는 세 개의 판독 포트를 구비하며, 이들 중 둘은 정수 실행 유닛(IEU)에 지정되고 하나는 드리블 관리 유닛(151)에 지정된다. 스택 캐시(155)는 또한 두 개의 기록 포트를 구비하며, 이들 중 하나는 정수 실행 유닛(IEU)에 지정되고 나머지 하나는 드리블 관리 유닛(151)에 지정된다.Stack cache 155 is a 64-entry 32-bit wide array that is physically executed as a register file in one embodiment. The stack cache 155 has three read ports, two of which are assigned to the integer execution unit (IEU) and one to the dribble management unit 151. The stack cache 155 also has two write ports, one of which is designated to the integer execution unit (IEU) and the other to the dribble management unit 151.

정수 유닛(142)은 스택 캐시(155)내에서 로컬 변수 등의 변수, 및 오퍼랜드 스택 값에 액세스하기 위해 사용되는 다양한 포인터를 유지한다. 정수 유닛(142)은 또한 스택 캐시 히트가 발생했는지 검지하기 위한 포인터를 유지한다. 실행시간 예외는 캐치되고 마이크로코드 ROM(141) 및 회로(170)내의 정보를 사용하여 실행되는 예외 조정기에 의해 처리된다. The integer unit 142 maintains variables, such as local variables, and various pointers used to access operand stack values within the stack cache 155. The integer unit 142 also maintains a pointer for detecting whether a stack cache hit has occurred. Runtime exceptions are caught and handled by an exception handler executed using information in microcode ROM 141 and circuit 170.

정수 유닛(142)은 계산 동작을 지원하기 위한 32-비트 ALU를 포함한다. ALU에 의해 지원되는 동작은 더하기, 빼기, 시프트, 배타적 논리합, 비교, 초과, 미만 및 바이패스 등을 포함한다. ALU는 또한 분리된 비교기가 분기 명령의 출현을 결정하는 동안 조건적 분기의 어드레스를 결정하기 위해 사용된다.Integer unit 142 includes a 32-bit ALU to support computational operations. Operations supported by the ALU include addition, subtraction, shift, exclusive OR, comparison, over, under, and bypass. ALU is also used to determine the address of a conditional branch while a separate comparator determines the appearance of a branch instruction.

파이프라인을 통해 깨끗하게 실행되는 가장 공통적인 명령 세트는 ALU 명령의 그룹이다. ALU 명령은 디코드 단계(302)내의 스택(400)의 최상위로부터 오퍼랜드를 판독하고 실행 단계(303)내의 ALU를 사용하여 결과를 계산한다. 그 결과는 라이트-백 단계(305)에서 스택(400)에 재 기록된다. 연속되는 ALU 동작이 스택 캐시(155)에 액세스중이면 필요하게 되는 바이패스의 두 가지 레벨이 있다.The most common set of instructions that runs cleanly through the pipeline is a group of ALU instructions. The ALU instruction reads the operand from the top of stack 400 in decode step 302 and uses the ALU in execution step 303 to compute the result. The result is written back to the stack 400 in the write-back step 305. There are two levels of bypass that are needed if subsequent ALU operations are accessing the stack cache 155.

본 실시예에 있어서 스택 캐시 포트는 32-비트 와이드이기 때문에, 배정도(double precision) 및 긴 데이터 동작은 두 개의 사이클을 갖는다. 시프터는 또한 ALU의 부분으로 나타난다. 오퍼랜드가 디코드 단계(302)의 명령에 이용될 수 없거나, 또는 실행 단계(303)의 시작에서 최대이면, 인터록은 실행단계(303) 이전에 파이프라인 단계를 홀드한다.Since the stack cache port is 32-bit wide in this embodiment, the double precision and long data operations have two cycles. Shifters also appear as part of the ALU. If the operand is not available to the instruction of the decode stage 302 or is at the beginning of the execute stage 303, the interlock holds the pipeline stage before the execute stage 303.

정수 실행 유닛 IEU의 명령 캐시 유닛 인터페이스는, 명령 캐시 유닛(120)이 명령을 유효 비트를 따라 고정된 필드내의 명령 디코드 유닛(130)으로 운반하는 유효/수용 인터페이스이다. 명령 디코더(135)는 얼마나 많은 바이트 정렬기 회로(122)가 시프트할 필요가 있는지, 또는 얼마나 많은 바이트 명령 디코드 유닛(130)이 디코드 단계(302)에서 소비할 수 있는지 시그널링함으로써 응답한다. 명령 캐시 유닛 인터페이스는 또한 명령 캐시 유닛(120)에 분기 오-예측 조건을 알리고, 실행 단계(303)내의 분기 어드레스를 알린다. 트랩은, 취해질 때, 또한 명령 캐시 유닛(120)에 비슷하게 지정된다. 명령 캐시 유닛(120)은 어느 유효 비트도 명령 디코드 유닛(130)에 참가시키지 않음으로써 정수 유닛(142)을 홀드할 수 있다. 명령 디코드 유닛(130)은 시프트 신호를 바이트 정렬기 회로(122)에 참가시키지 않음으로써 명령 캐시 유닛(12)을 홀드할 수 있다.The instruction cache unit interface of the integer execution unit IEU is a validity / acceptance interface in which the instruction cache unit 120 carries instructions to the instruction decode unit 130 in a fixed field along the valid bits. The command decoder 135 responds by signaling how many byte aligner circuits 122 need to shift, or how many byte command decode units 130 can consume in the decode step 302. The instruction cache unit interface also informs the instruction cache unit 120 for branch mis-prediction conditions and informs the branch address in the execution step 303. The trap, when taken, is also similarly assigned to the instruction cache unit 120. The instruction cache unit 120 can hold the integer unit 142 by not participating in any valid bits in the instruction decode unit 130. The instruction decode unit 130 can hold the instruction cache unit 12 by not engaging the shift signal in the byte aligner circuit 122.

정수 실행 유닛 IEU의 데이터 캐시 인터페이스는 유효-수용 인터페이스이고, 여기서 정수 유닛(142)은 실행단계(303)에서 그 특성, 예를 들면 논-캐시, 특별 저장등에 따라 로드 또는 저장 동작을 데이터 캐시 유닛(160)내의 데이터 캐시 제어기(161)에 신호한다. 데이터 캐시 유닛(160)은 데이터를 로드로 리턴시킬 수 있고, 데이터 제어 유닛 홀드 신호를 사용하여 정수 유닛(142)을 제어한다. 데이터 캐시 히트 이면, 데이터 캐시 유닛(160)은 요구된 데이터를 리턴시키고, 그 후 파이프라인을 해제한다.The data cache interface of the integer execution unit IEU is a validity-receiving interface, where the integer unit 142 performs a load or store operation according to its characteristics, eg, non-cache, special storage, etc., in the execution step 303. Signal to data cache controller 161 in 160. The data cache unit 160 may return data to the load and control the integer unit 142 using the data control unit hold signal. If it is a data cache hit, the data cache unit 160 returns the requested data and then releases the pipeline.

저장 동작이면, 정수 유닛(142)은 또한 데이터를 실행 단계(303)의 어드레스에 따라 공급한다. 데이터 캐시 유닛(160)은 데이터 캐시 유닛(160)이 사용 중, 예를 들면 라인 충전 등이면, 캐시 단계(304)의 파이프라인을 홀드할 수 있다.In the case of a storage operation, the integer unit 142 also supplies data according to the address of the execution step 303. The data cache unit 160 may hold the pipeline of the cache step 304 if the data cache unit 160 is in use, such as line charging or the like.

부동소수점 동작은 특별히 정수 실행 유닛 IEU에 의해 처리된다. 명령 디코더(135)는 부동소수점 유닛(143) 관련 명령을 패치하고 디코드한다. 명령 디코더(135)는 실행을 위한 부동소수점 동작 오퍼랜드를 디코드 단계(302)의 부동소수점 유닛(142)으로 보낸다. 부동소수점 유닛(143)이 부동소수점 동작을 실행하면서 비지한 동안, 정수 유닛(142)은 파이프라인을 정지시키고 부동소수점 유닛(143)이 정수 유닛(142)에 결과가 유용하다고 신호할 때까지 대기한다.Floating point operations are specifically handled by the integer execution unit IEU. The instruction decoder 135 patches and decodes the floating point unit 143 related instructions. The instruction decoder 135 sends a floating point operation operand for execution to the floating point unit 142 of the decode step 302. While floating point unit 143 busy while performing floating point operation, integer unit 142 stops the pipeline and waits until floating point unit 143 signals integer unit 142 that the result is useful. do.

부동소수점 유닛(143)으로부터의 부동소수점 준비 신호는 부동소수점 동작의 실행 단계(303)가 종료되었음을 나타낸다. 부동소수점 준비 신호에 응답하여, 결과는 정수 유닛(142)에 의해 스택 캐시(155)내로 다시 기록된다. 부동소수점 로드 및 저장은 전적으로 정수 실행 유닛 IEU에 의해 취급되며, 이는 부동소수점 유닛(143) 및 정수 유닛(142) 모두를 위한 오퍼랜드가 스택 캐시(155)내에서 발견되기 때문이다.The floating point ready signal from the floating point unit 143 indicates that the execution step 303 of the floating point operation has ended. In response to the floating point ready signal, the result is written back into stack cache 155 by integer unit 142. Floating point load and store are handled entirely by the integer execution unit IEU, because operands for both the floating point unit 143 and the integer unit 142 are found in the stack cache 155.

스택 관리 유닛(Stack Management Unit)Stack Management Unit

스택 관리 유닛(150)은 정보를 저장하고, 오퍼랜드를 실행 유닛(140)에 제공한다. 스택 관리 유닛(150)은 또한 스택 캐시(155)의 오버플로우 및 언더플로우를 관리한다.The stack management unit 150 stores the information and provides the operands to the execution unit 140. Stack management unit 150 also manages overflow and underflow of stack cache 155.

한 실시예에 있어서, 스택 관리 유닛(150)은 전술한 바와 같이 한 실시예에서 세 개의 판독 포트, 두 개의 기록 포트 레지스터 파일인 스택 캐시(155), 실행 유닛(140)의 오퍼랜드를 검색하기 위해 사용되는 두개의 판독 포트 및 하나의 기록 포트를 위해, 그리고 라이트-백 레지스터 또는 데이터 캐시(156)로부터 스택 캐시(155)로 데이터를 저장하기 위해 필요한 제어 신호를 제공하는 스택 제어 유닛(152), 및 오버플로우 또는 언더플로우가 스택 캐시(155)내에 있을 때마다 스택 캐시(155) 내외의 데이터를 메모리로 추리적으로 드리블하는 드리블 관리자(151)를 포함한다. 도 1에 도시된 실시예에 있어서, 메모리는 데이터 캐시(165) 및 메모리 인터페이스 유닛(110)에 의해 인터페이스된 임의의 메모리 기억영역을 포함한다. 일반적으로, 메모리는 캐시, 어드레스 가능 판독/기록 메모리 스토리지, 2차 스토리지 등을 포함하는 적절한 메모리 계층구조를 포함한다. 드리블 관리자(151)는 또한 백그라운드 드리블링용으로만 사용되는 스택 캐시(155)의 하나의 기록 포트 및 하나의 판독 포트를 위해 필요한 제어 신호를 제공한다.In one embodiment, the stack management unit 150 is configured to retrieve the operands of the stack cache 155, the execution unit 140, which are three read ports, two write port register files in one embodiment, as described above. A stack control unit 152 for the two read ports and one write port used and for providing control signals for storing data from the write-back register or data cache 156 to the stack cache 155, And a dribble manager 151 that speculatively dribble data in and out of the stack cache 155 into memory whenever overflow or underflow is in the stack cache 155. In the embodiment shown in FIG. 1, the memory includes a data cache 165 and any memory storage area interfaced by the memory interface unit 110. In general, the memory includes a suitable memory hierarchy including cache, addressable read / write memory storage, secondary storage, and the like. The dribble manager 151 also provides the necessary control signals for one write port and one read port of the stack cache 155 used only for background dribbling.

한 실시예에 있어서, 스택 캐시(155)는 오버플로우 또는 오버라이트를 피하기 위해 예측 가능한 방식으로 스택이 성장 또는 축소하도록 보증하는 순환 버퍼로서 기능한다. 데이터 캐시(165)로부터 및 데이터 캐시로의 값의 저장 및 복원(restore)은, 한 실시예에 있어서, 고/저 양수표(water mark)를 사용하는 드리블 관리자(151)에 의해 제어된다.In one embodiment, the stack cache 155 serves as a circular buffer that ensures that the stack grows or shrinks in a predictable manner to avoid overflows or overwrites. The storage and restore of values from and into the data cache 165 is controlled by the dribble manager 151 using, in one embodiment, a high / low water mark.

스택 관리 유닛(150)은 주어진 사이클내에서 두 개의 32-비트 오퍼랜드가 잇는 실행 유닛(140)을 제공한다. 스택 관리 유닛(150)은 주어진 싸이클내의 단일 32-비트 결과를 저장할 수 있다.The stack management unit 150 provides an execution unit 140 with two 32-bit operands in a given cycle. Stack management unit 150 may store a single 32-bit result in a given cycle.

드리블 관리자(151)는 데이터 캐시(165)로부터의 및 데이터 캐시로의 스택 캐시(155)내외의 데이터를 추리적으로 드리블링함으로써 스택 캐시(155)의 충전 및 스필을 다룬다. 드리블 관리자(151)는 스택 오버플로우 또는 언더플로우 조건이 검지될 때 파이프라인을 지연시키기 위한 파이프라인 지연 신호를 생성한다. 드리블 관리자(151)는 또한 데이터 캐시 유닛(160)으로 보내진 요청의 트랙을 유지한다. 데이터 캐시 유닛(160)으로의 단일 요청은 32-비트 연속 로드 또는 저장 요청이다.The dribble manager 151 handles filling and spilling of the stack cache 155 by speculatively dribbling data in and out of the data cache 165 and into and out of the stack cache 155. The dribble manager 151 generates a pipeline delay signal for delaying the pipeline when a stack overflow or underflow condition is detected. The dribble manager 151 also keeps track of the requests sent to the data cache unit 160. The single request to the data cache unit 160 is a 32-bit continuous load or store request.

스택 캐시(155)의 하드웨어 구조는, 롱 오퍼랜드(배정도 정수 및 배정도 부동소수점 수)를 제외하고, 연산부호를 위한 내재하는 오퍼랜드 패치는 연산부호 실행에 대한 지연을 더하지 않는다. 오퍼랜드 스택(423)(도 4a)내의 엔트리수 및 스택 캐시(155)내에 유지되는 로컬 변수 스토리지(421)는 하드웨어/성능 절충을 나타낸다. 적어도 몇 개의 오퍼랜드 스택(423) 및 로컬 변수 스토리지(421) 엔트리가 좋은 성능을 얻기 위해 필요하다. 도 1에 도시된 실시예에 있어서, 적어도 오퍼랜드 스택(423)의 최상위 세 개의 엔트리 및 첫 번째 4개 로컬 변수 스토리지(421) 엔트리가 바람직하게 스택 캐시(155)내에 나타난다.The hardware structure of the stack cache 155, except for long operands (double integer and double floating point numbers), does not imply an inherent operand patch for the opcode adds a delay to the opcode execution. The number of entries in operand stack 423 (FIG. 4A) and the local variable storage 421 maintained in stack cache 155 represent hardware / performance tradeoffs. At least some operand stack 423 and local variable storage 421 entries are needed to achieve good performance. In the embodiment shown in FIG. 1, at least the top three entries of the operand stack 423 and the first four local variable storage 421 entries are preferably represented in the stack cache 155.

스택 캐시(155)(도 1)에 의해 제공되는 하나의 주요 기능은 여분의 사이클 없이 항상 최상위 두 개의 레지스터로의 액세스가 가능한 레지스터 파일을 에뮬레이팅하는 것이다. 작은 하드웨어 스택은, 백그라운드내의 메모리로/로부터의 값을 로드/저장하기 위한 적당한 정보가 제공되면 충분하며, 따라서 인커밍되는 가상 머신 명령을 위한 스택 캐시(155)를 준비한다.One major function provided by stack cache 155 (FIG. 1) is to emulate a register file that is always accessible to the top two registers without extra cycles. A small hardware stack is sufficient if adequate information is provided to load / store the value to / from memory in the background, thus preparing a stack cache 155 for incoming virtual machine instructions.

위에서 설명한 바와 같이, 스택(400)상의 모든 아이템은 (크기에 관계없이) 32-비트 워드로 위치된다. 이는 많은 작은 데이터 아이템이 사용될 때 스페이스를 낭비하는 경향이 있지만, 이는 상대적으로 간단히 하고 먹싱(muxing) 또는 태깅(tagging)으로부터 자유롭게 한다. 따라서 스택(400)내의 엔트리는 값을 나타내고 바이트의 수를 나타내지 않는다. 배정도 정수 및 배정도 부동소수점 수는 두 개의 엔트리를 필요로 한다. 판독 및 기록 포트의 수를 적게 하기 위해, 두 개의 배정도 정수 또는 두 개의 배정도 부동소수점 수를 판독하기 위한 2 사이클이 필요하다.As described above, all items on the stack 400 are placed in 32-bit words (regardless of size). This tends to waste space when many small data items are used, but this is relatively simple and frees from muxing or tagging. Thus, an entry in stack 400 represents a value and not a number of bytes. Double and double floating point numbers require two entries. To reduce the number of read and write ports, two cycles are required to read two double integers or two double floating point numbers.

드리블 관리자(151)에 의해 스택 캐시(155)로부터 메모리로 오퍼랜드 스택을 스필링 및 충전하기 위한 매커니즘은 다른 몇 가지 타입에서 하나를 취할 수 있다. 어느 시간에 하나의 레지스터는 충전될 수 있거나 스필될 수 있고, 또는 몇 가지 레지스터의 블럭은 단번에 충전되거나 스필될 수 있다. 단순한 스코어보드 매서드가 스택 관리를 위해 적절하다. 그 가장 단순한 타입에 있어서, 단일 비트는 스택 캐시(155)내의 레지스터가 현재 유효한지 나타낸다. 또한, 스택 캐시(155)의 몇몇 실시예는 레지스터의 데이터 내용이 스택(400)에 저장되었는지 즉, 레지스터가 더티한지 나타내기 위해 단일 비트를 사용한다. 한 실시예에 있어서, 고 양수표/저 양수표 발견적 교수법(heuristic)은 언제 엔트리가 스택(400)에 저장되고 스택(400)으로부터 복원되는지 결정한다(도 4a). 이와 다르게, 스택의 최상위가 고정된 또는 다르게 엔트리의 프로그램 가능한 수에 의해 스택 캐시(155)의 하위에 접근할 때, 하드웨어는 스택(400)으로부터 스택 캐시(155)로의 레지스터의 로딩을 시작한다. 스택 관리 유닛(150) 및 드리블 관리 유닛(151)의 다른 실시예는 Mark Tremblay 및 James Michael O'Connor 가 발명자인 제목 "METHOD FRAME STORAGE USING MULTIPLE MEMORY CIRCUITS"이고, 본 출원의 양수인에게 양도되고, 본 명세서에서 참고로 소개된 미국특허출원 제 08/787,736 호를 참조하고, 또 위 발명자와 동일인이 발명자인 본 명세서에서 참고로 소개된 본 출원의 양수인에게 양도되었고 본원과 동일자로 출원된 제목 "STACK CACHING USING MULTIPLE MEMORY CIRCUITS"인 미국 특허출원 제08/787,617 도 참고하라.The mechanism for spilling and filling the operand stack from the stack cache 155 to memory by the dribble manager 151 may take one of several other types. At any time one register may be charged or spilled, or several blocks of registers may be charged or spilled at one time. Simple scoreboard methods are appropriate for stack management. In its simplest type, a single bit indicates whether a register in stack cache 155 is currently valid. In addition, some embodiments of stack cache 155 use a single bit to indicate whether the data content of a register is stored on stack 400, ie, the register is dirty. In one embodiment, the high and low check heuristics determine when an entry is stored in the stack 400 and restored from the stack 400 (FIG. 4A). Alternatively, when the top of the stack approaches the bottom of the stack cache 155 by a fixed or otherwise programmable number of entries, the hardware starts loading the registers from the stack 400 into the stack cache 155. Another embodiment of the stack management unit 150 and the dribble management unit 151 is the title "METHOD FRAME STORAGE USING MULTIPLE MEMORY CIRCUITS" by Mark Tremblay and James Michael O'Connor, and assigned to the assignee of the present application, See US patent application Ser. No. 08 / 787,736, which is incorporated herein by reference, and the title "STACK CACHING, assigned to the assignee of the present application, hereby incorporated by reference, which is incorporated herein by reference; See also US Patent Application No. 08 / 787,617 entitled USING MULTIPLE MEMORY CIRCUITS.

한 실시예에 있어서, 스택 관리 유닛(150)은 또한 선택적인 로컬 변수 룩-어사이드 캐시(153)를 포함한다. 캐시(153)는 매서드의 로컬 변수 및 오퍼랜드 스택(423) 모두 스택 캐시(155)상에 위치하지 않는 적용에 있어서 가장 중요하다. 캐시(153)가 하드웨어 프로세서(100)내에 포함되지 않는 경우에, 로컬 변수가 액세스될 때 스택 캐시(155)에 미스가 있고, 실행 유닛(140)은 데이터 캐시 유닛(160)에 액세스하고, 이는 결국 실행을 느리게 한다. 반대로, 캐시(153)가 있으면, 로컬 변수는 캐시(153)로부터 검색되고 실행에 지연이 없다.In one embodiment, stack management unit 150 also includes an optional local variable look-side cache 153. The cache 153 is most important in applications where neither the local variables of the method and the operand stack 423 are located on the stack cache 155. If the cache 153 is not contained within the hardware processor 100, there is a miss in the stack cache 155 when the local variable is accessed, and the execution unit 140 accesses the data cache unit 160, which is This slows down execution. In contrast, with cache 153, local variables are retrieved from cache 153 and there is no delay in execution.

로컬 변수 룩-어사이드 캐시(153)의 한 실시예가 도 4d에 스택(400)상의 매서드 0 에서 2를 위해 도시되었다. 매서드 0을 위한 로컬 변수 제로에서 M(여기서 M은 정수)이 캐시(153)의 플레인(421A_0)에 저장되고 플레인(421A_0)은 매서드 수(402)가 제로일 때 액세스된다. 매서드 1을 위한 로컬 변수 제로에서 N(여기서 N은 정수)은 캐시(153)의 플레인(421A_1)에 저장되고 플레인(421A_1)은 매서드 수(402)가 1일 때 액세스된다. 매서드 1을 위한 로컬 변수 제로에서 P, 여기서 P는 정수, 는 캐시(153)의 플레인(421A_2)에 저장되고 플레인(421A_2)은 매서드 수(402)가 2일 때 액세스된다. 캐시(153)의 다양한 플레인은 크기가 다를 수 있음에 주의해야 하지만, 전형적으로 각 캐시의 플레인은 실험적으로 결정된 고정된 크기를 갖는다.One embodiment of a local variable look-side cache 153 is shown for methods 0 through 2 on stack 400 in FIG. 4D. At local variable zero for method 0, M (where M is an integer) is stored in plane 421A_0 of cache 153 and plane 421A_0 is accessed when method number 402 is zero. At local variable zero for method 1, N (where N is an integer) is stored in plane 421A_1 of cache 153 and plane 421A_1 is accessed when method number 402 is one. P at local variable zero for method 1, where P is an integer, is stored in plane 421A_2 of cache 153 and plane 421A_2 is accessed when method number 402 is two. It should be noted that the various planes of cache 153 may vary in size, but typically the plane of each cache has a fixed size determined experimentally.

새로운 매서드가 호출될 때, 예를 들면 매서드 2가 호출될 때, 캐시(153)내의 새로운 플레인(421A_2)이 그 매서드를 위한 로컬 변수로 로드되고, 한 실시예에서 카운터인 매서드 수 레지스터(402)는 변화(예를 들면 증가)되어 새로운 매서드의 로컬 변수를 포함하는 캐시(153)의 플레인을 지시한다. 로컬 변수는 캐시(153)의 내에서 정렬되어 캐시(153)는 효과적으로 직접 사상 캐시임을 알아야한다. 따라서, 로컬 변수가 현재의 매서드를 위해 필요할 때, 변수는 캐시(153)내의 가장 최근 플레인 즉, 매서드 수(402)에 의해 인식된 플레인으로부터 직접 액세스된다. 현재의 매서드가 예를 들면 매서드 2로 복귀할 때, 매서드 수 레지스터(402)는 변하고, 예를 들면 감소하여 캐시(153)의 이전 플레인(421A_1)을 지시한다. 캐시(153)는 필요한 한 넓고 깊게 만들어진다.When a new method is called, for example when method 2 is called, a new plane 421A_2 in cache 153 is loaded into a local variable for that method, and in one embodiment the method number register 402 is a counter. Is changed (eg, incremented) to indicate the plane of cache 153 containing the local variables of the new method. It should be noted that local variables are sorted within cache 153 so that cache 153 is effectively a direct mapping cache. Thus, when a local variable is needed for the current method, the variable is accessed directly from the most recent plane in the cache 153, that is, the plane recognized by the method number 402. When the current method returns, for example, to method 2, the method number register 402 changes, for example, decrements to indicate the previous plane 421A_1 of the cache 153. The cache 153 is made as wide and deep as needed.

데이터 캐시 유닛(Data Cache Unit)Data Cache Unit

데이터 캐시 유닛(160)(DCU)은 데이터 캐시(165)내의 데이터를 위한 모든 요청을 관리한다. 데이터 캐시 요청은 드리블링 관리자(151) 또는 실행 유닛(140)으로부터 나온다. 데이터 캐시 제어기(161)는 실행 유닛 요청에 우선권을 주면서 이들 요청 사이를 조정한다. 요청에 응답하여, 데이터 캐시 제어기(161)는 데이터 캐시(165)내의 태그 RAM 및 데이터를 위한 어드레스, 데이터 및 제어 신호를 생성한다. 데이터 캐시 히트를 위해, 데이터 캐시 제어기(161)는 데이터 RAM 출력을 재정렬하여 올바른 데이터를 제공한다.The data cache unit 160 (DCU) manages all requests for data in the data cache 165. The data cache request comes from the dribbling manager 151 or the execution unit 140. The data cache controller 161 coordinates these requests while giving priority to execution unit requests. In response to the request, the data cache controller 161 generates addresses, data and control signals for the tag RAM and data in the data cache 165. For data cache hits, data cache controller 161 reorders the data RAM output to provide correct data.

데이터 캐시 제어기(161)는 또한 데이터 캐시 미스인 경우 및 논-캐시어블 로드 및 저장인 경우, I/O 버스 및 메모리 인터페이스 유닛(110)에 대한 요청을 생성한다. 데이터 캐시 제어기(161)는 논-캐시어블 요청을 처리하기 위한 제어 논리 및 데이터 경로를 제공하고, 캐시 미스를 다루기 위한 데이터 경로제어 기능 및 데이터 경로를 제공한다.The data cache controller 161 also generates a request to the I / O bus and memory interface unit 110 for data cache misses and for non-cacheable load and store. The data cache controller 161 provides control logic and data paths for handling non-cacheable requests, and provides data path control functions and data paths for handling cache misses.

데이터 캐시 히트를 위해, 데이터 캐시 유닛(160)은 로드를 위한 하나의 사이클 내의 실행 유닛(140)으로 데이터를 리턴시킨다. 데이터 캐시 유닛(160)은 또한 기록 히트를 위한 하나의 사이클을 취한다. 캐시 미스인 경우, 데이터 캐시 유닛(160)은 요청된 데이터가 외부 메모리로부터 이용 가능할 때까지 파이프라인을 지연시킨다. 논-캐시어블 로드 및 저장 모두를 위해, 데이터 캐시(165)는 바이패스되고 요청은 I/O 버스와 메모리 인터페이스 유닛(161)으로 보내진다. 데이터 캐시(165)에 대한 비-정렬 로드 및 저장은 소프트웨어내에 트랩된다.For a data cache hit, data cache unit 160 returns data to execution unit 140 in one cycle for loading. Data cache unit 160 also takes one cycle for write hits. In the case of a cache miss, the data cache unit 160 delays the pipeline until the requested data is available from external memory. For both non-cacheable load and store, data cache 165 is bypassed and requests are sent to the I / O bus and memory interface unit 161. Non-aligned loads and stores to data cache 165 are trapped in software.

데이터 캐시(165)는 쌍방향 세트 어소시어티브, 라이트 백, 라이트 할당 및 16-바이트 라인 캐시이다. 캐시 사이즈는 0, 1, 2, 4, 8, 16 킬로바이트 사이즈로 구성 가능하다. 초기 사이즈는 8 킬로바이트이다. 각 라인은 각 라인과 관련된 캐시 저장 엔트리를 구비한다. 캐시 미스일 때, 16 바이트의 데이터는 외부 메모리로부터 캐시(165)에 기록된다.Data cache 165 is an interactive set associative, write back, write allocation and 16-byte line cache. Cache size is configurable in 0, 1, 2, 4, 8 and 16 kilobyte sizes. The initial size is 8 kilobytes. Each line has a cache storage entry associated with each line. When cache misses, 16 bytes of data are written to cache 165 from external memory.

각 데이터 캐시 태그는 20-비트 어드레스 태그 필드, 하나의 유효 비트, 및 하나의 더티 비트를 포함한다. 각 캐시 태그는 또한 교체 정책(policy)를 위해 사용되는 가장 최근 사용된 비트와 관련된다. 다중 캐시 사이즈를 유지하기 위해, 태그 필드의 폭은 또한 변화될 수 있다. 프로세서 서비스 레지스터내 캐시 이네이블 비트가 세트되지 않으면, 로드 및 저장은 데이터 캐시 제어기(161)에 의해 논-캐시어블 명령으로 취급된다.Each data cache tag includes a 20-bit address tag field, one valid bit, and one dirty bit. Each cache tag is also associated with the most recently used bit used for the replacement policy. In order to maintain multiple cache sizes, the width of the tag field can also be changed. If the cache enable bit in the processor service register is not set, the load and store are treated as non-cacheable instructions by the data cache controller 161.

단일의 16-바이트 라이트 백 버퍼가 교체될 필요가 있는 더티 캐시 라인을 라이트 백하기 위해 제공된다. 데이터 캐시 유닛(161)은 판독에 최대 4 바이트를 제공하고 최대 4 바이트의 데이터는 단일 사이클내에서 캐시(165)에 기록될 수 있다. 진단상의 판독 및 기록은 캐쉬에서 실행될 수 있다. A single 16-byte write back buffer is provided to write back dirty cache lines that need to be replaced. The data cache unit 161 provides up to 4 bytes for reading and up to 4 bytes of data can be written to the cache 165 in a single cycle. Diagnostic reads and writes can be performed in the cache.

메모리 할당 가속기(Memory Allocation Accelerator)Memory Allocation Accelerator

한 실시예에서, 데이터 캐시 유닛(160)은 메모리 할당 가속기(166)를 포함한다. 전형적으로, 새로운 오브젝트가 생성되면, 오브젝트의 필드는 외부 메모리로부터 패치되어, 데이터 캐시(165)에 저장되고, 필드는 제로로 클리어된다. 이는 시간을 소비하는 과정으로 메모리 할당 가속기(166)에 의해 제거된다. 새로운 오브젝트가 생성될 때, 어떤 필드도 외부 메모리로부터 검색되지 않는다. 그보다는, 메모리 할당 가속기(166)는 단순히 제로 라인을 데이터 캐시(165)에 저장하고 데이터 캐시(165)의 라인을 더티(dirty)로 표시한다. 메모리 할당 가속기(166)는 특히 기록-백(write-back) 캐시에 이점이 있다. 메모리 할당 가속기(166)가 외부 메모리 액세스를 없애기 때문에, 하드웨어프로세서(100)의 성능은 향상된다.In one embodiment, data cache unit 160 includes a memory allocation accelerator 166. Typically, when a new object is created, the field of the object is fetched from external memory, stored in the data cache 165, and the field is cleared to zero. This is a time consuming process and is eliminated by the memory allocation accelerator 166. When a new object is created, no fields are retrieved from external memory. Rather, memory allocation accelerator 166 simply stores zero lines in data cache 165 and marks the lines of data cache 165 as dirty. Memory allocation accelerator 166 is particularly advantageous for write-back caches. Since memory allocation accelerator 166 eliminates external memory access, the performance of hardware processor 100 is improved.

부동소수점 유닛(Floating Point Unit)Floating Point Unit

부동소수점 유닛(FPU)(141)은 마이크로코드 시퀀서, 입력/출력 레지스터가 있는 입력/출력부, 부동소수점 가산기 즉 ALU, 및 부동소수점 곱셈/나눗셈 유닛을 포함한다. 마이크로코드 시퀀서는 마이크로코드 플로우 및 마이크로코드 분기를 제어한다. 입력/출력부는 입력/출력 데이터 전송을 위한 제어, 및 입력 데이터 로딩과 출력 데이터 언로딩 레지스터를 제공한다. 이들 레지스터는 또한 중간 결과 기억영역을 제공한다.Floating-point unit (FPU) 141 includes a microcode sequencer, an input / output section with input / output registers, a floating-point adder or ALU, and a floating-point multiply / divide unit. The microcode sequencer controls the microcode flow and microcode branching. The input / output section provides control for input / output data transfer, and input data loading and output data unloading registers. These registers also provide intermediate result storage.

부동소수점 가산기-ALU는 부동소수점 가산, 부동소수점 감산, 및 전환 동작을 수행하기 위해 사용되는 조합 논리를 포함한다. 부동소수점 승산/제산 유닛은 승산/제산 및 나머지를 수행하기 위한 하드웨어를 포함한다.Floating-point adder-ALU includes combinatorial logic used to perform floating-point addition, floating-point subtraction, and switching operations. The floating point multiplication / division unit includes hardware for performing multiplication / division and remainder.

부동소수점 유닛(143)은 32-비트 데이터 경로가 있는 마이크로코드 엔진으로 구성된다. 이 데이터 경로는 종종 결과 계산동안 여러번 재사용된다. 배정도 동작은 단정도 동작의 사이클 수보다 두배 내지 네배의 사이클을 필요로 한다. 부동소수점 준비 신호는 주어진 부동소수점 동작의 완료에 앞서 1-사이클로 주장한다. 이는 정수 유닛(142)이 어떠한 낭비된 인터페이스 사이클 없이 부동소수점 유닛 출력 레지스터를 판독하게 한다. 따라서, 출력 데이터는 부동소수점 준비 신호가 표명된 후 한 사이클을 판독하기 위해 가능하다.Floating-point unit 143 consists of a microcode engine with a 32-bit data path. This data path is often reused many times during the calculation of the result. Double precision operations require two to four times the number of cycles of a single precision operation. The floating point ready signal asserts one cycle before completion of a given floating point operation. This causes the integer unit 142 to read the floating point unit output register without any wasted interface cycles. Thus, the output data is possible to read one cycle after the floating point ready signal is asserted.

실행 유닛 가속기(Execution Unit Accelerator)Execution Unit Accelerator

부록 Ⅰ의 JAVA 가상 머신 명세는 하드웨어에 독립적이기 때문에, 가상 머신 명령은 특정한 일반적 타입의 프로세서, 예를 들면 복잡 명령 세트 컴퓨터(CISC) 프로세서, 또는 축소 명령 세트 컴퓨터(RISC) 프로세서 등에 대하여 최적화되지는 않는다. 실제로, 일부 가상 머신 명령은 CISC 특성을 가지고 있고 다른 일부는 RISC 특성을 갖는다. 이 이중 특성은 동작 및 하드웨어 프로세서(100)의 최적화를 복잡하게 한다. Because the JAVA virtual machine specification in Appendix I is hardware independent, virtual machine instructions are not optimized for certain general types of processors, for example, complex instruction set computer (CISC) processors, or reduced instruction set computer (RISC) processors. Do not. In fact, some virtual machine instructions have CISC characteristics and others have RISC characteristics. This dual characteristic complicates the operation and optimization of the hardware processor 100.

예를 들면, JAVA 가상 머신 명세는 종래의 스위치 명령문인 명령 룩업스위치(lookupswitch)를 위한 연산부호(171)를 규정한다. 명령 캐시 유닛(120)으로의 데이터 스트링은 연산부호(171), 제로에서 3 바이트의 패딩이 뒤따르는 N-웨이 스위치 명령문 인식을 포함한다. 패딩 바이트의 수는 첫 번째 오퍼랜드 바이트가 4의 배수인 어드레스에서 시작하도록 선택된다. 여기서, 데이터스트림이 일반적으로 사용되어 특정 요소, 블럭, 구성요소 또는 유닛에 제공되는 정보를 나타낸다.For example, the JAVA virtual machine specification defines an operation code 171 for a command lookupswitch, which is a conventional switch statement. The data string to the instruction cache unit 120 includes an operation code 171, N-way switch statement recognition followed by three bytes of padding at zero. The number of padding bytes is chosen such that the first operand byte starts at an address that is a multiple of four. Here, data streams are generally used to represent information provided to a particular element, block, component or unit.

데이터스트림내에서 패딩 바이트를 뒤따르는 것은 일련의 부호 달린 4-바이트 크기의 쌍이다. 첫 번째 쌍은 특별하다. 첫 번째 쌍내의 제 1 오퍼랜드는, 정수 키 또는 현재 매치 값으로 불리는 스위치 명령문의 인수가 스위치 명령문내의 일치 값의 어느것과도 같지 않을 때 사용되는 스위치 명령문를 위한 디폴트 오프셋이다. 첫 번째 쌍의 제2 오퍼랜드는 데이터스트림내에서 따라오는 여러 쌍을 한정한다. Following the padding byte in the data stream is a series of signed 4-byte pairs. The first pair is special. The first operand in the first pair is the default offset for the switch statement that is used when the argument of the switch statement, called an integer key or the current match value, is not equal to any of the match values in the switch statement. The second operand of the first pair defines several pairs that follow in the data stream.

데이터 스트림내의 각 뒤이은 오퍼랜드 쌍은 매치 값인 제 1 오퍼랜드, 오프셋인 제 2 오퍼랜드를 구비한다. 정수 키가 매치 값의 어느 하나와 같으면, 쌍내의 오프셋은 스위치 명령문의 어드레스에 가산되어 실행이 분기되는 어드레스를 규정한다. 반대로, 정수 키가 매치 값의 어느 것과도 같지 않으면, 첫 번째 쌍내의 디폴트 오프셋은 스위치 명령문의 어드레스에 가산되어 실행이 분기되는 어드레스를 규정한다. 이 가상 머신 명령의 직접 실행은 많은 사이클을 필요로 한다.Each subsequent operand pair in the data stream has a first operand that is a match value and a second operand that is an offset. If the integer key is equal to either of the match values, the offset in the pair is added to the address of the switch statement to define the address at which execution branches. Conversely, if the integer key is not equal to any of the match values, the default offset in the first pair is added to the address of the switch statement to define the address at which execution branches. Direct execution of this virtual machine instruction takes many cycles.

하드웨어 프로세서(100)의 성능을 향상시키기 위해, 룩업스위치 가속기(145)는 하드웨어 프로세서(100)에 포함된다. 룩업스위치 가속기(145)는 하나 이상의 룩업스위치 명령문에 관련된 정보를 저장하는 관련 메모리를 포함한다. 각 룩업스위치 명령문을 위해, 즉 각 명령 룩업스위치를 위해, 이 정보는 룩업스위치 인식기 값, 즉 룩업스위치 명령문에 관련된 프로그램 카운터 값, 복수의 매치 값 및 대응하는 복수의 점프 오프 셋 값을 포함한다.To improve the performance of the hardware processor 100, the lookup switch accelerator 145 is included in the hardware processor 100. Lookupswitch accelerator 145 includes an associated memory that stores information related to one or more lookupswitch statements. For each lookup switch statement, ie for each command lookup switch , this information includes a lookup switch identifier value, ie, a program counter value, a plurality of match values, and a corresponding plurality of jump offset values associated with the lookup switch statement.

룩업스위치 가속기(145)는 하드웨어 프로세서(100)에 의해 수신된 현재 명령이 관련 메모리 내에 저장된 룩업스위치 명령문에 대응하는지 결정한다. 또한 룩업스위치 가속기(145)는 현재 명령에 관련된 현재 매치 값이 관련 메모리에 저장된 매치 값의 하나와 대응하는지 결정한다. 룩업스위치 가속기(145)는, 현재 명령이 메모리에 저장된 룩업스위치 명령문에 대응되고 현재 매치 값이 메모리내에 저장된 매치 값의 하나에 대응될 때, 관련 메모리로부터의 점프 오프셋 값에 액세스하며, 여기서 액세스된 점프 오프셋 값은 현재 매치 값에 대응된다. The lookupswitch accelerator 145 determines whether the current instruction received by the hardware processor 100 corresponds to a lookupswitch statement stored in the associated memory. The lookup switch accelerator 145 also determines whether the current match value associated with the current command corresponds to one of the match values stored in the associated memory. The lookupswitch accelerator 145 accesses a jump offset value from the associated memory when the current command corresponds to a lookupswitch statement stored in memory and the current match value corresponds to one of the match values stored in the memory. The jump offset value corresponds to the current match value.

룩업스위치 가속기(145)는 또한 관련 메모리가 매치와 현재 룩업스위치 명령문에 관련된 점프 오프셋 값을 이미 포함하지 않을 때, 현재 룩업스위치 명령문와 관련된 점프 오프 셋 값 및 매치를 검색하기 위한 회로를 포함한다. 룩업스위치 가속기(145)는, 발명의 명칭이 "LOOK-UP SWITCH ACCELERATOR AND METHOD OF OPERATING SAME"이고, 마크 트렘블레이 및 제임스 마이클 오'코너등이 발명자이며, 본 출원의 양수인에게 양도되고, 여기서는 참고로 소개된 미국특허출원 제 08/788,811 호에 상세히 기재되어 있다. A look-up switch accelerator 145 also has an associated memory comprising a circuit for searching the current lookup switch jump offset value and a match associated myeongryeongmunwa when not already included in the jump offset values associated with a match with the current lookup switch statement. The look-up switch accelerator 145 is named "LOOK-UP SWITCH ACCELERATOR AND METHOD OF OPERATING SAME", and Mark Tremblay and James Michael O'Corner and the like are assigned to the assignee of the present application and are referred to herein. It is described in detail in US patent application Ser. No. 08 / 788,811, which is incorporated by reference.

오브젝트의 매서드의 실행 개시 과정에 있어서, 실행 유닛(140)은 매서드 벡터에 액세스하여, 매서드 벡터내의 매서드 포인터의 하나 즉 하나의 간접(indirection) 레벨을 검색한다. 실행 유닛(140)은 액세스된 매서드 포인터를 사용하여 대응하는 매서드 즉 두 번째 간접 레벨에 액세스한다.In the process of initiating the execution of the method of the object, the execution unit 140 accesses the method vector and searches for one or one indirection level of the method pointer in the method vector. Execution unit 140 uses the accessed method pointer to access the corresponding method, that is, the second level of indirection.

실행 유닛(140)내의 간접 레벨을 감소시키기 위해, 각 오브젝트를 오브젝트에 의해 액세스되는 각 매서드의 전용 카피가 구비된다. 실행 유닛(140)은 그 후 간접의 단일 레벨을 사용하여 매서드에 액세스한다. 즉, 각 매서드는 오브젝트로부터 나온 포인터에 의해 직접 액세스된다. 이는 매서드 포인터에 의해 이전에 도입된 간접 레벨을 제거한다. 간접의 레벨을 감소시킴으로써, 실행 유닛(140)의 동작은 가속될 수 있다. 간접의 레벨을 감소시킴으로써, 실행 유닛(140)의 동작은 가속될 수 있다. 간접의 레벨을 감소시킴으로써 실행 유닛(140)을 가속하는 것은, 발명의 명칭이 "REPLICATING CODE TO ELIMINATE A LEVEL OF INDIRECTION DURING EXECUTION"이고, 마크 트렘블레이 및 제임스 마이클 오'코너등이 발명자이며, 본 출원의 양수인에게 양도되고, 여기서는 참고로 소개된 미국특허출원 제 08/787,846 호에 상세히 기재되어 있다. In order to reduce the level of indirection in the execution unit 140, a dedicated copy of each method is accessed for each object by the object. Execution unit 140 then accesses the method using a single level of indirection. That is, each method is accessed directly by a pointer from the object. This eliminates the level of indirection previously introduced by the method pointer. By reducing the level of indirection, the operation of the execution unit 140 can be accelerated. By reducing the level of indirection, the operation of the execution unit 140 can be accelerated. Accelerating the execution unit 140 by reducing the level of indirection is the name of the invention "REPLICATING CODE TO ELIMINATE A LEVEL OF INDIRECTION DURING EXECUTION", the inventors of Mark Tremblay and James Michael O'Corner and the like, Assigned to the assignee of U.S. Patent No. 08 / 787,846, which is incorporated herein by reference.

getfield-putfield 가속기getfield-putfield accelerator

다른 특정 기능적인 유닛 및 구조의 다양한 변환 룩어사이드 버퍼(TLB) 타입들은 선택적으로 하드웨어 프로세서(100)에 포함되어 상수 풀에 대한 액세스를 가속시킨다. 예를 들면, JAVA 가상 머신 명세는 실행될 때 오브젝트 내에 필드를 설정하는 명령 풋필드(putfield), 연산부호(181)로 실행될 때 오브젝트로부터 필드를 인출하는 겟필드(getfield), 연산부호(180)를 결정한다. 이들 명령에 있어서, 연산부호는 인덱스 바이트 1 및 인덱스 바이트 2가 뒤따른다. 오퍼랜드 스택(423)은 명령 풋필드를 위한 값이 뒤따르는 오브젝트에 대한 레퍼런스와 명령 겟필드를 위한 오브젝트에 대한 레퍼런스만을 포함한다.Various transform lookaside buffer (TLB) types of other specific functional units and structures are optionally included in the hardware processor 100 to accelerate access to the constant pool. For example, the JAVA virtual machine specification may include a command putfield that sets a field in an object when executed, a getfield that obtains a field from an object when executed with an operation code 181, and an operation code 180. Decide In these instructions, the operation code is followed by index byte 1 and index byte 2. The operand stack 423 includes only a reference to an object for the reference and the Get command field for the object followed by a value for the foot command field.

인덱스 바이트 1 및 2는 현재 클래스의 상수 풀내로 인덱스를 생성하기 위해 사용된다. 그 인덱스에서의 상수 풀내의 항목은 클래스 이름 및 필드 이름에 대한 필드 레퍼런스이다. 항목은 바이트내 필드폭과 바이트내 필드 오프셋을 모두 갖는 필드 블럭 포인터로 분해된다.Index bytes 1 and 2 are used to create an index into the constant pool of the current class. The items in the constant pool at that index are field references to class names and field names. The item is decomposed into a field block pointer having both the intrabyte byte width and the intrabyte byte offset.

실행 유닛(140)내의 선택적인 겟필드-풋필드 가속기(146)는 캐시내 명령 겟필드 또는 명령 풋필드를 위한 필드 블럭 포인터를 저장하고, 태그로써 필드 블럭 포인터로 분해된 상수 풀내에서 항목을 인식하기 위해 사용된 인덱스에 따라, 명령의 첫 번째 호출후에 사용한다. 계속해서, 실행 유닛(140)은 인덱스 바이트 1 및 2를 사용하여 인덱스를 생성하고, 인덱스를 겟필드-풋필드 가속기(146)로 공급한다. 인덱스가 태그로써 저장된 인덱스의 어느 하나와 매치되면, 즉 히트가 있으면, 그 태그와 관련된 필드 블럭 포인터는 검색되고 실행 유닛(140)에 의해 사용된다. 반대로, 매치가 발견되지 않으면, 실행 유닛(140)은 위에서 설명한 동작을 실행한다. 겟필드-풋필드 가속기(146)는 위에서 설명한 퀵 명령 변환 실시예에서 사용된 자가 수정 코드 없이 구현된다.Selective nuggets field in the execution unit 140-foot field accelerator 146 is cached in instruction nuggets field or command stores the field block pointer for the foot field and recognize an item in the constant pool, even if they are decomposed into the field block pointer as a tag Used after the first invocation of the command, depending on the index used to do so. Subsequently, execution unit 140 creates an index using index bytes 1 and 2 and supplies the index to getfield-footfield accelerator 146. If the index matches any of the indexes stored as a tag, that is, a hit, the field block pointer associated with that tag is retrieved and used by execution unit 140. Conversely, if no match is found, execution unit 140 performs the operation described above. Getfield-footfield accelerator 146 is implemented without the self modifying code used in the quick command conversion embodiment described above.

한 실시예에 있어서, 겟필드-풋필드 가속기(146)는 태그로써 기능하는 인덱스들을 홀드하는 첫 번째 부분과, 필드 블럭 포인터를 홀드하는 두 번째 부분을 구비한 관련 메모리를 포함한다. 인덱스가 입력부를 통해 관련 메모리의 제 1 부분에 공급될 때, 그리고 저장된 인덱스들의 하나와 매치가 있으면, 입력 인덱스와 매치된 저장된 인덱스와 관련된 필드 블럭 포인터는 관련 메모리의 제 2 부분으로부터의 출력이다.In one embodiment, getfield-footfield accelerator 146 includes an associated memory having a first portion holding indices serving as tags and a second portion holding a field block pointer. When an index is supplied through the input to the first portion of the associated memory, and if there is a match with one of the stored indices, the field block pointer associated with the stored index matched with the input index is the output from the second portion of the associated memory.

바운드 검사 유닛(Bounds Check Unit)Bounds Check Unit

실행 유닛(140)내 바운드 검사 유닛(147)(도 1)은 어레이의 요소로의 각각의 액세스를 검사하여 액세스가 어레이내의 로케이션에 대한 것인지 결정하는 선택적인 하드웨어 회로이다. 액세스가 어레이 외부의 로케이션에 대한 것일 때, 바운드 검사 유닛(147)은 액티브 어레이 바운드 예외 신호를 실행 유닛(140)에 발한다. 액티브 어레이 바운드 예외 신호에 응답하여, 실행 유닛(140)은 아웃 오브 바운드 어레이 액세스를 취급하는 마이크로코드 ROM(141)에 저장된 예외 핸들러의 실행을 시작한다. Bound inspection unit 147 (FIG. 1) in execution unit 140 is an optional hardware circuit that checks each access to elements of the array to determine if the access is to a location within the array. When the access is to a location outside of the array, bound check unit 147 issues an active array bound exception signal to execution unit 140. In response to the active array bound exception signal, execution unit 140 begins execution of an exception handler stored in microcode ROM 141 that handles out of bound array access.

한 실시예에 있어서, 바운드 검사 유닛(147)은, 그 내부에 어레이(예를 들면 프로그램 카운터 값)를 위한 어레이 인식기 및 어레이를 위한 최소값 및 최대값이 저장된 관련 메모리 요소를 포함한다. 어레이가 액세스될 때, 즉 그 어레이를 위한 어레이 인식기가 관련 메모리 요소에 적용될 때, 그리고 어레이가 관련 메모리 요소내에 나타난다고 할 때, 저장된 최소값은 제 1 비교기 요소에 대한 제 1 입력 신호이고, 저장된 최대값은 제 2 비교기 요소에 대한 제 1 입력 신호이고, 비교기(comparator) 요소는 때때로 비교(comparison) 요소라고도 불린다. 제 1 및 제 2 비교기 요소에 대한 제 2 입력 신호는 어레이 요소의 액세스에 관련된 값이다.In one embodiment, bound check unit 147 includes therein an array identifier for an array (e.g., a program counter value) and associated memory elements having stored therein minimum and maximum values for the array. When an array is accessed, that is, when an array identifier for that array is applied to the associated memory element, and the array appears within the associated memory element, the stored minimum value is the first input signal for the first comparator element and the maximum stored The value is the first input signal for the second comparator element, and the comparator element is sometimes called the comparator element. The second input signal for the first and second comparator elements is a value related to the access of the array element.

어레이 요소의 액세스에 관련된 값이 저장된 최대값보다 적거나 같을 때 및 저장된 최소값보다 크거나 같을 때에는 어느 비교기 요소도 출력 신호를 생성하지 않는다. 그러나, 만일 이들 조건중 하나가 거짓이면, 적당한 비교기요소가 액티브 어레이 바운드 예외 신호를 생성한다. 보다 상세한 바운드 검사 유닛(147)의 설명은, 발명의 명칭이 "PROCESS WITH ACCELERATED ARRAY ACCESS BOUND CHECKING"이고, 마크 트렘블레이 및 제임스 마이클 오'코너등이 발명자이며, 본 출원의 양수인에게 양도되고, 본 출원과 동일자로 출원되었으며, 여기서는 참고로 소개된 미국특허출원 제 08/786,352 호에 상세히 기재되어 있다.No comparator element generates an output signal when the value associated with access of the array element is less than or equal to the stored maximum and greater than or equal to the stored minimum. However, if either of these conditions is false, a suitable comparator element generates an active array bound exception signal. The more detailed description of the bound inspection unit 147 is named "PROCESS WITH ACCELERATED ARRAY ACCESS BOUND CHECKING", and Mark Tremblay and James Michael O'Corner are the inventors, and are assigned to the assignee of the present application, It is filed on the same day as the application, which is described in detail in US patent application Ser. No. 08 / 786,352, which is hereby incorporated by reference.

JAVA 가상 머신 명세는 특정 명령이 특정 예외를 야기할 수 있음을 규정한다. 이들 예외 조건의 검사가 구현되고, 이들을 처리하기 위한 하드웨어/소프트웨어 매커니즘은 마이크로코드 ROM(141) 및 프로그램 카운터 및 트랩 제어 논리(170)내의 정보에 의해 하드웨어 프로세서(100)에 제공된다. 다른 것은 트랩 벡터 스타일 또는 단일 트랩 타겟을 갖고 트랩 타입를 스택상에 푸싱하는 것을 포함하여, 제공된 트랩 핸들러 루틴이 적절한 동작을 결정하게 한다.The JAVA virtual machine specification specifies that certain commands can cause certain exceptions. Checks of these exception conditions are implemented and hardware / software mechanisms for dealing with them are provided to the hardware processor 100 by information in the microcode ROM 141 and the program counter and trap control logic 170. Others include pushing a trap type on the stack with a trap vector style or a single trap target, such that the provided trap handler routine determines the appropriate behavior.

어떠한 외부 캐시도 하드웨어 프로세서(100)의 아키택쳐를 위해 필요하지 않다. 어떠한 변환 룩어사이드 버퍼도 유지될 필요가 없다.No external cache is needed for the architecture of the hardware processor 100. No translation lookaside buffer needs to be maintained.

도 5는 독특한 시스템을 만들기 위한 하드웨어 프로세서(100)에 대한 몇 개의 가능한 부가 요소들을 나타낸다. 나타난 여덟 개의 기능을 유지하기 위한 회로, 즉 본 발명의 하드웨어 프로세서(100)로서의 동일 칩 속에 집적될 수 있는 NTSC 인코더(501), MPEG(502), 에더넷 제어기(503), VIS(504), ISDN(505), I/O 제어기(506). ATM 어셈블리/리어셈블리(507) 및 무선 링크(508)가 도시되어 있다.5 shows some possible additional elements for the hardware processor 100 to create a unique system. Circuitry to maintain the eight functions shown, i.e. NTSC encoder 501, MPEG 502, Ethernet controller 503, VIS 504, which can be integrated into the same chip as the hardware processor 100 of the present invention, ISDN 505, I / O controller 506. ATM assembly / reassembly 507 and wireless link 508 are shown.

도 6a는 본 발명의 한 실시예로서, 단일 실리콘 칩상에서 구현되는 듀얼 명령 세트 프로세서(690)의 블록 다이어그램이다. 듀얼 명령 세트 프로세서(690)는 가상 머신 명령 즉, 즉 네트워크 등으로부터 수신되는 첫번째 명령 세트를 디코딩 및 실행하고, 로컬 메모리 또는 네트워크 등으로부터 제공되는 두번째 명령 세트를 디코딩 및 실행하는 능력도 가지고 있다. 6A is a block diagram of a dual instruction set processor 690 implemented on a single silicon chip as one embodiment of the invention. The dual instruction set processor 690 also has the ability to decode and execute virtual machine instructions, i.e., the first instruction set received from a network or the like, and to decode and execute a second instruction set provided from local memory or a network or the like.

상기 첫번째 및 두번째 명령 세트는 다른 컴퓨터 프로세서 아키텍처를 위한 것이다. 한 실시예에서, 상기 첫번째 명령 세트는 JAVA 가상 머신 명령 등의 가상 머신 명령이고, 상기 명령의 두번재 세트는 앞서 설명한 아키텍처 등의 종래의 마이크로프로세서 아키텍처를 위한 원시 명령이다.The first and second instruction sets are for different computer processor architectures. In one embodiment, the first set of instructions is a virtual machine instruction, such as a JAVA virtual machine instruction, and the second set of instructions is a native instruction for a conventional microprocessor architecture, such as the architecture described above.

처음에는, 듀얼 명령 세트 프로세서(690)가 부팅되면, 듀얼 명령 세트 프로세서(690)상에서 실행되는 운용시스템은 보통 상기 프로세서에게 상기 원시 명령 세트내의 명령을 실행시키게 한다. 상기 가상 머신 명령 세트내의 명령들을 사용하거나 요구하는 애플리케이션이 로딩되면, 상기 운용 시스템은 데이터스트림을 번역 유닛(691)으로 진행하게 한다.Initially, when dual instruction set processor 690 boots up, an operating system running on dual instruction set processor 690 typically causes the processor to execute instructions in the native instruction set. When an application that uses or requires instructions in the virtual machine instruction set is loaded, the operating system causes the datastream to proceed to a translation unit 691.

한 실시예에서, 번역 유닛(691)은 가상 머신 명령에서 원시 명령까지의 인터프리터를 포함하는 ROM 이다. 이 ROM은 프로세서(690)상의 일부 가상 머신 명령를 구현하기 위해 사용되는 마이크로코드를 포함하기도 한다. 선택적으로, 상기 인터프리터의 소프트웨어 구현은 프로세서(690)에 의해 실현될 수 있어서 상기 데이터스트림 내의 가상 머신 명령을 원시 명령으로 전환시킨다.In one embodiment, translation unit 691 is a ROM that includes an interpreter from virtual machine instructions to native instructions. This ROM may also contain microcode that is used to implement some virtual machine instructions on the processor 690. Optionally, a software implementation of the interpreter may be realized by processor 690 to convert virtual machine instructions in the datastream into native instructions.

번역 유닛(691)으로부터의 원시 명령들은 디코드 유닛(692)에 의해 디코딩되는데, 이 유닛은 종래의 마이크로프로세서 아키텍처로 사용된다. 그러면 상기 디코딩된 명령들은 종래 마이크로프로세서 아키텍처로 사용을 위한 종래의 실행 유닛인 실행 유닛(693)에 의해 실행된다. 만일 마이크로코드 루틴이 번역 유닛(691)내에 포함되어 있어서 어떤 가상 머신 명령을 구현하게 되면, 상기 마이크로코드 루틴은 실행을 위해 실행 유닛(693)으로 바로 통과하게 된다.Primitive instructions from translation unit 691 are decoded by decode unit 692, which is used in a conventional microprocessor architecture. The decoded instructions are then executed by execution unit 693, which is a conventional execution unit for use with a conventional microprocessor architecture. If a microcode routine is included in the translation unit 691 to implement any virtual machine instruction, the microcode routine passes directly to the execution unit 693 for execution.

당 기술분야의 통상의 지식을 가진 자에게는 본 발명의 특징을 해치지 않도록 도 6a에 도시되지는 않았으나 프로세서(690)에 다른 기능 유닛, 메모리 구성 등이 포함된다는 것은 명백한 것이다. 또한, 종래의 특정 마이크로프로세서 아키텍처를 사용하는 것에 따라, 관심있는 가상 머신 환경을 지원하기 위해 추가의 마이크로코드가 요구되기도 한다. 물론, 종래의 마이크로프로세서 아키텍처의 수행능력을 향상시키고자 한다면, 앞서 설명한 여러 캐시 및 가속 유닛이 상기 종래의 마이크로프로세서 아키텍처 내부에 통합될 수도 있다.To those skilled in the art, it is apparent that the processor 690 includes other functional units, memory configurations, and the like, although not shown in FIG. 6A so as not to detract from the features of the present invention. In addition, using certain conventional microprocessor architectures, additional microcode may be required to support the virtual machine environment of interest. Of course, to improve the performance of a conventional microprocessor architecture, the various cache and acceleration units described above may be integrated within the conventional microprocessor architecture.

듀얼 명령 세트 프로세서(690)는 상기 변역된 가상 머신 명령을 직접 실행하여 소프트웨어 인터프리터 또는 적시 컴파일러가 필요하지 않다. 상기 번역된 가상 머신 명령이 바로 실행되기 때문에, 수행능력은 소프트웨어 인터프리터 또는 적시 컴파일러보다 우수하다. Dual instruction set processor 690 executes the translated virtual machine instructions directly, eliminating the need for a software interpreter or a timely compiler. Since the translated virtual machine instructions are executed immediately, performance is superior to software interpreters or timely compilers.

듀얼 명령 세트 프로세서(690)의 한 실시예에서, 프로세서 상태 레지스터내의 비트는 모드 선택 비트로 정의된다. 상기 모드 선택 비트가 첫번재 상태인 경우, 신호 MODE(도 6a)가 액티브(active) 되고 데이터스트림(695)이 디멀티플렉서(696)를 통해 디코드 유닛(692)로 통과된다. 상기 모드 선태 비트가 두번째 상태인 경우, 신호 MODE 는 인액티브(inactive) 되고 데이터스트림(695)은 디멀티플렉서(696)를 통해 번역 유닛(691)으로 통과되고 번역 유닛(691)로부터 번역된 명령 스트림은 디코드 유닛(692)로 입력된다. 따라서, 이 실시예에서는, 가상 머신은 종래의 마이크로프로세서 아키텍처내에서 구현된다.In one embodiment of dual instruction set processor 690, the bits in the processor status register are defined as mode select bits. When the mode select bit is in the first state, the signal MODE (FIG. 6A) is active and the datastream 695 is passed to the decode unit 692 through the demultiplexer 696. When the mode select bit is in the second state, the signal MODE is inactive and the data stream 695 is passed through the demultiplexer 696 to the translation unit 691 and the translated command stream from the translation unit 691 is It is input to the decode unit 692. Thus, in this embodiment, the virtual machine is implemented within a conventional microprocessor architecture.

도 6b에 설명된 다른 실시예에서, 듀얼 명령 세트 프로세서(600) - 때때로 프로세서(600)로 언급함 - 에는: 스택(400)(도 4a)이 될 수 있는 스택(655); 네트워크 또는 로컬 메모리로부터 명령 스트림을 수신하는 제1 명령 디코더(635); 네트워크 또는 로컬 메모리로부터 선택된 명령을 수신하는 제2 명령 디코더(660); 제1 실행 유닛(640)을 포함하는 명령 실행 유닛(650); 및 스택(400)(도 4a)가 될 수 있는, 즉 제1 실행 유닛(640)에 의해 사용되는 스택(655)이 포함되어 있다. 당 기술분야의 통상의 지식을 가진 자에게는 프로세서(600)에 다른 기능 유닛이 포함된다는 것은 명백한 것이다. 그러나, 다른 기능 유닛들은 본 발명에 있어서 관심사가 아니며 본 발명의 상세한 설명을 해치지 않기 위해 설명은 하지 않도록 한다. 또한, 제2 실행 유닛(622)에는 제1 실행 유닛(640)에 의해 요구되는 환경을 지원하기 위한 마이크로코드 루틴이 포함되기도 한다.In another embodiment described in FIG. 6B, dual instruction set processor 600, sometimes referred to as processor 600, includes: stack 655, which may be stack 400 (FIG. 4A); A first command decoder 635 for receiving a command stream from a network or local memory; A second command decoder 660 for receiving a selected command from a network or local memory; An instruction execution unit 650 including a first execution unit 640; And stack 655, which may be stack 400 (FIG. 4A), that is, used by first execution unit 640. It will be apparent to one of ordinary skill in the art that the processor 600 includes other functional units. However, other functional units are not of interest to the present invention and are not described in order not to obscure the detailed description of the present invention. In addition, the second execution unit 622 may include a microcode routine to support the environment required by the first execution unit 640.

이 실시예에서 여러 기능 유닛이 하나의 다이 상에 도시되어 있지만, 이것은 단지 설명을 위한 것이며 이 특정한 실시예로 본 발명이 제한되는 것이 아니다. 본 명세서의 개시내용에서, 당 기술분야의 통상의 지식을 가진 자는 분리 프로세서, 통합된 프로세서, 또는 다른 어느 요구되는 물리적 구조로 본 발명의 원리를 구현할 수 있을 것이다.Although several functional units are shown on one die in this embodiment, this is for illustrative purposes only and the present invention is not limited to this particular embodiment. In the present disclosure, one of ordinary skill in the art will be able to implement the principles of the present invention in a separate processor, integrated processor, or any other desired physical structure.

제2 명령 디코더(660)는 스택 명령의 다른 세트를 디코딩하는 디코더를 포함하는 - 그러나 이로 제한되는 것은 아님 - 당 기술분야에서는 잘 알려진 어느 타입일 수 있다. 본 발명의 한 실시예에서, 제2 명령 디코더(660)는 RISC 타입 명령 디코더이다. 이 실시예에서, 제2 실행 유닛(662)는 RISC 타입 명령 실행 유닛으로서 명령 실행 유닛(650)내의 제1 실행 유닛(640)의 상기 스택 아키텍처와 대향하는 것으로 플랫 레지스터(flat register)와 연결되어 있다. 본 발명의 더 다른 실시예에서, 제2 명령 디코더(660)는 CISC 타입 명령 디코더이고 제2 실행 유닛(662)는 CISC 타입 실행 유닛이다. 더 다른 실시예에서, 제2 명령 디코더(660)는 VLIW 타입 명령 디코더이고 제2 실행 유닛(662)는 VLIW 타입 실행 유닛이다. The second instruction decoder 660 can be of any type well known in the art, including but not limited to a decoder for decoding another set of stack instructions. In one embodiment of the invention, the second command decoder 660 is a RISC type command decoder. In this embodiment, the second execution unit 662 is connected to a flat register as opposed to the stack architecture of the first execution unit 640 in the instruction execution unit 650 as a RISC type instruction execution unit. have. In another embodiment of the present invention, the second command decoder 660 is a CISC type command decoder and the second execution unit 662 is a CISC type execution unit. In yet another embodiment, the second instruction decoder 660 is a VLIW type instruction decoder and the second execution unit 662 is a VLIW type execution unit.

아래에 저 자세히 설명하겠지만, 본 발명의 한 실시예에서, 제1 명령 디코더(635)는 명령 디코드 유닛(130)(도 1)내의 명령 디코더(135)와 동일하다. 제2 명령 디코더(660)(도 6b)는 가상 모드 명령의 스트림내의 세트 모드 명령의 실행에 응답하여 액티브되고, 명령 스트림은 제1 명령 디코더 유닛(635)으로부터 제2 명령 디코더(660)까지 토글된다. 일단 제2 명령 디코더(660)가 액티브되면, 제2 명령 디코더(660)으로부터 디코딩된 명령들은 명령 실행 유닛(650)내의 제2 실행 유닛(662)로 공급된다.As will be described in detail below, in one embodiment of the present invention, the first instruction decoder 635 is identical to the instruction decoder 135 in the instruction decode unit 130 (FIG. 1). The second command decoder 660 (FIG. 6B) is active in response to the execution of the set mode command in the stream of virtual mode commands, and the command stream toggles from the first command decoder unit 635 to the second command decoder 660. do. Once the second command decoder 660 is active, the instructions decoded from the second command decoder 660 are supplied to the second execution unit 662 in the instruction execution unit 650.

이 구성은 여러 장점이 있다. 부록Ⅰ에 도시되어 있듯이, JAVA 가상 머신 명세는 더 다른 확장을 위한 일부 연산부호를 남겨놓는데, 즉 상기 명세는 모든 가능한 연산부호(256)를 정의하지 않는다. 그러나, 이러한 더 다른 확장을 위한 능력조차도 원하는 모든 명령을 제공하기엔 충분하지 못하다. 프로세서(600)를 가지고, 실행 유닛(662)를 위한 원시 명령은 상기 JAVA 가상 머신 명세내의 명령을 구현하기 위해 사용될 수 있다. 예를 들어, 애플리케이션이 사인 또는 코사인 함수 등의 관념적인 기능을 요구한다면, 이 관념적인 기능은 상기 세트 모드 명령, 그리고 원하는 기능을 실행하기 위해 실행 유닛(662)의 원시 명령 세트내에 사용된 명령들을 사용하여 구현될 수 있다. This configuration has several advantages. As shown in Appendix I, the JAVA virtual machine specification leaves some opcodes for further extensions, i.e. the specs do not define all possible opcodes 256. However, even these other extensions are not enough to provide all the commands you want. With processor 600, raw instructions for execution unit 662 can be used to implement the instructions in the JAVA virtual machine specification. For example, if an application requires an ideological function, such as a sine or cosine function, this ideological function replaces the set mode command and the commands used in the native instruction set of execution unit 662 to execute the desired function. Can be implemented.

그러므로, 본 발명의 원리에 따르면, 256개의 제한을 넘는 가상 머신 명령의 수를 증가시키는 한 방법은 세트 모드 명령으로서 연산부호(255) 등의 특별한 연산부호를 할당하는 것이다. 앞서 설명한 바와 같이, 세트 모드 명령의 실행은 제2 명령 디코더(660)를 동작하게 만들고, 제2 명령 디코더(660)로 명령의 RISC 타입과 같은 제 2 명령 세트를 토글 또는 스위치하여 JAVA 가상 머신 명세내에 지원되지 않는 계산을 수행한다.Therefore, in accordance with the principles of the present invention, one way to increase the number of virtual machine instructions beyond the 256 limit is to assign a special opcode, such as opcode 255, as a set mode instruction. As described above, execution of the set mode instruction causes the second instruction decoder 660 to operate, and toggles or switches a second instruction set, such as a RISC type of instruction, to the second instruction decoder 660 to specify the JAVA virtual machine specification. Perform unsupported calculations

상기 세트 모드 명령의 실행은 운용 시스템이 모드 비트의 상태를 변경시키게 만드는데, 이것은 제2 명령 디코더(660) 및 제2 실행 유닛(662)를 교대로 액티브 시키는 것이다. 계산이 완료되면, 운용 시스템은 그 완료를 검출하고 입력 데이터스트림이 첫번째 명령 디코더(635)로 돌아갈 수 있도록 그 모드 비트를 재설정한다. Execution of the set mode command causes the operating system to change the state of the mode bit, which in turn activates the second command decoder 660 and the second execution unit 662. Once the calculation is complete, the operating system detects the completion and resets its mode bits so that the input datastream can be returned to the first command decoder 635.

따라서, 제2 명령 실행 유닛(662)이 RISC 타입 실행 유닛인 본 발명의 이 실시예에서는, 제2 명령 디코더(660) 및 제2 실행 유닛(662)에 의해 RISC 명령을 액티브 시키고 실행시키는 방법을 도 7에서 볼 수 있다. 세트 모드 명령(701), 즉 데이터스트림(700) 내의 연산부호(255)(도 7)은 명령 디코더(135)(도 6b)에 의해 디코딩되고 제1 실행 유닛(640)에 의해 실행되며, 세트 모드 비트의 상태는 제2 명령 디코더(660) 및 제2 실행 유닛(662)를 액티브 시키기 위해 변경된다. 세트 모드 명령(701)다음에 즉시 오게되는 데이터스트림(700)내의 명령은 RISC 명령, 즉 RISC 실행 유닛용 연산부호 및 그들과 관련된 오퍼랜드 이다. Thus, in this embodiment of the present invention where the second instruction execution unit 662 is a RISC type execution unit, a method of activating and executing RISC instructions by the second instruction decoder 660 and the second execution unit 662 is described. It can be seen in FIG. 7. The set mode instruction 701, i.e., operation code 255 (FIG. 7) in the data stream 700, is decoded by the instruction decoder 135 (FIG. 6B) and executed by the first execution unit 640, and the set The state of the mode bit is changed to activate the second command decoder 660 and the second execution unit 662. Immediately following the set mode instruction 701, the instructions in the data stream 700 are RISC instructions, that is, opcodes for RISC execution units and their associated operands.

다음으로, 명령 디코더(135) 또는 프로세서(600)내의 다른 하드웨어는 정보(702)를 제2 명령 디코더(660)로 경로설정하고, 명령 디코더(135)의 디코딩을 바이패스시킨다. 예를 들어, 도 6a의 디멀티플렉서 및 신호 모드 가 프로세서(600)내에 통합될 수 있다. Next, the instruction decoder 135 or other hardware in the processor 600 routes the information 702 to the second instruction decoder 660 and bypasses the decoding of the instruction decoder 135. For example, the demultiplexer and signal mode of FIG. 6A can be integrated into the processor 600.

도 6c는 상기 제1 명령 디코더(635), 제1 실행 유닛(640) 및 스택(655)가 각 각 하드웨어 프로세서(100)의 명령 디코더(135), 실행 유닛(140) 및 스택 캐시(155)인 본 발명의 더 다른 실시예의 보다 자세한 사항을 보여주고 있다. 이 실시예에서, 상기 제1 및 제2 실행 유닛은 분리되어 있고, 제2 실행 유닛(662)는 플랫 레지스터(664)와 연결된 RISC 실행 유닛이다. 또한, 제2 실행 유닛(662)에 JAVA 가상 머신 환경을 지원하기 위해 실행된 마이크로코드가 포함되기도 한다. 그러므로, 프로세서(600, 600A)는 연산부호를 포함하는 JAVA 가상 머신 명령을 실행할 수 있고 또한 다른 컴퓨터 프로세서 아키텍처용 제 2 명령 세트를 실행하기 위해 최적화 될 수도 있다.6C shows that the first instruction decoder 635, the first execution unit 640, and the stack 655 each have an instruction decoder 135, an execution unit 140, and a stack cache 155 of the hardware processor 100. More details of another embodiment of the present invention are shown. In this embodiment, the first and second execution units are separate and the second execution unit 662 is a RISC execution unit coupled with the flat register 664. In addition, the second execution unit 662 may include microcode executed to support the JAVA virtual machine environment. Therefore, processors 600 and 600A may execute JAVA virtual machine instructions that include opcodes and may also be optimized to execute a second instruction set for other computer processor architectures.

그래서, 본 발명의 원리에 따르면, 명령을 포함하는 데이터스트림이 제1 명령 디코더(636)에 제공된다. 상기 데이터스트림내의 미리 정의된 명령을 실행하는 즉시, 상기 데이터스트림은 액티브된 제2 명령 디코더(660)으로 토글되어 상기 데이터스트림내의 연속 정보를 처리한다. 그러므로, 명령 세트는 두 가지 다른 타입, 즉 플랫폼 독립 명령 세트, 그리고 플랫폼 종속 명령 세트가 본 발명의 듀얼 명령 세트 프로세서(600)에 의해 디코딩되고 실행된다. 이것은 상기 제2 실행 유닛으 연산부호 공간이 가상 머신 연산부호 공간을 가지고 포함될 수 있게 하여 수행능력 및 가상 머신의 능력을 향상시키게 되는 장점을 가진다.Thus, in accordance with the principles of the present invention, a data stream comprising instructions is provided to the first instruction decoder 636. Upon executing a predefined command in the data stream, the data stream is toggled to an active second command decoder 660 to process the continuous information in the data stream. Therefore, the instruction set has two different types, platform independent instruction set, and platform dependent instruction set, which are decoded and executed by the dual instruction set processor 600 of the present invention. This has the advantage that the operation code space of the second execution unit can be included with the virtual machine operation code space to improve the performance and the capabilities of the virtual machine.

도 8을 참고하면, 프로세서(801)를 사용하는 컴퓨터 시스템(800)의 블록 레벨 다이어그램이 도시되어 있는데, 상기 프로세서는 본 발명의 프로세서(690,600 및 600A) 중 하나이고 모뎀(802) 및 로컬 메모리(804)와 연결되어 있다. 본 발명의 이 실시예에서, 모뎀(802)은 인터넷 또는 인트라넷 등의 네트워크와 통신하여 실행을 위한 가상 머신 명령을 수신한다. 선택적으로, 인트라넷을 위해서는 모뎀(802)은 컴퓨터 시스템(800)의 네트워크 카드로 대체되기도 한다. 따라서, 모뎀(802)은 네트워크와 통신용으로 연결될 수 있는 통신 인터페이스 유닛을 나타내는 것이다. 당 기술 분야의 통상의 지식을 가진 자에게는 명백하듯이, 상기 통신 인터페이스 유닛은 제1 포맷내의 제 1 명령 세트를 수신하고, 제2 포멧을 출력 신호로 하여 제 1 명령 세트를 공급한다.Referring to FIG. 8, shown is a block level diagram of a computer system 800 using a processor 801, which is one of the processors 690, 600, and 600A of the present invention and has a modem 802 and a local memory ( 804. In this embodiment of the invention, the modem 802 communicates with a network such as the Internet or an intranet to receive virtual machine instructions for execution. Optionally, the modem 802 may be replaced with a network card of the computer system 800 for an intranet. Thus, modem 802 represents a communication interface unit that can be connected for communication with a network. As will be apparent to one of ordinary skill in the art, the communication interface unit receives a first set of instructions in a first format and supplies a first set of instructions with the second format as an output signal.

본 실시예에서, 프로세서(801)에는 두 개의 연산 모드가 있다. 첫번째 연산 모드에서, 프로세서(801)는 실행을 위해 네트워크로부터 오직 가상 머신 명령만을 수신한다. 두번째 연산 모드에서는 상기 가상 머신 명령내의 미리 정의된 명령의 수신이 있는 직후, 프로세서(801)는 실행을 위해 로컬 메모리(804)내에 저장되어 있는 RISC, X86, 파워 PC, 및/또는 다른 어느 프로세서 아키텍처를 위한 다른 명령을 수신 및 처리할 수 있다. 이 방법에서, 예를들어 모델링, 디멘셔널 드로잉 등의 시각 연산용 명령과 같은 상기 가상 머신 명령내에서 구현되지 않은 명령들은 프로세서(801)를 사용하여 완전히 구현될 수 있다. 당 기술분야의 통상의 지식을 가진 자에게는 프로세서(801)가 명령의 제2 타입, 즉 애플리케이션이 보안을 필요로 하지 않기도 한다는 것을 이해하면서 네트워크로부터 비-JAVA 가상 머신 명령 을 수신할 수도 있다는 것은 명백한 것이다.In this embodiment, the processor 801 has two modes of operation. In the first mode of operation, processor 801 receives only virtual machine instructions from the network for execution. In a second mode of operation, immediately after receipt of a predefined instruction within the virtual machine instruction, processor 801 is stored in local memory 804 for execution, RISC, X86, power PC, and / or any other processor architecture. Receive and process other commands for. In this way, instructions not implemented within the virtual machine instructions, such as, for example, instructions for visual arithmetic, such as modeling, dimension drawing, or the like, may be fully implemented using the processor 801. It will be apparent to one of ordinary skill in the art that the processor 801 may receive non-JAVA virtual machine instructions from the network while understanding that the second type of instruction, that is, the application may not require security. will be.

프로세서(600,600A)에는 많은 애플리케이션이 있다. 예를들어, 컴퓨터 시스템(800)은 인터넷 등의 공중 캐리어 또는 로컬 메모리(804) 중 어느 하나로부터 제공된 JAVA 가상 머신 명령을 가진 프로세서(801)를 제공하기 위해 구성된다. 컴퓨터 시스템(800)의 사용자는 상기 JAVA 프로그래밍 언어로 기록되고 로컬 메모리(804)로부터 교대로 제공된 도 2에 도시된 것과 같은 가상 머신 명령을 발생하기 위해 처리된 컴퓨터 프로그램이 바이러스 또는 다른 소트프웨어 문제로부터 상대적으로 안전하다는 것을 어느정도 확신할 수 있다. There are many applications in the processors 600 and 600A. For example, computer system 800 is configured to provide a processor 801 with JAVA virtual machine instructions provided from either a public carrier such as the Internet or from local memory 804. A user of the computer system 800 may have a computer program that is written in the JAVA programming language and processed to generate a virtual machine instruction, such as that shown in Figure 2, which is alternately provided from the local memory 804, from a virus or other software problem. You can be certain that it is safe.

예를들면, 네트워크로부터 수신된 애플리케이션이 필요로 하는 라이브러리가 로컬 메모리(804)내에 저장될 수 있다. 특별한 운용 시스템 또는 그래픽 사용자 인터페이스는 상기 운용 시스템 또는 그래픽적인 사용자 인터페이스의 일부분으로서 상기 라이브러리를 포함할 수 있다. 따라서, JAVA 프로그래밍 언어로 기록된 어느 컴퓨터 프로그램도 두 가지 다른 버젼으로 컴파일 될 수 있는데, 이 중 한 버전은 다른 프로세서(600 또는 600A) 또는 다른 하드웨어 프로세서(100)에 의해 처리를 위해 보안이 되지 않은 네트워크상에서 제공된 것이고, 다른 버전은 로컬 메모리(804) 또는 다른 신뢰성 있는 환경 등의 로컬 환경내에서 사용되는 것이다.For example, a library needed by an application received from the network may be stored in local memory 804. A particular operating system or graphical user interface may include the library as part of the operating system or graphical user interface. Thus, any computer program written in the JAVA programming language can be compiled into two different versions, one of which is not secured for processing by another processor 600 or 600A or another hardware processor 100. It is provided on a network, and another version is used in a local environment, such as local memory 804 or other trusted environment.

상기 JAVA 언어 소스 프로그램의 두 개의 컴파일된 버전의 차이점은 로컬 메모리(804)내에 저장된 버전과 같이 논리적으로 실행되고자 하는 컴파일된 버전은 안전하지 않은 네트워크용 버전등을 검사하는 어레이 경계와 같은 강한 보안 검사를 할 필요가 없다는 것이다. 따라서 시간 소비와 불필요한 보안 검사는 필요가 없어서 지나칠 수 있다. 이것은 로컬 환경내의 프로세서(600,600A)의 수행능력을 향상시키는데, 그러나 프로세서가 공중 캐리어상에서 수신된 가상 머신 명령을 처리하기 위해 사용될 수 있도록 하는 것도 필요하다.The difference between the two compiled versions of the JAVA language source program is that a compiled version that is intended to be executed logically, such as a version stored in local memory 804, is a strong security check such as an array boundary that checks for insecure network versions. There is no need to do it. Therefore, time consuming and unnecessary security checks are not necessary and can be passed. This improves the performance of the processors 600 and 600A in the local environment, but it is also necessary to allow the processor to be used to process virtual machine instructions received on the air carrier.

앞서 네트워크를 안전하지 않은 환경으로 생각했고, 로컬 메모리를 신뢰된 환경으로 생각했다. 그러나, 이것은 단지 설명을 위한 것이다. 당 기술분야의 통상의 지식을 가진자에게는 인터넷, 인트라넷 또는 다른 네트워크상의 전송이 안전하고 믿을 수 있을 수도 있다는 것은 명백한 것이다. 따라서, 그러한 상황에서는, 신뢰된 환경을 위한 본 발명내의 특성들이 사용될 수 있다. 비슷하게, 몇 몇 상황에서는 상기 로컬 메모리가 신뢰된 환경이 아닐 수 도 있어서 안전하지 않은 환경을 위한 본 발명의 원리가 사용되어야 하는 경우도 있다.Earlier, we thought of the network as an insecure environment, and we considered local memory as a trusted environment. However, this is for illustrative purposes only. It will be apparent to those of ordinary skill in the art that transmissions on the Internet, intranets or other networks may be secure and reliable. Thus, in such a situation, the features within the present invention for a trusted environment may be used. Similarly, in some situations the local memory may not be a trusted environment and therefore the principles of the present invention for insecure environments should be used.

당해 기술분야의 통상의 지식을 가진 자는 본 명세서에 개시된 내용을 가지고 본 발명의 여러 측면의 범위 및 정신에서 벗어나지 않는 한 본 발명의 실시예를 여러 방법으로 부가 또는 수정할 수 있다. 또한, 첨부된 특허청구범위에 정의된 본 발명의 정신 및 범위에 놓일 수 있는 본 발명의 다양한 변경 및 수정이 있을 수 있다. Those skilled in the art can add or modify embodiments of the present invention in various ways without departing from the scope and spirit of the various aspects of the present invention with the teachings disclosed herein. In addition, there may be various changes and modifications of the invention which may fall within the spirit and scope of the invention as defined in the appended claims.

(부록Ⅰ)(Appendix I)

JAVA 가상 머신 명세JAVA virtual machine specification

ⓒ1993, 1994, 1995 Sun Microsystems, Inc.© 1993, 1994, 1995 Sun Microsystems, Inc.

2550 Garcia Avenue, Mountain View, California2550 Garcia Avenue, Mountain View, California

94043-1100 U.S.A.94043-1100 U.S.A.

모든 권리는 보존되었다. 이 BETA 특성은 공개되었으며, 관련 서류는 저작권에 의해 보호되며, 그의 사용, 복사, 배포 및 편집을 제한하는 라이센스에 의해 배포된다. 이 공개 또는 관련 서류는 선 또는 그의 라이센서의 위임없이 어떤 수단에 의해 어떤 타입로 재생산될 수 있다.All rights have been preserved. This BETA feature is publicly available, and its documentation is protected by copyright and distributed under licenses restricting its use, copying, distribution and editing. This disclosure or related document may be reproduced in any type by any means without the authorization of the Sun or its licensors.

이 생산물의 일부는 UNIX 시스템 연구소와 캘리포니아대학에 각각 인가된 상표명 UNIX와 바클리 4.3 BSD 시스템즈에서 비롯될 수 있다. 이 공개의 제삼자의 원천 소프트웨어는 저작권에 의해 보호되며 선의 원천 공급자에 라이센스되어 있다.Portions of this product may be derived from the UNIX and Barclays 4.3 BSD systems, licensed from the Institute of UNIX Systems and the University of California, respectively. Third-party software from this release is protected by copyright and licensed from good sources.

제한된 권리 범례 : 미국정부에 의한 사용, 복사 또는 개시는 DFARS 252.227-7013(c)(1)(ⅱ) 및 FAR 52.227-19에 설정된 제한에 구속된다.Restricted Rights Legend: Use, copying or disclosure by the US Government is subject to the restrictions set forth in DFARS 252.227-7013 (c) (1) (ii) and FAR 52.227-19.

이 매뉴얼에 기술된 공개는 하나 이상의 미국특허, 외극특허 또는 계류출원에 의해 보호될 수 있다.Disclosures described in this manual may be protected by one or more US patents, foreign patents, or pending applications.

상 표brand

Sun, Sun Microsystems, Sun Microsystems Computer Corporation, 선 로고, 선 마이크로시스템즈 컴퓨터 코퍼레이션 로고, WebRunner, JAVA, FirstPerson 및 Firstperson 로고 및 에이전트는 선 마이크로시스템즈 인코퍼레이티드의 상표 또는 등록 상표이다. "Duke" 캐릭터는 선 마이크로시스템즈 인코포레이티드의 저작권 1992-1995 Copyright (c)이다. 모든 권리는 보존되었다. 상표명 UNIX는 미국 및 다른 나라에서 상표등록되었으며, X/Open Company, Ltd를 통해 독점적으로 라이센스되었다. OPEN LOOK는 노벨 인코퍼레이티드의 등록 상표이다. 여기에 언급된 모든 다른 생산물명은 그들 각각의 자신들의 상표이다.Sun, Sun Microsystems, Sun Microsystems Computer Corporation, the Sun logo, the Sun Microsystems Computer Corporation logo, WebRunner, JAVA, FirstPerson, and the Firstperson logo and agents are trademarks or registered trademarks of Sun Microsystems Incorporated. The "Duke" character is copyright 1992-1995 Copyright (c) of Sun Microsystems, Inc. All rights have been preserved. Tradenames UNIX is a registered trademark in the United States and other countries, licensed exclusively through X / Open Company, Ltd. OPEN LOOK is a registered trademark of Novell Incorporated. All other product names mentioned herein are their respective trademarks.

SCD 컴플레이언트 로고를 포함하는 모든 SPARC 상표는 SPARC 인터내셔날 인코퍼레이티드의 상표 또는 등록상표이다. SPARCstation, SPARCserver, SPARCengine, SPARCworks 및 SPARCcompiler는 선 마이크로시스템즈 인코퍼레이티드에 독점적으로 인가되어 있다. 상표 SPARC를 부착한 제품은 선 마이크로시스템즈 인코퍼레이티드에 의해 개발된 구성물에 기초한다.All SPARC trademarks, including the SCD Compliant logo, are trademarks or registered trademarks of SPARC International. SPARCstation, SPARCserver, SPARCengine, SPARCworks, and SPARCcompiler are licensed exclusively to Sun Microsystems, Inc. Products bearing the trademark SPARC are based on components developed by Sun Microsystems, Inc.

OPEN LOOK 및 SunTM Graphical User Interfaces는 그의 사용자와 라이센스자에 대해 선 마이크로시스템즈 인코퍼레이티드에 의해 개발되었다. 선은 컴퓨터 산업을 위해 시각 및 도형 사용자 조화의 관점에서 연구 또는 개발한 제록스의 선구자적 노력을 인정한다. 선은 제록스로부터 Xerox Graphical User Interface에 비독점적 라이센서를 소유하였으며 또한 OPEN LOOK GUIs와 선의 라이센스 동의에 따라 선의 라이센스를 포함한다.OPEN LOOK and Sun TM Graphical User Interfaces were developed by Sun Microsystems, Inc. for its users and licensees. Sun recognizes Xerox's pioneering efforts in research and development in terms of visual and graphical user harmony for the computer industry. Sun owns a non-exclusive licensor from Xerox to the Xerox Graphical User Interface and also includes a line license under OPEN LOOK GUIs and the line license agreement.

X 윈도우 시스템은 MIT의 상표 및 제품이다.X Window System is a trademark and product of MIT.

이 출판물은 특정 목적 또는 비침해에 대한 시장성, 합리성의 암시적 근거에 한정하지 않고 어떠한 종류의 근거, 표현 또는 암시없이 "그대로" 제공된다. 이 출판물은 기술적 오류 또는 기록 에러를 포함할 수 있다. 변경은 안내서에 정기적으로 부가될 수 있다 : 이들 변경은 본 출판물의 새로운 증보판에 조합될 것이다. 선 마이크로시스템즈 인코포레이티드는 적절한 시기에 이 출판물에 기재된 제품 및/또는 프로그램을 개선 및/또는 변경을 가할 수 있다.This publication is provided “as is” without limitation of any kind, grounds, representations, or implications, of any implied grounds of marketability or reasonableness for a particular purpose or noninfringement. This publication may include technical or recording errors. Changes may be added to the guide periodically: These changes will be combined in new supplements to this publication. Sun Microsystems Inc. may make improvements and / or changes in the products and / or programs described in this publication at appropriate times.

머리말preface

이 서류는 JAVA 가상 머신 및 그의 교육 프로그램의 버전 1.0을 기술한다. 우리는 컴파일러 기록자를 타겟으로 하기를 원하는 컴파일러 기록자를 위한 명세서로서, 및 추종 JAVA 가상 머신를 구현하기를 원하는 다른 사람들을 위한 명세서로써 작용하도록 이 서류를 기록하였다.This document describes version 1.0 of the JAVA virtual machine and its educational program. We have written this document to serve as a specification for compiler writers who want to target compiler writers, and as a specification for others who want to implement the following JAVA virtual machine.

JAVA 가상 머신는 실제 컴퓨터상에 소프트웨어로 에뮬레이트하는 것에 의해 구현되는 가상의 머신이다. JAVA 가상 머신의 코드는 클래스 파일에 기억되어 있으며, 각 클래스 파일은 하나 이상의 공용 클래스 코드를 포함한다.A JAVA virtual machine is a virtual machine implemented by emulating software on a real computer. The code for the JAVA virtual machine is stored in a class file, where each class file contains one or more public class code.

JAVA 가상 머신의 간단하고 능률적인 에뮬레이션은 컴퓨터의 포맷이 콤팩트하고 능률적인 바이트코드이기 때문에 가능하다. 컴파일된 C의 본래의 코드속도 액세스의 구현은 비록 선이 구현화에 대한 공개를 하지 않았지만 컴퓨터에 바이트코드를 변환하는 것에 가능하다.Simple and efficient emulation of JAVA virtual machines is possible because the computer's format is compact and efficient bytecode. The implementation of compiled C's native code-rate access is possible to convert bytecode to a computer, although Sun did not make public about its implementation.

이 서류의 나머지는 이하와 같이 구성되어 있다.The rest of this document is organized as follows.

1장은 JAVA 가상 머신의 구조를 기술한다.Chapter 1 describes the structure of the JAVA virtual machine.

2장은 클래스 파일 포맷을 기술한다.Chapter 2 describes the class file format.

3장은 바이트코드를 기술하며,Chapter 3 describes bytecodes.

부록 A는 JAVA 가상 머신의 선의 구현에 의한 어떤 구성을 포함한다. 명세서의 일부분은 정확하지 않지만 우리는 명세서가 구현에 참조가 되도록 여기에 이들을 기술한다. JAVA 가상 머신의 다른 구현은 이용가능하며 우리는 장래 공개에서 부록 A를 제거할 수 도 있다.Appendix A contains some configuration by the Sun implementation of the JAVA virtual machine. Portions of the specification are not exact but we describe them here for reference in the implementation. Other implementations of the JAVA virtual machine are available and we may remove Appendix A from future releases.

선은 JAVA 가상 머신 상표와 로고를 이 명세서의 구현에 사용하기 위해 인가할 것이다. 여러분이 JAVA 가상 머신의 구현을 고려하여 우리와 접촉하길 원한다면 아래의 주소로 E메일을 보내주길 바라며, 우리는 여러분의 구현을 위해 100% 지원할 것이다.Sun will authorize JAVA virtual machine trademarks and logos for use in the implementation of this specification. If you are considering implementing a JAVA virtual machine and would like to contact us, please send an e-mail to the address below and we will 100% support for your implementation.

JAVA Virtual Machine의 구현에 대한 명세서상의 논평이나 질문은 우리의 전자우편주소인 JAVA@JAVA.sun.com.으로 보내주길 바랍니다.Please send any comments or questions about the implementation of the JAVA Virtual Machine to our email address, JAVA@JAVA.sun.com.

1. JAVA 가상 머신 아키텍처(JAVA Virtual Machine Architecture)1.JAVA Virtual Machine Architecture

1.1 지원된 데이터 형식1.1 Supported Data Types

가상 머신 데이터 형식은 JAVA 언어의 기본 데이터 형식을 포함한다.Virtual machine data types include the basic data types of the JAVA language.

byte//1 바이트 부호 달린 2의 보수byte // 1 byte signed two's complement

short//2바이트 부호 달린 2의 보수short // 2-byte signed two's complement

int//4바이트 부호 달린 2의 보수int // 4 byte signed two's complement

long//8바이트 부호 달린 2의 보수long // 8-byte signed two's complement

float//4바이트 IEEE 754 단정도float // 4 byte IEEE 754 single precision

double//8바이트 IEEE 754 배정도double // 8 byte IEEE 754 double precision

char//2바이트 부호 없는 유니코드 문자char // 2-byte unsigned Unicode character

대략 모든 JAVA형 검색은 컴파일 때 이루어진다. 전술한 초기 타입의 데이터는 JAVA의 실행을 허용하도록 하드웨어에 의해 표시될 필요는 없다. 대신에, 초기 값으로 작동하는 바이트코드는 예를 들면 iadd, ladd, fadd 및 dadd 명령의 오퍼랜드 타입를 표시하며, 2개의 번호를 더한 타입는 각각 int, long, float 및 double이다.Approximately all JAVA-type searches are done at compile time. The aforementioned initial type of data need not be represented by the hardware to allow the execution of JAVA. Instead, the bytecode acting as the initial value indicates the operand type of the iadd, ladd, fadd and dadd instructions, for example, the two numbered types are int, long, float and double, respectively.

가상 머신는 부울 타입(boolean type)를 위한 명령을 분리하지 않는다. 대신에, 정수 복귀를 포함하는 정수 명령이 부울 값을 연산하는데 사용되며; 바이트 어레이는 부울의 어레이를 위해 사용된다.Virtual machines do not separate instructions for boolean types. Instead, integer instructions, including integer returns, are used to compute boolean values; Byte arrays are used for arrays of booleans.

가상 머신는 점진적인 언더플로우를 지원하며 IEEE 754 포맷에 부동소수점 포인트를 특정화한다. IEEE 포맷을 지원하지 않는 구형 컴퓨터 체계는 JAVA 분수 프로그램을 대단히 느리게 실행하게 된다.The virtual machine supports progressive underflow and specifies floating point points in the IEEE 754 format. Older computer systems that do not support the IEEE format will run JAVA fractional programs very slowly.

다른 가상 머신 데이터 타입는 이하의 것을 포함한다.Other virtual machine data types include the following:

object //JAVA 오브젝트에 대한 4바이트 레퍼런스object // 4-byte reference to the JAVA object

returnAddress //jsr/ret/jsr_w/ret_w 명령으로 사용된 4바이트returnAddress // 4 bytes used by the jsr / ret / jsr_w / ret_w command

주:JAVA 어레이는 오브젝트로서 처리되었다.Note: The JAVA array was treated as an object.

이 명세서는 오브젝트를 위해 어떤 특정한 내부 구조를 요구하지 않는다. 우리들의 구현에 있어서 오브젝트 레퍼런스는 한 쌍의 포인터: 하나는 오브젝트용 매서드 테이블, 다른 하나는 오브젝트를 위해 할당된 데이터로 처리된다. 다른 구현은 인라인 캐시 보다는 매서드 테이블 처리를 사용할 수 있으며, 이러한 방법은 하드웨어의 급속한 변화, 즉 현재와 2000년 사이에서 일어나는 급속한 변화와 유사하다.This specification does not require any particular internal structure for the object. In our implementation, an object reference is treated as a pair of pointers: one for the method table for the object and one for the data allocated for the object. Other implementations can use method table processing rather than inline cache, and this approach is similar to the rapid change in hardware, that is, between the current and 2000 years.

JAVA 가상 머신 바이트코드에 의해 표현된 프로그램은 바람직한 타입 억제를 유지하는 것이 기대되며, 구현은 이러한 타입 억제를 위반하는 바이코드 프로그램을 실행하도록 거부될 수 있다.Programs represented by JAVA virtual machine bytecodes are expected to maintain desirable type suppression, and implementations may be denied to execute bicode programs that violate this type suppression.

반면, JAVA 가상 머신는 32비트 어드레스 공간 컴퓨터에서 운전되도록 바이트코드 데오니션에 의해 한정되어지며, 이는 바이트코드를 64비트 형식으로 자동적으로 변환하는 JAVA 가상 머신의 버전을 만드는 것이 가능하다. 이 전송 기술은 JAVA 가상 머신 명세서의 기술사상을 넘어선다.JAVA virtual machines, on the other hand, are confined by bytecode deionization to run on 32-bit address space computers, which makes it possible to create a version of the JAVA virtual machine that automatically converts bytecodes into 64-bit formats. This transfer technology goes beyond the technical idea of the JAVA virtual machine specification.

1.2 레지스터(Resisters)1.2 Registers

어떤 관점에 있어서, 가상 머신는 단일 매서드의 코드를 실행하며, pc 레지스터는 실행되어지는 다음 바이트코드의 어드레스를 포함한다.In some respects, the virtual machine executes a single method of code, and the pc register contains the address of the next bytecode to be executed.

각 매서드는 메모리를 유지하기 위해 할당된 메모리 공간을 가진다.Each method has an allocated memory space to hold the memory.

vars 레지스터로 언급된 로컬 변수 설정;setting local variables referred to by the vars register;

옵탑 레지스터로 언급된 오퍼랜드 스택; 및Operand stack referred to as an optop register; And

frame 레지스터로 언급된 실행 환경 구조Execution environment structure referred to as frame register

로컬 변수 크기와 오퍼랜드 스택은 컴파일 때로 알려져 있기 때문에 이 공간의 모두는 한 번에 할당될 수 있으며, 실행환경 구조의 크기는 해석자로 잘 알려져 있다.Since the local variable size and operand stack are known at compile time, all of this space can be allocated at once, and the size of the execution environment structure is well known to the interpreter.

이들 레지스터 모두는 32비트 폭을 가진다.All of these registers are 32 bits wide.

1.3 로컬 변수(Local Variables)1.3 Local Variables

각 JAVA 매서드는 로컬 변수의 고정 크기 설정을 사용한다. 그들은 vars 레지스터로부터의 워드 오프셋으로써 어드레스된다. 로컬 변수는 모두 32비트 폭이다.Each JAVA method uses a fixed size setting for local variables. They are addressed as word offsets from the vars register. Local variables are all 32 bits wide.

배정도 정수와 배정도는 제 1 로컬 변수의 인덱스로 어드레스된다(예를 들면, 인덱스를 구비한 로컬 변수는 인덱스 n 및 n+1에서의 기억을 동적적으로 사용하는 배정도를 포함하고 있다). 가상 머신 명세서는 64비트 정렬되는 로컬 변수에서의 64비트 값을 요구하지 않는다. 구현자는 배정도 정수와 배정도를 2개의 워드로 분할하도록 적절한 방식을 결정한다.Double precision and double precision are addressed with the index of the first local variable (for example, a local variable with an index includes a double precision that dynamically uses storage at indexes n and n + 1). The virtual machine specification does not require 64-bit values in local variables that are 64-bit aligned. The implementer decides the proper way to split a double integer and a double into two words.

명령은 오퍼랜드 스택상에 로컬 변수 값을 로드하여 오퍼랜드 스택으로부터 로컬 변수내로 값을 기억하기 위해 제공되어 있다.Instructions are provided for loading local variable values on the operand stack to store values from the operand stack into local variables.

1.4 오퍼랜드 스택(The Operand Stack)1.4 The Operand Stack

컴퓨터 명령은 오퍼랜드 스택, 그들의 연산 및 스택으로의 결과 복귀로부터 오퍼랜드를 모두 취한다. 우리는 인텔 486 마이크로프로세서와 같은 약간 또는 불규칙 레지스터를 구비한 컴퓨터상에 컴퓨터를 효과적으로 쉽게 에뮬레이트 하도록 스택 조직을 선택하였다.Computer instructions take all of the operands from the operand stack, their operation, and returning the result to the stack. We chose a stack organization to easily and easily emulate a computer on a computer with some or irregular registers, such as the Intel 486 microprocessor.

오퍼랜드 스택은 32비트 폭이다. 매서드에 대한 매개 변수를 패스하여 얻어진 매서드를 수신할 뿐만 아니라 연산에 대한 변수를 공급하여 얻어진 연산을 세이브하도록 사용되어진다.The operand stack is 32 bits wide. It is used not only to receive methods obtained by passing parameters to methods, but also to save operations obtained by supplying variables for operations.

예를 들면, 명령 iadd 의 실행은 2개의 정수를 함께 가산한다. 2개의 정수는 이전 명령에 의해 푸시된 오퍼랜드 스택상의 2개의 최상위 워드인 것을 기대한다. 양 정수는 스택, added 및 오퍼랜드 스택상에 푸시된 그들의 합으로부터 팝된다. 보조계산기가 오퍼랜드 스택상에 위치될 수 있으며 단일 오퍼랜드의 결과는 다음 계산에 의해 사용될 수 있다.For example, the execution of the command iadd adds two integers together. The two integers are expected to be the two most significant words on the operand stack pushed by the previous instruction. Positive integers are popped from their sums pushed on the stack, added and operand stacks. A co-calculator can be placed on the operand stack and the result of a single operand can be used by the following calculation.

각각의 초기 데이터 타입는 그 타입의 오퍼랜드상에서 어떻게 연산할 것인지를 알고 있는 특정 명령을 가진다. 각 오퍼랜드는 2개의 위치를 요구하는 배정도 이중 오퍼랜드를 이상하고는 스택상의 단일위치를 요구한다.Each initial data type has a specific instruction that knows how to operate on that type of operand. Each operand requires a single location on the stack, more than a double precision operand that requires two locations.

오퍼랜드는 그들의 타입에 적합한 오퍼레이터로 연산되어야만 한다. 예를 들면, 2개의 오퍼랜드를 푸시하여 그들을 길게 처리하면 비합법적으로 된다. 이 제한은 바이트코드 입증자에 의해 선의 구현에서 강요된다. 그러나, 작은 수의 연산(dup 연산부호s and swap)은 타입에 관계없이 주어진 폭의 열 값으로서 실행시간 데이터 영역으로 연산한다.Operands must be computed with operators appropriate to their type. For example, pushing two operands to process them long makes it illegal. This restriction is enforced in the implementation of good by the bytecode verifier. However, a small number of operations (dup ops and swap) operate on the runtime data area as column values of a given width, regardless of type.

가상 머신 명령의 이하의 설명에 있어서, 오퍼랜드 스택상의 명령의 실행 효과는 좌측에서 우측으로 성장하는 스택을 구비한 그대로 표현되며, 각각은 32비트 워드로 분리되어 표현된다. 따라서:In the following description of the virtual machine instructions, the effect of the execution of the instructions on the operand stack is represented as it is with the stack growing from left to right, each represented separately by a 32 bit word. therefore:

stack: ..., value1, value2 ⇒ ..., value3 stack: ..., value1, value2 ⇒ ..., value3

연산의 바로 밑의 value1을 구비한 스택의 최상에 value2를 갖는 것에 의해 연산이 시작된다. 명령 실행의 결과로써, value1value2 는 스택으로부터 팝되며 명령에 의해 계산되어진 value3 으로 대체된다. 생략으로 표현된 스택의 나머지는 명령의 실행에 의해 영향을 받지 않는다.The operation is started by having value2 on top of the stack with value1 just below the operation. As a result of command execution, value1 and value2 are popped from the stack and replaced with value3 computed by the command. The rest of the stack, omitted, is not affected by the execution of the instruction.

배정도 및 이중 타입는 오퍼랜드상에 2개의 32비트 워드를 취한다:Double and double types take two 32-bit words on the operand:

stack: ..., ..., value-word1, value-word2 stack: ..., ..., value-word1, value-word2

이 명세서는 2개의 워드가 어떻게 64비트의 배정도 또는 이중 값으로부터 선택되었는지는 언급하지 않으며 단지 내부적으로 일정한 특정 구현만이 필요하다.This specification does not mention how two words were chosen from 64-bit double or double values, and only a specific implementation is needed internally.

1.5 실행 환경(Execution Environment)1.5 Execution Environment

명령 환경내에 포함된 정보는 동적 연결, 정상 매서드 복귀 및 이상 전파에 사용된다.Information contained within the command environment is used for dynamic linking, normal method return, and fault propagation.

1.5.1 동적 연결(Dynamic Linking)1.5.1 Dynamic Linking

실행 환경은 매서드 코드의 동적 연결을 지원하는 현재 매서드 및 현재 클래스를 위해 해석자 기호 테이블에 레퍼런스를 포함한다. 클래스는 호출되어지는 매서드에 대한 매서드를 위한 코드를 파일하며 부호로 액세스되어지도록 가변될 수 있다. 동적 연결은 동적 매서드 호출로 부호화 매서드 호출을 번역하며 아직 규정되지 않은 부호를 해석하는데 필요한 클래스를 로딩하며, 이들 가변의 실행 시간과 결합된 기억 구조에서 적절한 오프셋으로 가변 액세스를 변환한다.The execution environment includes a reference to the resolver symbol table for the current method and current class that support dynamic linking of the method code. The class files the code for the method for the method being called and can be changed to be accessed by sign. Dynamic linking translates encoding method calls into dynamic method calls, loads the classes needed to interpret undefined codes, and converts variable accesses to the appropriate offsets in the memory structure combined with these variable execution times.

이 매서드와 변형의 늦은 결합은 이 코드를 중단하는 매서드를 사용하는 다른 클래스로 변경된다.The late combination of this method and the transformation changes to another class that uses the method that breaks this code.

1.5.2 정상 매서드 복귀(Normal Method Return)1.5.2 Normal Method Return

현재 매서드의 실행이 정상적으로 완료되었다면, 값은 호출 매서드로 복귀된다. 이는 호출 매서드가 복귀 타입로 적절한 복귀 명령을 실행시킬 때 발생된다.If the execution of the current method completes successfully, the value is returned to the calling method. This happens when the calling method executes the appropriate return instruction with the return type.

실행 환경은 매서드 호출 명령을 스킵하도록 적절하게 증가된 호출기의 카운터 프로그램을 구비한 호출기의 레지스터를 재기억하는 경우에 사용된다. 실행은 그후 호출 매서드의 실행 환경으로 연속된다.The execution environment is used when re-memorizing the registers of the pager with the counter program of the pager appropriately incremented to skip method call instructions. Execution then continues to the execution environment of the calling method.

1.5.3 이상 및 에러 전파(Exception and Error Propagation)1.5.3 Exceptions and Error Propagation

버릴 수 있는 서브클래스의 에러 또는 이상으로서 JAVA에서 알려진 이상 조건은 이하의 이유로 인해 일어난다:Anomalies known to JAVA as errors or anomalies in discardable subclasses occur for the following reasons:

필요한 클래스 파일을 찾는데 실패한 것과 같은 동적 연결 실패;Dynamic link failures, such as failing to find the required class files;

널 포인터를 통한 레퍼런스와 같은 실행시간 에러;Runtime errors such as references through null pointers;

다른 스레드로부터 Thread.stop로 기동하는 것과 같은 비동기 사건; 및Asynchronous events such as starting with Thread.stop from another thread; And

기동 상태를 사용하는 프로그램.Program that uses the startup state.

이상이 발생할 때:When an abnormality occurs:

현재 매서드와 결합된 catch clauses 의 리스트가 검사된다. 각 캐시 구는 동적을 위해 명령 범위를 기술하고 조정하도록 이상의 타입를 기술하며, 그를 조정하도록 코드의 어드레스를 가진다.The list of catch clauses associated with the current method is examined. Each cache phrase describes the above types to describe and adjust the instruction range for dynamics, and has the address of the code to adjust it.

명령이 이상이 적절한 명령 범위내에 있고 이상 타입가 캐시 구를 조정하는 제와 타입의 서브타입를 일으키면 이상은 캐시 구를 매치한다. 매칭 캐시 구이 발견되었다면, 시스템은 특정 조정기에 분기된다. 조정기가 발견되지 않았다면, 처리는 현재 매서드의 네스트된 모든 캐시 구가 소비될 때까지 반복된다.An abnormality matches a cached phrase if the instruction is within the appropriate instruction range and the abnormal type results in a subtype of zero and type that controls the cached phrase. If a matching cache phrase is found, the system branches to a particular coordinator. If no coordinator is found, the process repeats until all nested cached phrases of the current method have been consumed.

리스트의 캐시 구의 오더는 중요하다. 가상 머신 실행은 첫 번째 매칭 캐시 구에 연속한다. JAVA 코드가 구성되었기 때문에 어떠한 프로그램 카운터 값에 대해 프로그램 카운터 값을 발생시키는 이상에 대해 바람직한(응용가능성을 포함하고 있는 최내부) 이상 조정자를 찾기 위한 선형 오더에서 검색될 수 있는 단일 리스트로 한가지 매서드에 대해 모든 이상 조정자를 소트하는 것이 가능하다. 캐시 구 매칭이 없다면 현재 매서드는 그의 결과로써 캐치되지 않은 이상을 가진다. 상기 매서드의 실행 상태가 호출되며 이 매서드는 실행 환경으로부터 재기억되며, 이 호출기에서 발생된 이상을 통하여 실행의 전파는 연속된다.The order of the cache phrase in the list is important. Virtual machine execution continues with the first matching cache phrase. Because the JAVA code is configured, a single list can be retrieved from the linear order to find the ideal (innermost containing applicability) anomaly adjuster for anomalies that generate program counter values for any program counter value. It is possible to sort all the ideal adjusters against. If there is no cache phrase match, the current method has an abnormality that is not caught as a result of it. The execution state of the method is called and this method is re-memorized from the execution environment, and propagation of execution continues through the abnormality generated in this pager.

1.5.4 추가 정보(Additinal Information)1.5.4 Additional Information

실행 환경은 디버깅 정보와 같은 추가의 구현-특정 정보로 확장될 수 있다.The execution environment can be extended with additional implementation-specific information such as debugging information.

1.6 가비지 수집 히프(Garbage Collected Heap)1.6 Garbage Collected Heap

JAVA 히프는 할당된 클래스 예시(오브젝트)로부터의 실행시간 데이터 영역이다. JAVA 언어는 무가치하게 수집되도록 설계되어 있어 프로그래머에게 명백하게 이 오브젝트를 미할당하는 능력을 주지 않는다. JAVA 언어는 무가치한 수집의 어떠한 특정 종류를 미리 제한하지 않으며: 다양한 알고리즘이 시스템의 요구에 따라 사용될 수 있다.JAVA heap is a runtime data area from an assigned class example (object). The JAVA language is designed to be valuelessly collected and does not give the programmer the ability to unassign this object explicitly. The JAVA language does not pre-restrict any particular kind of valueless collection: various algorithms can be used depending on the needs of the system.

1.7 매서드 영역(Method Area)1.7 Method Area

매서드 영역은 종래의 언어에서의 컴파일된 코드에 대한 기억 또는 UNIX 프로세서에서의 텍스트 세그먼트에 대해 아날로그적이다. 이는 매서드 코드(컴파일된 JAVA 코드)와 기호 데이터를 기억한다. 현재 JAVA 구현에 있어서, 매서드 코드는 미래에 공개 계획되어 있지만 무가치한 수집 힙의 일부분은 아니다.Method regions are analogous to memory for compiled code in conventional languages or text segments in UNIX processors. It stores method code (compiled JAVA code) and symbolic data. In the current JAVA implementation, the method code is planned for public in the future but is not part of the worthless collection heap.

1.8 JAVA 명령 세트(The JAVA Instruction Set) 1.8 The JAVA Instruction Set

JAVA 명령 세트내의 명령은 실행되어지는 연산을 특정화하는 1바이트 연산부호 및 연산에 의해 사용되어질 매개 변수 또는 데이터를 제공하는 0 이상의 operands로 구성되어 있다. 많은 명령은 오퍼랜드가 없으며, 단지 연산부호로만 구성되어 있다.An instruction in the JAVA instruction set consists of a one-byte opcode that specifies the operation to be executed and zero or more operands that provide the parameters or data to be used by the operation. Many instructions have no operands and consist only of opcodes.

가상 머신 실행의 내부 루프가 효과적이다:An inner loop of virtual machine execution is effective:

do {do {

연산부호형 패치Arithmetic patch

연산부호 값에 따른 작용 실행Execution of Action According to Operation Code

} while(할 것이 더 있음);} while (more to do);

추가 오퍼랜드의 수 및 크기는 연산부호에 의해 판정된다. 추가 오퍼랜드가 크기내에 1바이트 이상이면, big-endian 오더-high order byte first에 기억되어 있다. 예를 들면, 16비트 변수는 이하의 값의 2바이트로써 기억되어 있다:The number and size of additional operands is determined by the operation code. If the additional operand is more than one byte in size, it is stored in the big-endian order-high order byte first. For example, a 16-bit variable is stored as two bytes of the following value:

first_byte * 256 + second_bytefirst_byte * 256 + second_byte

바이트코드 명령 스트림은 그들의 명령내에 4바이트 2진수로 정렬되는 테이블스위치와 룩업스위치 명령인 실행을 구비한 단지 바이트 정열이다.A bytecode instruction stream is just a byte sequence with execution, which is a table switch and lookup switch instruction arranged in 4-byte binary numbers within their instructions.

이들 결정은 컴파일된 조밀한 JAVA 프로그램에 대한 가상 머신 코드를 유지하고 실행의 어떤 가능한 비용을 콤팩트화하는 의식 바이어스를 굴절시킨다.These decisions deflect conscious biases that keep the virtual machine code for the compiled compact JAVA program and compact any possible cost of execution.

1.9 제한(Limitation)1.9 Limitation

클래스당 상수 풀은 65535의 최대 엔트리를 가진다. 이는 단일 클래스의 전체 복잡성의 내부 한정으로서 작용한다.The constant pool per class has a maximum entry of 65535. This serves as an internal limitation of the overall complexity of a single class.

매서드당 코드의 양은 이상 테이블, 라인보호 테이블 및 로컬 변수 테이블내의 코드의 인덱스의 크기에 의해 65535 바이트로 한정되어 있다.The amount of code per method is limited to 65535 bytes by the size of the index of the code in the anomaly table, line protection table, and local variable table.

이 한정에서, 주해의 오직 다른 한정은 255로 한정된 매서드 호출내의 동의 워드수이다.In this limitation, the only other limitation of the annotation is the number of synonyms in the method call limited to 255.

2. 클래스 파일 포맷(Class File Format)2. Class File Format

이 장은 JAVA 클래스(.class) 파일 포맷을 기술한다.This chapter describes the JAVA class (.class) file format.

각 클래스 파일은 JAVA 클래스 또는 JAVA 인터페이스의 컴파일된 버전을 포함한다. 컴파일 JAVA 인터페이스는 이하의 명세서에 따르는 모든 클래스 파일을 처리할 수 있어야 한다.Each class file contains a compiled version of a JAVA class or JAVA interface. Compile The JAVA interface must be able to handle all class files according to the following specification.

JAVA 클래스 파일은 8비트 바이트의 스트림으로 구성되어 있다. 16비트와 32비트 모두는 각각 16비트 또는 32비트 바이트로 읽혀지는 것에 의해 구성된다. 바이트는 high gytes come first인 네트워크(big-endian)오더와 함께 결합되어 있다. 이 포맷은 JAVA.io.DataInput과 JAVA.io.DataOutput 인터페이스 및 JAVA.io.DataInputStream과 JAVA.io.DataOutpotStream과 같은 클래스로 지원된다.JAVA class files consist of an 8-bit byte stream. Both 16-bit and 32-bit are configured by reading into 16-bit or 32-bit bytes, respectively. The bytes are combined with a big-endian order that is high gytes come first. This format is supported by the JAVA.io.DataInput and JAVA.io.DataOutput interfaces and classes such as JAVA.io.DataInputStream and JAVA.io.DataOutpotStream.

클래스 파일 포맷은 구조 표기를 사용하여 기술한다. 구조내의 연속 충전되는 삽입 어구 또는 정렬 없이 외부적으로 표현되어 나타난다. 가변 크기 어레이, 가변 크기 요소는 종종 호출된 테이블이며 이들 구조내의 공통 위치이다.Class file formats are described using structure notation. It is represented externally without any consecutively inserted insertion phrases or alignments within the structure. Variable size arrays, variable size elements are often called tables and are common locations within these structures.

타입 u1, u2 및 u4는 readUnsignedByte, readUnsignedShort 및 JAVA.io.DataInput 인터페이스의 readInt와 같은 매서드에 의해 읽혀지는 부호 없는 1-, 2-, 또는 4바이트 양을 각각 의미한다.Types u1, u2, and u4 mean the unsigned 1-, 2-, or 4-byte amounts, respectively, read by methods such as readUnsignedByte, readUnsignedShort, and readInt of the JAVA.io.DataInput interface.

2.1 포맷(Format)2.1 Format

다음의 의사-구조(pseudo-structure)는 클래스 파일의 포맷의 가장 중요한 기술을 설명하고 있다:The following pseudo-structure describes the most important description of the format of a class file:

ClassFile {ClassFile {

u4 magic;          u4 magic;

u2 minor_version;          u2 minor_version;

u2 major_version;          u2 major_version;

u2 constant_pool_count;          u2 constant_pool_count;

cp_info constant_pool[constant_pool_count-1];          cp_info constant_pool [constant_pool_count-1];

u2 access_flags;          u2 access_flags;

u2 this class;          u2 this class;

u2 super_class;          u2 super_class;

u2 interfaces_count;          u2 interfaces_count;

u2 interfaces[interfaces_count];          u2 interfaces [interfaces_count];

u2 fields_count;          u2 fields_count;

field_info fields[fields_count];          field_info fields [fields_count];

u2 methods_count;          u2 methods_count;

method_info methods[methods_count];          method_info methods [methods_count];

u2 attributes_count;          u2 attributes_count;

attribute_info attribute[attribute_count];          attribute_info attribute [attribute_count];

}}

magicmagic

이 필드는 0xCAFEBABE 값을 가져야 한다.This field must have a value of 0xCAFEBABE.

minor_version, major_versionminor_version, major_version

이 필드들은 이러한 클래스 파일을 생성한 JAVA 컴파일러의 버전 번호를 포함한다. 가상 머신의 구현은 일반적으로 특정 메이저 버전번호의 마이너 버전번호 0-n의 일부 범위를 지원할 것이다. 만일 마이너 버전번호가 증가되면, 새로운 코드는 구 가상 머신상에서 실행하지 않을 것이지만, 최대 n+1 버전을 실행할 수 있는 새로운 가상 머신를 만드는 것이 가능하다.These fields contain the version number of the JAVA compiler that created these class files. Implementations of virtual machines will generally support some range of minor version numbers 0-n of a particular major version number. If the minor version number is incremented, the new code will not run on the old virtual machine, but it is possible to create a new virtual machine that can run up to n + 1 versions.

주 버전 번호의 변경은 어떠한 매서드로 구 메이저 버전을 지원할 수 없는 다른 가상 머신를 요구하는 메이저 비호환성 변경을 나타낸다.Changes in major version numbers indicate major incompatibilities that require other virtual machines that cannot support older major versions with any method.

현재 메이저 버전번호는 45이고; 현재 마이너 버전번호는 3이다.The current major version number is 45; The minor version number is currently 3.

constant_pool_countconstant_pool_count

이 필드는 클래스 파일내 상수 풀내 엔트리의 개수를 나타낸다.This field indicates the number of entries in the constant pool in the class file.

constant_poolconstant_pool

상수 풀은 값의 테이블이다. 이들 값은 클래스 구조 또는 코드에 의해 언급되는 여러 문자열 상수, 클래스명, 필드명등이 된다.The constant pool is a table of values. These values are the string constants, class names, field names, etc. that are mentioned by the class structure or code.

constant_pool[0]은 항상 컴파일러에 의해 사용되지 않고, 어떠한 목적으로 구현에 사용될 수 있다.constant_pool [0] is not always used by the compiler, but can be used for implementation for any purpose.

constant_pool[0] 엔트리 1 내지 constant_pool_count-1의 각각은 2.3장에 설명된 바와 같은 제 1 "태그" 바이트로 포맷이 주어지는 가변 길이 엔트리이다.Each of the constant_pool [0] entries 1 through constant_pool_count-1 is a variable length entry given the format of the first " tag " byte as described in Section 2.3.

access_flagsaccess_flags

이 필드는 클래스, 매서드 및 필드 선언에 사용된 최대 16 변경자의 마스크를 포함하고 있다. 후술된 field_info 및 method_info의 유사한 필드상에서 동일한 인코딩이 사용된다. 다음에 인코딩이 있다:This field contains a mask of up to 16 modifiers used in class, method, and field declarations. The same encoding is used on similar fields of field_info and method_info described below. Here is the encoding:

플래그명 Flag Name  value 의미meaning 사용주체Subject of use ACC_PUBLIC ACC_PUBLIC 0x0001 0x0001 모두에게 가시적임Visible to all 클래스, 매서드, 변수Classes, methods, variables ACC_PRIVATE ACC_PRIVATE 0x0002 0x0002 정의된 클래스에만 가시적임Visible only to defined classes 매서드, 변수Methods, variables ACC_PROTECTED ACC_PROTECTED 0x0004 0x0004 서브클래스에게 가시적임Visible to subclasses 매서드, 변수Methods, variables ACC_STATIC ACC_STATIC 0x0008 0x0008 변수 또는 매서드가 정적임Variable or method is static 매서드, 변수Methods, variables ACC_FINAL ACC_FINAL 0x0010 0x0010 초기화이후에 추가적인 하위분류, 중첩, 또는 지정 없음No additional subclasses, nesting, or assignments after initialization 클래스, 매서드,변수Class, method, variable ACC_SYNCHRONIZED ACC_SYNCHRONIZED 0x0020 0x0020 모니터 록에서 랩 사용Using Labs with Monitor Lock 매서드Method ACC_VOLATILE ACC_VOLATILE 0x0040 0x0040 캐시할 수 없음Can't cache 변수variable ACC_TRANSIENT ACC_TRANSIENT 0x0080 0x0080 영구 객체 관리자에 의한 쓰기 또는 읽기 없음No writes or reads by the persistent object manager 변수variable ACC_NATIVE ACC_NATIVE 0x0100 0x0100 JAVA이외의 언어로 구현됨Implemented in languages other than JAVA 매서드Method ACC_INTERFACE ACC_INTERFACE 0x0200 0x0200 인터페이스interface 클래스class ACC_ABSTRACT ACC_ABSTRACT 0x0400 0x0400 제공된 본체 없음No body provided 클래스, 매서드Class, methods

this_classthis_class

이 필드는 상수 풀내 인덱스이다; constant_pool[this_class]는 CONSTANT_class이어야 한다.This field is an index in the constant pool; constant_pool [this_class] must be CONSTANT_class.

super_classsuper_class

≤이 필드는 상수 풀내 인덱스이다. 만일 super_class의 값이 제로가 아니라면, constant_pool[super_class]는 클래스이어야 하고, 상수 풀내에 이러한 클래스의 수퍼클래스의 인덱스를 제공한다.This field is the index in the constant pool. If super_class is nonzero, constant_pool [super_class] must be a class, providing the index of the superclass of this class in the constant pool.

만일 super_class의 값이 제로라면, 정의되는 클래스는 JAVA.lang.Object이어야 하고, 어떠한 수퍼클래스도 가져서는 안된다.If the value of super_class is zero, the class defined must be JAVA.lang.Object and must not have any superclass.

interfaces_countinterfaces_count

이 필드는 이 클래스가 구현하는 인터페이스의 개수를 제공한다.This field provides the number of interfaces this class implements.

interfacesinterfaces

이 테이블내 각각의 값은 상수 풀내 인덱스이다. 만일 테이블 값이 제로가 아니라면(0≤i<interfaces_count인 경우 interface[i]!=0), constant_pool[interfaces[i]]는 이 클래스가 구현하는 인터페이스이어야 한다.Each value in this table is an index in the constant pool. If the table value is nonzero (interface [i]! = 0 if 0≤i <interfaces_count), constant_pool [interfaces [i]] must be an interface implemented by this class.

fields_countfields_count

이 필드는 이 클래스에 의해 정의된 동적 및 정적 모두의 예시 변수의 개수를 제공한다. 상기 필드 테이블은 이 클래스에 의해 묵시적으로 정의되는 변수만을 포함한다. 그것은 이 클래스로부터 액세스 가능하지만 수퍼클래스로부터 상속되는 그들 예시 변수들을 포함하지 않는다.This field provides the number of example variables, both dynamic and static, defined by this class. The field table contains only variables that are implicitly defined by this class. It is accessible from this class but does not include those example variables inherited from the superclass.

fieldsfields

이 테이블내 각각의 값은 좀더 완벽한 상기 클래스내 필드의 설명이 된다. field_info 구조에 대한 추가 정보를 얻으려면 2.4 장을 참고하라.Each value in this table is a more complete description of the fields in the class. See Section 2.4 for more information about the field_info structure.

methods_countmethods_count

이 필드는 이 클래스에 의해 정의된 정적 및 동적 매서드의 개수를 나타낸다. 이 테이블은 이 클래스에 의해 묵시적으로 정의되는 매서드만을 포함한다. 상속된 매서드는 포함하지 않는다.This field indicates the number of static and dynamic methods defined by this class. This table contains only those methods implicitly defined by this class. Inherited methods are not included.

methodsmethods

이 테이블내 각각의 값은 좀더 완벽한 상기 클래스내 매서드의 설명이 된다. method_info 구조에 관한 추가 정보를 얻으려면 2.5장을 참고하라.Each value in this table is a more complete description of the methods in the class. See Section 2.5 for more information about the method_info structure.

attributes_countattributes_count

이 필드는 이 클래스에 관한 추가 속성의 개수를 나타낸다.This field indicates the number of additional attributes for this class.

attributesattributes

클래스는 그것과 관련된 임의의 개수의 선택적 속성을 가질 수 있다. 현재, 인지된 클래스 속성만이 "SourceFile" 속성이 되고, SourceFile 속성은 이 클래스 파일이 컴파일된 소스 파일명을 나타낸다.A class can have any number of optional attributes associated with it. Currently, only recognized class attributes become "SourceFile" attributes, and the SourceFile attribute represents the name of the source file from which this class file is compiled.

2.2 기호(signatures)2.2 signatures

기호는 어레이, 필드 또는 매서드의 타입를 나타내는 문자열이다. The symbol is a string representing the type of an array, field or method.

기호 필드는 변수의 값 또는 기능에의 인수의 값을 나타낸다. 그것은 다음의 문법에 의해 생성된 일련의 바이트가 된다 :The symbol field indicates the value of the variable or the argument to the function. It is a sequence of bytes generated by the following syntax:

<field_signature> ::= <field_type><field_signature> :: = <field_type>

<field_type> ::= <base_type>|<object_type>|<array_type><field_type> :: = <base_type> | <object_type> | <array_type>

<base_type> ::= B|C|D|F|I|J|S|Z<base_type> :: = B | C | D | F | I | J | S | Z

<object_type> ::= L<fullclassname>;<object_type> :: = L <fullclassname>;

<array_type> ::= <optional_size><field_type><array_type> :: = <optional_size> <field_type>

<optional_size> ::= [0-9]<optional_size> :: = [0-9]

기본 타입의 의미는 다음과 같다.The meaning of the basic types is as follows:

B byte 지정된 바이트B byte specified byte

C char 문자C char character

D double 배정도 IEEE 부동수D double double IEEE float

F float 단정도 IEEE 부동수F float single-precision IEEE float

I int 정수I int integer

J long 배정도 정수J long double integer

L<fullclassname>; ... 주어진 클래스의 오브젝트L <fullclassname>; ... object of a given class

S short 지정된 단정도수S short Specified single precision

Z boolean 참 또는 거짓Z boolean true or false

[<field sig> ... 어레이[<field sig> ... array

반환 타입 기호는 매서드로부터의 값의 반환을 나타낸다. 그것은 다음의 문법에 따른 일련의 바이트가 된다:The return type symbol indicates the return of a value from a method. It is a sequence of bytes according to the following syntax:

<return_signature> ::= <field_type> | V<return_signature> :: = <field_type> | V

문자 V는 매서드가 어떠한 값도 반환하지 않는다는 것을 나타낸다. 그렇지 않으면, 기호는 반환값의 타입를 나타낸다.The letter V indicates that the method does not return any value. Otherwise, the symbol indicates the type of return value.

인수 기호는 매서드로 통과된 인수를 나타낸다:The argument symbol indicates the argument passed to the method:

<argument_signature> ::= <field_type><argument_signature> :: = <field_type>

매서드 기호는 매서드가 원하는 인수 및 매서드가 반환하는 값을 나타낸다.Method symbols indicate the arguments that the method wants and the values that the method returns.

<method_signature> ::= (<arguments_signature>)<return_signature><method_signature> :: = (<arguments_signature>) <return_signature>

<arguments_signature> ::= <argument_signature>* <arguments_signature> :: = <argument_signature> *

2.3 상수 풀(Constant Pool)2.3 Constant Pool

상수 풀내 각각의 아이템은 1바이트 태그로 시작한다. 아래의 테이블은 유효 태그 및 그 값을 나열하고 있다.Each item in the constant pool starts with a single byte tag. The table below lists valid tags and their values.

상수 타입 Constant type     value CONSTANT_Class CONSTANT_Fieldref CONSTANT_Methodref CONSTANT_InterfaceMethodref CONSTANT_String CONSTANT_Integer CONSTANT_Float CONSTANT_Long CONSTANT_Double CONSTANT_NameAndType CONSTANT_Utf8 CONSTANT_Unicode CONSTANT_Class CONSTANT_Fieldref CONSTANT_Methodref CONSTANT_InterfaceMethodref CONSTANT_String CONSTANT_Integer CONSTANT_Float CONSTANT_Long CONSTANT_Double CONSTANT_NameAndType CONSTANT_Utf8 CONSTANT_Unicode 7 9 10 11 8 3 4 5 6 12 1 2         7 9 10 11 8 3 4 5 6 12 1 2

그러면, 각각의 태그 바이트는 지정 상수에 관한 추가 정보를 제공하는 하나 또는 그 이상의 바이트에 따른다.Each tag byte then follows one or more bytes that provide additional information about the specified constant.

2.3.1 CONSTANT_Class2.3.1 CONSTANT_Class

CONSTANT_Class는 클래스 또는 인터페이스를 나타내기 위해 제공된다.CONSTANT_Class is provided to represent a class or interface.

CONSTANT_Class_info {CONSTANT_Class_info {

u1 tag;     u1 tag;

u2 name_index;     u2 name_index;

}}

tagtag

태그는 CONSTANT_Class 값을 가질 것이다.The tag will have a value of CONSTANT_Class.

name_indexname_index

constant_pool[name_index]는 클래스의 문자열 명을 제공하는 CONSTANT_Utf8이다.constant_pool [name_index] is CONSTANT_Utf8 giving the string name of the class.

어레이가 오브젝트이기 때문에, 연산부호 anewarray 및 multianewarray는 상수 풀내 CONSTANT_Class 아이템을 통해 어레이 "classes"을 참조할 수 있다. 이러한 경우, 클래스명은 그 기호가 된다. 예를 들어, int[][]를 위한 클래스명은 [[I , Thread[]를 위한 클래스명은 "[LJAVA.lang.Thread;"가 된다.Because the array is an object, the opcodes anewarray and multianewarray can refer to the array "classes" through the CONSTANT_Class item in the constant pool. In this case, the class name is its symbol. For example, the class name for int [] [] is [[I, the class name for Thread [] is "[LJAVA.lang.Thread;".

2.3.2 CONSTANT_{Fieldref,Methodref,InterfaceMethodref}2.3.2 CONSTANT_ {Fieldref, Methodref, InterfaceMethodref}

필드, 매서드 및 인터페이스 매서드는 유사한 구조에 의해 표현된다.Fields, methods, and interface methods are represented by similar structures.

CONSTANT_Fieldref_info {CONSTANT_Fieldref_info {

u1 tag;    u1 tag;

u2 class_index;    u2 class_index;

u2 name_and_type_index;    u2 name_and_type_index;

}}

CONSTANT_Methodref_info {CONSTANT_Methodref_info {

u1 tag;    u1 tag;

u2 class_index;    u2 class_index;

u2 name_and_type_index;    u2 name_and_type_index;

}}

CONSTANT_InterfaceMethodref_info {CONSTANT_InterfaceMethodref_info {

u1 tag;    u1 tag;

u2 class_index;    u2 class_index;

u2 name_and_type_index;    u2 name_and_type_index;

}}

tagtag

태그는 CONSTANT_Fieldref,CONSTANT_Methodref,CONSTANT_InterfaceMethodref 값을 가질 것이다.The tag will have the values CONSTANT_Fieldref, CONSTANT_Methodref, and CONSTANT_InterfaceMethodref.

class_indexclass_index

constant_pool[class_index]는 필드 또는 매서드를 내포하는 인터페이스 또는 클래스명을 제공하는 CONSTANT_Class 타입의 엔트리가 될 것이다. constant_pool [class_index] will be an entry of type CONSTANT_Class that provides the interface or class name containing the field or method.

CONSTANT_Fieldref 및 CONSTANT_Methodref에서, CONSTANT_Class 아이템은 실제 클래스가 되어야 한다. CONSTANT_InterfaceMethodref에서, 아이템은 제공된 매서드를 구현하기 위해 지원하는 인터페이스가 되어야 한다.In CONSTANT_Fieldref and CONSTANT_Methodref, the CONSTANT_Class item must be a real class. In the CONSTANT_InterfaceMethodref, the item must be the supporting interface to implement the provided method.

name_and_type_indexname_and_type_index

constant_pool[name_and_type_index]는 CONSTANT_NameAndType 타입의 엔트리가 될 것이다. 이 상수 풀 엔트리는 필드 또는 매서드의 기호 및 이름을 나타낸다.constant_pool [name_and_type_index] will be an entry of type CONSTANT_NameAndType. This constant pool entry represents the symbol and name of the field or method.

2.3.3 CONSTANT_String2.3.3 CONSTANT_String

CONSTANT_String은 짜여진 타입의 문자열의 상수 오브젝트를 나타내기 위해 사용된다.CONSTANT_String is used to represent a constant object of type string.

CONSTANT_String_info {CONSTANT_String_info {

u1 tag;    u1 tag;

u2 string_index;    u2 string_index;

}}

tagtag

태그는 CONSTANT_String 값을 가질 것이다.The tag will have a value of CONSTANT_String.

string_indexstring_index

constant_pool[string_index]는 문자열 오브젝트가 초기화되는 값을 제공하는 CONSTANT_utf8 문자열이다.constant_pool [string_index] is a CONSTANT_utf8 string that provides the value from which the string object is initialized.

2.3.4 CONSTANT_Integer 및 CONSTANT_Float2.3.4 CONSTANT_Integer and CONSTANT_Float

CONSTANT_Integer 및 CONSTANT_Float는 4바이트 상수를 나타낸다.CONSTANT_Integer and CONSTANT_Float represent 4-byte constants.

CONSTANT_Integer_info {CONSTANT_Integer_info {

u1 tag;    u1 tag;

u4 bytes;    u4 bytes;

}}

CONSTANT_Float_info {CONSTANT_Float_info {

u1 tag;    u1 tag;

u4 bytes;    u4 bytes;

}}

tagtag

태그는 CONSTANT_Integer 또는 CONSTANT_Float 값을 가질 것이다.The tag will have a value of CONSTANT_Integer or CONSTANT_Float.

bytesbytes

정수에서, 4바이트가 정수값이 된다. 실수에서, 그들은 IEEE 754 표준 표시의 부동소수점값이다. 이들 바이트는 네트워크 순서(높은 바이트 먼저)에 따른다.In integers, 4 bytes are integer values. In real terms, they are floating point values in the IEEE 754 standard representation. These bytes are in network order (high byte first).

2.3.5 CONSTANT_Long 및 CONSTANT_Double2.3.5 CONSTANT_Long and CONSTANT_Double

CONSTANT_Long 및 CONSTANT_Double는 8바이트 상수를 나타낸다.CONSTANT_Long and CONSTANT_Double represent 8-byte constants.

CONSTANT_Long-info {CONSTANT_Long-info {

u1 tag;    u1 tag;

u4 high_bytes;    u4 high_bytes;

u4 low_bytes;    u4 low_bytes;

}}

CONSTANT_Double_info {CONSTANT_Double_info {

u1 tag;    u1 tag;

u4 high_bytes;    u4 high_bytes;

u4 low_bytes;    u4 low_bytes;

}}

모든 8바이트 상수는 상수 풀내 두 개 스폿을 차지한다. 만일 이것이 상수 풀내에서 nth 아이테이라면, 다음 아이템은 n+2로 번호가 매겨질 것이다.Every 8-byte constant occupies two spots in the constant pool. If this is n th items in the constant pool, the next item will be numbered n + 2.

tagtag

태그는 CONSTANT_Long 또는 CONSTANT_Double 값을 가질 것이다.The tag will have a value of CONSTANT_Long or CONSTANT_Double.

high_bytes, low_byteshigh_bytes, low_bytes

CONSTANT_Long에서, 64비트 값은 (high_bytes << 32) +low_bytes가 된다.In CONSTANT_Long, the 64-bit value is (high_bytes << 32) + low_bytes.

CONSTANT_Double에서, 64비트 값의 high_bytes 및 low_bytes는 함께 표준 IEEE 754 표시의 배정도 부동소수점수를 나타낸다.In CONSTANT_Double, high_bytes and low_bytes of 64-bit values together represent double-precision floating point numbers of the standard IEEE 754 representation.

2.3.6 CONSTANT_NameAndType2.3.6 CONSTANT_NameAndType

CONSTANT_NameAndType은 그것이 속하는 클래스를 나타내지 않고서 필드 또는 매서드를 표현하기 위해 사용된다.CONSTANT_NameAndType is used to represent a field or method without indicating the class to which it belongs.

CONSTANT_NameAndType_info {CONSTANT_NameAndType_info {

u1 tag;    u1 tag;

u2 name_index;    u2 name_index;

u2 signature_index;    u2 signature_index;

}}

tagtag

태그는 CONSTANT_NameAndType 값을 가질 것이다.The tag will have a value of CONSTANT_NameAndType.

name_indexname_index

constant_pool[name_index]는 필드 또는 매서드명을 제공하는 CONSTANT_Utf8 문자열이다.constant_pool [name_index] is a CONSTANT_Utf8 string that provides the field or method name.

signature_indexsignature_index

constant_pool[signature_index]는 필드 또는 매서드의 기호를 제공하는 CONSTANT_Utf8 문자열이다.constant_pool [signature_index] is a CONSTANT_Utf8 string that provides the symbol of the field or method.

2.3.7 CONSTANT_Utf8 및 CONSTANT_Unicode2.3.7 CONSTANT_Utf8 and CONSTANT_Unicode

CONSTANT_Utf8 및 CONSTANT_Unicode는 상수 문자열 값을 표시하기 위해 사용된다.CONSTANT_Utf8 and CONSTANT_Unicode are used to represent constant string values.

CONSTANT_Utf8 문자열은 비어있지 않은 ASCII 문자만을 내포하는 문자열이 문자당 1바이트만을 사용하여 표시될 수 있도록 "엔코드"되지만, 최대 16비트의 문자까지 표시될 수 있다.The CONSTANT_Utf8 string is "encoded" so that strings containing only non-empty ASCII characters can be displayed using only one byte per character, but up to 16-bit characters can be displayed.

0x0001 내지 0x007F 범위내 모든 문자들은 하나의 바이트로 표시된다:All characters in the range 0x0001 to 0x007F are represented by one byte:

빈 문자(0x0000) 및 0x0080 내지 0x07FF 범위의 문자는 한 쌍의 두 개 바이트로 표시된다.Empty characters (0x0000) and characters in the range 0x0080 to 0x07FF are represented by a pair of two bytes.

0x0800 내지 0xFFFF 범위의 문자는 3바이트로 표시된다:Characters in the range 0x0800 to 0xFFFF are represented by 3 bytes:

이러한 포맷과 "표준" UTF-8 포맷간에는 두 가지 차이가 있다. 첫째, 빈 바이트(0x00)는 1바이트보다 2바이트 포맷으로 인코드되어, 문자열이 빈 곳을 갖지 않도록 한다. 둘째, 1바이트, 2바이트 및 3바이트 포맷만이 사용된다. 더 긴 포맷은 인식하지 않는다.There are two differences between this format and the "standard" UTF-8 format. First, empty bytes (0x00) are encoded in a two-byte format rather than one, so that the string does not have a space. Second, only 1 byte, 2 byte and 3 byte formats are used. Longer formats are not recognized.

CONSTANT_Utf8_info {CONSTANT_Utf8_info {

u1 tag;    u1 tag;

u2 length;    u2 length;

u1 bytes[length];    u1 bytes [length];

}}

CONSTANT_Unicode_info {CONSTANT_Unicode_info {

u1 tag;    u1 tag;

u2 length;    u2 length;

u2 bytes[length];    u2 bytes [length];

}}

tagtag

태그는 CONSTANT_Utf8 또는 CONSTANT_Unicode 값을 가질 것이다.The tag will have a value of CONSTANT_Utf8 or CONSTANT_Unicode.

lengthlength

문자열내 바이트의 수. 이들 문자열은 종료된 빈곳이 아니다.Number of bytes in string. These strings are not empty spaces.

bytesbytes

문자열의 실제 바이트.The actual byte of the string.

2.4 Fields2.4 Fields

각각의 필드를 위한 정보는 즉시 클래스 파일내 field_count 필드에 이어진다. 각각의 필드는 가변 길이 field_info 구조에 의해 설명된다. 이 구조의 포맷은 다음과 같다:The information for each field immediately follows the field_count field in the class file. Each field is described by a variable length field_info structure. The format of this structure is as follows:

field_info {field_info {

u2 access_flags;     u2 access_flags;

u2 name_index;     u2 name_index;

u2 signature_index;     u2 signature_index;

u2 attributes_count;     u2 attributes_count;

attribute_info attributes[attribute_count];     attribute_info attributes [attribute_count];

}}

access_flagsaccess_flags

이것은 다양한 특성 및 그들이 다른 클래스에서 매서드에 의해 액세스할 수 있는 매서드를 설명하기 위해 클래스, 매서드 및 필드에 의해 사용된 한 세트의 16 플래그이다. This is a set of 16 flags used by classes, methods, and fields to describe the various properties and methods they can access by methods in other classes.

필드를 위해 설정될 수 있는 가능한 필드로 ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_VOLATILE, 및 ACC_TRANSIENT가 있다.Possible fields that can be set for the field are ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_VOLATILE, and ACC_TRANSIENT.

적어도 ACC_PUBLIC, ACC_PROTECTED 및 ACC_PRIVATE중의 하나는 어떠한 매서드를 위해 설정될 수 있다.At least one of ACC_PUBLIC, ACC_PROTECTED and ACC_PRIVATE may be set for any method.

name_indexname_index

constant_pool[name_index]는 필드명인 CONSTANT_Utf8 문자열이다.constant_pool [name_index] is a field name CONSTANT_Utf8.

signature_indexsignature_index

constant_pool[signature_index]는 필드 기호인 CONSTANT_Utf8 문자열이다. 기호에 관한 추가정보를 얻으려면 "기호"장을 참고하라.constant_pool [signature_index] is a CONSTANT_Utf8 string that is a field symbol. See the "Symbols" chapter for more information about symbols.

attributes_countattributes_count

이 값은 이 필드에 관한 추가 속성의 수를 나타낸다.This value indicates the number of additional attributes for this field.

attributesattributes

필드는 그것과 관련된 임의의 수의 선택적 속성을 가질 수 있다. 현재, 인지된 필드 속성만이 "ConstantValue" 속성이 되고, ConstantValue 속성은 이 필드가 스태틱 상수임을 나타내고, 그 필드의 상수값을 나타낸다.A field can have any number of optional attributes associated with it. Currently, only recognized field attributes become "ConstantValue" attributes, and the ConstantValue attribute indicates that this field is a static constant and indicates the constant value of that field.

어떠한 다른 속성은 스킵된다.Any other attribute is skipped.

2.5 Methods2.5 Methods

각각의 매서드를 위한 정보는 즉시 클래스 파일내 method_count 필드에 이어진다. 각각의 매서드는 가변 길이 method_info 구조에 의해 설명된다. 구조는 다음의 포맷을 갖는다:The information for each method immediately follows the method_count field in the class file. Each method is described by a variable length method_info structure. The structure has the following format:

method_info {method_info {

u2 access_flags;      u2 access_flags;

u2 name_index;      u2 name_index;

u2 signature_index;      u2 signature_index;

u2 attributes_count;      u2 attributes_count;

attribute_info attributes[attribute_count];      attribute_info attributes [attribute_count];

}}

access_flagsaccess_flags

이것은 다양한 특성 및 그들이 다른 클래스에서 매서드에 의해 액세스할 수 있는 매서드를 설명하기 위해 클래스, 매서드 및 필드에 의해 사용된 한 세트의 16 플래그이다. 이 필드내에 다양한 비트를 제공하는 "Access Flags" 테이블 참조.This is a set of 16 flags used by classes, methods, and fields to describe the various properties and methods they can access by methods in other classes. See the "Access Flags" table for providing various bits in this field.

매서드를 위해 설정될 수 있는 가능한 필드로 ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_NATIVE 및 ACC_ABSTRACT가 있다.Possible fields that can be set for the method are ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_NATIVE, and ACC_ABSTRACT.

적어도 ACC_PUBLIC, ACC_PROTECTED 및 ACC_PRIVATE중의 하나는 어떠한 매서드를 위해 설정될 수 있다.At least one of ACC_PUBLIC, ACC_PROTECTED and ACC_PRIVATE may be set for any method.

name_indexname_index

constant_pool[name_index]는 매서드명을 제공하는 CONSTANT_Utf8 문자열이다.constant_pool [name_index] is a CONSTANT_Utf8 string that provides the method name.

signature_indexsignature_index

constant_pool[signature_index]는 필드 기호를 제공하는 CONSTANT_Utf8 문자열이다. 기호에 관한 추가정보를 얻으려면 "기호"장을 참고하라.constant_pool [signature_index] is a CONSTANT_Utf8 string that provides the field symbol. See the "Symbols" chapter for more information about symbols.

attributes_countattributes_count

이 값은 이 필드에 관한 추가 속성의 수를 나타낸다.This value indicates the number of additional attributes for this field.

attributesattributes

필드는 그것과 관련된 임의의 수의 선택적 속성을 가질 수 있다. 각각의 속성은 이름 및 다른 추가 정보를 갖는다. 현재, 인지된 필드 속성만이 "Code" 및 "Exceptions" 속성이 되고, Code 및 Exceptions 속성은 각각 이 매서드를 수행하기 위해 실행되는 바이트코드 및 매서드의 실행 결과가 되도록 선언되는 JAVA 예외들을 설명한다.A field can have any number of optional attributes associated with it. Each attribute has a name and other additional information. Currently, only recognized field attributes become "Code" and "Exceptions" attributes, and the Code and Exceptions attributes describe the JAVA exceptions declared to be the bytecode executed to perform this method and the execution result of the method, respectively.

어떠한 다른 속성은 스킵된다.Any other attribute is skipped.

2.6 Attributes2.6 Attributes

속성은 클래스 포맷내 여러 다른 위치에서 사용된다. 모든 속성은 다음과 같은 포맷을 갖는다:Attributes are used in different places in the class format. All properties have the following format:

GenericAttribute_info {GenericAttribute_info {

u2 attribute_name;     u2 attribute_name;

u4 attribute_length;     u4 attribute_length;

u1 info[attribute_length];     u1 info [attribute_length];

}}

attribute_name은 클래스의 상수 풀내 16비트 인덱스이다; constant_pool[attribute_name]의 값은 속성명을 제공하는 CONSTANT_Utf8 문자열이다. 필드 attribute_length는 잇따른 정보의 길이를 바이트로 나타낸다. 이 길이는 6바이트의 attribute_name 및 attribute_length을 포함하지 않는다.attribute_name is a 16-bit index in the constant pool of the class; The value of constant_pool [attribute_name] is a CONSTANT_Utf8 string that provides the attribute name. The field attribute_length indicates the length of subsequent information in bytes. This length does not include attribute_name and attribute_length of 6 bytes.

다음의 텍스트에서, 속성을 받아들일 때마다 현재 이해되는 속성명을 제공한다. 앞으로, 속성이 좀더 추가될 것이다. 클래스 파일 리더(reader)는 스킵하는 것이 요구되고, 그들이 이해할 수 없는 어떠한 속성내 정보는 무시한다.In the following text, each time you accept an attribute, you provide the attribute name currently understood. In the future, more attributes will be added. Class file readers are required to skip and ignore information in any attributes they do not understand.

2.6.1 SourceFile2.6.1 SourceFile

"SourceFile" 속성은 다음의 포맷을 갖는다:The "SourceFile" property has the following format:

SourceFile_attribute {SourceFile_attribute {

u2 attribute_name_index;     u2 attribute_name_index;

u4 attribute_length;     u4 attribute_length;

u2 sourcefile_index;     u2 sourcefile_index;

}}

attribute_name_indexattribute_name_index

constant_pool[attribute_name_index]는 CONSTANT_Utf8 문자열 "SourceFile"이다. constant_pool [attribute_name_index] is the CONSTANT_Utf8 string "SourceFile".

attribute_lengthattribute_length

SourceFile_attribute의 길이는 2이어야 한다.The length of the SourceFile_attribute must be 2.

sourcefile_indexsourcefile_index

constant_pool[sourcefile_index]는 이 클래스 파일이 컴파일된 소스 파일을 제공하는 CONSTANT_Utf8 문자열이다.constant_pool [sourcefile_index] is the CONSTANT_Utf8 string that provides the source file from which this class file was compiled.

2.6.2 ConstantValue2.6.2 ConstantValue

"ConstantValue" 속성은 다음의 포맷을 갖는다:The "ConstantValue" attribute has the following format:

ConstantValue_attribute {ConstantValue_attribute {

u2 attribute_name_index;     u2 attribute_name_index;

u4 attribute_length;     u4 attribute_length;

u2 constantvalue_index;     u2 constantvalue_index;

}}

attribute_name_indexattribute_name_index

constant_pool[attribute_name_index]는 CONSTANT_Utf8 문자열 "ConstantValue"이다. constant_pool [attribute_name_index] is the CONSTANT_Utf8 string "ConstantValue".

attribute_lengthattribute_length

ConstantValue_attribute의 길이는 2이어야 한다.The length of ConstantValue_attribute must be 2.

constantvalue_indexconstantvalue_index

constant_pool[constantvalue_index]는 이 필드를 위한 상수값을 제공한다.constant_pool [constantvalue_index] provides a constant value for this field.

상수 풀 엔트리는 다음의 테이블에 도시된 바와 같이, 필드에 적절한 타입 중의 하나가 되어야 한다.The constant pool entry must be one of the appropriate types for the field, as shown in the following table.

long long CONSTANT_Long CONSTANT_Long float float CONSTANT_Float CONSTANT_Float double double CONSTANT_Double CONSTANT_Double int, short, char, byte, boolean int, short, char, byte, boolean CONSTANT_Integer CONSTANT_Integer

2.6.3 Code2.6.3 Code

"Code" 속성은 다음의 포맷을 갖는다:The "Code" attribute has the following format:

Code_attribute {Code_attribute {

u2 attribute_name_index;     u2 attribute_name_index;

u4 attribute_length;     u4 attribute_length;

u2 max_stack;     u2 max_stack;

u2 max_locals;     u2 max_locals;

u4 code_length;     u4 code_length;

u1 code[code_length];     u1 code [code_length];

u2 exception_table_length;     u2 exception_table_length;

{ u2 start_pc;     {u2 start_pc;

u2 end_pc;          u2 end_pc;

u2 handler_pc;          u2 handler_pc;

u2 catch_type;          u2 catch_type;

} exception_table[exception_table_length];     } exception_table [exception_table_length];

u2 attributes_count;     u2 attributes_count;

attribute_info attributes[attribute_count];     attribute_info attributes [attribute_count];

}}

attribute_name_indexattribute_name_index

constant_pool[attribute_name_index]는 CONSTANT_Utf8 문자열 "Code"이다. constant_pool [attribute_name_index] is the CONSTANT_Utf8 string "Code".

attribute_lengthattribute_length

이 필드는 초기 6바이트를 제외한 "Code" 속성의 전체 길이를 나타낸다.This field indicates the total length of the "Code" attribute excluding the initial 6 bytes.

max_stackmax_stack

이 매서드의 실행동안 사용될 오퍼랜드 스택상의 최대 엔트리 수. 오퍼랜드 스택에 관한 추가 정보를 얻으려면 본 명세서내 다른 장을 참조.Maximum number of entries on the operand stack to be used during the execution of this method. See other chapters in this specification for additional information on operand stacks.

max_localsmax_locals

이 매서드에 의해 사용된 로컬 변수 슬롯의 수. 로컬 변수에 관한 추가 정보를 얻으려면 본 명세서내 다른 장을 참조.Number of local variable slots used by this method. See other chapters in this document for additional information on local variables.

code_lengthcode_length

이 매서드를 위한 가상 머신 코드내 바이트의 수.Number of bytes in virtual machine code for this method.

codecode

이들은 상기 매서드를 구현하는 가상 머신 코드의 실제 바이트이다. 메모리를 읽을 경우, 만일 코드의 제 1 바이트가 4 다중 경계상에서 정렬되면, 연산부호 엔트리 tableswitch 및 tablelookup는 정렬될 것이다; 정렬 요구에 관한 추가 정보를 얻으려면 그것에 관한 설명 참조.These are the actual bytes of the virtual machine code that implement the method. When reading memory, if the first byte of code is aligned on four multiple boundaries, the opcode entries tableswitch and tablelookup will be aligned; See the description of it for more information about the sort request.

exception_table_lengthexception_table_length

다음의 예외 테이블내 엔트리의 수.Number of entries in the next exception table.

exception_tableexception_table

예외 테이블내 각각의 엔트리는 상기 코드내 하나의 예외 처리기를 설명한다.Each entry in the exception table describes one exception handler in the code.

start_pc, end_pcstart_pc, end_pc

두 개 fieldsstart_pc 및 end_pc는 예외 처리기가 활동중인 코드내 범위를 나타낸다. 양쪽 필드의 값은 코드의 시작으로부터의 오프셋(offsets)이 된다. start_pc는 포함되고, end_pc는 제외된다.Two fieldsstart_pc and end_pc indicate the range in the code where the exception handler is active. The values in both fields are offsets from the beginning of the code. start_pc is included and end_pc is excluded.

handler_pchandler_pc

이 필드는 예외 처리기의 시작 주소를 나타낸다. 필드값은 코드의 시작으로부터의 오프셋이 된다.This field indicates the start address of the exception handler. The field value is the offset from the beginning of the code.

catch_typecatch_type

만일 catch_type이 제로가 아니라면, constant_pool[catch_type]은 이러한 예외 처리기가 파악하도록 설계되는 예외 클래스가 될 것이다. 이 예외 처리기는 만일 실행된 예외가 주어진 클래스의 예가 되는 경우에만 호출되어야 한다.If catch_type is nonzero, constant_pool [catch_type] will be the exception class that this exception handler is designed to catch. This exception handler should only be called if the exception thrown is an example of a given class.

만일 catch_type이 제로라면, 이 예외 처리기는 모든 예외에서 호출되어야 한다.If catch_type is zero, this exception handler should be called on every exception.

attributes_countattributes_count

이 필드는 코드에 관한 추가 속성의 수를 나타낸다. "Code" 속성은 그 자신이 속성을 가질 수 있다.This field indicates the number of additional attributes for the code. The "Code" attribute may itself have an attribute.

attributesattributes

"Code" 속성은 그것과 관련된 임의의 선택적 속성의 수를 가질 수 있다. 각각의 속성은 이름 및 다른 추가 정보를 갖는다. 현재, 정의된 코드 속성은 "LineNumberTable" 및 "LocalVariableTable"만이고, 양쪽 모두 디버깅 정보를 포함한다. The "Code" attribute can have any number of optional attributes associated with it. Each attribute has a name and other additional information. Currently, the defined code attributes are only "LineNumberTable" and "LocalVariableTable" and both contain debugging information.

2.6.4 예외 테이블(Exception Table)2.6.4 Exception Table

이 테이블은 매서드가 실행하기로 선언하는 예외를 나타내는 컴파일러에 의해 사용된다. This table is used by the compiler to indicate the exception that the method declares to execute.

Exceptions_attribute {Exceptions_attribute {

u2 attribute_name_index;     u2 attribute_name_index;

u4 attribute_length;     u4 attribute_length;

u2 number_of_exceptions;     u2 number_of_exceptions;

u2 exception_index_table[number_of_exceptions];     u2 exception_index_table [number_of_exceptions];

}}

attribute_name_indexattribute_name_index

constant_pool[attribute_name_index]는 CONSTANT_Utf8 문자열 "Exceptions"가 될 것이다.constant_pool [attribute_name_index] will be the CONSTANT_Utf8 string "Exceptions".

attribute_lengthattribute_length

이 필드는 초기 6바이트를 제외한 Exceptions_attribute의 전체 길이를 나타낸다.This field indicates the total length of Exceptions_attribute excluding the initial 6 bytes.

number_of_exceptionsnumber_of_exceptions

이 필드는 다음의 예외 인덱스 테이블내 엔트리의 수를 나타낸다.This field indicates the number of entries in the following exception index table.

exception_index_tableexception_index_table

이 테이블내 각각의 값은 상수 풀내 인덱스이다. 각각의 테이블 요소에서, (0 ≤ I < number_of_exceptions인 경우 exception_index_table[i]!=0)이면, constant_pool[exception_index+table[i]]는 이 클래스가 실행하도록 선언하는 예외가 된다.Each value in this table is an index in the constant pool. For each table element, if (0 ≤ I <number_of_exceptions exception_index_table [i]! = 0), constant_pool [exception_index + table [i]] is the exception that this class declares to execute.

2.6.5 LineNumberTable2.6.5 LineNumberTable

이 속성은 가상 머신 코드의 부분이 상기 소스내 주어진 위치에 대응하도록 결정하기 위해 디버거 및 예외 처리기에 의해 사용된다. LineNumberTable_attribute는 다음의 포맷을 갖는다:This property is used by debuggers and exception handlers to determine that a portion of virtual machine code corresponds to a given location in the source. LineNumberTable_attribute has the following format:

LineNumberTable_attribute {LineNumberTable_attribute {

u2 attribute_name_index;     u2 attribute_name_index;

u4 attribute_length;     u4 attribute_length;

u2 line_number_table_length;     u2 line_number_table_length;

{ u2 start_pc;     {u2 start_pc;

u2 line_number;     u2 line_number;

} line_number_table[line_number_table_length];     } line_number_table [line_number_table_length];

}}

u2 exception_index_table[number_of_exceptions];     u2 exception_index_table [number_of_exceptions];

}}

attribute_name_indexattribute_name_index

constant_pool[attribute_name_index]는 CONSTANT_Utf8 문자열 "LineNumberTable"가 될 것이다.constant_pool [attribute_name_index] will be the CONSTANT_Utf8 string "LineNumberTable".

attribute_lengthattribute_length

이 필드는 초기 6바이트를 제외한 LineNumberTable_attribute의 전체 길이를 나타낸다.This field indicates the total length of LineNumberTable_attribute excluding the initial 6 bytes.

line_number_table_lengthline_number_table_length

이 필드는 다음의 라인 개수 테이블내 엔트리의 수를 나타낸다.This field indicates the number of entries in the next line count table.

line_number_tableline_number_table

라인 개수 테이블내 각각의 엔트리는 소스 파일내 라인 수가 코드내 주어진 지점에서 변경되는 것을 나타낸다.Each entry in the line count table indicates that the number of lines in the source file changes at a given point in the code.

start_pcstart_pc

이 필드는 소스내 새로운 라인을 위한 코드가 시작하는 코드내 위치를 나타낸다. source_pc <<SHOULD THAT BEstart_pc?>>는 코드의 시작으로부터의 오프셋이다.This field indicates where in the code the code for the new line in the source begins. source_pc << SHOULD THAT BEstart_pc? >> is the offset from the beginning of the code.

line_numberline_number

파일내 주어진 위치에서 시작하는 라인 수.The number of lines starting at a given position in the file.

2.6.6 LocalVariableTable2.6.6 LocalVariableTable

이 속성은 매서드의 동적 실행동안 주어진 로컬 변수의 값을 결정하기 위해 디버거에 의해 사용된다. LocalVariableTable_attribute의 포맷은 다음과 같다:This property is used by the debugger to determine the value of a given local variable during the dynamic execution of a method. The format of LocalVariableTable_attribute is:

LocalVariableTable_attribute {LocalVariableTable_attribute {

u2 attribute_name_index;     u2 attribute_name_index;

u4 attribute_length;     u4 attribute_length;

u2 local_variable_table_length;     u2 local_variable_table_length;

{ u2 start_pc;     {u2 start_pc;

u2 length;           u2 length;

u2 name_index;           u2 name_index;

u2 signature_index;           u2 signature_index;

u2 slot;           u2 slot;

} local_variable_table[local_variable_table_length];     } local_variable_table [local_variable_table_length];

}}

attribute_name_indexattribute_name_index

constant_pool[attribute_name_index]는 CONSTANT_Utf8 문자열 "LocalVariableTable"가 될 것이다.constant_pool [attribute_name_index] will be the CONSTANT_Utf8 string "LocalVariableTable".

attribute_lengthattribute_length

이 필드는 초기 6바이트를 제외한 LineNumberTable_attribute의 전체 길이를 나타낸다.This field indicates the total length of LineNumberTable_attribute excluding the initial 6 bytes.

local_variable_table_lengthlocal_variable_table_length

이 필드는 다음의 로컬 변수 테이블내 엔트리의 수를 나타낸다.This field indicates the number of entries in the next local variable table.

local_variable_tablelocal_variable_table

로컬 변수 테이블내 각각의 엔트리는 로컬 변수가 값을 갖는 동안 그 코드 범위를 나타낸다. 그것은 또한 스택에서 변수가 발견될 수 있는 값을 나타낸다.Each entry in the local variable table represents its code range while the local variable has a value. It also represents the value on which the variable can be found on the stack.

start_pc, lengthstart_pc, length

주어진 로컬 변수는 start_pc와 start_pc+length 사이의 코드에서 값을 갖는다. 두 값 모두 코드의 시작으로부터의 오프셋이 된다.The given local variable has a value in the code between start_pc and start_pc + length. Both values are offset from the beginning of the code.

name_index, signature_indexname_index, signature_index

constant_pool[name_index] 및 constant_pool[signature_index]는 로컬 변수의 이름과 기호를 제공하는 CONSTANT_Utf8 문자열이다.constant_pool [name_index] and constant_pool [signature_index] are CONSTANT_Utf8 strings that provide the names and symbols of local variables.

slotslot

주어진 변수는 매서드의 프레임내 slotth 로컬 변수가 될 것이다.The given variable will be the slot th local variable in the method's frame.

3. 가상 머신 명령 세트(The Virtual Machine Instruction Set)3. The Virtual Machine Instruction Set

3.1 명령을 위한 포맷3.1 Format for Command

JAVA 가상 머신 명령어는 본 명세서에서 다음 타입의 엔트리로 표현된다.JAVA virtual machine instructions are represented herein as entries of the following types.

instruction nameinstruction name

명령의 간단한 설명Brief description of the command

구문:construction:

연산부호 = numberOpcode = number operand1operand1 operand2operand2 ......

스택: ...., value1, value2 => ..., value3Stack: ...., value1, value2 => ..., value3

명령의 기능을 설명하고, 실행동안 실시될 수 있는 어떠한 예외를 나타내는 longer description.A longer description describing the function of the command and indicating any exceptions that may be thrown during execution.

구문 테이블내 각각의 라인은 단일 8비트 바이트를 나타낸다.Each line in the syntax table represents a single 8-bit byte.

JAVA 가상 머신의 연산은 종종 스택으로부터 그들의 오퍼랜드를 취하고, 스택상에 다시 그 결과를 집어넣는다. 규칙으로서, 본 명세서에서는 스택이 연산의 소스 또는 종단이 되는 경우는 언급하지 않을 것이지만, 그렇지 않은 경우는 항상 언급할 것이다. 예를 들어, 명령 iload 는 "로컬 변수로부터 정수를 로드"하라는 짧은 설명을 갖는다. 묵시적으로, 정수는 스택으로 로드된다. 명령 iadd 는 "정수 덧셈"으로 설명된다; 그 소스 및 종단 모두 스택이 된다.Operations in JAVA virtual machines often take their operands from the stack and put the results back on the stack. As a rule, we will not mention here the case where the stack is the source or end of the operation, but otherwise it will always be mentioned. For example, the command iload has a short description to "load an integer from a local variable". Implicitly, integers are loaded onto the stack. The command iadd is described as "integer addition"; Both the source and the end are stacks.

계산의 제어 흐름에 영향을 주지않는 명령은 다음의 명령의 연산부호로 가상 머신 프로그램 카운터를 항상 전진시키는 것으로 가정될 수 있다. 제어 흐름에 영향을 주는 명령만이 프로그램 카운터상에서 그들이 갖는 효과를 묵시적으로 언급할 것이다. An instruction that does not affect the control flow of the calculation may be assumed to always advance the virtual machine program counter with the opcode of the next instruction. Only instructions that affect the control flow will implicitly mention their effect on the program counter.

3.2 스택상으로 상수 푸시(Pushing Constants onto the Stack)3.2 Pushing Constants onto the Stack

bipushbipush

1바이트 부호 달린 정수 푸시Single-byte signed integer push

구문:construction:

bipush = 16bipush = 16 byte1byte1

스택: ...=> ..., valueStack: ... => ..., value

byte1은 부호 달린 8비트 값으로 해석된다. 이 value 는 정수로 확장되고, 오퍼랜드 스택으로 푸시된다. byte1 is interpreted as a signed 8-bit value. This value is expanded to an integer and pushed onto the operand stack.

sipushsipush

2바이트 부호 달린 정수 푸시2-byte signed integer push

구문:construction:

sipush = 17sipush = 17 byte1byte1 byte2byte2

스택: ... => ..., item Stack: ... => ..., item

byte1byte2는 부호 달린 16비트 value 로 어셈블된다. 이 value 는 정수로 확장되고, 오퍼랜드 스택으로 푸시된다. byte1 byte2 and is assembled with a signed 16-bit value. This value is expanded to an integer and pushed onto the operand stack.

ldc1ldc1

상수 풀로부터 아이템 푸시Push items from constant pool

구문:construction:

ldc1 = 18ldc1 = 18 indexbyte1indexbyte1

스택: ... => ..., item Stack: ... => ..., item

indexbyte1은 현재 클래스의 상수 풀로의 기호되지 않은 8비트 인덱스로서 사용된다. 그 인덱스에서의 item 은 해결되고, 스택으로 푸시된다. 만일 문자열이 푸시되고 있고, 그것을 할당하기에 충분한 메모리가 없다면, OutOfMemoryError가 기동된다. indexbyte1 is used as an unsigned 8-bit index into the constant pool of the current class. The item at that index is resolved and pushed onto the stack. If a string is being pushed and there is not enough memory to allocate it, an OutOfMemoryError is called.

주의: 문자열 푸시는 오브젝트 레퍼런스를 하게 한다. Note : String Push lets you do object references.

ldc2ldc2

상수 풀로부터 아이템 푸시Push items from constant pool

구문:construction:

ldc2 = 19ldc2 = 19 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ... => ..., item Stack: ... => ..., item

indexbyte1indexbyte2는 현재 클래스의 상수 풀로 기호되지 않은 16비트 인덱스를 구성하기 위해 사용된다. 그 인덱스에서의 item 은 해결되고 스택으로 푸시된다. 만일 문자열이 푸시되고 있고, 그것을 할당하기에 충분한 메모리가 없다면, OutOfMemoryError가 기동된다. indexbyte1 and indexbyte2 are used to construct an unsigned 16-bit index into the constant pool of the current class. The item at that index is resolved and pushed onto the stack. If a string is being pushed and there is not enough memory to allocate it, an OutOfMemoryError is called.

주의: 문자열 푸시는 오브젝트 레퍼런스를 하게 한다. Note : String Push lets you do object references.

ldc2wldc2w

상수 풀로부터 long 또는 double 푸시Push long or double from constant pool

구문:construction:

ldc2w = 20ldc2w = 20 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ... => ..., constant-word1, constant-word2 Stack: ... => ..., constant-word1, constant-word2

indexbyte1indexbyte2는 현재 클래스의 상수 풀로 기호되지 않은 16비트 인덱스를 구성하기 위해 사용된다. 그 인덱스에서의 2 워드 constant 는 해결되고 스택으로 푸시된다. indexbyte1 and indexbyte2 are used to construct an unsigned 16-bit index into the constant pool of the current class. The two word constant at that index is solved and pushed onto the stack.

aconst_nullaconst_null

비어있는 오브젝트 레퍼런스 푸시Push empty object reference

구문:construction:

aconst_null = 1aconst_null = 1

스택: ... => ..., nullStack: ... => ..., null

빈 오브젝트 레퍼런스를 스택으로 푸시.Push an empty object reference onto the stack.

iconst_m1iconst_m1

정수 constant-1 푸시Integer constant-1 push

구문:construction:

iconst_ml = 2iconst_ml = 2

스택: ... => ..., 1Stack: ... => ..., 1

integer-1을 스택으로 푸시.Push integer-1 onto the stack.

iconst_<n>iconst_ <n>

정수 상수 푸시Integer constant push

구문:construction:

iconst_<n>iconst_ <n>

스택: ... => ..., <n>Stack: ... => ..., <n>

타입: iconst_0 = 3, iconst_1 = 4, iconst_2 = 5, iconst_3 = 6, iconst_4 = 7, iconst_5 = 8Type: iconst_0 = 3, iconst_1 = 4, iconst_2 = 5, iconst_3 = 6, iconst_4 = 7, iconst_5 = 8

정수 <n>을 스택으로 푸시.Push integer <n> onto stack.

lconst_<l>lconst_ <l>

배정도 정수 상수 푸시Double integer constant push

구문:construction:

lconst_<l>lconst_ <l>

스택: ... => ..., <l>-word1, <l>-word2 Stack: ... => ..., <l> -word1, <l> -word2

타입: lconst_0 = 9, lconst_1 = 10Type: lconst_0 = 9, lconst_1 = 10

배정도 정수 <l>을 스택으로 푸시.Push a double integer <l> onto the stack.

fconst_<f>fconst_ <f>

단정도 부동소수점 푸시Single precision floating point push

구문:construction:

fconst_<f>fconst_ <f>

스택: ... => ..., <f>Stack: ... => ..., <f>

타입: fconst_0 = 11, fconst_1 = 12, fconst_2 = 13Type: fconst_0 = 11, fconst_1 = 12, fconst_2 = 13

단정도 부동소수점 수 <f>을 스택으로 푸시.Push a single floating point number <f> onto the stack.

dconst_<d>dconst_ <d>

배정도 부동소수점 푸시Double precision floating point push

구문:construction:

dconst_<d>dconst_ <d>

스택: ... => ..., <d>-word1, <d>-word2 Stack: ... => ..., <d> -word1, <d> -word2

타입: dconst_0 = 14, dconst_1 = 15Type: dconst_0 = 14, dconst_1 = 15

배정도 부동소수점 수 <d>을 스택으로 푸시.Push double precision floating point number <d> onto stack.

3.3 스택상으로 로컬 변수 로딩(Loading Local Variables Onto the Stack)3.3 Loading Local Variables Onto the Stack

lloadlload

로컬 변수로부터 정수 로드Load integer from local variable

구문:construction:

iload=21iload = 21 vindexvindex

스택: ... => ..., value Stack: ... => ..., value

현재 JAVA 프레임내 vindex에서의 로컬 변수의 value 는 오퍼랜드 스택으로 푸시된다.The value of the local variable at vindex in the current JAVA frame is pushed onto the operand stack.

iload_<n>iload_ <n>

로컬 변수로부터 정수 푸시Push integers from local variables

구문:construction:

iload_<n>iload_ <n>

스택: ... => ..., valueStack: ... => ..., value

타입: iload_0 = 26, iload_1 = 27, iload_2 = 28, iload_3 = 29Type: iload_0 = 26, iload_1 = 27, iload_2 = 28, iload_3 = 29

현재 JAVA 프레임내 <v>에서의 로컬 변수의 value 은 오퍼랜드 스택으로 푸시된다.The value of the local variable in <v> in the current JAVA frame is pushed onto the operand stack.

이 명령은 오퍼랜드 <n>이 묵시적이라는 것을 제외하고는 <n>vindex를 가진 iload에서와 동일하다.This command is the same as in iload with vindex of <n> , except that operand <n> is implicit.

iloadiload

로컬 변수로부터 long integer 로드Load long integer from local variable

구문:construction:

iload=22iload = 22 vindexvindex

스택: ... => ..., value-word1, value-word2 Stack: ... => ..., value-word1, value-word2

현재 JAVA 프레임내 vindexvindex+1에서의 로컬 변수의 value은 오퍼랜드 스택으로 푸시된다.The values of local variables at vindex and vindex + 1 in the current JAVA frame are pushed onto the operand stack.

lload_<n>lload_ <n>

로컬 변수로부터 long integer 로드Load long integer from local variable

구문:construction:

iload_<n>iload_ <n>

스택: ... => ..., value-word1, value-word2 Stack: ... => ..., value-word1, value-word2

타입: lload_0 = 30, lload_1 = 31, lload_2 = 32, lload_3 = 33Type: lload_0 = 30, lload_1 = 31, lload_2 = 32, lload_3 = 33

현재 JAVA 프레임내 <n> 및 <n>+1에서의 로컬 변수의 value은 오퍼랜드 스택으로 푸시된다.The values of local variables at <n> and <n> +1 in the current JAVA frame are pushed onto the operand stack.

이 명령은 오퍼랜드 <n>이 묵시적이라는 것을 제외하고는 <n>의 vindex를 가진 lload에서와 동일하다.This command is the same as in lload with vindex of <n> except that operand <n> is implicit.

floadfload

로컬 변수로부터 단정도 부동소수점 로드Load single-precision floating point from local variable

구문:construction:

fload=23fload = 23 vindexvindex

스택: ... => ..., value Stack: ... => ..., value

현재 JAVA 프레임내 vindex에서의 로컬 변수의 value은 오퍼랜드 스택으로 푸시된다.The value of the local variable at vindex in the current JAVA frame is pushed onto the operand stack.

fload_<n>fload_ <n>

로컬 변수로부터 단정도 부동소수점 로드Load single-precision floating point from local variable

구문:construction:

fload_<n>fload_ <n>

스택: ... => ..., valueStack: ... => ..., value

타입: fload_0 = 34, fload_1 = 35, fload_2 = 36, fload_3 = 37Type: fload_0 = 34, fload_1 = 35, fload_2 = 36, fload_3 = 37

현재 JAVA 프레임내 <n>에서의 로컬 변수의 value은 오퍼랜드 스택으로 푸시된다.The value of the local variable in <n> in the current JAVA frame is pushed onto the operand stack.

이 명령은 오퍼랜드 <n>이 묵시적이라는 것을 제외하고는 <n>의 vindex를 가진 fload에서와 동일하다.This command is the same as in fload with vindex of <n> except that operand <n> is implicit.

dloaddload

로컬 변수로부터 double float 로드Load double float from local variable

구문:construction:

dload=24dload = 24 vindexvindex

스택: ... => ..., value-word1, value-word2 Stack: ... => ..., value-word1, value-word2

현재 JAVA 프레임내 vindexvindex+1에서의 로컬 변수의 value 은 오퍼랜드 스택으로 푸시된다.The values of local variables at vindex and vindex + 1 in the current JAVA frame are pushed onto the operand stack.

dload_<n>dload_ <n>

로컬 변수로부터 double float 로드Load double float from local variable

구문:construction:

dload_<n>dload_ <n>

스택: ... => ..., value-word1, value-word2 Stack: ... => ..., value-word1, value-word2

타입: dload_0 = 38, dload_1 = 39, dload_2 = 40, dload_3 = 41Type: dload_0 = 38, dload_1 = 39, dload_2 = 40, dload_3 = 41

현재 JAVA 프레임내 <n> 및 <n>+1에서의 로컬 변수의 value 은 오퍼랜드 스택으로 푸시된다.The values of local variables at <n> and <n> +1 in the current JAVA frame are pushed onto the operand stack.

이 명령은 오퍼랜드 <n>이 묵시적이라는 것을 제외하고는 <n>vindex를 가진 dload에서와 동일하다.This command is the same as in dload with vindex of <n> , except that operand <n> is implicit.

aloadaload

로컬 변수로부터 오브젝트 레퍼런스 로드Load object reference from local variable

구문:construction:

aload=25aload = 25 vindexvindex

스택: ... => ..., value Stack: ... => ..., value

현재 JAVA 프레임내 vindex에서의 로컬 변수의 value 은 오퍼랜드 스택으로 푸시된다.The value of the local variable at vindex in the current JAVA frame is pushed onto the operand stack.

aload_<n>aload_ <n>

로컬 변수로부터 오브젝트 레퍼런스 로드Load object reference from local variable

구문:construction:

aload_<n>aload_ <n>

스택: ... => ..., value Stack: ... => ..., value

타입: aload_0 = 42, aload_1 = 43, aload_2 = 44, aload_3 = 45Type: aload_0 = 42, aload_1 = 43, aload_2 = 44, aload_3 = 45

현재 JAVA 프레임내 <n>에서의 로컬 변수의 value 은 오퍼랜드 스택으로 푸시된다.The value of the local variable in <n> in the current JAVA frame is pushed onto the operand stack.

이 명령은 오퍼랜드 <n>이 묵시적이라는 것을 제외하고는 <n>vindex를 가진 aload에서와 동일하다.This command is the same as in aload with vindex of <n> , except that operand <n> is implicit.

3.4 로컬 변수로 스택값 저장3.4 Storing Stack Values as Local Variables

istoreistore

로컬 변수로 정수 저장Store integers as local variables

구문:construction:

istore=54istore = 54 vindexvindex

스택: ..., value => ...Stack: ..., value => ...

value 은 정수이어야 한다. 현재 JAVA 프레임내 로컬 변수 vindex는 값으로 설정된다. value must be an integer. The local variable vindex in the current JAVA frame is set to a value.

istore_<n>istore_ <n>

로컬 변수로 정수 저장Store integers as local variables

구문:construction:

istore_<n>istore_ <n>

스택: ..., value => ...Stack: ..., value => ...

타입: istore_0 = 59, istore_1 = 60, istore_2 = 61, istore_3 = 62Type: istore_0 = 59, istore_1 = 60, istore_2 = 61, istore_3 = 62

value 은 정수이어야 한다. 현재 JAVA 프레임내 로컬 변수 <n>value 으로 설정된다. value must be an integer. The local variable <n> in the current JAVA frame is set to value .

이 명령은 오퍼랜드 <n>이 묵시적이라는 것을 제외하고는 <n>vindex를 가진 istore에서와 동일하다.This command is the same as in istore with vindex of <n> , except that operand <n> is implicit.

lstorelstore

로컬 변수로 long integer 저장Store long integer as local variable

구문:construction:

lstore=55lstore = 55 vindexvindex

스택: ..., value-word1, value-word2 => ...Stack: ..., value-word1, value-word2 => ...

value 은 long integer이어야 한다. 현재 JAVA 프레임내 로컬 변수 vindex+1value 로 설정된다. value must be a long integer. The local variable vindex + 1 in the current JAVA frame is set to value .

lstore_<n>lstore_ <n>

로컬 변수로 long integer 저장Store long integer as local variable

구문:construction:

lstore_<n>lstore_ <n>

스택: ..., value-word1, value-word2 =>Stack: ..., value-word1, value-word2 =>

타입: lstore_0 = 63, lstore_1 = 64, lstore_2 = 65, lstore_3 = 66Type: lstore_0 = 63, lstore_1 = 64, lstore_2 = 65, lstore_3 = 66

value 은 정수이어야 한다. 현재 JAVA 프레임내 로컬 변수 <n><n>+1value 으로 설정된다. value must be an integer. The local variables <n> and <n> +1 in the current JAVA frame are set to value .

이 명령은 오퍼랜드 <n>이 묵시적이라는 것을 제외하고는 <n>vindex를 가진 lstore에서와 동일하다.This command is the same as in lstore with vindex of <n> except that operand <n> is implicit.

fstorefstore

로컬 변수로 단정도 부동소수점 저장Store single-precision floating point as local variable

구문:construction:

fstore=56fstore = 56 vindexvindex

스택: ..., value => ...Stack: ..., value => ...

value 은 단정도 부동소수점 수이어야 한다. 현재 JAVA 프레임내 로컬 변수 vindexvalue 으로 설정된다. value must be a single floating point number. The local variable vindex in the current JAVA frame is set to value .

fstore_<n>fstore_ <n>

로컬 변수로 단정도 부동소수점 저장Store single-precision floating point as local variable

구문: construction:

fstore_<n>fstore_ <n>

스택: ..., value => ...Stack: ..., value => ...

타입: fstore_0 = 67, fstore_1 = 68, fstore_2 = 69, fstore_3 = 70Type: fstore_0 = 67, fstore_1 = 68, fstore_2 = 69, fstore_3 = 70

value 은 단정도 부동소수점 수이어야 한다. 현재 JAVA 프레임내 로컬 변수 <n>value 로 설정된다. value must be a single floating point number. The local variable <n> in the current JAVA frame is set to value .

이 명령은 오퍼랜드 <n>이 묵시적이라는 것을 제외하고는 <n>vindex를 가진 fstore에서와 동일하다.This command is the same as in fstore with vindex of <n> , except that operand <n> is implicit.

dstoredstore

로컬 변수로 double float 저장Store double float as local variable

구문:construction:

dstore=57dstore = 57 vindexvindex

스택: ..., value-word1, value-word2 => ...Stack: ..., value-word1, value-word2 => ...

value 은 배정도 부동소수점 수이어야 한다. 현재 JAVA 프레임내 로컬 변수 vindexvindex+1value 로 설정된다. value must be a double-precision floating point number. The local variables vindex and vindex + 1 in the current JAVA frame are set to value .

dstore_<n>dstore_ <n>

로컬 변수로 double float 저장Store double float as local variable

구문:construction:

dstore_<n>dstore_ <n>

스택: ..., value-word1, value-word2 => ...Stack: ..., value-word1, value-word2 => ...

타입: dstore_0 = 71, dstore_1 = 72, dstore_2 = 73, dstore_3 = 74Type: dstore_0 = 71, dstore_1 = 72, dstore_2 = 73, dstore_3 = 74

value 은 배정도 부동소수점 수이어야 한다. 현재 JAVA 프레임내 로컬 변수 <n><n>+1value 로 설정된다. value must be a double-precision floating point number. The local variables <n> and <n> +1 in the current JAVA frame are set to value .

이 명령은 오퍼랜드 <n>이 묵시적이라는 것을 제외하고는 <n>vindex를 가진 dstore에서와 동일하다.This command is the same as in dstore with vindex of <n> , except that operand <n> is implicit.

astoreastore

로컬 변수로 오브젝트 레퍼런스 저장Save object reference as local variable

구문:construction:

astore=58astore = 58 vindexvindex

스택: ..., value => ...Stack: ..., value => ...

value 은 반환 주소 또는 오브젝트에 대한 레퍼런스이어야 한다. 현재 JAVA 프레임내 로컬 변수 vindexvalue 로 설정된다. value must be a reference to a return address or object. The local variable vindex in the current JAVA frame is set to value .

astore_<n>astore_ <n>

로컬 변수로 오브젝트 레퍼런스 저장Save object reference as local variable

구문: construction:

astore_<n>astore_ <n>

스택: ..., value => ...Stack: ..., value => ...

타입: astore_0 = 75, astore_1 = 76, astore_2 = 77, astore_3 = 78Type: astore_0 = 75, astore_1 = 76, astore_2 = 77, astore_3 = 78

value 은 반환 주소 또는 오브젝트에 대한 레퍼런스이어야 한다. 현재 JAVA 프레임내 로컬 변수 <n>은 값으로 설정된다. value must be a reference to a return address or object. The local variable <n> in the current JAVA frame is set to a value.

이 명령은 오퍼랜드 <n>이 묵시적이라는 것을 제외하고는 <n>vindex를 가진 astore에서와 동일하다.This command is the same as in astore with vindex of <n> , except that operand <n> is implicit.

iinciinc

상수에 의해 로컬 변수 증가Increment local variable by constant

구문: construction:

iinc=132iinc = 132 vindexvindex constconst

스택: 변화 없음 Stack: no change

현재 JAVA 프레임내 로컬 변수 vindex 는 정수를 포함해야 한다. const가 부호 달린 8비트 양으로 처리되는 경우, const 값만큼 그 값이 증가한다.The local variable vindex in the current JAVA frame must contain an integer. If const is treated as a signed 8-bit quantity, it is incremented by the value of const .

3.5 로드, 저장 및 증가용 Wider Index3.5 Wider Index for Load, Save and Increase

widewide

로드, 저장 및 증가에서 로컬 변수를 액세스하기 위한 와이더 인덱스.Wider index for accessing local variables in load, store, and increment.

구문:construction:

wide=196wide = 196 vindex2vindex2

스택: 변화없음Stack: No change

이 바이트코드는 다음의 바이트코드중의 하나에 선행해야 한다: iload, lload, fload, dload, aload, istore, lstore, fstore, dstore, astore, iinc. 다음의 바이트코드의 vindex 및 이 바이트코드로부터의 vindex2는 현재 JAVA 프레임내 로컬 변수로 부호 없는 16비트 인덱스로 어셈블된다. 다음의 바이트코드는 이 와이더 인덱스 사용을 제외하고 정상적으로 연산된다.This bytecode must precede one of the following bytecodes: iload, lload, fload, dload, aload, istore, lstore, fstore, dstore, astore, iinc. Vindex of the next bytecode and vindex2 from this bytecode are assembled into an unsigned 16-bit index into a local variable in the current JAVA frame. The following bytecodes operate normally except for the use of this wider index.

3.6 어레이 관리(Managing Arrays)3.6 Managing Arrays

newarraynewarray

새로운 어레이 할당New Array Allocation

구문:construction:

newarray=196newarray = 196 atypeatype

스택: ..., size => result Stack: ..., size => result

size 는 정수이어야 한다. 그것은 새로운 어레이내 요소의 수를 나타낸다. size must be an integer. It represents the number of elements in the new array.

atype 은 할당될 어레이의 타입를 나타내는 내부 코드이다. atype 으로 가능한 값은 다음과 같다: atype is an internal code indicating the type of array to be allocated. Possible values for atype are:

T_BOOLEAN 4T_BOOLEAN 4

T_CHAR 5T_CHAR 5

T_FLOAT 6T_FLOAT 6

T_DOUBLE 7T_DOUBLE 7

T_BYTE 8T_BYTE 8

T_SHORT 9T_SHORT 9

T_INT 10T_INT 10

T_LONG 11T_LONG 11

size 요소를 보유할 수 있는 새로운 어레이 atype이 할당되고, result는 이 새로운 오브젝트에 대한 레퍼런스가 된다. atypesize 아이템을 포함하기에 충분히 큰 어레이의 할당이 시도된다. 어레이의 모든 요소는 제로로 초기화된다.A new array atype is allocated that can hold size elements, and result is a reference to this new object. An allocation of an array large enough to contain a size item of atype is attempted. All elements of the array are initialized to zero.

만일 size가 제로보다 작다면, NegativeArraySizeExecution이 기동된다. 만일 상기 어레이를 할당하기에 충분한 메모리가 없다면, OutOfMemoryError가 기동된다.If size is less than zero, NegativeArraySizeExecution is invoked. If there is not enough memory to allocate the array, OutOfMemoryError is triggered.

anewarrayanewarray

새로운 레퍼런스 어레이를 오브젝트에 할당Assign a new reference array to the object

구문:construction:

anewarray=189anewarray = 189 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ..., size => result Stack: ..., size => result

size는 정수이어야 한다. 그것은 새로운 어레이내 요소의 수를 나타낸다. size must be an integer. It represents the number of elements in the new array.

indexbyte1indexbyte2는 현재 클래스의 상수 풀로 인덱스를 구성하기 위해 사용된다. 그 인덱스에서의 아이템은 해결된다. 결과적인 엔트리는 클래스이어야 한다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The item at that index is resolved. The resulting entry must be a class.

size 요소를 보유할 수 있는, 표시된 클래스 타입의 새로운 어레이가 할당되고, result는 이 새로운 오브젝트에 대한 레퍼런스가 된다. 주어진 클래스 타입의 size 아이템을 포함하기에 충분히 큰 어레이의 할당이 시도된다. 어레이의 모든 요소는 비어있는 것으로 초기화된다.A new array of the indicated class type, which can hold size elements, is allocated and result is a reference to this new object. An allocation of an array large enough to contain a size item of a given class type is attempted. All elements of the array are initialized to empty.

만일 size가 제로보다 작다면, NegativeArraySizeExecution이 기동된다. 만일 상기 어레이를 할당하기에 충분한 메모리가 없다면, OutOfMemoryError가 기동된다.If size is less than zero, NegativeArraySizeExecution is invoked. If there is not enough memory to allocate the array, OutOfMemoryError is triggered.

anewarray는 1차원의 오브젝트 레퍼런스 어레이를 생성하기 위해 사용된다. 예를 들어, new Thread[7]을 생성하기 위해 다음과 같은 코드가 사용된다:anewarray is used to create a one-dimensional array of object references. For example, to create a new Thread [7], the following code is used:

bipush 7bipush 7

anewarray <Class "JAVA.lang.Thread">anewarray <Class "JAVA.lang.Thread">

anewarray는 또한 제 1 차원의 다차원 어레이를 생성하기 위해 사용될 수 있다. 예를 들어, 다음과 같은 어레이 선언:anewarray can also be used to create a multidimensional array of first dimensions. For example, the array declaration looks like this:

new int[6][]new int [6] []

이 다음과 같은 코드로 생성될 수 있다:This can be generated with code like this:

bipush 6bipush 6

anewarray <Class "[I">anewarray <Class "[I">

어레이 클래스명에 관한 정보를 얻으려면 "클래스 파일 포맷"장에서 CONSTANT_Class를 참조.See CONSTANT_Class in the "Class File Format" chapter for information on array class names.

multianewarraymultianewarray

새로운 다차원 어레이 할당New multidimensional array allocation

구문:construction:

multianewarray=197multianewarray = 197 indexbyte1indexbyte1 indexbyte2indexbyte2 dimensionsdimensions

스택: ..., size1, size2...sizen => result Stack: ..., size1, size2 ... sizen => result

각각의 size는 정수이어야 한다. 각각은 어레이의 차원으로 요소의 수를 나타낸다.Each size must be an integer. Each represents the number of elements in the dimensions of the array.

indexbyte1indexbyte2는 현재 클래스의 상수 풀로 인덱스를 구성하기 위해 사용된다. 그 인덱스에서의 아이템은 해결된다. 결과적인 엔트리는 1 또는 그 이상의 차원의 어레이 클래스이어야 한다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The item at that index is resolved. The resulting entry must be an array class of one or more dimensions.

dimensions 은 다음과 같은 특징으로 갖는다: dimensions have the following characteristics:

1 이상의 정수이어야 한다. Must be an integer greater than or equal to 1.

생성되는 차원수를 나타낸다. 어레이 클래스의 차원 수 이하이어야 한다. Indicates the number of dimensions to be created. Must be less than or equal to the number of dimensions of the array class.

스택에서 팝되는 요소 수를 나타낸다. 모두 제로 이상인 정수이어야 한다. 차원의 크기와 같이 사용된다.Shows the number of elements popped from the stack. All must be an integer greater than or equal to zero. Used with the size of the dimension.

예를 들어, new int[6][3][]을 생성하기 위해 다음과 같은 코드가 사용된다:For example, to generate new int [6] [3] [], the following code is used:

bipush 6bipush 6

bipush 3bipush 3

multianewarray <Class "[[[I"> 2multianewarray <Class "[[[I"> 2

만일 스택상의 size 인수중의 하나가 제로보다 작다면, NegativeArraySizeExecution이 기동된다. 만일 상기 어레이를 할당하기에 충분한 메모리가 없다면, OutOfMemoryError가 기동된다.If one of the size arguments on the stack is less than zero, NegativeArraySizeExecution is invoked. If there is not enough memory to allocate the array, OutOfMemoryError is triggered.

result는 새로운 어레이 오브젝트에 대한 레퍼런스가 된다. result is a reference to the new array object.

주의: 1차원을 생성하는 경우 newarray 또는 anewarray를 사용하기에 좀더 충분하다. Note : If you are creating one dimension, it is more than enough to use newarray or anewarray.

어레이 클래스명에서 정보를 얻으려면 "클래스 파일 포맷"장에서 CONSTANT_Class를 참조.For information on array class names, see CONSTANT_Class in the "Class File Format" chapter.

arraylengtharraylength

어레이의 길이를 구함Find the length of the array

구문:construction:

arraylength = 190arraylength = 190

스택: ..., objectref => ..., length Stack: ..., objectref => ..., length

objectref는 어레이 오브젝트에 대한 레퍼런스이어야 한다. 어레이의 길이가 결정되고, 스택의 최상위에서 objectref를 교체한다. objectref must be a reference to an array object. The length of the array is determined and the objectref is replaced at the top of the stack.

만일 objectref가 널 이라면, NullPointerException이 기동된다.If objectref is null, a NullPointerException is thrown .

ialoadiaload

어레이로부터 정수 로드Load integer from array

구문:construction:

iaload = 46iaload = 46

스택: ..., arrayref, index => ..., value Stack: ..., arrayref, index => ..., value

arrayref는 정수 어레이에 대한 레퍼런스이어야 한다. index는 정수이어야 한다. 어레이내 위치 번호 index에서의 정수 value 가 검색되고, 스택의 최상위로 푸시된다. arrayref must be a reference to an array of integers. index must be an integer. The integer value at position number index in the array is retrieved and pushed to the top of the stack.

만일 arrayref 가 널 이라면, NullPointerException이 기동된다. 만일 index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다.If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

laloadlaload

어레이로부터 배정도 정수 로드Load double integer from array

구문:construction:

laload = 47laload = 47

스택: ..., arrayref, index => ..., value-word1, value-word2 Stack: ..., arrayref, index => ..., value-word1, value-word2

arrayref는 배정도 정수 어레이에 대한 레퍼런스이어야 한다. index는 정수이어야 한다. 어레이내 위치 번호 index 에서의 배정도 정수 값이 검색되고, 스택의 최상위로 푸시된다. arrayref must be a reference to a double integer array. index must be an integer. The double integer value at position number index in the array is retrieved and pushed to the top of the stack.

만일 arrayref가 널 이라면, NullPointerException이 기동된다. 만일 index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다.If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

faloadfaload

어레이로부터 단정도 부동소수점 로드Single-precision floating point load from array

구문:construction:

faload = 48faload = 48

스택: ..., arrayref, index => ..., value Stack: ..., arrayref, index => ..., value

arrayref는 단정도 부동소수점 수 어레이에 대한 레퍼런스이어야 한다. index는 정수이어야 한다. 어레이내 위치 번호 index에서의 단정도 부동소수점 수 value 가 검색되고, 스택의 최상위로 푸시된다. arrayref must be a reference to a single-precision floating point array. index must be an integer. The single-precision floating point value at position number index in the array is retrieved and pushed to the top of the stack.

만일 arrayref가 널 이라면, NullPointerException이 기동된다. 만일 index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다.If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

daloaddaload

어레이로부터 double float 로드Load a double float from an array

구문:construction:

daload = 49daload = 49

스택: ..., arrayref, index => ..., value-word1, value-word2 Stack: ..., arrayref, index => ..., value-word1, value-word2

arrayref는 배정도 부동소수점 수 어레이에 대한 레퍼런스이어야 한다. index는 정수이어야 한다. 어레이내 위치 번호 index에서의 배정도 부동소수점 수 value 가 검색되고, 스택의 최상위로 푸시된다. arrayref must be a reference to a double-precision floating point array. index must be an integer. The double-precision floating-point value at position number index in the array is retrieved and pushed to the top of the stack.

만일 arrayref가 널 이라면, NullPointerException이 기동된다. 만일 index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다.If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

aaloadaaload

어레이로부터 오브젝트 레퍼런스 로드Load object reference from array

구문:construction:

aaload = 50aaload = 50

스택: ..., arrayref, index => ..., value Stack: ..., arrayref, index => ..., value

arrayref는 오브젝트 레퍼런스 어레이에 대한 레퍼런스이어야 한다. index는 정수이어야 한다. 어레이내 위치 번호 index에서의 오브젝트 레퍼런스가 검색되고, 스택의 최상위로 푸시된다. arrayref must be a reference to an object reference array. index must be an integer. The object reference at position number index in the array is retrieved and pushed to the top of the stack.

만일 arrayref가 널 이라면, NullPointerException이 기동된다. 만일 index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다.If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

baloadbaload

어레이로부터 부호 달린 바이트 로드Load Signed Byte From Array

구문:construction:

baload = 51baload = 51

스택: ..., arrayref, index => ..., value Stack: ..., arrayref, index => ..., value

arrayref는 부호 달린 바이트 어레이에 대한 레퍼런스이어야 한다. index는 정수이어야 한다. 어레이내 위치 번호 index에서의 부호 달린 바이트 value가 검색되고, 정수로 확장되며, 스택의 최상위로 푸시된다. arrayref must be a reference to a signed byte array. index must be an integer. The signed byte value at position number index in the array is retrieved, expanded to an integer, and pushed to the top of the stack.

만일 arrayref가 널 이라면, NullPointerException이 기동된다. 만일 index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다.If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

caloadcaload

어레이로부터 문자 로드Load character from array

구문:construction:

caload = 52caload = 52

스택: ..., arrayref, index => ..., value Stack: ..., arrayref, index => ..., value

arrayref는 문자 어레이에 대한 레퍼런스이어야 한다. index는 정수이어야 한다. 어레이내 위치 번호 index에서의 문자 value가 검색되고, 정수로 제로 확장되며, 스택의 최상위로 푸시된다. arrayref must be a reference to an array of characters. index must be an integer. The character value at position number index in the array is retrieved, zero-extended to an integer, and pushed to the top of the stack.

만일 arrayref가 널 이라면, NullPointerException이 기동된다. 만일 index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다.If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

saloadsaload

어레이로부터 단정도 로드Single precision load from array

구문:construction:

saload = 53saload = 53

스택: ..., arrayref, index => ..., value Stack: ..., arrayref, index => ..., value

arrayref는 단정도 정수 어레이에 대한 레퍼런스이어야 한다. index는 정수이어야 한다. 어레이의 위치 번호 index에서의 부호 달린 단정도 정수 값이 검색되고, 정수로 확장되며, 스택의 최상위로 푸시된다. arrayref must be a reference to a single integer array. index must be an integer. The signed single integer value at position number index of the array is retrieved, expanded to an integer, and pushed to the top of the stack.

만일 arrayref 가 널 이라면, NullPointerException이 기동된다. 만일 index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다.If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

iastoreiastore

정수 어레이로 저장Store as an integer array

구문:construction:

iastore = 79iastore = 79

스택: ..., arrayref, index, value => ... Stack: ..., arrayref, index, value => ...

arrayref는 정수 어레이에 대한 레퍼런스이어야 한다. index는 정수이어야 하며, value 는 정수이어야 한다. 어레이내 위치 index에서 정수 value 가 저장된다. arrayref must be a reference to an array of integers. index must be an integer and value must be an integer. The integer value is stored at position index in the array.

만일 arrayref가 널 이라면, NullPointerException이 기동된다. 만일 index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다.If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

lastorelastore

배정도 정수 어레이로 저장Store as a double integer array

구문:construction:

lastore = 80lastore = 80

스택: ..., arrayref, index, value-word1, value-word2 => ... Stack: ..., arrayref, index, value-word1, value-word2 => ...

arrayref는 배정도 정수 어레이에 대한 레퍼런스이어야 하고, index는 정수이어야 하며, value 는 배정도 정수이어야 한다. 어레이내 위치 index에서 배정도 정수 값이 저장된다. arrayref must be a reference to an array of double integers, index must be an integer, and value must be a double integer. The double integer value is stored at position index in the array.

만일 arrayref가 널 이라면, NullPointerException이 기동된다. 만일 index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다.If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

fastorefastore

단정도 부동소수점 어레이로 저장Store as single-precision floating point array

구문:construction:

fastore = 81fastore = 81

스택: ..., arrayref, index, value => ... Stack: ..., arrayref, index, value => ...

arrayref는 단정도 부동소수점 수의 어레이에 대한 레퍼런스이어야 하고, index는 정수이어야 하며, value는 단정도 부동소수점 수이어야 한다. 어레이내 위치 index에서 단정도 부동소수점 값이 저장된다. arrayref must be a reference to an array of single-precision floating point numbers, index must be an integer, and value must be a single precision floating point number. Single-precision floating point values are stored at position index in the array.

만일 arrayref가 널 이라면, NullPointerException이 기동된다. 만일 index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다.If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

dastoredastore

배정도 부동소수점 어레이로 저장Stored in double-precision floating point array

구문:construction:

dastore=82dastore = 82

스택: ..., arrayref, index, value-word1, value-word2 => ...Stack: ..., arrayref, index, value-word1 , value-word2 => ...

arrayref는 배정도 부동소수점 수의 어레이에 대한 레퍼런스이어야 하고, index는 정수이어야 하며, value 는 배정도 부동소수점 수이어야 한다. 어레이내 위치 index에서 배정도 부동소수점 값이 저장된다. arrayref must be a reference to an array of double precision floating point numbers, index must be an integer, and value must be a double precision floating point number. Double-precision floating-point values are stored at position index in the array.

arrayref가 널 이라면, NullPointerException이 기동된다. index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다. If arrayref is null, a NullPointerException is thrown . If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

aastoreaastore

오브젝트 레퍼런스 어레이로 저장Save as Object Reference Array

구문:construction:

aastore=83aastore = 83

스택: ..., arrayref, index, value => ... Stack: ..., arrayref, index, value => ...

arrayref는 오브젝트 레퍼런스 어레이에 대한 레퍼런스이어야 하고, index는 정수이어야 하며, value 는 오브젝트 레퍼런스이어야 한다. 어레이내 위치 index에서 오브젝트 레퍼런스 값이 저장된다. arrayref must be a reference to an object reference array, index must be an integer, and value must be an object reference. The object reference value is stored at position index in the array.

arrayref가 널 이라면, NullPointerException이 기동된다. index가 어레이의 경계내에 있지 않다면, ArrayIndexOutOfBoundsException이 기동된다. value 의 실제 타입는 어레이 요소의 실제 타입와 일치되어야 한다. 예를 들어, 클래스 Object 어레이의 클래스 Thread의 예시를 저장하는 것은 정당하지만, 그렇지 않으면 정당하지 않다. 호환가능하지 않은 오브젝트 레퍼런스를 저장하기 위한 시도가 이뤄지는 경우 ArrayStoreException이 기동된다. If arrayref is null, a NullPointerException is thrown . If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked. The actual type of value must match the actual type of the array element. For example, storing an example of a class Thread in a class Object array is valid, but not otherwise. An ArrayStoreException is thrown when an attempt is made to store an incompatible object reference.

bastorebastore

부호 달린 바이트 어레이로 저장Store as signed byte array

구문:construction:

bastore = 84bastore = 84

스택: ..., arrayref, index, value => ... Stack: ..., arrayref, index, value => ...

arrayref는 부호 달린 바이트 어레이에 대한 레퍼런스이어야 하고, index는 정수이어야 하며, 그리고 value 는 정수이다. 정수 value 는 어레이내의 위치 index에 저장된다. value 가 너무 커서 부호 달린 바이트가 되지 못한다면, 절단된다. arrayref must be a reference to a signed byte array, index must be an integer, and value is an integer. The integer value is stored at position index in the array. If value is too large to be a signed byte, it is truncated.

arrayref가 널이면, NullPointerException이 기동된다. index가 어레이의 경계 내부에 있지 않다면 ArrayIndexOutOfBoundsException이 기동된다. If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

castorecastore

문자 어레이로 저장Save as character array

구문:construction:

castore = 85castore = 85

스택: ..., arrayref, index, value => ... Stack: ..., arrayref, index, value => ...

arrayref는 문자의 어레이여야 하고, index는 정수이어야 하며, value 는 정수이다. 정수 index는 어레이의 위치 index에 저장된다. value 가 너무 커서 문자가 될 수 없다면, 절단된다. arrayref must be an array of characters, index must be an integer, and value is an integer. The integer index is stored at position index of the array. If value is too large to be a character, it is truncated.

arrayref가 널이면, NullPointerException이 기동된다. index가 어레이의 경계 내부에 있지 않다면 ArrayIndexOutOfBoundsException이 기동된다. If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

sastoresastore

단정도 어레이로 저장Store in single precision array

구문:construction:

sastore = 86sastore = 86

스택: ..., arrayref, index, value => ... Stack: ..., arrayref, index, value => ...

arrayref는 단정도 어레이이어야 하고, index는 정수이어야 하며, 그리고 value 는 정수이다. 정수 value 는 상기 어레이의 위치 index에 저장된다. value 가 너무 커서 짧게 될 수 없다면, 절단된다. arrayref must be a single array, index must be an integer, and value is an integer. The integer value is stored at the position index of the array. If value is too large to be short, it is truncated.

arrayref가 널이면, NullPointerException이 기동된다. index가 어레이의 경계 내부에 있지 않다면 ArrayIndexOutOfBoundsException이 기동된다. If arrayref is null, a NullPointerException is invoked. If index is not within the bounds of the array, an ArrayIndexOutOfBoundsException is invoked.

3.7 스택 명령(Stack Instructions)3.7 Stack Instructions

nopnop

하는 일 없음Nothing to do

구문:construction:

nop = 0nop = 0

스택: 변화 없음Stack: no change

하는일 없음.Nothing to do.

poppop

상위 스택 워드 팝Top Stack Word Pop

구문:construction:

pop = 87pop = 87

스택: ..., any => ... Stack: ..., any => ...

스택으로부터 최상위 워드를 팝함. Pop the top word from the stack.

pop2pop2

상위 두 개의 스택 워드팝Top Two Stacks Wordpop

구문:construction:

pop2 = 89pop2 = 89

스택: ..., any2, any1 => ... Stack: ..., any2, any1 => ...

스택으로부터 두 개의 최상위 워드를 팝함.Pop the top two words from the stack.

dupdup

상위 스택 워드 복사Copy top stack word

구문:construction:

dup = 89dup = 89

스택: ..., any => ..., any, any Stack: ..., any => ..., any, any

스택상의 최상위 워드를 복사함. Copies the highest word on the stack.

dup2dup2

상위 두 개의 스택 워드 복사Top Two Stack Word Copy

구문:construction:

dup2 = 92dup2 = 92

스택: ..., any2, any1 => ..., any2, any1,any2, any1 Stack: ..., any2, any1 => ..., any2, any1, any2, any1

스택상의 최상위 두 워드를 복사함.Copies the top two words on the stack.

dup_x1dup_x1

상위 스택 워드 복사하고, 두 개를 내려놓음Copies the top stack word and puts two

구문:construction:

dup_x1 = 90dup_x1 = 90

스택: ..., any2, any1 => ..., any1, any2, any1 Stack: ..., any2, any1 => ..., any1, any2, any1

스택상의 최상위 워드를 복사하고 스택 내에 복사한 두 개의 워드를 삽입함.Copies the highest word on the stack and inserts the two words copied into the stack.

dup2_x1dup2_x1

상위 두 개의 스택 워드를 복사하고, 두 개를 내려놓음Copies the top two stack words and puts them down

구문:construction:

dup_x1 = 93dup_x1 = 93

스택: ..., any3, any2, any1 => ..., any2, any1, any3, any2, any1 Stack: ..., any3, any2, any1 => ..., any2, any1, any3, any2, any1

스택상의 최상위 두 워드를 복사하고 스택 내에 복사한 두 개의 워드를 삽입함.Copy the top two words on the stack and insert the two words copied into the stack.

dup_x2dup_x2

상위 스택 워드를 복사하고 세 개를 내려놓음Copy the top stack word and put three down

구문:construction:

dup_x2 = 91dup_x2 = 91

스택: ..., any3, any2, any1 => ..., any1, any3, any2, any1 Stack: ..., any3, any2, any1 => ..., any1, any3, any2, any1

스택상의 최상위 워드를 복사하고 스택 내에 복사한 세 개의 워드를 삽입함.Copies the highest word on the stack and inserts three words copied into the stack.

dup2_x2dup2_x2

상위 두 개의 스택 워드를 복사하고 세 개를 내려놓음Copy the top two stack words and put three down

구문:construction:

dup2_x2 = 94dup2_x2 = 94

스택: ..., any4, any3, any2, any1 => ..., any2, any1, any4, any3, any2, any1 Stack: ..., any4, any3, any2, any1 => ..., any2, any1, any4, any3, any2, any1

스택상의 최상위 두 워드를 복사하고 스택 내에 복사한 세 개의 워드를 삽입함.Copy the top two words on the stack and insert the three words copied into the stack.

swapswap

상위 두 개의 스택 워드를 스왑함Swap the top two stack words

구문:construction:

swap = 95swap = 95

스택: ..., any2, any1 => ..., any2, any1 Stack: ..., any2, any1 => ..., any2, any1

스택상의 최상위 두 성분을 스왑함.Swap the top two components on the stack.

3.8 산술 연산 명령(Arithmetic Instructions)3.8 Arithmetic Instructions

iadd iadd

정수 가산Integer addition

구문:construction:

iadd = 96iadd = 96

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 정수이어야 한다. 상기 값들은 가산되고 그들의 정수 합에 의해 스택상에서 교체된다. value1 and value2 must be integers. The values are added and replaced on the stack by their sum of integers.

laddladd

배정도 정수 가산Double precision addition

구문:construction:

ladd = 97ladd = 97

스택: ..., value1-word1, value1-word2, value2-word2 => ..., result-word2 Stack: ..., value1-word1, value1-word2, value2-word2 => ..., result-word2

value1value2는 정수이어야 한다. 상기 값들은 가산되고 그들의 배정도 정수 합에 의해 상기 스택상에서 교체된다. value1 and value2 must be integers. The values are added and replaced on the stack by their double integer sum.

faddfadd

단정도 부동소수점 가산Single precision floating point addition

구문:construction:

fadd = 98fadd = 98

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 단정도 부동소수점 수이어야 한다. 상기 값들은 더해지고 그들의 단정도 부동소수점 합에 의해 상기 스택상에서 교체된다. value1 and value2 must be single-precision floating point numbers. The values are added and replaced on the stack by their single floating point sum.

dadddadd

배정도 부동소수점 가산Double precision floating point addition

구문:construction:

dadd = 99dadd = 99

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2는 배정도 부동소수점 수이어야 한다. 상기 값들은 더해지고 그들의 배정도 부동소수점 합에 의해 상기 스택상에서 교체된다. value1 and value2 must be double-precision floating point numbers. The values are added and replaced on the stack by their double precision floating point sum.

isubisub

정수 감산Integer Subtraction

구문:construction:

isub = 100isub = 100

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 정수이어야 한다. value2value1에서 감산되고, 양 값 모두 그들의 정수 차에 의해 상기 스택상에서 교체된다. value1 and value2 must be integers. value2 is subtracted from value1 and both values are replaced on the stack by their integer difference.

lsublsub

배정도 정수 감산Double precision subtraction

구문:construction:

lsub = 101lsub = 101

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2는 배정도 정수이어야 한다. value2value1에서 감산되고, 양 값은 모두 그들의 배정도 정수 차에 의해 상기 스택상에서 교체된다. value1 and value2 must be double integers. value2 is subtracted from value1 , and both values are replaced on the stack by their double integer difference.

fsubfsub

단정도 부동소수점 감산Single precision floating point subtraction

구문:construction:

fsub = 102fsub = 102

스택: ..., value1, value2 => ..., resultStack: ..., value1, value2 => ..., resul t

value1value2는 단정도 부동소수점 수이어야 한다. value2value1 에서 감산되고, 양 값은 모두 그들의 단정도 부동소수점 차에 의해 상기 스택상에서 교체된다. value1 and value2 must be single-precision floating point numbers. value2 is subtracted from value1 , and both values are replaced on the stack by their single precision floating point difference.

dsubdsub

배정도 부동소수점 감산Double precision floating point subtraction

구문:construction:

dsub = 103dsub = 103

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2는 배정도 부동소수점 수이어야 한다. value2value1 에서 감산되고, 양 값은 모두 그들의 배정도 부동소수점 차에 의해 상기 스택상에서 교체된다. value1 and value2 must be double-precision floating point numbers. value2 is subtracted from value1 and both values are replaced on the stack by their double precision floating point difference.

imulimul

정수 승산Integer multiplication

구문:construction:

imul = 104imul = 104

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 정수이어야 한다. 양 값은 모두 그들의 정수 곱에 의해 상기 스택상에서 교체된다. value1 and value2 must be integers. Both values are replaced on the stack by their integer product.

lmullmul

배정도 정수 승산Double integer multiplication

구문:construction:

imul = 105imul = 105

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2는 배정도 정수이어야 한다. 양 값은 모두 그들의 배정도 정수 곱에 의해 상기 스택상에서 교체된다. value1 and value2 must be double integers. Both values are replaced on the stack by their double integer product.

fmulfmul

단정도 부동소수점 승산Single precision floating point multiplication

구문:construction:

fmul = 106fmul = 106

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2 는 단정도 부동소수점 수이어야 한다. 양 값은 모두 그들의 단정도 부동소수점 곱에 의해 상기 스택상에서 교체된다. value1 and value2 must be single-precision floating point numbers. Both values are replaced on the stack by their single floating point product.

dmuldmul

배정도 부동소수점 승산Double precision floating point multiplication

구문:construction:

dmul = 107dmul = 107

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2는 배정도 부동소수점 수이어야 한다. 양 값은 모두 그들의 배정도 부동소수점 곱에 의해 상기 스택상에서 교체된다. value1 and value2 must be double-precision floating point numbers. Both values are replaced on the stack by their double precision floating point product.

idividiv

정수 제산Integer Division

구문:construction:

idiv = 108idiv = 108

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 정수이어야 한다. value1value2로 나누어지고, 양 값은 모두 그들의 정수 몫에 의해 상기 스택상에서 교체된다. value1 and value2 must be integers. value1 is divided by value2 , and both values are replaced on the stack by their integer quotient.

결과는 그것과 0 사이의 가장 가까운 정수로 절단된다. 0으로 나누고자 하는 시도는 기동되는 "/by zero" ArithmeticException으로 귀착한다.The result is truncated to the nearest integer between it and zero. Attempts to divide by zero result in a "/ by zero" ArithmeticException being invoked.

ldivldiv

배정도 정수 제산Double integer division

구문:construction:

ldiv = 109ldiv = 109

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2는 배정도 정수이어야 한다. value1value2로 나누어지고, 양 값은 모두 그들의 배정도 정수 몫에 의해 상기 스택상에서 교체된다. value1 and value2 must be double integers. value1 is divided by value2 , and both values are replaced on the stack by their double integer quotient.

결과는 그것과 0 사이의 가장 가까운 정수로 절단된다. 0으로 나누고자 하는 시도는 기동되는 "/by zero" ArithmeticException으로 귀착한다.The result is truncated to the nearest integer between it and zero. Attempts to divide by zero result in a "/ by zero" ArithmeticException being invoked.

fdivfdiv

단정도 부동소수점 제산Single precision floating point division

구문:construction:

fdiv = 110fdiv = 110

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 단정도 부동소수점 수이어야 한다. value1value2 로 나누어지고, 양 값은 모두 그들의 단정도 부동소수점 몫에 의해 상기 스택상에서 교체된다. value1 and value2 must be single-precision floating point numbers. value1 is divided by value2 , and both values are replaced on the stack by their single floating point quotient.

0으로 나누면 몫은 NaN이 된다.Dividing by 0 gives the quotient NaN.

ddivddiv

배정도 부동소수점 나누기Double-precision floating point division

구문:construction:

ddiv = 111ddiv = 111

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2는 배정도 부동소수점 수이어야 한다. value1value2로 나누어지고, 양 값은 모두 그들의 배정도 부동소수점 몫에 의해 상기 스택상에서 교체된다. value1 and value2 must be double-precision floating point numbers. value1 is divided by value2 , and both values are replaced on the stack by their double-precision floating point quotient.

0으로 나누면 몫은 NaN이 된다.Dividing by 0 gives the quotient NaN.

iremirem

정수 나머지Integer remainder

구문:construction:

irem = 112irem = 112

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 둘 다 정수이어야 한다. value1value2로 나누어지고, 양 값은 모두 그들의 정수 나머지에 의해 상기 스택상에서 교체된다. value1 and value2 must both be integers. value1 is divided by value2 , and both values are replaced on the stack by their integer remainder.

0으로 나누고자 하는 시도는 기동되는 "/by zero" ArithmeticException으로 귀착한다.Attempts to divide by zero result in a "/ by zero" ArithmeticException being invoked.

lremlrem

배정도 정수 나머지Double integer remainder

구문:construction:

lrem = 113lrem = 113

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2 는 모두 배정도 정수이어야 한다. value1value2로 나누어지고, 양 값은 모두 그들의 배정도 정수 나머지에 의해 상기 스택상에서 교체된다. value1 and value2 must both be double integers. value1 is divided by value2 , and both values are replaced on the stack by their double integer remainder.

0으로 나누고자 하는 시도는 기동되는 "/by zero" ArithmeticException 로 귀착한다.Attempts to divide by zero result in a "/ by zero" ArithmeticException being invoked.

fremfrem

단정도 부동소수점 나머지Single precision floating point remainder

구문:construction:

frem = 114frem = 114

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 둘 다 단정도 부동소수점 수이어야 한다. value1value2로 나누어지고, 그 몫은 정수로 잘린다. 그 곱은 value1에서 감산된다. 그 결과, 단정도 부동소수점 수와 같이, 양 값은 상기 스택상에서 교체된다. value1 and value2 must both be single-precision floating point numbers. value1 is divided by value2 , and the quotient is truncated to an integer. The product is subtracted from value1 . As a result, both values are swapped on the stack, such as single precision floating point numbers.

result = value1 - (integral_part(value/value2)*value2)이고, 여기서 integral_part()는 짝수로 되는 같은 수를 갖는 가장 근접한 정수로 사사오입한다. result = value1- (integral_part (value / value2) * value2 ), where integral_part () rounds to the nearest integer with the same number being even.

0으로 나누고자 하면 결과는 NaN이 된다.If you divide by zero, the result is NaN.

dremdrem

배정도 부동소수점 나머지Double precision floating point remainder

구문:construction:

drem = 115drem = 115

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2는 둘 다 배정도 부동소수점 수이어야 한다. value1value2로 나누어지고, 그 몫은 정수로 잘리고, 그다음 value2와 곱해진다. 그 곱은 value1에서 감산된다. 그 결과, 배정도 부동소수점 수와 같이, 양 값은 상기 스택상에서 교체된다. value1 and value2 must both be double-precision floating point numbers. value1 is divided by value2 , the quotient is truncated to an integer, and then multiplied by value2 . The product is subtracted from value1 . As a result, both values, such as double precision floating point numbers, are swapped on the stack.

result = value1 - (integral_part(value/value2)*value2)이고, 여기서 integral_part()는 짝수로 되는 같은 수를 갖는 가장 근접한 정수로 사사오입한다. result = value1- (integral_part (value / value2) * value2 ), where integral_part () rounds to the nearest integer with the same number being even.

0으로 나누고자 하면 결과는 NaN이 된다.If you divide by zero, the result is NaN.

inegineg

정수 간접Integer indirect

구문:construction:

ineg = 116ineg = 116

스택: ..., value => ..., result Stack: ..., value => ..., result

value는 정수이어야 한다. 이것은 그의 산술 연산 간접에 의해 상기 스택상에 되놓인다. value must be an integer. This is put on the stack by its arithmetic operation indirectly.

lneglneg

배정도 정수 간접Double integer indirect

구문:construction:

lneg = 117lneg = 117

스택: ..., value1-word1, value1-word2 => ..., result-word1 Stack: ..., value1-word1, value1-word2 => ..., result-word1

value는 정수이어야 한다. 이것은 그의 산술 연산 간접에 의해 상기 스택상에 되놓인다. value must be an integer. This is put on the stack by its arithmetic operation indirectly.

fnegfneg

단정도 부동소수점 간접Single-precision floating point indirect

구문:construction:

fneg = 118fneg = 118

스택: ..., value => ..., result Stack: ..., value => ..., result

value는 단정도 부동소수점 수이어야 한다. 이것은 그의 산술 연산 간접에 의해 상기 스택상에 되놓인다. value must be a single floating point number. This is put on the stack by its arithmetic operation indirectly.

dnegdneg

배정도 부동소수점 간접Double precision floating point indirect

구문:construction:

dneg = 119dneg = 119

스택: ..., value1-word1, value1-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2 => ..., result-word1, result-word2

value는 배정도 부동소수점 수이어야 한다. 이것은 그의 산술 연산 간접에 의해 상기 스택상에 놓는다. value must be a double-precision floating point number. It is placed on the stack by its arithmetic operation indirectly.

3.9 논리 명령(Logical Instructions)3.9 Logical Instructions

ishlishl

정수 왼쪽 시프트Integer left shift

구문:construction:

ishl = 120ishl = 120

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 정수이어야 한다. value1value2의 하위 5비트에 의해 표시된 양에 의해 왼쪽으로 시프트된다. 상기 정수 결과는 두 값 모두를 상기 스택상에 놓는다. value1 and value2 must be integers. value1 is shifted left by the amount indicated by the lower 5 bits of value2 . The integer result puts both values on the stack.

ishrishr

정수 산술 연산 오른쪽 시프트Integer Arithmetic Right Shift

구문:construction:

ishr = 122ishr = 122

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 정수이어야 한다. value1value2의 하위 5비트에 의해 표시된 양에 의해 (부호 확장을 가지고) 산술 연산적으로 오른쪽으로 시프트된다. 상기 정수 결과는 두 값을 모두 상기 스택상에 놓는다. value1 and value2 must be integers. value1 is shifted arithmetic right (with sign extension) by the amount indicated by the lower 5 bits of value2 . The integer result puts both values on the stack.

iushriushr

정수 논리 오른쪽 시프트Integer Logic Right Shift

구문:construction:

iushr = 124iushr = 124

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 정수이어야 한다. value1value2의 하위 5비트에 의해 표시된 양에 의해 (부호 확장 없이) 산술 연산적으로 오른쪽으로 시프트된다. 상기 정수 결과는 두 값을 모두 상기 스택상에 놓는다. value1 and value2 must be integers. value1 is shifted arithmetic right (without sign expansion) by the amount indicated by the lower 5 bits of value2 . The integer result puts both values on the stack.

lshllshl

배정도 정수 왼쪽 시프트Double integer left shift

구문:construction:

lshl = 121lshl = 121

스택: ..., value1-word1, value1-word2, value2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2 => ..., result-word1, result-word2

value1은 배정도 정수이어야 하고 value2는 정수이어야 한다. value1value2 의 하위 6비트에 의해 표시된 양에 의해 왼쪽으로 시프트된다. 상기 배정도 정수 결과는 두 값을 모두 상기 스택상에 놓는다. value1 must be a double integer and value2 must be an integer. value1 is shifted left by the amount indicated by the lower 6 bits of value2 . The double integer result puts both values on the stack.

lshrlshr

배정도 정수 산술 연산 오른쪽 시프트Double-precision integer arithmetic right shift

구문:construction:

lshr = 123lshr = 123

스택: ..., value1-word1, value1-word2, value2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2 => ..., result-word1, result-word2

value1은 배정도 정수이어야 하고 value2는 정수이어야 한다. value1value2의 하위 6비트에 의해 표시된 양에 의해 (부호 확장을 가지고) 산술 연산적으로 오른쪽으로 시프트된다. 상기 배정도 정수 결과는 두 값을 모두 상기 스택상에 놓는다. value1 must be a double integer and value2 must be an integer. value1 is shifted arithmetic right (with sign extension) by the amount indicated by the lower 6 bits of value2 . The double integer result puts both values on the stack.

lushrlushr

배정도 정수 논리 오른쪽 시프트Double Integer Logic Right Shift

구문:construction:

lushr = 125lushr = 125

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1은 배정도 정수이어야 하고 value2는 정수이어야 한다. value1value2의 하위 6비트에 의해 표시된 양에 의해 (부호 확장 없이) 논리적으로 오른쪽으로 시프트된다. 상기 배정도 정수 결과는 두 값을 모두 상기 스택상에 놓는다. value1 must be a double integer and value2 must be an integer. value1 is logically shifted right (without sign extension) by the amount indicated by the lower 6 bits of value2 . The double integer result puts both values on the stack.

iandiand

정수 불 ANDInteger Boolean AND

구문:construction:

iand = 126iand = 126

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 정수이어야 한다. 이들은 그들의 비트방향 논리 and(논리곱)에 의해 상기 스택상에 놓여진다. value1 and value2 must be integers. These are placed on the stack by their bitwise logic and.

landland

배정도 정수 불 ANDDouble integer integer AND

구문:construction:

land = 127land = 127

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2는 배정도 정수이어야 한다. 이들은 그들의 비트방향 논리 and(논리곱)에 의해 상기 스택상에 놓여진다. value1 and value2 must be double integers. These are placed on the stack by their bitwise logic and.

iorior

정수 불 ORInteger Boolean OR

구문:construction:

ior = 128ior = 128

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 정수이어야 한다. 이들은 그들의 비트방향 논리 or(논리합)에 의해 상기 스택상에 놓여진다. value1 and value2 must be integers. These are placed on the stack by their bitwise logic or.

lorlor

배정도 정수 불 ORDouble integer Boolean OR

구문:construction:

lor = 129lor = 129

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2는 배정도 정수이어야 한다. 이들은 그들의 비트방향 논리 or(논리합)에 의해 상기 스택상에 놓여진다. value1 and value2 must be double integers. These are placed on the stack by their bitwise logic or.

ixorixor

정수 부울 XORInteger Boolean XOR

구문:construction:

ixor = 130ixor = 130

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 모두 정수이어야 한다. 이들은 그들의 비트방향 exclusive or(배타적 논리합)에 의해 상기 스택상에 놓여진다. value1 and value2 must both be integers. They are placed on the stack by their bitwise exclusive or.

lxorlxor

배정도 정수 부울 XORDouble Integer Boolean XOR

구문:construction:

lxor = 131lxor = 131

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2 Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2

value1value2는 모두 배정도 정수이어야 한다. 이들은 그들의 비트방향 exclusive or(배타적 논리합)에 의해 상기 스택상에 놓여진다. value1 and value2 must both be double integers. They are placed on the stack by their bitwise exclusive or.

3.10 변환 연산(Conversion Operations)3.10 Conversion Operations

i2li2l

정수-배정도 정수 변환Integer-double integer conversion

구문:construction:

i2l = 133i2l = 133

스택: ..., value => ..., result-word1, result-word2 Stack: ..., value => ..., result-word1, result-word2

value는 정수이어야 한다. 이것은 배정도 정수로 변환된다. 그 결과는 스택의 value를 대체한다. value must be an integer. This is converted to a double integer. The result replaces value on the stack.

i2fi2f

정수-단정도 부동소수점Integer-precision floating point

구문:construction:

i2f = 134i2f = 134

스택: ..., value => ..., result Stack: ..., value => ..., result

value는 정수이어야 한다. 이것은 단정도 부동소수점 수로 변환된다. 그 결과는 스택의 value를 대체한다. value must be an integer. This is converted to a single floating point number. The result replaces value on the stack.

i2di2d

정수-배정도 부동소수점Integer-double floating point

구문:construction:

i2d = 135i2d = 135

스택: ..., value => ..., result-word1, result-word2 Stack: ..., value => ..., result-word1, result-word2

value는 정수이어야 한다. 이것은 배정도 부동소수점 수로 변환된다. 그 결과는 스택의 value를 대체한다. value must be an integer. This is converted to a double precision floating point number. The result replaces value on the stack.

l2il2i

배정도 정수-정수Double integer-integer

구문:construction:

l2i = 136l2i = 136

스택: ..., value-word1, value-word2 => ..., result Stack: ..., value-word1, value-word2 => ..., result

value는 배정도 정수이어야 한다. 이것은 하위측 32비트를 취해 정수로 변환된다. 그 결과는 스택의 value를 대체한다. value must be a double integer. This takes the lower 32 bits and converts to an integer. The result replaces value on the stack.

l2fl2f

배정도 정수-단정도 부동소수점Double integer-single floating point

구문:construction:

l2f = 137l2f = 137

스택: ..., value-word1, value-word2 => ..., result Stack: ..., value-word1, value-word2 => ..., result

value는 배정도 정수이어야 한다. 이것은 단정도 부동소수점 수로 변환된다. 그 결과는 스택의 value를 대체한다. value must be a double integer. This is converted to a single floating point number. The result replaces value on the stack.

l2dl2d

배정도 정수-배정도 부동소수점Double integer-double floating point

구문:construction:

l2d = 138l2d = 138

스택: ..., value-word1, value-word2 => ..., result-word1, result-word2 Stack: ..., value-word1, value-word2 => ..., result-word1, result-word2

value는 배정도 정수이어야 한다. 이것은 배정도 부동소수점 수로 변환된다. 그 결과는 스택의 value를 대체한다. value must be a double integer. This is converted to a double precision floating point number. The result replaces value on the stack.

f2if2i

단정도 부동소수점-정수Single-precision floating point-integer

구문:construction:

f2i = 139f2i = 139

스택: ..., value => ..., result Stack: ..., value => ..., result

value는 단정도 부동소수점 수이어야 한다. 이것은 정수로 변환된다. 그 결과는 스택의 value를 대체한다. value must be a single floating point number. This is converted to an integer. The result replaces value on the stack.

f2lf2l

단정도 부동소수점-배정도 정수Single-precision floating-point-double integer

구문:construction:

f2l = 140f2l = 140

스택: ..., value => ..., result-word1, result-word2 Stack: ..., value => ..., result-word1, result-word2

value는 단정도 부동소수점 수이어야 한다. 이것은 배정도 정수로 변환된다. 그 결과는 스택의 value를 대체한다. value must be a single floating point number. This is converted to a double integer. The result replaces value on the stack.

f2df2d

단정도 부동소수점-배정도 부동소수점Single-precision floating-point

구문:construction:

f2d = 141f2d = 141

스택: ..., value => ..., result-word1, result-word2 Stack: ..., value => ..., result-word1, result-word2

value는 단정도 부동소수점 수이어야 한다. 이것은 배정도 부동소수점 수로 변환된다. 그 결과는 스택의 value를 대체한다. value must be a single floating point number. This is converted to a double precision floating point number. The result replaces value on the stack.

d2id2i

배정도 부동소수점-정수Double precision floating point-integer

구문:construction:

d2i = 142d2i = 142

스택: ..., value-word1, value-word2 => ..., result Stack: ..., value-word1, value-word2 => ..., result

value는 배정도 부동소수점 수이어야 한다. 이것은 정수로 변환된다. 그 결과는 스택의 value를 대체한다. value must be a double-precision floating point number. This is converted to an integer. The result replaces value on the stack.

d2ld2l

배정도 부동소수점-배정도 정수Double-precision floating point-double integer

구문:construction:

d2l = 143d2l = 143

스택: ..., value-word1, value-word2 => ..., result-word1, result-word2 Stack: ..., value-word1, value-word2 => ..., result-word1, result-word2

value는 배정도 부동소수점 수이어야 한다. 이것은 배정도 정수로 변환된다. 그 결과는 스택의 value를 대체한다. value must be a double-precision floating point number. This is converted to a double integer. The result replaces value on the stack.

d2fd2f

배정도 부동소수점-단정도 부동소수점Double precision floating point-Single precision floating point

구문:construction:

2df = 1442df = 144

스택: ..., value-word1, value-word2 => ..., result Stack: ..., value-word1, value-word2 => ..., result

value는 배정도 부동소수점 수이어야 한다. 이것은 단정도 부동소수점 수로 변환된다. 만일 오버플로우가 발생하면, 그 결과는 value와 동일한 부호를 갖는 무한대가 되어야 한다. 그 결과는 스택의 value를 대체한다. value must be a double-precision floating point number. This is converted to a single floating point number. If an overflow occurs, the result should be infinity with the same sign as value . The result replaces value on the stack.

int2byteint2byte

정수-부호 달린 바이트Integer-signed byte

구문:construction:

int2byte = 157int2byte = 157

스택: ..., value => ..., result Stack: ..., value => ..., result

value는 정수이어야 한다. 이것은 부호 달린 8-비트 결과로 절단되고, 다음으로 부호는 정수로 확장된다. 그 결과는 스택의 value를 대체한다. value must be an integer. It is truncated into a signed 8-bit result, and then the sign is extended to an integer. The result replaces value on the stack.

int2charint2char

정수-charInteger-char

구문:construction:

int2char = 146int2char = 146

스택: ..., value => ..., result Stack: ..., value => ..., result

value는 정수이어야 한다. 이것은 부호 없는 16-비트 결과로 절단되고, 다음으로 0가 정수로 확장된다. 그 결과는 스택의 value를 대체한다. value must be an integer. This is truncated to an unsigned 16-bit result, followed by zero extending to an integer. The result replaces value on the stack.

int2shortint2short

짧은 정수Short integer

구문:construction:

int2short = 147int2short = 147

스택: ..., value => ..., result Stack: ..., value => ..., result

value는 정수이어야 한다. 이것은 부호 달린 16-비트 결과로 절단되고, 다음으로 부호는 정수로 확장된다. 그 결과는 스택의 value를 대체한다. value must be an integer. It is truncated to a signed 16-bit result, and then the sign is extended to an integer. The result replaces value on the stack.

3.11 제어 전송 명령(Control Transfer Instructions)3.11 Control Transfer Instructions

ifeqifeq

0인 경우의 분기Branch if zero

구문:construction:

ifeg = 153ifeg = 153 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value => ... Stack: ..., value => ...

value는 정수이어야 한다. 이것은 상기 스택으로부터 팝된다. value가 0이면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 상기 ifeq 다음에 오는 명령에서 실행은 진행된다. value must be an integer. This is popped from the stack. If value is 0, branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise, execution proceeds at the command following the ifeq.

ifnullifnull

널인 경우의 분기Branch if null

구문:construction:

ifnull = 198ifnull = 198 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value => ... Stack: ..., value => ...

value는 오브젝트에 대한 레퍼런스이어야 한다. 이것은 상기 스택으로부터 팝된다. value가 널이면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 상기 ifnull 다음에 오는 명령에서 진행된다. value must be a reference to an object. This is popped from the stack. If value is null, branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise execution proceeds with the command following ifnull.

ifltiflt

0보다 작은 경우의 분기Branch if less than zero

구문:construction:

iflt = 155iflt = 155 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value => ... Stack: ..., value => ...

value는 정수이어야 한다. 이것은 상기 스택으로부터 팝된다. value가 0보다 작다면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 상기 iflt 다음에 오는 명령에서 진행된다. value must be an integer. This is popped from the stack. If value is less than zero, branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise execution proceeds with the command following iflt.

ifleifle

0보다 작거나 같은 경우의 분기Branch if less than or equal to zero

구문:construction:

ifle = 158ifle = 158 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value => ... Stack: ..., value => ...

value는 정수이어야 한다. 이것은 상기 스택으로부터 팝된다. value가 0보다 작거나 같다면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 상기 ifle 다음에 오는 명령에서 진행된다. value must be an integer. This is popped from the stack. If value is less than or equal to zero, branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise execution proceeds with the command following the ifle.

ifneifne

0이 아닌 경우의 분기Branch if nonzero

구문:construction:

ifne = 154ifne = 154 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value => ... Stack: ..., value => ...

value는 정수이어야 한다. 이것은 상기 스택으로부터 팝된다. value가 0이 아니라면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 상기 ifne 다음에 오는 명령에서 진행된다. value must be an integer. This is popped from the stack. If value is nonzero, branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise execution proceeds with the command following the ifne above.

ifnonnullifnonnull

널이 아닌 경우의 분기Branch if not null

구문:construction:

ifnonnull = 199ifnonnull = 199 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value => ... Stack: ..., value => ...

value는 오브젝트의 레퍼런스이어야 한다. 이것은 상기 스택으로부터 팝된다. value가 널이 아니라면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 상기 ifnonnull 다음에 오는 명령에서 진행된다. value must be a reference to the object. This is popped from the stack. If value is not null, branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise execution proceeds with the command following ifnonnull.

ifgtifgt

0보다 큰 경우의 분기Quarter if greater than zero

구문:construction:

ifft = 157ifft = 157 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value => ... Stack: ..., value => ...

value는 정수이어야 한다. 이것은 상기 스택으로부터 팝된다. value가 0보다 크다면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 상기 ifgt 다음에 오는 명령에서 진행된다. value must be an integer. This is popped from the stack. If value is greater than zero, branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise execution proceeds at the instruction following the ifgt.

ifgeifge

0보다 크거나 같은 경우의 분기Branch if greater than or equal to 0

구문:construction:

ifge = 156ifge = 156 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value => ... Stack: ..., value => ...

value는 정수이어야 한다. 이것은 상기 스택으로부터 팝된다. value가 0보다 크거나 같다면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 상기 ifge 다음에 오는 명령에서 진행된다. value must be an integer. This is popped from the stack. If value is greater than or equal to 0, branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise execution proceeds at the command following the ifge.

if_icmpeqif_icmpeq

정수가 동일한 경우의 분기Quarter if integers are equal

구문:construction:

if_icmpeg = 159if_icmpeg = 159 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value1, value2 => ... Stack: ..., value1, value2 => ...

value1value2는 정수이어야 한다. 이들은 모두 상기 스택으로부터 팝된다. value1이 value2와 같다면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 명령 if_icmpeq 다음에 오는 명령에서 진행된다. value1 and value2 must be integers. These are all popped from the stack. If value1 is equal to value2 , branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise, execution proceeds at the command following the command if_icmpeq.

if_icmpneif_icmpne

정수가 같지 않은 경우의 분기Branch when integers are not equal

구문:construction:

if_icmpne = 160if_icmpne = 160 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value1, value2 => ... Stack: ..., value1, value2 => ...

value1value2는 정수이어야 한다. 이들은 모두 상기 스택으로부터 팝된다. value1value2와 같지 않다면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 명령 if_icmpne 다음에 오는 명령에서 진행된다. value1 and value2 must be integers. These are all popped from the stack. If value1 is not equal to value2 , branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise, execution proceeds at the command following the command if_icmpne.

if_icmpltif_icmplt

정수가 보다 작은 경우의 분기Branch if integer is less than

구문:construction:

if_icmplt = 161if_icmplt = 161 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value1, value2 => ... Stack: ..., value1, value2 => ...

value1value2는 정수이어야 한다. 이들은 모두 상기 스택으로부터 팝된다. value1value2보다 작다면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 명령 if_icmplt 다음에 오는 명령에서 진행된다. value1 and value2 must be integers. These are all popped from the stack. If value1 is less than value2 , branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise, execution proceeds at the command following the command if_icmplt.

if_icmpgtif_icmpgt

정수가 보다 큰 경우의 분기Quarter if integer is greater than

구문:construction:

if_icmpgt = 163if_icmpgt = 163 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value1, value2 => ... Stack: ..., value1, value2 => ...

value1value2는 정수이어야 한다. 이들은 모두 상기 스택으로부터 팝된다. 만일 value1value2보다 크다면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 명령 if_icmpgt 다음에 오는 명령에서 진행된다. value1 and value2 must be integers. These are all popped from the stack. If value1 is greater than value2 , branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise, execution proceeds at the command following the command if_icmpgt .

if_icmpleif_icmple

정수가 작거나 같은 경우의 분기Branch if integer is less than or equal to

구문:construction:

if_icmple = 164if_icmple = 164 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value1, value2 => ... Stack: ..., value1, value2 => ...

value1value2는 정수이어야 한다. 이들은 모두 상기 스택으로부터 팝된다. value1value2보다 작거나 같다면, branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 명령 if_icmple 다음에 오는 명령에서 진행된다. value1 and value2 must be integers. These are all popped from the stack. If value1 is less than or equal to value2 , branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise, execution proceeds at the command following the command if_icmple .

if_icmpgeif_icmpge

정수가 크거나 같은 경우의 분기Branch if integer is greater than or equal to

구문:construction:

if_icmpge = 162if_icmpge = 162 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value1, value2 => ... Stack: ..., value1, value2 => ...

value1 및 value2는 정수이어야 한다. 이들은 모두 상기 스택으로부터 팝된다. value1이 value2보다 크거나 같다면, branchbyte1 및 branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 이 명령의 어드레스로부터의 그 오프셋에서 실행이 진행된다. 그렇지 않으면 실행은 명령 if_icmpge 다음에 오는 명령에서 진행된다. value1 and value2 must be integers. These are all popped from the stack. If value1 is greater than or equal to value2, branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction. Otherwise, execution proceeds at the command following the command if_icmpge .

lcmplcmp

배정도 정수 비교Double integer comparison

구문:construction:

lcmp = 148lcmp = 148

스택: ..., value1-word1, value1-word2, value2-word1, => ..., result Stack: ..., value1-word1, value1-word2, value2-word1, => ..., result

value1value2는 배정도 정수이어야 한다. 이들은 모두 상기 스택으로부터 팝되고 비교된다. value1value2보다 크다면, 정수 값 1이 상기 스택상으로 푸시된다. value1value2와 같다면, value 0가 상기 스택상으로 푸시된다. value1value2보다 작다면, value -1이 상기 스택상으로 푸시된다. value1 and value2 must be double integers. They are all popped from the stack and compared. If value1 is greater than value2 , integer value 1 is pushed onto the stack. If value1 is equal to value2 , value 0 is pushed onto the stack. If value1 is less than value2 , value -1 is pushed onto the stack.

fcmplfcmpl

단정도 부동소수점 비교(NaN 상의 1)Single precision floating point comparison (1 on NaN)

구문:construction:

fcmpl = 149fcmpl = 149

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 단정도 부동소수점 수이어야 한다. 이들은 모두 상기 스택으로부터 팝되고 비교된다. value1value2보다 크다면, 정수 값 1이 상기 스택상으로 푸시된다. value1value2와 같다면, value 0가 상기 스택상으로 푸시된다. value1value2보다 작다면, value -1이 상기 스택상으로 푸시된다. value1 and value2 must be single-precision floating point numbers. They are all popped from the stack and compared. If value1 is greater than value2 , integer value 1 is pushed onto the stack. If value1 is equal to value2 , value 0 is pushed onto the stack. If value1 is less than value2 , value -1 is pushed onto the stack.

만일 value1 또는 value2 중 하나가 NaN라면, value -1이 상기 스택상으로 푸시된다.If either value1 or value2 is NaN, value -1 is pushed onto the stack.

fcmpgfcmpg

단정도 부동소수점 비교(NaN 상의 1)Single precision floating point comparison (1 on NaN)

구문:construction:

fcmpg = 150fcmpg = 150

스택: ..., value1, value2 => ..., result Stack: ..., value1, value2 => ..., result

value1value2는 단정도 부동소수점 수이어야 한다. 이들은 모두 상기 스택으로부터 팝 되고 비교된다. value1value2보다 크다면, 정수 값 1이 상기 스택상으로 푸시된다. value1value2와 같다면, value 0가 상기 스택상으로 푸시된다. value1value2보다 작다면, value -1이 상기 스택상으로 푸시된다. value1 and value2 must be single-precision floating point numbers. They are all popped from the stack and compared. If value1 is greater than value2 , integer value 1 is pushed onto the stack. If value1 is equal to value2 , value 0 is pushed onto the stack. If value1 is less than value2 , value -1 is pushed onto the stack.

value1 또는 value2 중 하나가 NaN라면, value 1이 상기 스택상으로 푸시된다. If either value1 or value2 is NaN, value 1 is pushed onto the stack.

dcmpldcmpl

배정도 부동소수점 비교(NaN 상의 -1)Double-precision floating point comparison (-1 on NaN)

구문:construction:

dcmpl = 151dcmpl = 151

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result

value1value2는 배정도 부동소수점 수이어야 한다. 이들은 모두 상기 스택으로부터 팝되고 비교된다. value1value2보다 크다면, 정수 값 1이 상기 스택상으로 푸시된다. value1value2와 같다면, value 0가 상기 스택상으로 푸시된다. value1value2보다 작다면, value 1이 상기 스택상으로 푸시된다. value1 and value2 must be double-precision floating point numbers. They are all popped from the stack and compared. If value1 is greater than value2 , integer value 1 is pushed onto the stack. If value1 is equal to value2 , value 0 is pushed onto the stack. If value1 is less than value2 , value 1 is pushed onto the stack.

value1 또는 value2 중 하나가 NaN라면, value 1이 상기 스택상으로 푸시된다. If either value1 or value2 is NaN, value 1 is pushed onto the stack.

dcmpgdcmpg

배정도 부동소수점 비교(NaN 상의 1)Double precision floating point comparison (1 on NaN)

구문:construction:

dcmpg = 152dcmpg = 152

스택: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result

value1value2는 배정도 부동소수점 수이어야 한다. 이들은 모두 상기 스택으로부터 팝되고 비교된다. value1value2보다 크다면, 정수 값 1이 상기 스택상으로 푸시된다. value1value2와 같다면, value 0가 상기 스택상으로 푸시된다. value1value2보다 작다면, value -1이 상기 스택상으로 푸시된다. value1 and value2 must be double-precision floating point numbers. They are all popped from the stack and compared. If value1 is greater than value2 , integer value 1 is pushed onto the stack. If value1 is equal to value2 , value 0 is pushed onto the stack. If value1 is less than value2 , value -1 is pushed onto the stack.

value1 또는 value2 중 하나가 NaN라면, value 1이 상기 스택상으로 푸시된다. If either value1 or value2 is NaN, value 1 is pushed onto the stack.

if_acmpegif_acmpeg

오브젝트 레퍼런스가 같은 경우의 분기Branch if the object references are equal

구문:construction:

if_acmpeg = 165if_acmpeg = 165 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value1, value2 => ... Stack: ..., value1, value2 => ...

value1value2는 오브젝트에 대한 레퍼런스이어야 한다. 이들은 모두 상기 스택으로부터 팝된다. 참조된 오브젝트가 동일하지 않다면, branchbyte1 및 branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. value1 and value2 must be references to objects. These are all popped from the stack. If the referenced object is not the same, branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset.

실행은 이 명령의 어드레스로부터의 그 오프셋에서 진행된다. 그렇지 않으면 실행은 상기 if_acmpeg 다음에 오는 명령에서 진행된다.Execution proceeds at that offset from the address of this instruction. Otherwise execution proceeds with the command following the if_acmpeg.

if_acmpneif_acmpne

오브젝트 레퍼런스가 같지 않은 경우의 분기Branch when object references are not equal

구문:construction:

if_acmpne = 166if_acmpne = 166 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ..., value1, value2 => ... Stack: ..., value1, value2 => ...

value1value2는 오브젝트에 대한 레퍼런스이어야 한다. 이들은 모두 상기 스택으로부터 팝된다. 참조된 오브젝트가 동일하지 않다면, branchbyte1 및 branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. value1 and value2 must be references to objects. These are all popped from the stack. If the referenced object is not the same, branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset.

실행은 이 명령의 어드레스로부터의 그 오프셋에서 진행된다. 그렇지 않으면 실행은 명령 if_acmpne 다음에 오는 명령에서 진행된다.Execution proceeds at that offset from the address of this instruction. Otherwise, execution proceeds at the command following the command if_acmpne .

gotogoto

모든 경우의 분기Quarter of all occasions

구문:construction:

goto = 167goto = 167 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: 변화 없음Stack: no change

branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 실행은 이 명령의 어드레스로부터의 그 오프셋에서 진행된다. branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. Execution proceeds at that offset from the address of this instruction.

goto_wgoto_w

모든 경우의 분기(광역 인덱스)Branch in all cases (wide index)

구문:construction:

goto_w = 200goto_w = 200 branchbyte1branchbyte1 branchbyte2branchbyte2 branchbyte3branchbyte3 branchbyte4branchbyte4

스택: 변화 없음Stack: no change

branchbyte1, branchbyte2, branchbyte3branchbyte4는 부호 달린 32-비트 오프셋을 구성하기 위해 사용된다. branchbyte1, branchbyte2, branchbyte3 and branchbyte4 are used to construct a signed 32-bit offset.

실행은 이 명령의 어드레스로부터의 그 오프셋에서 진행된다.Execution proceeds at that offset from the address of this instruction.

jsrjsr

서브루틴 점프Subroutine jump

구문:construction:

jsr = 168jsr = 168 branchbyte1branchbyte1 branchbyte2branchbyte2

스택: ... => ..., return-address Stack: ... => ..., return-address

branchbyte1branchbyte2는 부호 달린 16-비트 오프셋을 구성하기 위해 사용된다. 상기 jsr 다음에 즉시 따라오는 명령의 어드레스가 상기 스택상으로 푸시된다. 이 명령의 어드레스로부터의 오프셋에서 실행이 진행된다. branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset. The address of the instruction immediately following jsr is pushed onto the stack. Execution proceeds at an offset from the address of this instruction.

jsr_wjsr_w

서브루틴 점프(광역 인덱스)Subroutine Jump (Wide Index)

구문:construction:

jsr_w = 201jsr_w = 201 branchbyte1branchbyte1 branchbyte2branchbyte2 branchbyte3branchbyte3 branchbyte4branchbyte4

스택: ... => ..., return-address Stack: ... => ..., return-address

branchbyte1, branchbyte2, branchbyte3branchbyte4는 부호 달린 32-비트 오프셋을 구성하기 위해 사용된다. 상기 jsr_w 다음에 즉시 따라오는 명령의 어드레스가 상기 스택상으로 푸시된다. 이 명령의 어드레스로부터의 오프셋에서 실행이 진행된다. branchbyte1, branchbyte2, branchbyte3 and branchbyte4 are used to construct a signed 32-bit offset. The address of the instruction immediately following jsr_w is pushed onto the stack. Execution proceeds at an offset from the address of this instruction.

retret

서브루틴으로부터 복귀Return from subroutine

구문:construction:

ret = 169ret = 169 vindexvindex

스택: 변화 없음Stack: no change

현재 JAVA 프레임내의 로컬 변수 vindex 는 리턴 어드레스를 포함해야 한다. 상기 로컬 변수의 내용은 상기 pc로 기록된다.The local variable vindex in the current JAVA frame must contain a return address. The contents of the local variable are written to the pc.

jsr이 상기 어드레스를 상기 스택상으로 푸시하고 ret가 그것을 로컬 변수에서 얻게됨에 유의하라. 이 부조화는 의도적인 것이다.Note that jsr pushes the address onto the stack and ret gets it from a local variable. This disharmony is intentional.

ret_wret_w

서브루틴으로부터 복귀(광역 인덱스)Return from subroutine (wide index)

구문:construction:

ret_w = 209ret_w = 209 vindexbyte1vindexbyte1 vindexbyte2vindexbyte2

스택: 변화 없음Stack: no change

vindexbyte1vindexbyte2는 현재 JAVA 프레임내의 로컬 변수로 부호 없는 16-비트 인덱스내로 어셈블된다. 상기 로컬 변수는 리턴 어드레스를 포함해야 한다. 상기 로컬 변수의 내용은 상기 pc로 기록된다. 더 많은 정보에 대해서는 ret 명령을 참조하라. vindexbyte1 and vindexbyte2 are local variables in the current JAVA frame, assembled into an unsigned 16-bit index. The local variable must contain a return address. The contents of the local variable are written to the pc. See the ret command for more information.

3.12 함수 리턴(Function Return)3.12 Function Return

ireturnireturn

함수로부터 정수 리턴Return integer from function

구문:construction:

ireturn = 172ireturn = 172

스택: ..., value1 => ..., [empty] Stack: ..., value1 => ..., [empty]

value는 정수이어야 한다. 상기 값 value는 앞선 실행 환경의 스택상으로 푸시된다. 상기 오퍼랜드 스택상의 다른 값들은 버려진다. 그러면 해석기는 그의 호출자로 제어를 되돌려보낸다. value must be an integer. The value value is pushed onto the stack of the previous execution environment. Other values on the operand stack are discarded. The interpreter then returns control to his caller.

lreturnlreturn

함수로부터 배정도 정수 리턴Return double integer from function

구문:construction:

lreturn = 173lreturn = 173

스택: ..., value-word1, value-word2 => ..., [empty] Stack: ..., value-word1, value-word2 => ..., [empty]

value는 배정도 정수이어야 한다. 상기 값 value는 앞선 실행 환경의 스택상으로 푸시된다. 상기 오퍼랜드 스택상의 다른 값들은 버려진다. 그러면 해석기는 그의 호출자로 제어를 되돌려보낸다. value must be a double integer. The value value is pushed onto the stack of the previous execution environment. Other values on the operand stack are discarded. The interpreter then returns control to his caller.

freturnfreturn

함수로부터 단정도 부동소수점 리턴Return single-precision floating point from function

구문:construction:

freturn = 174freturn = 174

스택: ..., value => ..., [empty] Stack: ..., value => ..., [empty]

value는 단정도 부동소수점 수이어야 한다. 상기 값 value는 앞선 실행 환경의 스택상으로 푸시된다. 상기 오퍼랜드 스택상의 다른 값들은 버려진다. 그러면 해석기는 그의 호출자로 제어를 되돌려보낸다. value must be a single floating point number. The value value is pushed onto the stack of the previous execution environment. Other values on the operand stack are discarded. The interpreter then returns control to his caller.

dreturndreturn

함수로부터 배정도 부동소수점 리턴Return double-precision floating point from function

구문:construction:

dreturn = 175dreturn = 175

스택: ..., value-word1, value-word2 => ..., [empty] Stack: ..., value-word1, value-word2 => ..., [empty]

value는 배정도 부동소수점 수이어야 한다. 상기 값 value는 앞선 실행 환경의 스택상으로 푸시된다. 상기 오퍼랜드 스택상의 다른 값들은 버려진다. 그러면 해석기는 그의 호출자로 제어를 되돌려보낸다. value must be a double-precision floating point number. The value value is pushed onto the stack of the previous execution environment. Other values on the operand stack are discarded. The interpreter then returns control to his caller.

areturnareturn

함수로부터 오브젝트 레퍼런스 리턴Return object reference from function

구문:construction:

areturn = 176areturn = 176

스택: ..., value => [empty]Stack: ..., value => [empty]

value는 오브젝트에 대한 레퍼런스이어야 한다. 상기 값 value는 앞선 실행 환경의 스택상으로 푸시된다. 상기 오퍼랜드 스택상의 다른 값들은 버려진다. 그러면 해석기는 그의 호출자로 제어를 되돌려보낸다. value must be a reference to an object. The value value is pushed onto the stack of the previous execution environment. Other values on the operand stack are discarded. The interpreter then returns control to his caller.

returnreturn

프로시저로부터 (무효) 리턴Return (invalid) from procedure

구문:construction:

return = 177return = 177

스택: ... => [empty]Stack: ... => [empty]

오퍼랜드 스택상의 모든 값들이 버려진다. 그러면 해석기는 그의 호출자로 제어를 되돌려보낸다.All values on the operand stack are discarded. The interpreter then returns control to his caller.

breakpointbreakpoint

중지 및 브레이크포인트 처리기로 제어 전송Transfer control to stop and breakpoint handler

구문:construction:

breakpoint = 202breakpoint = 202

스택: 변화 없음 Stack: no change

3.13 테이블 점핑(Table Jumping)3.13 Table Jumping

tableswitchtableswitch

인덱스 및 점프에 의한 점프 테이블 액세스Jump Table Access by Index and Jump

구문:construction:

tableswitch= 170tableswitch = 170 ...0-3 byte pad...... 0-3 byte pad ... default-offset1default-offset1 default-offset2default-offset2 default-offset3default-offset3 default-offset4default-offset4 low1low1 low2low2 low3low3 low4low4 high1high1 high2high2 high3high3 high4high4 ...jump offsets...... jump offsets ...

스택: ..., index => ... Stack: ..., index => ...

tableswitch는 가변 길이 명령이다. 상기 tableswitch 연산부호 바로 다음으로, 다음 바이트가 4를 곱하는 어드레스에서 시작되도록 제로와 세 개의 0 사이에 패딩으로서 삽입된다. 상기 패딩 다음에 일련의 부호 달린 4-바이트 양이 온다: default-offset, low, high, 그리고 다음으로 high-low+1이 또한 4비트 오프셋을 부호를 붙인다. 상기 high-low+1 부호 달린 4-바이트 오프셋은 0-기반 점프 테이블처럼 취급된다. tableswitch is a variable length command. Immediately after the tableswitch opcode, padding is inserted between zero and three zeros so that the next byte starts at an address multiplied by four. The padding is followed by a series of signed 4-byte quantities: default-offset, low, high, and then high-low +1 also sign the 4-bit offset. The high-low + 1 signed 4-byte offset is treated like a 0-based jump table.

index는 정수이어야 한다. indexlow 보다 작거나 또는 indexhigh 보다 크다면, default-offset가 이 명령의 어드레스에 더해진다. 그렇지 않으면, lowindex에서 감산되고, 상기 점프 테이블의 index-low번째 성분이 추출되며, 그리고 이 명령의 어드레스에 더해진다. index must be an integer. If index is less than low or index is greater than high , a default-offset is added to the address of this command. Otherwise, low is subtracted from index , the index-lowth component of the jump table is extracted, and added to the address of this instruction.

lookupswitchlookupswitch

키 매치 및 점프에 의한 점프 테이블 액세스Jump Table Access by Key Match and Jump

구문:construction:

lookupswitch= 171lookupswitch = 171 ...0-3 byte pad...... 0-3 byte pad ... default-offset1default-offset1 default-offset2default-offset2 default-offset3default-offset3 default-offset4default-offset4 npairslnpairsl npairs2npairs2 npairs3npairs3 npairs4npairs4 ...match-offset pairs...... match-offset pairs ...

스택: ..., key => ... Stack: ..., key => ...

lookupswitch는 가변 길이 명령이다. 상기 lookupswitch 연산부호 바로 직후, 4가 곱해지는 어드레서에서 다음 바이트가 시작되도록 패딩하는 것처럼 제로와 세 개의 0 사이에 삽입된다. lookupswitch is a variable length command. Immediately after the lookupswitch opcode, it is inserted between zero and three zeros, such as padding to start the next byte in an address multiplied by four.

상기 패딩 바로 다음에 여러개의 부호 달린 4-바이트 양의 쌍이 있게된다. 첫 번째 쌍은 특별하다. 그 쌍의 상기 첫 번째 조항은 디폴트 오프셋이고, 그 쌍의 두 번째 조항은 그 다음의 쌍의 수를 가져다 준다. 각각의 연속 쌍은 matchoffset으로 구성되어 있다.Immediately after the padding there are several signed 4-byte positive pairs. The first pair is special. The first clause of the pair is the default offset, and the second clause of the pair brings the number of the next pair. Each successive pair consists of a match and an offset .

상기 key는 정수이어야 한다. 스택 상의 정수 key는 상기 match 각각과 비교된다. 그들 중 하나와 같다면, offset가 이 명령의 어드레스에 더해진다. key가 상기 match의 어느 것과도 매치되지 않는다면, 상기 디폴트 오프셋이 이 명령의 어드레스에 더해진다.The key must be an integer. The integer key on the stack is compared to each of the above matches . If it is equal to one of them, offset is added to the address of this command. If key does not match any of the matches , the default offset is added to the address of this command.

3.14 오브젝트 필드 조작(Manipulation Object Fields)3.14 Manipulation Object Fields

putfieldputfield

오브젝트내 필드 설정Set Fields in Objects

구문:construction:

putfield = 181putfield = 181 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ..., objectref, value => ... Stack: ..., objectref, value => ...

또는or

스택: ..., objectref, value-word1, value-word2 => ... Stack: ..., objectref, value-word1, value-word2 => ...

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상기 상수 풀 항목은 클래스명 및 필드명에 대한 필드 레퍼런스가 될 것이다. 상기 항목은 상기 필드 폭(바이트 단위) 및 상기 필드 오프셋(바이트 단위)을 갖는 필드 블럭 포인터로 분해된다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The constant pool item will be a field reference to the class name and field name. The item is decomposed into a field block pointer having the field width (in bytes) and the field offset (in bytes).

objectref에 의해 참조된 오브젝트의 처음부터 오프셋에서의 필드는 상기 스택의 최상위의 값으로 세트될 것이다.The field at offset from the beginning of the object referenced by objectref will be set to the value of the top of the stack.

이 명령은 32-비트와 64-비트 광역 필드 모두를 처리한다.This command handles both 32-bit and 64-bit wide fields.

objectref 가 널이면, NullPointerException가 발생된다. If objectref is null, a NullPointerException is thrown.

지정된 필드가 스태틱 필드이면, IncompatibleClassChangeError가 기동된다. If the specified field is a static field, IncompatibleClassChangeError is invoked.

getfieldgetfield

오브젝트로부터 필드 패치Patch Fields from Objects

구문:construction:

getfield = 180getfield = 180 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ..., objectref => ..., value Stack: ..., objectref => ..., value

또는or

스택: ..., objectref => ..., value-word1, value-word2 Stack: ..., objectref => ..., value-word1, value-word2

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상기 상수 풀 항목은 클래스명 및 필드명에 대한 필드 레퍼런스가 될 것이다. 상기 항목은 상기 필드 폭(바이트 단위) 및 상기 필드 offset(바이트 단위)을 갖는 필드 블럭 포인터로 분해된다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The constant pool item will be a field reference to the class name and field name. The item is decomposed into a field block pointer having the field width (in bytes) and the field offset (in bytes).

objectref는 오브젝트의 레퍼런스이어야 한다. objectref에 의해 참조된 오브젝트의 처음부터 offset에서의 값은 상기 스택 최상위의 objectref를 대체한다. objectref must be a reference to the object. value in from the start of the object referenced by objectref offset replaces objectref on the top of stack.

이 명령은 32-비트와 64-비트 광역 필드 모두를 다룬다.This command covers both 32-bit and 64-bit wide fields.

objectref가 널이면, NullPointerException이 발생된다. If objectref is null, a NullPointerException is thrown.

지정된 필드가 스태틱 필드이면, IncompatibleClassChangeError가 기동된다.If the specified field is a static field, IncompatibleClassChangeError is invoked.

putstaticputstatic

클래스내 스태틱 필드 설정Static field setting in class

구문:construction:

putstatic = 179putstatic = 179 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ..., value => ... Stack: ..., value => ...

또는or

스택: ..., value-word1, value-word2 => ... Stack: ..., value-word1, value-word2 => ...

indexbyte1indexbyte2는 현재 클래스의 상수 풀 로의 인덱스를 구성하는데 사용된다. 상기 상수 풀 항목은 클래스의 스태틱 필드에 대한 필드 레퍼런스가 될 것이다. 그 필드는 상기 스택의 최상위의 값을 가지도록 설정될 것이다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The constant pool item will be a field reference to the static field of the class. The field will be set to have the highest value of the stack.

이 명령은 32-비트와 64-비트 광역 필드 모두를 처리한다.This command handles both 32-bit and 64-bit wide fields.

지정된 필드가 스태틱 필드이면, IncompatibleClassChangeError가 기동된다.If the specified field is a static field, IncompatibleClassChangeError is invoked.

getstaticgetstatic

클래스로부터 스태틱 필드 입수Get static field from class

구문:construction:

getstatic = 178getstatic = 178 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ..., => ..., value Stack: ..., => ..., value

또는or

스택: ..., => ..., value-word1, value-word2 Stack: ..., => ..., value-word1, value-word2

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상기 상수 풀 항목은 클래스의 스태틱 필드에 대한 필드 레퍼런스가 될 것이다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The constant pool item will be a field reference to the static field of the class.

이 명령은 32-비트와 64-비트 광역 필드 모두를 처리한다.This command handles both 32-bit and 64-bit wide fields.

지정된 필드가 스태틱 필드이면, IncompatibleClassChangeError가 발생된다. If the specified field is a static field, an IncompatibleClassChangeError is raised.

3.15 매서드 호출(Method Invocation)3.15 Method Invocation

매서드 호출을 구현하는 4개의 명령이 있다.There are four commands that implement method calls.

invokevirtual 오브젝트의 런타임(가상) 타입에 기초하여 디스패치하는 오 브젝트의 예시 매서드 호출. 이것은 JAVA의 정상적인 매서 드 디스패치이다.An example method call for an object that dispatches based on the runtime (virtual) type of the invokevirtual object. This is JAVA's normal method dispatch.

invokenonvirtual 오브젝트의 컴파일-시간 (비가상) 타입에 기초하여 디스패 치하는 오브젝트의 예시 매서드 호출. 이것은 예를 들어 keywordsuper 또는 수퍼클래스 명을 매서드 한정자로 사용 할 때 사용된다.Invoke an example method of an object to dispatch based on the compile-time (non-virtual) type of the invokenonvirtual object. This is used, for example, when using keywordsuper or superclass names as method modifiers.

invokestatic 명명된 클래스의 클래스(스태틱) 매서드 호출.invokestatic Invokes the class (static) method of a named class.

invokeinterface 적절한 매서드를 찾기 위해 특정 런타임 오브젝트에 의해 구현된 매서드를 검색하는 인터페이스에 의해 구현되는 매 서드 호출.invokeinterface A method call implemented by an interface that retrieves a method implemented by a particular runtime object to find the appropriate method.

invokevirtualinvokevirtual

예시 매서드 호출, 런타임 타입에 기초한 디스패치Example method call, dispatch based on runtime type

구문: construction:

invokevirtual = 182invokevirtual = 182 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ..., objectref, [arg1, [arg2 ...]], ... => ... Stack: ..., objectref, [arg1, [arg2 ...]], ... => ...

오퍼랜드 스택은 오브젝트의 레퍼런스 및 소수의 인수를 포함해야 한다. indexbyte1indexbyte2는 현재 클래스의 상수 풀 로의 인덱스를 구성하는데 사용된다. 상수 풀의 그 인덱스에서의 항목은 완전한 매서드 기호와 클래스를 포함한다. 오브젝트의 매서드 테이블에 대한 포인터가 오브젝트 레퍼런스에서 복원된다. 매서드 기호는 상기 매서드 테이블에서 검색된다. 매서드 기호는 테이블의 매서드 기호 중 하나와 정확히 일치하도록 제공된다.The operand stack must contain a reference to the object and a few arguments. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The item at that index of the constant pool contains the complete method symbol and class. A pointer to the object's method table is restored from the object reference. Method symbols are retrieved from the method table. Method symbols are provided to exactly match one of the method symbols in the table.

룩업 결과는 명명된 클래스의 매서드 테이블내의 인덱스인데, 그 타입의 매서드 테이블내를 보기 위해 오브젝트의 동적 타입와 같이 사용되며, 여기서 일치된 매서드에 대한 매서드 블럭에 대한 포인터가 발견된다. 매서드 블럭은 매서드의 타입(고유의, 동기된 등)와 오퍼랜드 스택에 예측딘 인수의 수를 나타낸다.The result of the lookup is an index in the method table of the named class, which is used with the dynamic type of the object to look in the method table of that type, where a pointer to the method block for the matched method is found. Method blocks indicate the type of method (unique, synchronized, and so on) and the number of arguments predicted on the operand stack.

매서드가 동기된 것으로 표시되면 objectref와 연관된 모니터가 입력된다.If the method is marked as synchronized, the monitor associated with the objectref is entered.

objectref 및 인수는 매서드 스택에서 팝되고, 새로운 매서드의 로컬 변수의 초기값으로 된다. 실행은 새로운 매서드의 첫번째 명령으로 계속된다. The objectref and arguments are popped off of the method stack and become the initial values of the new method's local variables. Execution continues with the first command of the new method.

오퍼랜드 스택의 오브젝트 레퍼런스가 널이면, NullPointerException이 기동된다. 매서드 호출 동안 스택 오버플로우가 검출되면, StackOverflowError가 기동된다. If the object reference of the operand stack is null, a NullPointerException is invoked. If a stack overflow is detected during a method call, a StackOverflowError is called.

invokenonvirtualinvokenonvirtual

컴파일-시간 타입에 기초하여 디스패치하는 예시 매서드 호출Example method call to dispatch based on compile-time type

구문: construction:

inokenonvirtual = 183inokenonvirtual = 183 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ..., objectref, [arg1, [arg2 ...]], ... => ... Stack: ..., objectref, [arg1, [arg2 ...]], ... => ...

오퍼랜드 스택은 오브젝트의 레퍼런스와 소수의 인수를 포함해야 한다. indexbyte1indexbyte2는 현재 클래스의 상수 풀 로의 인덱스를 구성하는데 사용된다. 상수 풀의 그 인덱스에서의 항목은 완전한 매서드 기호를 포함한다. 매서드 기호는 매서드 테이블에서 검색된다. 매서드 기호는 테이블의 매서드 기호 중 하나와 정확히 일치하도록 제공된다.The operand stack must contain a reference to the object and a few arguments. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The item at that index of the constant pool contains the complete method symbol. Method symbols are retrieved from the method table. Method symbols are provided to exactly match one of the method symbols in the table.

룩업 결과는 매서드 블럭이다. 매서드 블럭은 매서드의 타입(고유의, 동기된 등)와 오퍼랜드 스택에서 예측된 인수(nargs)의 수를 나타낸다.The lookup result is a method block. Method blocks represent the type of method (unique, synchronized, and so on) and the number of predicted arguments in the operand stack.

매서드가 동기된 것으로 표시되면 objectref와 연관된 모니터가 입력된다.If the method is marked as synchronized, the monitor associated with the objectref is entered.

objectref 및 인수는 이 매서드의 스택에서 팝되고 새로운 매서드의 로컬 변수의 초기값으로 된다. 실행은 새로운 매서드의 첫번째 명령으로 계속된다. The objectref and arguments are popped off the stack of this method and become the initial values of the local variables of the new method. Execution continues with the first command of the new method.

오퍼랜드 스택상의 오브젝트 레퍼런스가 널이면, NullPointerException이 기동된다. 매서드 호출 동안 스택 오버플로우가 검출되면, StackOverflowError가 기동된다.If the object reference on the operand stack is null, a NullPointerException is invoked. If a stack overflow is detected during a method call, a StackOverflowError is called.

invokestaticinvokestatic

클래스 (스태틱) 매서드 호출Class (static) method calls

구문: construction:

invokestatic = 184invokestatic = 184 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ..., [arg1, [arg2 ...]], ... => ... Stack: ..., [arg1, [arg2 ...]], ... => ...

오퍼랜드 스택은 소수의 인수를 포함해야 한다. indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상수 풀의 그 인덱스에서의 항목은 완전한 매서드 기호 및 클래스를 포함한다. 매서드 기호는 표시된 클래스의 매서드 테이블에서 검색된다. 매서드 기호는 클래스의 매서드 테이블의 매서드 기호 중 하나와 정확히 일치하도록 제공된다.The operand stack must contain a few arguments. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The item at that index of the constant pool contains the complete method symbol and class. Method symbols are retrieved from the method table of the indicated class. Method symbols are provided to exactly match one of the method symbols in the method table of the class.

룩업 결과는 매서드 블럭이다. 매서드 블럭은 매서드의 타입(고유의, 동기된 등)와 오퍼랜드 스택에서 예측된 인수(nargs)의 수를 나타낸다.The lookup result is a method block. Method blocks represent the type of method (unique, synchronized, and so on) and the number of predicted arguments in the operand stack.

매서드가 동기된 것으로 표시되면 분류와 관련된 모니터가 들어간다.If the method is marked as synchronized, the monitor associated with the classification is entered.

인수는 이 매서드 스택에서 팝되고 새로운 매서드의 로컬 변수의 초기값으로 된다. 실행은 새로운 매서드의 첫번째 명령으로 계속된다.The argument is popped from this method stack and made the initial value of the new method's local variable. Execution continues with the first command of the new method.

매서드 호출 동안 스택 오버플로우가 검출되면, StackOverflowError가 기동된다.If a stack overflow is detected during a method call, a StackOverflowError is called.

invokeinterfaceinvokeinterface

인터페이스 매서드 호출Call interface method

구문: construction:

invokeinterface = 185invokeinterface = 185 indexbyte1indexbyte1 indexbyte2indexbyte2 nargsnargs reservedreserved

스택: ..., objectref, [arg1, [arg2 ...]], ... => ... Stack: ..., objectref, [arg1, [arg2 ...]], ... => ...

오퍼랜드 스택은 오브젝트와 nargs-1 인수에 대한 레퍼런스를 포함해야 한다. indexbyte1indexbyte2는 현재 클래스의 상수 풀로 인덱스를 재구성하는데 사용된다. 상수 풀의 인덱스에서의 항목은 완전한 매서드(method) 기호를 포함한다. 오브젝트의 매서드 테이블에 대한 포인터는 오브젝트 레퍼런스로부터 복원된다. 매서드 기호는 매서드 테이블에서 색인된다. 매서드 기호는 테이블의 매서드 기호 중 하나와 정확히 일치하도록 제공된다.The operand stack must contain an object and a reference to the nargs -1 argument. indexbyte1 and indexbyte2 are used to reconstruct the index into the constant pool of the current class. The item at the index of the constant pool contains the complete method symbol. The pointer to the object's method table is restored from the object reference. Method symbols are indexed in method tables. Method symbols are provided to exactly match one of the method symbols in the table.

색인 결과는 매서드 블럭이다. 매서드 블럭은 매서드의 타입(고유의, 동기된 등등)를 나타내지만, invokevirtualinvokenonvirtual와는 달리 가용 인수의 수(nargs)는 바이트코드로부터 취해진다.The index result is a method block. Method blocks indicate the type of method (unique, synchronized, and so on), but unlike invokevirtual and invokenonvirtual , the number of available arguments (nargs) is taken from the bytecode.

매서드가 markedsynchronized이면, objectref와 연관된 모니터가 입력된다.If the method is markedsynchronized, the monitor associated with the objectref is entered.

objectref와 인수가 매서드의 스택에서 팝되어 새로운 매서드의 로컬 변수의 초기값이 된다. 실행은 새로운 매서드의 첫 번째 명령으로 계속된다. The objectref and arguments are popped off the stack of methods, which is the initial value of the new method's local variables. Execution continues with the first command of the new method.

오퍼랜드 스택의 objectref가 널이면, NullPointerException이 기동된다. 매서드 호출 동안 스택 오버플로우가 검출되면 StackOverflowError이 기동된다.If the objectref of the operand stack is null, a NullPointerException is invoked. If a stack overflow is detected during a method call, a StackOverflowError is invoked.

3.16 예외 핸들링(Exception Handlings)3.16 exception handlings

athrowathrow

기동 예외 또는 오류Startup exception or error

구문:construction:

athrow = 191athrow = 191

스택: ..., objectref => [undefined] Stack: ..., objectref => [undefined]

objectref는 기동되는 Throwable의 서브클래스인 오브젝트의 레퍼런스이어야 한다. 현재의 JAVA 스택 프레임은 이 클래스 또는 이 클래스의 수퍼클래스를 캐치하는 가장 최근의 캐치 클로즈에 대하여 검색된다. 일치하는 캐치 리스트 항이 발견되면, pc는 캐치 리스트 항으로 표시된 어드레스로 세트되고, 실행을 계속한다. objectref must be a reference to an object that is a subclass of Throwable invoked. The current JAVA stack frame is searched for the most recent catch close that catches this class or its superclasses. If a matching catch list term is found, pc is set to the address indicated by the catch list term and continues execution.

적절한 캐치 클라우즈(catch clause)가 현재의 스택 프레임에서 발견되지 않으면, 그 프레임은 팝되고, 오브젝트가 다시 기동된다. 하나가 발견되면, 그것은 이 예외에 대한 코드의 위치를 포함한다. pc 는 그 위치 및 실행 계속으로 리셋된다. 현재의 스택 프레임에서 적절한 캐치가 발견되지 않으면, 그 프레임은 팝되고, objectref가 다시 기동된다.If no appropriate catch clause is found in the current stack frame, the frame is popped and the object is launched again. If one is found, it contains the location of the code for this exception. pc is reset to that position and execution continues. If no suitable catch is found in the current stack frame, the frame is popped and objectref is invoked again.

만일 objectref 가 널 이라면, NullPointerException 이 대신 기동된다.If objectref is null, a NullPointerException is invoked instead.

3.17 다양한 오브젝트 동작(Miscellaneous Object Operations)3.17 Miscellaneous Object Operations

newnew

새로운 오브젝트 형성New object formation

구문:construction:

new = 187new = 187 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ... => ..., objectref Stack: ... => ..., objectref

indexbyte1indexbyte2는 현재 클래스의 상수 풀에 인덱스를 구성하는데 사용된다. 그 인덱스에서의 항은 클래스 포인터 class로 분해될 수 있는 클래스명이어야 한다. 다음에 그 클래스에 대한 새로운 예시가 형성되고, 오브젝트에 대한 레퍼런스가 스택에 푸시된다. indexbyte1 and indexbyte2 are used to construct indexes into the constant pool of the current class. The term at that index must be a class name that can be resolved into a class pointer class . Then a new example of the class is formed, and a reference to the object is pushed onto the stack.

checkcastcheckcast

오브젝트가 지정된 타입인지 확인Determine if object is of specified type

구문:construction:

checkcast = 192checkcast = 192 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ..., objectref => ..., objectref Stack: ..., objectref => ..., objectref

indexbyte1indexbyte2는 현재 클래스의 상수 풀에 인덱스를 구성하는데 사용된다. 상수 풀의 그 인덱스에서 스트링은 클래스 포인터 class로 분해될 수 있는 클래스명인 것으로 가정된다. objectref는 오브젝트에 대한 레퍼런스이어야 한다. indexbyte1 and indexbyte2 are used to construct indexes into the constant pool of the current class. At that index of the constant pool, the string is assumed to be a class name that can be resolved into a class pointer class . objectref must be a reference to an object.

checkcastobjectref가 클래스 class의 오브젝트에 대한 레퍼런스에 가해질 수 있는지를 판정한다. 널 objectref는 어떤 클래스에도 가해질 수 있다. 그렇지 않으면 참조된 오브젝트는 class의 예시 또는 그의 수퍼클래스 중 하나이어야 한다. objectrefclass에 가해질 수 있으면, 실행은 다음 명령으로 진행하고, objectref는 스택에 남게 된다. checkcast determines if an objectref can be added to a reference to an object of class class . A null objectref can be applied to any class. Otherwise, the referenced object must be an example of class or one of its superclasses. If an objectref can be added to the class , execution proceeds to the next command and the objectref remains on the stack.

objectrefclass에 가해질 수 없으면 ClassCastException이 기동된다. If no objectref can be added to the class , a ClassCastException is invoked.

instanceofinstanceof

오브젝트가 지정된 타입의 것인지 판정Determine if object is of specified type

구문:construction:

instanceof = 193instanceof = 193 indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ..., objectref => ..., result Stack: ..., objectref => ..., result

indexbyte1indexbyte2는 현재 클래스의 상수 풀에 인덱스를 구성하는데 사용된다. 상수 풀의 그 인덱스에서의 스트링은 클래스 포인터 class로 분해될 수 있는 클래스명인 것으로 가정된다. objectref는 오브젝트에 대한 레퍼런스이어야 한다. indexbyte1 and indexbyte2 are used to construct indexes into the constant pool of the current class. The string at that index of the constant pool is assumed to be a class name that can be resolved into a class pointer class . objectref must be a reference to an object.

instanceofobjectref가 클래스 class의 오브젝트에 대한 레퍼런스인 것으로 가해질 수 있는지를 판정한다. 이 명령은 objectrefclass의 예시 또는 그의 수퍼클래스 중 하나이면 objectref를 1로 겹쳐쓴다. 그렇지 않으면 objectref는 0으로 겹쳐쓰여진다. objectref가 널이면, 0으로 겹쳐쓰여진다. instanceof determines if objectref can be added as a reference to an object of class class . This command is objectref an example of a class or one of its superclass overwrite the objectref 1. Otherwise objectref is overwritten with zeros. If objectref is null, it is overwritten by zero.

3.18 모니터(Monitors)3.18 Monitors

monitorentermonitorenter

코드의 모니터된 영역 들어감Entering a Monitored Area of Code

구문:construction:

monitorenter = 194monitorenter = 194

스택: ..., objectref => ... Stack: ..., objectref => ...

objectref는 오브젝트에 대한 레퍼런스이어야 한다. objectref must be a reference to an object.

인터프리터는 로크(lock) 매커니즘을 통한 objectref에 대한 배타적인 액세스를 얻고자 한다. 다른 스레드(thread)가 이미 objectref를 로크했으면, 핸재의 스레드는 오브젝트의 로크가 풀릴 때까지 대기한다. 오브젝트가 로크되어 있지 않으면, 배타적인 로크를 얻는다.The interpreter wants to gain exclusive access to the objectref through the lock mechanism. If another thread has already locked the objectref , the handy thread waits until the object is unlocked. If the object is not locked, an exclusive lock is obtained.

objectref가 널이면, NullPointerException이 대신 기동된다. If objectref is null, a NullPointerException is invoked instead.

monitorexitmonitorexit

코드의 모니터된 영역 나옴Out of Monitored Areas of Code

구문:construction:

monitorexit = 195monitorexit = 195

스택: ..., objectref => ... Stack: ..., objectref => ...

objectref는 오브젝트에 대한 레퍼런스이어야 한다. 오브젝트에 대한 로크는 해제하였다. 이것이 이 스레드가 그 오브젝트에 대하여 갖는 최종 로크이면(하나의 스레드는 단일 오브젝트에 대하여 다중 로크를 갖도록 허용된다), 오브젝트가 이용 가능한 것을 대기하고 있는 다른 스레드가 진행하도록 허용된다. objectref must be a reference to an object. The lock on the object was released. If this is the last lock this thread has on that object (one thread is allowed to have multiple locks on a single object), another thread waiting for the object to be available is allowed to proceed.

objectref가 널이면, NullPointerException이 대신 기동된다. If objectref is null, a NullPointerException is invoked instead.

부록 A: 최적화Appendix A: Optimization

_quick가 끝에 붙은 다음의 의사 명령 세트들은 JAVA 가상 머신 명령의 변형이다. 이들은 바이트코드를 해석하는 속도를 개선하는데 사용된다. 이들은 가상 머신 명세 또는 명령 세트의 일부는 아니고, JAVA 가상 머신 구현의 외부에서는 볼 수 없는 것이다. 그러나, 가상 머신 구현의 내부에서 이들은 효과적인 최적화로 판명되었다.The following pseudo-instruction sets at the end of _quick are variations of JAVA virtual machine instructions. These are used to improve the speed of interpreting bytecodes. They are not part of the virtual machine specification or instruction set, and are not visible outside of a JAVA virtual machine implementation. However, within the virtual machine implementation, they turned out to be effective optimizations.

JAVA 소스 코드로부터 JAVA 가상 머신 명령 세트로의 컴파일러는 다만 non-_quick 명령만을 제거한다. _quick 의사 명령이 사용되면, _quick 변형을 갖는 non-_quick의 예시는 각각 자체 _quick 변형에 의한 실행시 겹쳐쓰여진다. 그 명령 예시에 대한 이후의 실행은 _quick 변형일 것이다.The compiler from the JAVA source code to the JAVA virtual machine instruction set only removes non-_quick instructions. If the _quick pseudo-instruction is used, examples of non-_quick with the _quick variant are each overwritten at runtime by its own _quick variant. Subsequent execution of the command example would be a _quick variant.

모든 경우에 있어서, 명령이 첨자 _quick를 갖는 대안을 가지면, 명령을 상수 풀을 참조한다. _quick 최적화가 사용되면, _quick 변형을 갖는 각각의 non-_quick 명령은 다음을 수행한다.In all cases, if the command has an alternative with the subscript _quick, the command refers to the constant pool. If _quick optimization is used, each non-_quick command with the _quick variant does the following:

상수 풀의 지정된 항목을 분해한다;Decompose the specified item in the constant pool;

상수 풀의 항목이 몇가지 이유로 분해될 수 없으면 오류를 발신한다;If an item in the constant pool cannot be resolved for some reason, it will send an error;

그것 자체를 명령의 _quick 버전으로 변환한다. 명령 putstatic, getstatic, putfield 및 getfield는 각각 2개의 _quick 버전을 갖는다;It converts itself to the _quick version of the command. The commands putstatic, getstatic, putfield and getfield each have two _quick versions;

예정된 동작을 실행한다.Run the scheduled action.

이것은 명령이 _quick 변형으로 자신을 겹쳐쓰는 부가적인 스텝을 제외하고는 _quick 최적화가 없는 명령의 동작과 동일하다.This is the same as the behavior of a command without _quick optimization, except for the additional step in which the command overwrites itself with the _quick variant.

명령의 _quick 변형은 상수 풀의 항목이 이미 분해되었고, 이 분해는 어떤 오류도 발생하지 않는다고 가정한다. 이것은 분해된 항목에 대해서 예정된 동작을 간단히 실행한다.The _quick variant of the instruction assumes that the entries in the constant pool have already been resolved, and that decomposition will not cause any errors. This simply performs the intended action on the disassembled item.

주: 몇가지 호출 매서드만이 오브젝트의 매서드 테이블로의 단일 바이트 오프셋을 지원할 뿐이다. 256 이상의 매서드를 갖는 오브젝트에 대하여 몇몇 호출은 이런 바이트코드만으로는 빨라질 수 없다.Note: Only a few calling methods support a single byte offset into an object's method table. For calls with more than 256 methods, some calls cannot be made faster with these bytecodes alone.

이 부록은 의사 명령의 연산부호 값을 제공하지 않는데, 그 이유는 이들이 보이지 않고, 변경되기 때문이다.This appendix does not provide opcode values for pseudo-instructions because they are invisible and change.

A.1 상수 풀 분해(Constant Pool Resolution)A.1 Constant Pool Resolution

클래스가 판독되면, 크기가 n인 상수의 어레이 constant_pool []이 형성되고, 클래스의 한 필드에 할당된다. constant_pool [0]은 constant_pool의 어느 필드가 이미 분해되었는지를 나타내는 동적으로 할당된 어레이에 대한 포인트로 세트된다. constant_pool [1] 내지 constant_pool [nconstants-1]은 이 상수 항목에 대응하는 "타입" 필드의 포인트로 세트된다.When the class is read, an array constant_pool [] of size n constants is formed and assigned to one field of the class. constant_pool [0] is set to a point for a dynamically allocated array indicating which fields of the constant_pool have already been decomposed. constant_pool [1] to constant_pool [nconstants-1] are set to the points of the "type" field corresponding to this constant item.

상수 풀을 참조하는 명령이 실행될 때, 인덱스가 발생되고, 인덱스가 이미 분해되었는지를 확인하기 위해 constant_pool [0]이 검사된다. 그렇다면, constant_pool [index]의 값이 리턴된다. 그렇지 않으면, constant_pool [index]의 값은 실제 포인터 또는 데이터로 분해되고, constant_pool [index]에 어떤 값이 존재하든지 겹쳐쓴다.When a command that references a constant pool is executed, an index is generated and constant_pool [0] is checked to see if the index has already been decomposed. If so, the value of constant_pool [index] is returned. Otherwise, the value of constant_pool [index] is decomposed into an actual pointer or data, overwriting whatever value is present in constant_pool [index].

A.2 스택상으로 상수 푸싱(_quick 변형)A.2 Constant Pushing on the Stack (_quick variant)

idcl_quickidcl_quick

상수 풀로부터 스택으로 항목 푸시Push item from constant pool to stack

구문:construction:

idcl_quickidcl_quick indexbyte1indexbyte1

스택: ...=>..., item Stack: ... => ..., item

indexbyte1은 현재 클래스의 상수 풀 로의 부호가 없는 8비트 인덱스로서 사용된다. 그 인덱스에서의 item 이 스택상으로 푸시된다. indexbyte1 is used as an unsigned 8-bit index into the constant pool of the current class. The item at that index is pushed onto the stack.

idc2_quickidc2_quick

상수 풀로부터 스택으로 항목 푸시Push item from constant pool to stack

구문:construction:

idc2_quickidc2_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...=>..., item Stack: ... => ..., item

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 그 인덱스의 constant는 분해되고, 그 인덱스의 item은 스택으로 푸시된다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The constant at that index is decomposed and the item at that index is pushed onto the stack.

idc2w_quickidc2w_quick

상수 풀로부터 스택으로 배정도 정수 또는 배정도 부동소수점 푸시Push double-precision or double-precision floating point from constant pool to stack

구문:construction:

idc2w_quickidc2w_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...=>...,constant-word1,constant-word2 Stack: ... => ..., constant-word1, constant-word2

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 그 인덱스의 constant가 스택으로 푸시된다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The constant at that index is pushed onto the stack.

A.3 어레이 관리(_quick 변형)A.3 Array Management (_quick variant)

anewarray_quickanewarray_quick

오브젝트에 새로운 레퍼런스 어레이 할당Assign a new reference array to the object

구문:construction:

anewarray_quickanewarray_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...,size=>result Stack: ... , size => result

size는 정수이어야 한다. 이것은 새로운 어레이에서 구성요소의 수를 나타낸다. size must be an integer. This represents the number of components in the new array.

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 엔트리는 클래스이어야 한다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The entry must be a class.

표시된 클래스 타입과 size 구성요소를 유지할 수 있는 새로운 어레이가 할당되고, result는 이 새로운 어레이에 대한 레퍼런스이다. 지정된 클래스 타입의 size 항목을 포함할 만큼 충분히 큰 어레이의 할당이 시도된다. 어레이의 모든 구성요소는 0으로 초기화된다.A new array is allocated that can hold the indicated class type and size components, and result is a reference to this new array. An attempt is made to allocate an array large enough to contain a size item of the specified class type. All components of the array are initialized to zero.

size가 0보다 적으면, NegativeArraySizeException이 기동된다. 어레이를 할당할 만큼 충분한 메모리가 존재하지 않으면, OutOfMemoryError가 기동된다. If size is less than 0, a NegativeArraySizeException is invoked. If there is not enough memory to allocate the array, OutOfMemoryError is triggered.

multianewarray_quickmultianewarray_quick

새로운 다차원 어레이 할당New multidimensional array allocation

구문:construction:

multianewarray_quickmultianewarray_quick indexbyte1indexbyte1 indexbyte2indexbyte2 dimensionsdimensions

스택: ...,size1,size2,...sizen=>result Stack: ... , size1, size2, ... sizen => result

size는 정수이어야 한다. 각각은 1차원 어레이에서 구성요소의 수를 나타낸다.Each size must be an integer. Each represents the number of components in the one-dimensional array.

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 생성되는 엔트리는 클래스이어야 한다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The entry created must be a class.

dimensions는 다음과 같은 양상을 갖는다. dimensions have the following aspects:

이것은 ≥1인 정수이어야 한다. 이는 형성되는 차원의 수를 나타낸다. 이것은 ≤어레이 클래스의 차원 수이어야 한다.It must be an integer ≥1. This represents the number of dimensions formed. This must be the number of dimensions of the array class.

이는 스택에서 팝되는 구성요소의 수를 나타낸다. 이 모두는 0보다 크거나 같은 정수이어야 한다. 이들은 차원의 크기로 사용된다.This represents the number of components popped off the stack. All of these must be integers greater than or equal to zero. These are used as dimensions of dimensions.

스택의 size 인수 중 어느 하나가 0보다 작으면, NegativeArraySizeException이 기동된다. 어레이를 할당한 만큼 충분한 메모리가 존재하지 않으면 OutOfMemoryError가 기동된다.If any of the stack's size arguments is less than zero, a NegativeArraySizeException is invoked. If there is not enough memory to allocate the array, OutOfMemoryError is triggered.

result는 새로운 어레이 오브젝트에 대한 레퍼런스이다. result is a reference to the new array object.

A.4 오브젝트 필드 조작(_quick 변형)A.4 Object field manipulation (_quick variant)

putfield_quickputfield_quick

오브젝트의 필드 설정Field settings for the object

구문:construction:

putfield2_quickputfield2_quick offsetoffset unusedunused

스택: ...,objectref,value=>... Stack: ... , objectref, value => ...

objectref는 오브젝트에 대한 레퍼런스이어야 한다. value는 지정된 필드에 적합한 타입의 값이어야 한다. offset은 그 오브젝트의 필드에 대한 오프셋이다. value는 오프셋에서 오브젝트에 기록된다. objectrefvalue는 모두 스택으로부터 팝된다. objectref must be a reference to an object. value must be a value of the appropriate type for the specified field. offset is the offset into the field of the object. value is written to the object at the offset. objectref and value are both popped off the stack.

objectref가 널이면, NullPointerException이 발생된다. If objectref is null, a NullPointerException is thrown.

putfield2_quickputfield2_quick

오브젝트의 배정도 정수 또는 배정도 부동소수점 필드 설정Set double-precision or double-precision floating-point field for object

구문:construction:

putfield2_quickputfield2_quick offsetoffset unusedunused

스택: ...,objectref,value-word1,value-word2=>... Stack: ... , objectref, value-word1, value-word2 => ...

objectref는 오브젝트에 대한 레퍼런스이어야 한다. value는 지정된 필드에 적합한 타입의 값이어야 한다. offset은 그 오브젝트의 필드에 대한 오프셋이다. valueoffset에서 오브젝트에 기록된다. objectrefvalue는 스택으로부터 팝된다. objectref must be a reference to an object. value must be a value of the appropriate type for the specified field. offset is the offset into the field of the object. value is written to the object at offset . objectref and value are popped from the stack.

objectref가 널이면, NullPointerException이 발생된다. If objectref is null, a NullPointerException is thrown.

getfield_quickgetfield_quick

오브젝트로부터 필드 패치Patch Fields from Objects

구문:construction:

getfield_quickgetfield_quick offsetoffset unusedunused

스택: ...,objectref=>...,value Stack: ... , objectref => ..., value

objectref는 오브젝트에 대한 조정자이어야 한다. objectref에 의해 참조된 오브젝트로의 offset의 값은 스택 최상위의 objectref를 대체한다. objectref must be a coordinator for the object. The value of the offset to the object referenced by objectref replaces objectref on the stack top.

objectref가 널이면, NullPointerException이 발생된다. If objectref is null, a NullPointerException is thrown.

getfield2_quickgetfield2_quick

오브젝트로부터 필드 패치Patch Fields from Objects

구문:construction:

getfield2_quickgetfield2_quick offsetoffset unusedunused

스택: ...,objectref=>...,value-word1,value-word2 Stack: ..., objectref => ..., value-word1, value-word2

objectref는 오브젝트에 대한 조정자이어야 한다. objectref에 의해 참조된 오브젝트로의 offset 값은 스택 최상위의 objectref를 대체한다. objectref must be a coordinator for the object. offset values to the objects referenced by the objectref replaces objectref on the stack top.

objectref가 널이면, NullPointerException이 발생된다. If objectref is null, a NullPointerException is thrown.

putstatic_quickputstatic_quick

클래스의 스태틱 필드 설정Set static fields for class

구문:construction:

putstatic_quickputstatic_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...,value=>... Stack: ..., value => ...

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상수 풀 항목은 클래스의 스태틱 필드에 대한 필드 레퍼런스가 될 것이다. value 는 그 필드에 대한 적절한 타입이어야 한다. 그 필드는 값 value를 갖도록 설정될 것이다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The constant pool entry will be a field reference to the static field of the class. value must be the appropriate type for that field. The field will be set to have the value value .

putstatic2_quickputstatic2_quick

클래스의 스태틱 필드 설정Set static fields for class

구문:construction:

putstatic2_quickputstatic2_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...,value-word1,value-word2=>... Stack: ..., value-word1, value-word2 => ...

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상수 풀 항목은 클래스의 스태틱 필드에 대한 필드 레퍼런스일 것이다. 그 필드는 단정도 정수 또는 배정도 부동 소수점 수 중 하나이어야 한다. value는 그 필드에 적당한 타입이어야 한다. 그 필드는 값 value를 갖도록 설정될 것이다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The constant pool entry will be a field reference to the static field of the class. The field must be either a single integer or a double precision floating point number. value must be of the appropriate type for that field. The field will be set to have the value value .

getstatic_quickgetstatic_quick

클래스로부터 스태틱 필드 입수Get static field from class

구문:construction:

getstatic_quickgetstatic_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...,=>...,value Stack: ..., => ..., value

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상수 풀 항목은 클래스의 스태틱 필드에 대한 필드 레퍼런스일 것이다. 그 필드의 값은 스택의 handle를 대체할 것이다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The constant pool entry will be a field reference to the static field of the class. The value of that field will replace the handle of the stack.

getstatic2_quickgetstatic2_quick

클래스로부터 스태틱 필드 입수Get static field from class

구문:construction:

getstatic2_quickgetstatic2_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...,=>...,value-word1,value-word2 Stack: ..., => ..., value-word1, value-word2

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상수 풀 항목은 클래스의 스태틱 필드에 대한 필드 레퍼런스일 것이다. 그 필드는 배정도 정수 또는 배정도 부동 소수점 수이어야 한다. 그 필드의 값은 스택의 handle을 대체할 것이다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The constant pool entry will be a field reference to the static field of the class. The field must be a double integer or a double floating point number. The value of that field will replace the handle of the stack.

A.5 매서드 호출(Method Invocation)(_quick 변형)A.5 Method Invocation (_quick variant)

invokevirtual_quickinvokevirtual_quick

런타임 타입에 기초하여 디스패칭하는 예시 매서드 호출Example method call dispatching based on runtime type

구문:construction:

invokevirtual_quickinvokevirtual_quick offsetoffset nargsnargs

스택: ...,objectref,[arg1,[arg2...]]=>... Stack: ..., objectref, [arg1, [arg2 ...]] => ...

오퍼랜드 스택은 objectref, 오브젝트에 대한 레퍼런스 및 nargs-1 인수를 포함해야 한다. 오브젝트의 동적 타입에 의해 결정되는 것처럼 오브젝트의 매서드 테이블의 offset에서 매서드 블럭이 복원된다. 매서드 블럭은 매서드의 타입(고유의, 동기된 등)를 나타낸다.The operand stack must contain an objectref , a reference to the object, and a nargs-1 argument. The method block is restored at the offset of the object's method table, as determined by the object's dynamic type. Method blocks indicate the type of method (unique, synchronized, etc.).

매서드가 동기된 것으로 표시되면, 오브젝트와 연관된 모니터가 입력된다.If the method is marked as synchronized, the monitor associated with the object is entered.

새로운 JAVA 스택 프레임에 대한 로컬 변수 어레이의 베이스는 스택의 objectref에 대한 포인트로 세트되고, objectref와 제공된 인수(arg1, arg2,...)는 새로운 프레임의 첫번째 nargs 로컬 변수를 구성한다. 매서드에 의해 사용된 로컬 변수의 전체 수가 결정되고, 로컬에 대해 충분한 공간이 남겨진 후 새로운 프레임에 대한 실행 환경이 푸시된다. 이 매서드 호출에 대한 오퍼랜드 스택의 베이스는 실행 환경후 첫번째 워드로 세트된다. 마직막으로 실행은 일치된 매서드의 첫번째 명령으로 계속된다.The base of the local variable array for the new JAVA stack frame is set to the point for the objectref of the stack, and the objectref and the supplied arguments ( arg1, arg2, ... ) make up the first nargs local variable of the new frame. The total number of local variables used by the method is determined, and after enough space is left for the local, the execution environment for the new frame is pushed. The base of the operand stack for this method call is set to the first word after the execution environment. Finally, execution continues with the first command of the matched method.

objectref가 널이면, NullPointerException이 기동된다. 매서드 호출 동안 스택 오버플로우가 검출되면, StackOverflowError이 기동된다. If objectref is null, a NullPointerException is invoked. If a stack overflow is detected during a method call, a StackOverflowError is called.

invokevirtualobject_quickinvokevirtualobject_quick

특히 어레이에 대하여 클래스 JAVA.lang.Object의 예시 매서드 호출In particular, call the example method of class JAVA.lang.Object on the array.

구문:construction:

invokevirtualobject_quickinvokevirtualobject_quick offsetoffset nargsnargs

스택: ...,objectref,[arg1,[arg2...]]=>... Stack: ..., objectref, [arg1, [arg2 ...]] => ...

오퍼랜드 스택은 objectref, 오브젝트 또는 어레이에 대한 레퍼런스 및 nargs-1 인수를 포함해야 한다. JAVA.lang.Object의 매서드 블럭의 offset에서의 매서드 블럭이 복원된다. 매서드 블럭은 매서드의 타입(고유의, 동기된 등)를 나타낸다.The operand stack must contain an objectref , a reference to the object or array, and the nargs-1 argument. The method block at the offset of the method block of JAVA.lang.Object is restored. Method blocks indicate the type of method (unique, synchronized, etc.).

매서드가 동기된 것으로 표시되면, handle과 연관된 모니터가 입력된다.If the method is marked as synchronized, the monitor associated with the handle is entered.

새로운 JAVA 스택 프레임에 대한 로컬 변수 어레이의 베이스는 스택의 objectref에 대한 포인트로 세트되고, objectref와 제공된 인수(arg1, arg2,...)는 새로운 프레임의 첫번째 nargs 로컬 변수를 구성한다. 매서드에 의해 사용된 로컬 변수의 전체 수가 결정되고, 로컬에 대해 충분한 공간이 남겨진 후 새로운 프레임의 실행 환경이 푸시된다. 이 매서드 호출에 대한 오퍼랜드 스택의 베이스는 실행 환경 후 첫번째 워드로 세트된다. 마지막으로, 실행은 일치된 매서드의 첫번째 명령으로 계속된다.The base of the local variable array for the new JAVA stack frame is set to the point for the objectref of the stack, and the objectref and the supplied arguments ( arg1, arg2, ... ) make up the first nargs local variable of the new frame. The total number of local variables used by the method is determined, and after enough space is left for the local, the execution environment of the new frame is pushed. The base of the operand stack for this method call is set to the first word after the execution environment. Finally, execution continues with the first command of the matched method.

objectref가 널이면, NullPointerException이 기동된다. 매서드 호출 동안 스택 오버플로우가 검출되면, StackOverflowError가 기동된다. If objectref is null, a NullPointerException is invoked. If a stack overflow is detected during a method call, a StackOverflowError is called.

invokenonvirtual_quickinvokenonvirtual_quick

컴파일 시간 타입에 기초하여 디스패칭하는 예시 매서드 호출Example method call dispatching based on compile time type

구문:construction:

invokenonvirtual_quickinvokenonvirtual_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...,objectref,[arg1,[arg2...]]=>... Stack: ..., objectref, [arg1, [arg2 ...]] => ...

오퍼랜드 스택은 objectref, 오브젝트에 대한 레퍼런스 및 소수의 인수를 포함해야 한다. indexbyte1indexbyte2는 현재 클래스의 상수 풀 로의 인덱스를 구성하는데 사용된다. 상수 풀의 그 인덱스에 대한 항목은 매서드 슬롯 인덱스와 클래스에 대한 포인터를 포함한다. 표시된 클래스의 매서드 슬롯 인덱스에서의 매서드 블럭이 복원된다. 매서드 블럭은 매서드의 타입(고유의, 동기된 등)와 오퍼랜드 스택에 예측된 인수의 수(nargs)를 나타낸다.The operand stack must contain objectref , a reference to the object, and a few arguments. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The entry for that index in the constant pool contains the method slot index and a pointer to the class. The method block at the method slot index of the indicated class is restored. Method blocks indicate the type of method (unique, synchronized, and so on) and the number of arguments ( nargs ) predicted on the operand stack.

매서드가 동기된 것으로 표시되면, 오브젝트와 연관된 모니터가 입력된다.If the method is marked as synchronized, the monitor associated with the object is entered.

새로운 JAVA 스택 프레임에 대한 로컬 변수 어레이의 베이스는 스택의 objectref에 대한 포인트로 세트되고, objectref와 제공된 인수(arg1, arg2,...)는 새로운 프레임의 첫번째 nargs 로컬 변수를 구성한다. 매서드에 의해 사용된 로컬 변수의 전체 수가 결정되고, 로컬에 대하여 충분한 공간이 남겨진 후 새로운 프레임의 실행 환경이 푸시된다. 이 매서드 호출에 대한 오퍼랜드 스택의 베이스는 실행 환경후 첫번째 워드로 세트된다. 마지막으로, 실행은 일치된 매서드의 첫번째 명령으로 계속된다.The base of the local variable array for the new JAVA stack frame is set to the point for the objectref of the stack, and the objectref and the supplied arguments ( arg1, arg2, ... ) make up the first nargs local variable of the new frame. The total number of local variables used by the method is determined, and after enough space is left for the local, the execution environment of the new frame is pushed. The base of the operand stack for this method call is set to the first word after the execution environment. Finally, execution continues with the first command of the matched method.

objectref가 널이면, NullPointerException이 기동된다. 매서드 호출 동안 스택 오버플로우가 검출되면, StackOverflowError가 기동된다. If objectref is null, a NullPointerException is invoked. If a stack overflow is detected during a method call, a StackOverflowError is called.

invokestatic_quickinvokestatic_quick

클래스(스태틱) 매서드 호출Class (static) method calls

구문:construction:

invokestatic_quickinvokestatic_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...,[arg1,[arg2...]]=>... Stack: ..., [arg1, [arg2 ...]] => ...

오퍼랜드 스택은 소수의 인수를 포함해야 한다. indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상수 풀의 그 인덱스에서의 항목은 매서드 슬롯 인덱스와 클래스에 대한 포인터를 포함한다. 표시된 클래스의 매서드 슬롯 인덱스에서의 매서드 블럭이 복원된다. 매서드 블럭은 매서드의 타입(고유의, 동기된 등)와 오퍼랜드 스택에 예측된 인수의 수(nargs)를 나타낸다.The operand stack must contain a few arguments. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The item at that index of the constant pool contains the method slot index and a pointer to the class. The method block at the method slot index of the indicated class is restored. Method blocks indicate the type of method (unique, synchronized, and so on) and the number of arguments ( nargs ) predicted on the operand stack.

매서드가 동기된 것으로 표시되면, 매서드의 클래스와 연관된 모니터가 입력된다.If the method is marked as synchronized, the monitor associated with the method's class is entered.

새로운 JAVA 스택 프레임에 대한 로컬 변수 어레이의 베이스는 스택의 첫번째 인수에 대한 포인트로 세트되고, 제공된 인수(arg1, arg2,...)는 새로운 프레임의 첫번째 nargs 로컬 변수를 구성한다. 매서드에 의해 사용된 로컬 변수의 전체 수가 결정되고, 로컬에 대해 충분한 공간이 남겨진 후 새로운 프레임의 실행 환경이 푸시된다. 이 매서드 호출에 대한 오퍼랜드 스택의 베이스는 실행 환경후 첫번째 워드로 세트된다. 마지막으로, 실행은 일치된 매서드의 첫번째 명령으로 계속된다.The base of the local variable array for the new JAVA stack frame is set to the point for the first argument in the stack, and the supplied arguments ( arg1, arg2, ... ) make up the first nargs local variable of the new frame. The total number of local variables used by the method is determined, and after enough space is left for the local, the execution environment of the new frame is pushed. The base of the operand stack for this method call is set to the first word after the execution environment. Finally, execution continues with the first command of the matched method.

오퍼랜드 스택의 오브젝트 조정자가 널이면, NullPointerException이 기동된다. 매서드 호출 동안 스택 오버플로우가 검출되면, StackOverflowError가 기동된다.If the object coordinator of the operand stack is null, a NullPointerException is invoked. If a stack overflow is detected during a method call, a StackOverflowError is called.

invokeinterface_quickinvokeinterface_quick

인터페이스 매서드 호출Call interface method

구문:construction:

invokeinterface_quickinvokeinterface_quick idbyte1idbyte1 idbyte2idbyte2 nargsnargs guessguess

스택: ...,objectref,[arg1,[arg2...]]=>... Stack: ..., objectref, [arg1, [arg2 ...]] => ...

오퍼랜드 스택은 objectref, 오브젝트에 대한 레퍼런스 및 nargs-1 인수를 포함해야 한다. idbyte1idbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상수 풀의 그 인덱스에서의 항목은 완전한 매서드 기호를 포함한다. 오브젝트의 매서드 테이블에 대한 포인터는 오브젝트 handle 에서 검색된다.The operand stack must contain an objectref , a reference to the object, and a nargs-1 argument. idbyte1 and idbyte2 are used to construct indices into the constant pool of the current class. The item at that index of the constant pool contains the complete method symbol. A pointer to the object's method table is retrieved from the object handle .

매서드 기호는 오브젝트의 매서드 테이블에서 서치된다. 용이한 방법으로서, 슬롯 guess에서의 매서드 기호가 제일 먼저 서치된다. 이것이 실패하면, 매서드 테이블에 대한 완전한 서치가 기동된다. 매서드 기호는 테이블의 매서드 기호들 중 하나와 정확히 일치하는 것을 보장한다.Method symbols are searched in the object's method table. As an easy way, method symbols in slot guess are searched first. If this fails, a full search for the method table is invoked. Method symbols ensure that they exactly match one of the method symbols in the table.

상기 룩업 결과가 매서스 블록이다. 상기 매서드 블록은 그 매서드의 타입(자연적, 동기화된 등)을 나타내지만 상기 bytecode 로부터 가변 인수(nargs)의 수가 취해진다.The lookup result is a mass block. The method block indicates the type of the method (natural, synchronized, etc.) but the number of variable arguments nargs is taken from the bytecode.

매서드가 동기된 것으로 표시되면, handle과 연관된 모니터가 입력된다.If the method is marked as synchronized, the monitor associated with the handle is entered.

새로운 JAVA 스택 프레임에 대한 로컬 변수 어레이의 베이스는 스택의 handle에 대한 포인트로 세트되고, handle과 제공된 인수(arg1, arg2,...)는 새로운 프레임의 첫번째 nargs 로컬 변수를 구성한다. 매서드에 의해 사용된 로컬 변수의 전체 수가 결정되고, 로컬에 대하여 충분한 공간이 남겨진 후 새로운 프레임의 실행 환경이 푸시된다. 이 매서드 호출에 대한 오퍼랜드 스택의 베이스는 실행 환경후 첫번째 워드로 세트된다. 마지막으로, 실행은 일치된 매서드의 첫번째 명령으로 계속된다.The base of the array of local variables for the new JAVA stack frame is set to the point of the handle of the stack, and the handle and the supplied arguments ( arg1, arg2, ... ) make up the first nargs local variable of the new frame. The total number of local variables used by the method is determined, and after enough space is left for the local, the execution environment of the new frame is pushed. The base of the operand stack for this method call is set to the first word after the execution environment. Finally, execution continues with the first command of the matched method.

objectref가 널이면, NullPointerException이 기동된다. 매서드 호출 동안 스택 오버플로우가 검출되면, StackOverflowError가 기동된다. If objectref is null, a NullPointerException is invoked. If a stack overflow is detected during a method call, a StackOverflowError is called.

guess는 최종 추측이다. 각각의 시간 동안 추측은 사용되었던 매서드 오프셋으로 세트된다. guess is the final guess. The guess at each time is set to the method offset that was used.

A.6 다양한 오브젝트 동작(_quick 변형)A.6 Various Object Behaviors (_quick Variants)

new_quicknew_quick

새로운 오브젝트 형성New object formation

구문:construction:

new_quicknew_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...=>...,objectref Stack: ... => ..., objectref

indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 그 인덱스에서의 항목은 클래스이어야 한다. 다음에, 그 클래스에 대한 새로운 예시가 형성되고, 그 오브젝트에 대한 레퍼런스 objectref가 스택에 푸시된다. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The item at that index must be a class. Next, a new example for that class is formed, and a reference objectref for that object is pushed onto the stack.

checkcast_quickcheckcast_quick

오브젝트가 지정된 타입인지 확인Determine if object is of specified type

구문:construction:

checkcst_quickcheckcst_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...,objectref=>...,objectref Stack: ..., objectref => ..., objectref

objectref는 오브젝트에 대한 레퍼런스이어야 한다. indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상수 풀의 그 인덱스에서의 오브젝트는 이미 분해되었을 것이다. objectref must be a reference to an object. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The object at that index of the constant pool would have already been decomposed.

다음으로 checkcast는 objectref가 클래스 class의 오브젝트에 대한 레퍼런스로 가해질 수 있는지 판정한다. 널 레퍼런스가 어떤 class에도 가해질 수 있고, 그렇지 않으면 objectref 타입의 수퍼클래스가 class에 대해 서치된다. 클래스가 objectref 타입의 수퍼클래스인 것으로 결정되거나 objectref가 널이면, objectref에 가해질 수 있다. class에 가해질 수 없으면 ClassCastException이 기동된다.Next, the checkcast determines if an objectref can be added as a reference to an object of class class . A null reference can be added to any class , otherwise a superclass of type objectref is searched for class . Class is determined to be a superclass of objectref type, or if objectref is null, may be added to objectref. If no class can be added, a ClassCastException is invoked.

instanceof_quickinstanceof_quick

오브젝트가 주어진 타입인지 판정Determine if object is of given type

구문:construction:

instanceof_quickinstanceof_quick indexbyte1indexbyte1 indexbyte2indexbyte2

스택: ...,objectref=>...,result Stack: ..., objectref => ..., result

objectref는 오브젝트에 대한 레퍼런스이어야 한다. indexbyte1indexbyte2는 현재 클래스의 상수 풀로의 인덱스를 구성하는데 사용된다. 상수 풀의 그 인덱스에서의 클래스 class의 항목은 이미 분해되었을 것이다. objectref must be a reference to an object. indexbyte1 and indexbyte2 are used to construct the index into the constant pool of the current class. The entry of class class at that index of the constant pool would have already been decomposed.

instance of 는 objectref가 클래스 class의 오브젝트에 가해질 수 있는지를 판정한다. 널 objectref가 어떤 class에도 가해질 수 있고, 그렇지 않으면 objectref 타입의 수퍼클래스가 class에 대해 서치된다. classobjectref 타입의 수퍼클래스인 것으로 결정되면, result는 1(참)이다. 그렇지 않으면, result는 0(거짓)이다. handle이 널이면, result는 0(거짓)이다.instance of determines if an objectref can be applied to an object of class class . A null objectref can be applied to any class , otherwise a superclass of type objectref is searched for the class . If class is determined to be a superclass of type objectref , result is 1 (true). Otherwise, result is 0 (false). If handle is null, result is 0 (false).

본 발명에 의하면 원시 명령을 처리할 수 있고, 동시에 컴퓨터 플랫폼 독립 명령을 처리할 수 있는 프로세서가 제공된다. 본 발명의 프로세서에 의하면 소프트웨어 인터프리터를 필요로 하지 않으므로, 종래의 소프트웨어 인터프리터가 차지하던 메모리 공간을 확보할 수 있고, 처리 속도가 개선된다. 또한, 전력 소비를 줄일 수 있어서 휴대용 애플리케이션에도 적합하다. According to the present invention, a processor capable of processing raw instructions and simultaneously processing computer platform independent instructions is provided. Since the processor of the present invention does not require a software interpreter, the memory space occupied by the conventional software interpreter can be secured, and the processing speed is improved. It also reduces power consumption, making it ideal for portable applications.

도 1은 본 발명의 한 실시예의 듀얼 명령 세트 프로세서 내에 포함된 가상 머신 하드웨어 프로세서의 한 실시예의 블록 다이어그램이고,1 is a block diagram of one embodiment of a virtual machine hardware processor included in a dual instruction set processor of one embodiment of the present invention,

도 2는 본 발명의 한 실시예에 사용된 가상 머신 명령의 발생을 위한 프로세서 흐름도,2 is a processor flow diagram for generating virtual machine instructions used in one embodiment of the present invention;

도 3은 도 1의 하드웨어 프로세서에서 실행된 명령 파이프라인을 도시하는 도면,3 illustrates an instruction pipeline executed in the hardware processor of FIG. 1;

도 4a는 각 매서드 프레임이 도 1의 하드웨어 프로세서에 의해 이용되는 오퍼랜드 스택, 환경 저장 영역 및 로컬 변수 저장 영역을 포함할 때 스택 구조의 논리적 구조의 한 실시예를 도시하는 도면,4A illustrates one embodiment of a logical structure of a stack structure when each method frame includes an operand stack, an environment storage area, and a local variable storage area used by the hardware processor of FIG. 1;

도 4b는 각 매서드 프레임이 스택상의 오퍼랜드 스택과 로컬 변수 저장 영역을 포함하고, 매서드 프레임을 위한 환경 저장 영역이 분리 실행 환경 스택상에 포함될 때, 스택 구조의 논리 조직의 대안 실시예가 도시된 도면,4B illustrates an alternative embodiment of the logical organization of the stack structure when each method frame includes an operand stack on the stack and a local variable storage area, and an environment storage area for the method frame is included on a separate execution environment stack;

도 4c는 도 4b의 실행 환경 스택과 스택을 위한 스택 관리 유닛의 대안 실시예를 나타내는 도면,4C illustrates an alternative embodiment of the execution environment stack and stack management unit for the stack of FIG. 4B;

도 4d는 도 1의 스택 관리 유닛에서 로컬 변수 룩-어사이드 캐시의 한 실시예를 도시하는 도면,4D illustrates an embodiment of a local variable look-side cache in the stack management unit of FIG. 1, FIG.

도 5는 도 1의 하드웨어 프로세서에 대해 여러 가능한 애드온을 도시한 도면,5 illustrates various possible addons for the hardware processor of FIG. 1;

도 6a는 본 발명의 원리에 따른 첫 번째 듀얼 명령 세트 프로세서의 블록 다이어그램이고,6A is a block diagram of a first dual instruction set processor in accordance with the principles of the invention;

도 6b는 본 발명의 원리에 따른 두 번째 듀얼 명령 세트 프로세서의 블록 다이어그램이고,6B is a block diagram of a second dual instruction set processor in accordance with the principles of the present invention;

도 6c는 본 발명의 원리에 따른 세 번째 듀얼 명령 세트 프로세서의 블록 다이어그램이고,6C is a block diagram of a third dual instruction set processor in accordance with the principles of the present invention;

도 7은 RISC 또는 CISC 명령 등의 다른 명령을 디코딩 및 실행하기 위해 본 발명의 프로세서를 스위치 또는 토글하기 위해 사용되는 바이트코드(bytecode)의 예이며, 그리고7 is an example of a bytecode used to switch or toggle the processor of the present invention to decode and execute other instructions, such as RISC or CISC instructions, and

도 8은 본 발명의 원리에 따른 프로세서를 사용하는 컴퓨터 시스템의 블록 다이어그램이다.8 is a block diagram of a computer system using a processor in accordance with the principles of the present invention.

본 발명의 상기 특징과 다른 특징들은 본 발명의 상세한 설명에 상술된 도면으로부터 나타내어질 것이다. 같거나 유사한 특징들은 본 발명의 상세한 설명과 도면에 있는 동일한 참조번호로 표시되어 있다.These and other features of the invention will be apparent from the drawings detailed in the detailed description of the invention. The same or similar features are indicated by the same reference numerals in the description and the drawings.

Claims (17)

네트워크 및 로컬 메모리와 통신가능하게 연결되도록 구성된 듀얼 명령 세트 프로세서에 있어서,A dual instruction set processor configured to be communicatively coupled to a network and local memory, the processor comprising: 상기 네트워크 또는 상기 로컬 메모리 중 어느 하나로부터 수신된 제 1 명령 세트 내의 다수의 제 1 컴퓨터 플랫폼 독립 명령들을 디코딩하는 제 1 컴퓨터 플랫폼 독립 명령 디코더,A first computer platform independent instruction decoder for decoding a plurality of first computer platform independent instructions in a first set of instructions received from either the network or the local memory, 상기 제 1 명령 세트와는 다른 제 2 명령 세트내의 다수의 제 2 명령을 디코딩하는 제 2 명령 디코더 및A second instruction decoder for decoding a plurality of second instructions in a second instruction set different than the first instruction set; 상기 제 1 컴퓨터 플랫폼 독립 명령 디코더에 의해 디코딩된 상기 다수의 제 1 컴퓨터 플랫폼 독립 명령들을 실행하고, 상기 제 2 명령 디코더에 의해 디코딩된 상기 다수의 제 2 명령들을 실행하는 명령 실행 유닛을 포함하고,An instruction execution unit for executing the plurality of first computer platform independent instructions decoded by the first computer platform independent instruction decoder, and executing the plurality of second instructions decoded by the second instruction decoder, 상기 제 1 명령 세트는 컴퓨터 플랫폼 독립 명령의 세트인 것을 특징으로 하는 프로세서.And said first instruction set is a set of computer platform independent instructions. 제 1 항에 있어서,The method of claim 1, 상기 제 1 컴퓨터 플랫폼 독립 명령 디코더는 상기 제 1 명령 세트중 하나인 세트 모드 명령을 디코딩하고, 이 디코딩에 응답하여 상기 세트 모드 명령에 연속하는 명령을 상기 제 2 명령 디코더로 전달하는 것을 특징으로 하는 프로세서.The first computer platform independent command decoder decodes a set mode command that is one of the first set of instructions, and passes the command subsequent to the set mode command to the second command decoder in response to the decoding. Processor. 제 1 항에 있어서,The method of claim 1, 상기 제 1 명령 세트내의 명령 각각은 가상 머신 명령인 것을 특징으로 하는 프로세서.And each of the instructions in the first instruction set is a virtual machine instruction. 제 3 항에 있어서,The method of claim 3, wherein 상기 가상 머신 명령은 연산부호(opcode)를 포함하는 것을 특징으로 하는 프로세서.And the virtual machine instruction comprises an opcode. 제 1 항에 있어서,The method of claim 1, 상기 네트워크는 인터넷인 것을 특징으로 하는 프로세서. And said network is the Internet. 제 1 항에 있어서,The method of claim 1, 상기 네트워크는 인트라넷 네트워크인 것을 특징으로 하는 프로세서.And said network is an intranet network. 네트워크 및 로컬 메모리와 통신하게 연결되도록 구성되고, 두 모드중 하나의 모드로 동작 가능한 듀얼 명령 세트 프로세서에 있어서,A dual instruction set processor configured to be in communication with a network and local memory and operable in one of two modes, 제 1 컴퓨터 플랫폼 독립 명령 세트내의 명령을 디코딩하고, 이 디코딩에 응답하여 제 1 디코딩된 명령을 생성하는 제 1 컴퓨터 플랫폼 독립 명령 디코더,A first computer platform independent instruction decoder for decoding an instruction in the first computer platform independent instruction set and generating a first decoded instruction in response to the decoding; 제 2 명령 세트내의 명령을 디코딩하고, 이 디코딩에 응답하여 제 2 디코딩된 명령을 실행하는 제 2 명령 디코더,A second instruction decoder for decoding an instruction in a second instruction set and executing a second decoded instruction in response to the decoding; 상기 제 1 디코딩된 명령 및 상기 제 2 디코딩된 명령을 실행하는 명령 실행 유닛을 포함하고,An instruction execution unit for executing the first decoded instruction and the second decoded instruction, 제 1 연산 모드에서, 상기 제 1 컴퓨터 플랫폼 독립 명령 디코더 및 상기 명령 실행 유닛은 상기 네트워크로부터 수신된 컴퓨터 플랫폼 독립 명령으로 동작하며, In a first mode of operation, the first computer platform independent command decoder and the command execution unit operate on computer platform independent instructions received from the network, 제 2 연산 모드에서, 상기 제 1 명령 디코더, 상기 제 2 명령 디코더 및 상기 명령 실행 유닛은 상기 로컬 메모리로부터 수신된 명령으로 동작하는 것을 특징으로 하는 프로세서. And wherein in the second mode of operation, the first instruction decoder, the second instruction decoder and the instruction execution unit operate on instructions received from the local memory. 공중 캐리어 네트워크와 통신가능하게 연결되는 컴퓨터 시스템에 있어서,A computer system communicatively coupled with a public carrier network, the computer system comprising: 상기 공중 캐리어 네트워크와 통신가능하게 연결되고, 제 1 컴퓨터 플랫폼 독립 명령 세트를 수신하는 통신 인터페이스 유닛,A communication interface unit communicatively coupled with the public carrier network, the communication interface unit receiving a first computer platform independent instruction set; 상기 제 1 컴퓨터 플랫폼 독립 명령 세트와는 집합적으로 다른 제 2 명령 세트의 컴퓨터 프로그램을 저장하는 메모리 및A memory for storing a computer program of a second instruction set collectively different from said first computer platform independent instruction set; 상기 통신 인터페이스 유닛과 접속되어 그로부터 상기 제 1 컴퓨터 플랫폼 독립 명령 세트를 수신하고, 상기 메모리와 접속되어 그로부터 상기 제 2 명령 세트를 수신하는 마이크로프로세서를 포함하고, A microprocessor connected with the communication interface unit to receive the first computer platform independent instruction set therefrom, the microprocessor connected to the memory to receive the second instruction set therefrom, 상기 마이크로프로세서는The microprocessor 상기 제 1 세트내의 컴퓨터 플랫폼 독립 명령을 디코딩하고, 이 디코딩에 응답하여 제 1 디코딩된 명령을 생성하는 제 1 컴퓨터 플랫폼 독립 명령 디코더,A first computer platform independent instruction decoder that decodes computer platform independent instructions in the first set and generates a first decoded instruction in response to the decoding; 상기 제 2 세트내의 명령을 디코딩하고, 이 디코딩에 응답하여 제 2 디코딩된 명령을 생성하는 제 2 명령 디코더 및A second instruction decoder that decodes the instructions in the second set and generates a second decoded instruction in response to the decoding; 상기 제 1 디코딩된 명령 및 상기 제 2 디코딩된 명령을 실행하는 명령 실행 유닛을 구비하는 것을 특징으로 하는 컴퓨터 시스템.And an instruction execution unit for executing the first decoded instruction and the second decoded instruction. 제 8 항에 있어서,The method of claim 8, 상기 제 1 컴퓨터 플랫폼 독립 명령 디코더는 상기 제 1 명령 세트내의 명령인 세트 모드 명령을 디코딩하고, 이 디코딩에 응답하여 상기 제 2 명령 디코더를 액티브시켜서 상기 세트 모드 명령에 연속되는 제 2 명령을 디코딩하는 것을 특징으로 하는 컴퓨터 시스템.The first computer platform independent instruction decoder decodes a set mode instruction that is an instruction in the first instruction set, and activates the second instruction decoder in response to the decoding to decode a second instruction subsequent to the set mode instruction. And a computer system. 제 8 항에 있어서,The method of claim 8, 상기 제 1 컴퓨터 플랫폼 독립 명령 세트내의 각 명령은 가상 머신 명령인 것을 특징으로 하는 컴퓨터 시스템.Wherein each instruction in the first computer platform independent instruction set is a virtual machine instruction. 제 10 항에 있어서,The method of claim 10, 상기 가상 머신 명령은 연산부호를 포함하는 것을 특징으로 하는 컴퓨터 시스템.And the virtual machine instructions include an operation code. 제 8 항에 있어서,The method of claim 8, 상기 네트워크는 인터넷 네트워크인 것을 특징으로 하는 컴퓨터 시스템.And said network is an internet network. 제 8 항에 있어서, The method of claim 8, 상기 네트워크는 인트라넷인 것을 특징으로 하는 컴퓨터 시스템.And said network is an intranet. 듀얼 명령 세트 프로세서에 있어서,In the dual instruction set processor, 복수의 제 1 컴퓨터 플랫폼 독립 명령을 디코딩할 수 있는 제 1 컴퓨터 플랫폼 독립 명령 디코더,A first computer platform independent command decoder capable of decoding a plurality of first computer platform independent instructions, 상기 제 1 컴퓨터 플랫폼 독립 명령 디코더와 연동하는 스택,A stack interoperating with the first computer platform independent command decoder, 복수의 제 2 명령을 디코딩하는 제 2 명령 디코더,A second command decoder for decoding the plurality of second commands, 상기 제 2 명령 디코더와 연동하는 플랫 레지스터, 및A flat register cooperating with said second instruction decoder, and 상기 스택 및 상기 플랫 레지스터와 연동하여 상기 복수의 제 1 컴퓨터 플랫폼 독립 명령 및 상기 복수의 제 2 명령을 실행하기 위한 명령 실행 유닛을 포함하는 것을 특징으로 하는 프로세서. And an instruction execution unit for executing the plurality of first computer platform independent instructions and the plurality of second instructions in association with the stack and the flat register. 제 14 항에 있어서,The method of claim 14, 상기 제 1 컴퓨터 플랫폼 독립 명령 디코더는 상기 복수의 제 1 컴퓨터 플랫폼 독립 명령 중 하나인 세트 모드 명령을 디코딩하기 위해 구성되고, 이 디코딩에 응답하여 상기 제 2 명령 디코더를 액티브시켜서 상기 세트 모드 명령에 연속하는 제 2 명령을 디코딩하는 것을 특징으로 하는 프로세서.The first computer platform independent command decoder is configured to decode a set mode command, which is one of the plurality of first computer platform independent commands, and activates the second command decoder in response to the decoding to continue to the set mode command. And decoding the second instruction. 제 14 항에 있어서,The method of claim 14, 상기 듀얼 명령 세트 프로세서는 인터넷 네트워크에 연결되는 것을 특징으로 하는 프로세서.And the dual instruction set processor is connected to an internet network. 제 14 항에 있어서, The method of claim 14, 상기 듀얼 명령 세트 프로세서는 인트라넷에 연결되는 것을 특징으로 하는 프로세서.And the dual instruction set processor is coupled to an intranet.
KR10-2005-7005493A 1996-01-24 1997-01-23 A processor for executing instruction sets received from a network or from a local memory KR100513138B1 (en)

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
US1052796P 1996-01-24 1996-01-24
US60/010,527 1996-01-24
US64310496A 1996-05-02 1996-05-02
US643,104 1996-05-02
KR1019980705677A KR100618756B1 (en) 1996-01-24 1997-01-23 Processors and computer systems that execute instruction sets received from network or local memory

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1019980705677A Division KR100618756B1 (en) 1996-01-24 1997-01-23 Processors and computer systems that execute instruction sets received from network or local memory

Publications (2)

Publication Number Publication Date
KR20050037609A KR20050037609A (en) 2005-04-22
KR100513138B1 true KR100513138B1 (en) 2005-09-07

Family

ID=26681281

Family Applications (2)

Application Number Title Priority Date Filing Date
KR1019980705677A KR100618756B1 (en) 1996-01-24 1997-01-23 Processors and computer systems that execute instruction sets received from network or local memory
KR10-2005-7005493A KR100513138B1 (en) 1996-01-24 1997-01-23 A processor for executing instruction sets received from a network or from a local memory

Family Applications Before (1)

Application Number Title Priority Date Filing Date
KR1019980705677A KR100618756B1 (en) 1996-01-24 1997-01-23 Processors and computer systems that execute instruction sets received from network or local memory

Country Status (5)

Country Link
US (1) US5925123A (en)
EP (1) EP0976029A2 (en)
JP (1) JP2000515270A (en)
KR (2) KR100618756B1 (en)
WO (1) WO1997027537A2 (en)

Families Citing this family (92)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3634379B2 (en) * 1996-01-24 2005-03-30 サン・マイクロシステムズ・インコーポレイテッド Method and apparatus for stack caching
US6934945B1 (en) 1997-03-14 2005-08-23 Cardsoft, Inc. Method and apparatus for controlling communications
JPH113225A (en) * 1997-06-13 1999-01-06 Nec Corp Information processor
US6513156B2 (en) 1997-06-30 2003-01-28 Sun Microsystems, Inc. Interpreting functions utilizing a hybrid of virtual and native machine instructions
GB9715005D0 (en) * 1997-07-17 1997-09-24 Philips Electronics Nv Graphic image texture generation
GB2327784B (en) * 1997-07-28 2002-04-03 Microapl Ltd A method of carrying out computer operations
WO1999008419A2 (en) * 1997-08-07 1999-02-18 Siemens Aktiengesellschaft Method for loading a function provided by a first computer (server) onto a second computer (client)
EP0950216B1 (en) * 1997-10-02 2003-11-26 Koninklijke Philips Electronics N.V. A processing device for executing virtual machine instructions
EP0941508B1 (en) 1997-10-02 2007-01-17 Koninklijke Philips Electronics N.V. Variable instruction set computer
JP3816961B2 (en) * 1997-10-02 2006-08-30 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Data processing apparatus for processing virtual machine instructions
US6317796B1 (en) * 1997-10-06 2001-11-13 Sun Microsystems, Inc. Inline database for receiver types in object-oriented systems
US6009517A (en) * 1997-10-06 1999-12-28 Sun Microsystems, Inc. Mixed execution stack and exception handling
US6366999B1 (en) * 1998-01-28 2002-04-02 Bops, Inc. Methods and apparatus to support conditional execution in a VLIW-based array processor with subword execution
US6110226A (en) * 1998-02-19 2000-08-29 Cygnus Solutions Java development environment using optimizing ahead-of-time compiler
US6275903B1 (en) * 1998-04-22 2001-08-14 Sun Microsystems, Inc. Stack cache miss handling
US6480952B2 (en) 1998-05-26 2002-11-12 Advanced Micro Devices, Inc. Emulation coprocessor
US6308255B1 (en) * 1998-05-26 2001-10-23 Advanced Micro Devices, Inc. Symmetrical multiprocessing bus and chipset used for coprocessor support allowing non-native code to run in a system
US6493740B1 (en) * 1998-06-16 2002-12-10 Oracle Corporation Methods and apparatus for multi-thread processing utilizing a single-context architecture
US6577316B2 (en) * 1998-07-17 2003-06-10 3Dlabs, Inc., Ltd Wide instruction word graphics processor
US6289446B1 (en) * 1998-09-29 2001-09-11 Axis Ab Exception handling utilizing call instruction with context information
GB2343022B (en) * 1998-10-19 2003-01-08 Ibm Encrypting of java methods
WO2000025209A1 (en) * 1998-10-23 2000-05-04 Unisys Corporation Automated web interface generation for software coded applications
US6233725B1 (en) * 1998-12-03 2001-05-15 International Business Machines Corporation Method and apparatus to coordinate and control the simultaneous use of multiple just in time compilers with a java virtual machine
US7114056B2 (en) 1998-12-03 2006-09-26 Sun Microsystems, Inc. Local and global register partitioning in a VLIW processor
US7117342B2 (en) * 1998-12-03 2006-10-03 Sun Microsystems, Inc. Implicitly derived register specifiers in a processor
US6718457B2 (en) * 1998-12-03 2004-04-06 Sun Microsystems, Inc. Multiple-thread processor for threaded software applications
WO2000034854A2 (en) * 1998-12-08 2000-06-15 Koninklijke Philips Electronics N.V. Method of executing an interpreter program
US7225436B1 (en) 1998-12-08 2007-05-29 Nazomi Communications Inc. Java hardware accelerator using microcode engine
US6332215B1 (en) * 1998-12-08 2001-12-18 Nazomi Communications, Inc. Java virtual machine hardware for RISC and CISC processors
US20050149694A1 (en) * 1998-12-08 2005-07-07 Mukesh Patel Java hardware accelerator using microcode engine
US6826749B2 (en) 1998-12-08 2004-11-30 Nazomi Communications, Inc. Java hardware accelerator using thread manager
JP2001142692A (en) * 1999-10-01 2001-05-25 Hitachi Ltd Microprocessor to execute two different fixed length instruction sets, microcomputer and instruction executing method
US7761857B1 (en) * 1999-10-13 2010-07-20 Robert Bedichek Method for switching between interpretation and dynamic translation in a processor system based upon code sequence execution counts
US6594821B1 (en) 2000-03-30 2003-07-15 Transmeta Corporation Translation consistency checking for modified target instructions by comparing to original copy
GB2367653B (en) * 2000-10-05 2004-10-20 Advanced Risc Mach Ltd Restarting translated instructions
GB2367654B (en) * 2000-10-05 2004-10-27 Advanced Risc Mach Ltd Storing stack operands in registers
US20020069402A1 (en) * 2000-10-05 2002-06-06 Nevill Edward Colles Scheduling control within a system having mixed hardware and software based instruction execution
KR20020028814A (en) * 2000-10-10 2002-04-17 나조미 커뮤니케이션즈, 인코포레이티드 Java hardware accelerator using microcode engine
GB2369464B (en) 2000-11-27 2005-01-05 Advanced Risc Mach Ltd A data processing apparatus and method for saving return state
US7076771B2 (en) 2000-12-01 2006-07-11 Arm Limited Instruction interpretation within a data processing system
US6704746B2 (en) * 2000-12-12 2004-03-09 Sun Microsystems, Inc. Method and apparatus for lazy instantiation of objects in a virtual machine
US20020095502A1 (en) * 2001-01-16 2002-07-18 Chester James S. Business-to-business service provider system for intranet and internet applications
US7284274B1 (en) * 2001-01-18 2007-10-16 Cigital, Inc. System and method for identifying and eliminating vulnerabilities in computer software applications
JP2004519027A (en) * 2001-01-30 2004-06-24 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Synchronization of main processor and instruction path coprocessor
US7080373B2 (en) * 2001-03-07 2006-07-18 Freescale Semiconductor, Inc. Method and device for creating and using pre-internalized program files
AU2002307080A1 (en) 2001-04-23 2002-11-05 Atmel Corporation Microprocessor for executing byte compiled java code
GB2376100B (en) * 2001-05-31 2005-03-09 Advanced Risc Mach Ltd Data processing using multiple instruction sets
GB2376098B (en) * 2001-05-31 2004-11-24 Advanced Risc Mach Ltd Unhandled operation handling in multiple instruction set systems
GB2376099B (en) * 2001-05-31 2005-11-16 Advanced Risc Mach Ltd Program instruction interpretation
GB2376097B (en) 2001-05-31 2005-04-06 Advanced Risc Mach Ltd Configuration control within data processing systems
US20030023958A1 (en) * 2001-07-17 2003-01-30 Patel Mukesh K. Intermediate language accelerator chip
US20030204636A1 (en) * 2001-07-02 2003-10-30 Globespanvirata Incorporated Communications system using rings architecture
US7240203B2 (en) * 2001-07-24 2007-07-03 Cavium Networks, Inc. Method and apparatus for establishing secure sessions
US8769508B2 (en) 2001-08-24 2014-07-01 Nazomi Communications Inc. Virtual machine hardware for RISC and CISC processors
GB0121064D0 (en) * 2001-08-31 2001-10-24 Transitive Technologies Ltd Obtaining translation of generic code representation
EP1324191A1 (en) * 2001-12-27 2003-07-02 STMicroelectronics S.r.l. Processor architecture, related system and method of operation
CA2472740A1 (en) * 2002-01-11 2003-07-17 Sierra Wireless, Inc. Host extensible wireless application interface
US7305567B1 (en) 2002-03-01 2007-12-04 Cavium Networks, In. Decoupled architecture for data ciphering operations
US20040215444A1 (en) * 2002-03-25 2004-10-28 Patel Mukesh K. Hardware-translator-based custom method invocation system and method
US6782349B2 (en) 2002-05-03 2004-08-24 International Business Machines Corporation Method and system for updating a root of trust measurement function in a personal computer
US7290080B2 (en) * 2002-06-27 2007-10-30 Nazomi Communications Inc. Application processors and memory architecture for wireless applications
US7131118B2 (en) * 2002-07-25 2006-10-31 Arm Limited Write-through caching a JAVA® local variable within a register of a register bank
EP1387252B1 (en) * 2002-07-31 2019-02-13 Texas Instruments Incorporated Instruction prefix to indicate system commands
WO2004049152A1 (en) * 2002-11-26 2004-06-10 Mplicity Ltd. A processor capable of multi-threaded execution of a plurality of instruction-sets
US7444471B1 (en) 2002-12-30 2008-10-28 Transmeta Corporation Method and system for using external storage to amortize CPU cycle utilization
EP1447742A1 (en) * 2003-02-11 2004-08-18 STMicroelectronics S.r.l. Method and apparatus for translating instructions of an ARM-type processor into instructions for a LX-type processor
US7366352B2 (en) * 2003-03-20 2008-04-29 International Business Machines Corporation Method and apparatus for performing fast closest match in pattern recognition
GB2399897B (en) * 2003-03-26 2006-02-01 Advanced Risc Mach Ltd Memory recycling in computer systems
US7310723B1 (en) 2003-04-02 2007-12-18 Transmeta Corporation Methods and systems employing a flag for deferring exception handling to a commit or rollback point
US7698539B1 (en) * 2003-07-16 2010-04-13 Banning John P System and method of instruction modification
US7606997B1 (en) 2003-07-18 2009-10-20 Guillermo Rozas Method and system for using one or more address bits and an instruction to increase an instruction set
US20050071656A1 (en) * 2003-09-25 2005-03-31 Klein Dean A. Secure processor-based system and method
CA2452077A1 (en) * 2003-12-03 2005-06-03 Daniel A. Rose Verification of stream oriented locale files
GB2412192B (en) * 2004-03-18 2007-08-29 Advanced Risc Mach Ltd Function calling mechanism
US7930526B2 (en) 2004-03-24 2011-04-19 Arm Limited Compare and branch mechanism
US7802080B2 (en) 2004-03-24 2010-09-21 Arm Limited Null exception handling
US7751431B2 (en) * 2004-12-30 2010-07-06 Motorola, Inc. Method and apparatus for distributed speech applications
TWI318359B (en) * 2005-04-13 2009-12-11 Ind Tech Res Inst Unified single-core & multi-mode processor and its program execution method
US7478224B2 (en) * 2005-04-15 2009-01-13 Atmel Corporation Microprocessor access of operand stack as a register file using native instructions
US8413162B1 (en) 2005-06-28 2013-04-02 Guillermo J. Rozas Multi-threading based on rollback
KR100573334B1 (en) * 2005-08-31 2006-04-24 주식회사 칩스앤미디어 Computer having dynamically changeable instruction set in realtime
US7502029B2 (en) * 2006-01-17 2009-03-10 Silicon Integrated Systems Corp. Instruction folding mechanism, method for performing the same and pixel processing system employing the same
US8694797B2 (en) * 2006-02-14 2014-04-08 Lenovo (Sinapore) Pte Ltd Method for preventing malicious software from execution within a computer system
US8041958B2 (en) * 2006-02-14 2011-10-18 Lenovo (Singapore) Pte. Ltd. Method for preventing malicious software from execution within a computer system
US20090044159A1 (en) * 2007-08-08 2009-02-12 Mplicity Ltd. False path handling
US7979685B1 (en) * 2007-11-27 2011-07-12 Oracle America, Inc. Multiple instruction execution mode resource-constrained device
CN100555225C (en) * 2008-03-17 2009-10-28 中国科学院计算技术研究所 A kind of risc processor device and method of supporting the X86 virtual machine
US20120159127A1 (en) * 2010-12-16 2012-06-21 Microsoft Corporation Security sandbox
JP5953867B2 (en) * 2012-03-26 2016-07-20 富士ゼロックス株式会社 Program and program protection device
US9069701B2 (en) * 2012-12-11 2015-06-30 International Business Machines Corporation Virtual machine failover
CN112312561B (en) * 2019-07-30 2024-01-23 华硕电脑股份有限公司 Method and apparatus for selecting beams for pre-configuring uplink resources
US11809839B2 (en) 2022-01-18 2023-11-07 Robert Lyden Computer language and code for application development and electronic and optical communication

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4325118A (en) * 1980-03-03 1982-04-13 Western Digital Corporation Instruction fetch circuitry for computers
JPS6133546A (en) * 1984-07-25 1986-02-17 Nec Corp Information processor
KR900003591B1 (en) * 1985-04-08 1990-05-26 가부시기 가이샤 히다찌 세이사꾸쇼 Data processor devices
US5115500A (en) * 1988-01-11 1992-05-19 International Business Machines Corporation Plural incompatible instruction format decode method and apparatus
US5701417A (en) * 1991-03-27 1997-12-23 Microstar Laboratories Method and apparatus for providing initial instructions through a communications interface in a multiple computer system
US5438668A (en) * 1992-03-31 1995-08-01 Seiko Epson Corporation System and method for extraction, alignment and decoding of CISC instructions into a nano-instruction bucket for execution by a RISC computer
US6496922B1 (en) * 1994-10-31 2002-12-17 Sun Microsystems, Inc. Method and apparatus for multiplatform stateless instruction set architecture (ISA) using ISA tags on-the-fly instruction translation
US5630066A (en) * 1994-12-20 1997-05-13 Sun Microsystems, Inc. System and method for locating object view and platform independent object
US5638525A (en) * 1995-02-10 1997-06-10 Intel Corporation Processor capable of executing programs that contain RISC and CISC instructions

Also Published As

Publication number Publication date
KR100618756B1 (en) 2007-05-04
EP0976029A2 (en) 2000-02-02
US5925123A (en) 1999-07-20
KR20050037609A (en) 2005-04-22
KR19990081959A (en) 1999-11-15
WO1997027537A3 (en) 1997-10-16
WO1997027537A2 (en) 1997-07-31
JP2000515270A (en) 2000-11-14

Similar Documents

Publication Publication Date Title
KR100513138B1 (en) A processor for executing instruction sets received from a network or from a local memory
KR100584964B1 (en) Apparatuses for stack caching
KR100529416B1 (en) Method and apparatus of instruction folding for a stack-based machine
KR100466722B1 (en) An array bounds checking method and apparatus, and computer system including this
US6076141A (en) Look-up switch accelerator and method of operating same
US7080362B2 (en) Java virtual machine hardware for RISC and CISC processors
US6148391A (en) System for simultaneously accessing one or more stack elements by multiple functional units using real stack addresses
US7930689B2 (en) Method and system for accessing indirect memories
US6038643A (en) Stack management unit and method for a processor having a stack
US5970242A (en) Replicating code to eliminate a level of indirection during execution of an object oriented computer program
Yellin et al. The java virtual machine specification
US6065108A (en) Non-quick instruction accelerator including instruction identifier and data set storage and method of implementing same
Yiyu et al. A Java processor with hardware-support object-oriented instructions
KR100618718B1 (en) Caching Methods and Devices in Stacked Memory Structures

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20120821

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20130820

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20140825

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20150730

Year of fee payment: 11

FPAY Annual fee payment

Payment date: 20160727

Year of fee payment: 12

EXPY Expiration of term