JPS6177936A - Information processor - Google Patents

Information processor

Info

Publication number
JPS6177936A
JPS6177936A JP20093084A JP20093084A JPS6177936A JP S6177936 A JPS6177936 A JP S6177936A JP 20093084 A JP20093084 A JP 20093084A JP 20093084 A JP20093084 A JP 20093084A JP S6177936 A JPS6177936 A JP S6177936A
Authority
JP
Japan
Prior art keywords
subset
mode
registers
task
general
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP20093084A
Other languages
Japanese (ja)
Inventor
Naoya Ono
直哉 大野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP20093084A priority Critical patent/JPS6177936A/en
Publication of JPS6177936A publication Critical patent/JPS6177936A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To increase the processing speed of an information processor by using all general-purpose registers with a single program or using some of these registers to switch tasks at a high speed. CONSTITUTION:The 32 pieces of general-purpose registers 1 (R0, R1...R31) are designated as operands, and five pieces of address registers 2 are used to holds said operands. Then registers R0...R15 are designated when the highest bit of the register 2 is equal to '0'; while registers R16...R31 are designated when said highest bit is equal to '1' respectively. This highest bit is applied to an exclusive OR circuit 4 together with the output of a mode FF3. The output of the circuit 4 is applied together with lower 4 bits of the register 2 for designation of the address of the register 1. Thus the circuit 4 functions as a subset address conversion mechanism. When the FF3 is equal to '0', the registers R0...R15 designated by a machine word instruction are set directly opposite to the general-purpose registers r0...r31 on a processor and receive accesses. When the FF3 is equal to '1', the highest bit of the register address is inverted. Then registers r16...r31 and r0...r15 are allocated to registers R0...R15 and R16...R31 respectively.

Description

【発明の詳細な説明】 (技術分野) 本発明に情報処理装置に関し9%に汎用レジスタの有効
利用全可能とする情報処理fc寛に関する。
DETAILED DESCRIPTION OF THE INVENTION (Technical Field) The present invention relates to an information processing device, and relates to an information processing fc system that enables effective use of general-purpose registers in 9%.

(従来技術) 一般に情報処理装置においてに、汎用レジスタと工ばれ
るレジスタをプロセッサ内に設け、これを機械語命令で
データの格納場所として使用することが行われている。
(Prior Art) Generally, in an information processing device, a register called a general-purpose register is provided in a processor, and this register is used as a data storage location by a machine language instruction.

汎用レジスタ全使用することに=9、主記憶上にデータ
全格納する場合に比べて高速にアクセスできるので、頻
繁に使用するデータを汎用レジスタに割当てることにエ
ム処理速度を速くできるという長所がらる。
Using all general-purpose registers = 9, it can be accessed faster than storing all data in main memory, so assigning frequently used data to general-purpose registers has the advantage of increasing em processing speed. .

後に示すエラなタスク切換えに↓る影響を無視して、−
個のタスクだけについて考え几場合、多数の汎用レジス
タ七使用できれば、処理速度の向上が著しい応用も存在
する反面、性能向上の度合が低い応用も存在する。
Ignoring the effects of erroneous task switching shown later, -
When considering only individual tasks, there are applications in which processing speed can be significantly improved if a large number of general-purpose registers can be used, but there are also applications in which the degree of performance improvement is low.

−1、汎用レジスタで備える情報処理装置においてに、
タスクの切換えに際して、使用している汎用レジスタの
内容の主記憶へのセーブ、あるいは、主記憶からのりス
トアを行う必要がろり、この友めのデータ転送の処理時
間が汎用レジスタの効果を削減する要因となっている。
-1. In an information processing device equipped with general-purpose registers,
When switching tasks, it is necessary to save the contents of the general-purpose register in use to main memory or store it from main memory, and the processing time for this data transfer reduces the effectiveness of the general-purpose register. This is a contributing factor.

このタスク切換えの頻度についても、単一のタスクが長
時間プロセッサを使用し、タスク切換えがほとんど発生
しないような環境も存在する−1、多数のタスクが頻繁
に切換わりながら処理t−実行し、−個のタスクが連続
してプロセッサで走行する時間が極めて短いよりな環境
も存在する。
Regarding the frequency of task switching, there are environments in which a single task uses the processor for a long time and task switching hardly occurs. - There also exist environments in which the time it takes for each task to run continuously on the processor is extremely short.

従って、前者のような場合には汎用レジスタの内容セー
ブ/リストアのfillが低いtめに、多数の汎用レジ
スタ七使用することVcよる効果が顕著に現れるのに対
し、後者のL5な場合には、汎用レジスタの内容のセー
ブ/リストアのオーバヘッドを少なくすることが性能向
上の面から重要な問題となる。
Therefore, in the former case, the effect of using a large number of general-purpose registers 7 becomes noticeable when the fill of general-purpose register contents save/restore is low t, whereas in the latter case, the effect of Vc becomes noticeable. In order to improve performance, reducing the overhead of saving/restoring the contents of general-purpose registers is an important issue.

この几め、特に高速なタスクの切換え重要するような応
用のために特に設計され窺プロセッサにおいては、汎用
レジスタやプログラムカウンタのような内部レジスタを
複数セット用意しこれを切換えることにエラ、レジスタ
内部の主記憶へのセーブ/リストア上行りことなくタス
クを直ちに切換えるような方法が採用されているものが
ろる。
This method is especially useful in processors designed specifically for applications where high-speed task switching is important. There are some methods that allow tasks to be immediately switched without having to save/restore data to the main memory.

しかしながらこのLうな従来の情報処理装置ではプロセ
ッサ全特に高速なタスク切換え全必要としない応用に利
用し九場合には、複数セットの内部レジス°りのtめの
ハードウェアが無駄となってしまうという欠点がるる。
However, in conventional information processing devices such as this, if the entire processor is used for applications that do not require high-speed task switching, hardware such as multiple sets of internal registers is wasted. There are flaws.

te、汎用レジスタの内容のセーブ/リストアを節約す
るtめにあらかじめ各モードで使用できる汎用レジスタ
を定めておきそれ以外は使用しないようにすることVC
工9、汎用レジスタがいくつかのモードに重なって使わ
れないようにする方法も行われている。しかしながらこ
のLつな従来の情報処理装置では、プログラムの作放り
時点からそのプログラムで使用可能な汎用レジスタを決
定しておく必要がわり、更に使用を許され比況用レジス
タのみを使用する工うにプログラム七作底する必要がわ
り、一度作放され友プログラムはそのタスクでしか使用
できないtめ、プログラムの自由度が限定されるという
欠点がるる。特にスタックポインタ、アーギエメントポ
インタ等’に%定の汎用レジスタに割当てているような
システムにおいては、すべてのプログラムが同一の汎用
レジスタを指定せざるを得ない九めにこれらについては
必ずセーブ/リストアが必要となり各タスクに割当てる
効果が減じられる欠点がある。
In order to save on saving/restoring the contents of general-purpose registers, define the general-purpose registers that can be used in each mode in advance and do not use the others.VC
Technique 9: There are also methods to prevent general-purpose registers from being used in multiple modes. However, in this conventional information processing device, it is necessary to determine the general-purpose registers that can be used by the program from the time the program is created. There is a drawback that the degree of freedom of the program is limited because it is necessary to complete seven tasks, and once released, the friend program can only be used for that task. Particularly in systems where stack pointers, argument pointers, etc. are assigned to fixed general-purpose registers, all programs are forced to specify the same general-purpose registers. There is a drawback that restoration is required and the effect of allocating to each task is reduced.

(発明の目的) 本発明の第1の目的は、プロセッサにサブセットアドレ
ス変換機構を設けることにより汎用レジスタを一個のプ
ログラムから全レジスタ使用することもでき、ま比況用
レジスタの一部のみ全使用して複数のタスクで汎用レジ
スタの内容のセーブ/リストアを行うことなく高速にタ
スク切換えを行い処理速度で向上できる情報処理装置を
提供することKある。
(Objective of the Invention) The first object of the present invention is that by providing a processor with a subset address translation mechanism, all general-purpose registers can be used from one program, and only a part of the general-purpose registers can be fully used. An object of the present invention is to provide an information processing device that can perform task switching at high speed and improve processing speed without saving/restoring the contents of general-purpose registers in a plurality of tasks.

本発明の第2の目的に、プロセッサに設けたサブセット
アドレス変換機構lCL力、プログラムの機械語命令で
指定する汎用レジスタをそのプログラムの実行されてい
る時点でのサブセット選択モードに応じてハードウェア
的にプロセッサ上の汎用レジスタに割当てることに=9
、プログラムを作置する時点では各プログラムは、実行
時に実際に割当てられるサブセットを意識する必要がな
く、プログラムの融通性を高めるとともに、汎用レジス
タの一部として固定的に割当てられている特殊レジスタ
についても、プログラムでは同一の汎用レジスタのアド
レス全指定しても実際のプロセッサ上の汎用レジスタア
ドレスに対するサブセット単位での変換紮行ないセーブ
/リストアを不要として汎用レジスタの有効利用上向上
できる情報処理装置を提供すること[6る。
A second object of the present invention is to use a subset address conversion mechanism (ICL) provided in a processor to convert general-purpose registers specified by machine language instructions of a program into hardware according to the subset selection mode at the time the program is being executed. to be assigned to a general-purpose register on the processor = 9
, at the time of program installation, each program does not need to be aware of the subset that is actually allocated during execution, increasing the flexibility of the program, and special registers that are fixedly allocated as part of general-purpose registers. To provide an information processing device that can improve the effective use of general-purpose registers by eliminating the need for converting and saving/restoring the general-purpose register addresses on an actual processor in subset units even if all addresses of the same general-purpose register are specified in a program. To do [6ru.

本発明の第3の目的は、汎用レジスタの基本モードに属
するサブセットしか使用しないプログラムと、基本モー
ド以外のサブセットも使用するプログラムの混用を可能
とするとともに最小限のレジスタの内容のセーブ、リス
トアでこれらのタスク間の切換えを可能とする情報処理
装置全提供することにろる。
A third object of the present invention is to enable the mixed use of programs that use only a subset belonging to the basic mode of general-purpose registers and programs that also use subsets other than the basic mode, and to save and restore the contents of a minimum number of registers. We will provide all information processing equipment that allows switching between these tasks.

(発明の溝底) 本発明の装置に、プロセッサに設けられた複数のサブセ
ットからなる汎用レジスタと1機械語命令で指定され比
況用レジスタのサブセット指定全保持するサブセット指
定保持手段と、サブセット週折モード會指定するデータ
金弊込み保持するモードデータ書込み保持手段と、前記
保持されているモードデータに対応して前記保持されて
いるサブセット指定全前記プロセッサに設けられt汎用
レジスタのサブセットのアドレス全指定に変換するサブ
セットアドレス変換手段と、前記サブセットが基本モー
ド以外で使用され次ときに基本モードにおける前記サブ
セットに属するレジスタの内容全保存する基本モードデ
ータ格納手段と、実行中のタスク全識別するタスク識別
子をサブセット選択モード毎に保持するタスク識別子保
持手段と。
(Bottom of the Invention) The device of the present invention includes a general-purpose register provided in a processor consisting of a plurality of subsets, a subset designation holding means for holding all subset designations of a ratio register designated by one machine language instruction, and a mode data writing/holding means for holding data specified by the mode meeting, and all addresses of subsets of the general-purpose registers provided in the processor, corresponding to the held mode data; Subset address conversion means for converting into a specified address; basic mode data storage means for saving all contents of registers belonging to the subset in basic mode when the subset is used in a mode other than basic mode; and a task for identifying all tasks being executed. and task identifier holding means for holding an identifier for each subset selection mode.

前記サブセットが基本モード以外で使用されたか否か?
示す情報全サブセット選択モード毎に保持するサブセッ
ト使用状況情報保持手段と、前記タスク識別子保持手段
VCより指定され基本モード以外にも使用するサブセッ
トに指定するサグセット指定情報を保持するタスク制御
ブロックと、サブセット選択モードの切換えに際して前
記サブセット使用状況情報保持手段に保持されている情
臀が新几に切換えるべきサブセット選択モードの基本モ
ードのサブセットが他のサブセット選択モードで基本モ
ード以外のモードで使用されていることを示していると
きに汀前記新たに切換えるべきサブセット選択モードの
基本モードのサブセットに属するレジスタの内容全前記
基本モードデータ格納手段から読出し対応するレジスタ
vc復元するサブセット選択モード切換手段と、同一の
サブセット選択モード内におけるタスクの切換えに際し
て!Fi几に実行丁べさタスクに対応する前記タスク制
御ブロックのサグセット指定情報が基本モード以外にも
使用するサブセットを指定してかつ前記サブセット使用
状況情報保持手段に保持されている情報が@記基本モー
ド以外にも使用するサブセットが1だ基本モード以外で
使用されてい乃:いこと金示すとぎVCに前記基本モー
ドデータ格珀手段の対応するサブセットに前記基本モー
ド以外にも使用するサブセノInて属するレジスタの内
容NI存し前記サブセット使用状況情報保持手段の情報
t更新してタスクの切換えを行なうタスク切換手段とt
含んで構成される。
Whether said subset was used in other than basic mode?
a subset usage status information holding unit that holds information for each all-subset selection mode; a task control block that holds sag set specification information specified by the task identifier holding unit VC and specified for the subset to be used in addition to the basic mode; When switching the selection mode, the information held in the subset usage information holding means indicates that the subset of the basic mode of the subset selection mode to be switched to the new one is being used in another subset selection mode in a mode other than the basic mode. When it indicates that the subset selection mode to be newly switched to is the same as the subset selection mode switching means which reads out all the contents of the registers belonging to the basic mode subset of the basic mode to be switched from the basic mode data storage means and restores the corresponding register vc. When switching tasks in subset selection mode! If the sag set specification information of the task control block corresponding to the task to be executed specifies a subset to be used in addition to the basic mode, and the information held in the subset usage information holding means is The number of subsets used in modes other than the basic mode is 1.The sub-sets used in modes other than the basic mode belong to the corresponding subset of the basic mode data collection means in the Togi VC that shows the basic mode. A task switching means for updating the contents of the register NI and updating the information t in the subset usage information holding means to switch tasks;
It consists of:

(実施例) 次に本発明の実施例について1面を参照して詳細に説明
する。
(Example) Next, an example of the present invention will be described in detail with reference to the first page.

WJ1図に本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.

本実施例において、プロセッサは32個の汎用レジスタ
l (r6.  rl、・・・・・・r31Vt有しこ
れが各16個からなる2つのサプセッ)K分割されてい
る。
In this embodiment, the processor is divided into K 32 general-purpose registers (r6, rl, . . . r31Vt, each consisting of two subsets of 16 registers).

ま九本実施例においては機械語命令の少なくとも一部は
32本の汎用レジスタ(Ro、R+、・・・R31)を
オペ2ンドとして指定できる。そして機械語命令で指定
される32本の汎用レジスタのアドレス七保持する几め
[5ビツトのアドレスレジスター2が設けられる。その
最上位ビットは機械語命令で指定され比況用レジスタの
サブセット指定でろ9″″0#のと!HRo−Rtst
”、  −1”ノドきIcUR16〜Rstt−指定す
る。この最上位ビットニサブセット選択モード七保持す
るために設けられ之モード7リツプフロブグ3の出力と
ともに排他的論理和回路4に印加され、その出力がアド
レスレジスタ2の下位4ビツトとともに汎用レジスタ1
のアドレス指定のために印加されている。すなわち排他
的論理和回路4が機械語命令で指定され比況用レジスタ
のサブセラトメ指定音プロセッサの汎用レジスタのサブ
セットアドレスに変換するサブセットアドレス変換機構
となる。
In this embodiment, at least a part of the machine language instruction can specify 32 general-purpose registers (Ro, R+, . . . R31) as the operand. A 5-bit address register 2 is provided to hold the addresses of 32 general-purpose registers designated by machine language instructions. The most significant bit is specified by a machine language instruction and specifies a subset of the ratio register. HRo-Rtst
", -1" Throat IcUR16~Rstt- Specify. This most significant bit is applied to the exclusive OR circuit 4 together with the output of the mode 7 lip flop flag 3, which is provided to maintain the subset selection mode 7, and the output is applied to the general register 1 along with the lower 4 bits of the address register 2.
applied for addressing. That is, the exclusive OR circuit 4 serves as a subset address conversion mechanism that converts a sub-ceratome specified sound processor specified by a machine language instruction into a subset address of a general-purpose register of the sound processor.

ま九、サブセット選択モード全標準モードお工び裏モー
ドに設定するために2個の機械語命令が用意されている
。この機械語命令により前記モード7リツプ70ツブ3
のモード設定が行なわれる。
Nine, two machine language instructions are provided to set the subset selection mode, all standard mode, and back-of-the-box mode. By this machine language instruction, the mode 7 lip 70 lip 3
mode setting is performed.

なお、ここで灯スタックレジスタとして、R15゜呼ば
れ几手続のローカル変数の領域を示すためのフレームポ
インタ紮保持するtめのレジスタとして、R14,呼ば
れ九手続きに引渡す几めの実引数の領域金示すためのア
ーキュメントポインタを保持するためのレジスタとして
R13が固定的に割当てられているものとする。
Here, R15 is used as a light stack register, and R15 is a frame pointer to indicate the local variable area of the called procedure. It is assumed that R13 is fixedly allocated as a register for holding an archument pointer for indicating money.

また機械語命令での汎用レジスタの指定範囲がRO””
R15内の場合は基本モードのサブセットの使用、指定
範囲がR16以上に及ぶときには拡張モードのサブセッ
トの使用と呼称する。
Also, the specified range of general-purpose registers in machine language instructions is RO""
When the specified range is within R15, it is called using a basic mode subset, and when the specified range extends beyond R16, it is called using an extended mode subset.

ま几、標準モードお工び裏モードにおける制御情報を保
持するために、モード制御テーブル5が用意される。こ
のモード制御テーブル5は、慨準モードおよび裏モード
に対応して、2つのエントリをもつ。各エントリは、対
応するモードで現在実行中のタスクの識別子を保持する
九めのフィールドP T R,お工び、対応するモード
における基本モードのサブセット即ちRIo〜R15が
他のモードの拡張モードで使用されたかどうかt示す定
めのフラグフィールドFiもつ。
A mode control table 5 is prepared to hold control information in the standard mode and the secret mode. This mode control table 5 has two entries corresponding to the general mode and the secret mode. Each entry has a ninth field PTR which holds the identifier of the task currently executing in the corresponding mode, and a subset of the basic mode in the corresponding mode, i.e. RIo to R15, is an extended mode of the other modes. It has a defined flag field Fi indicating whether it has been used.

さらに、各サブセントが、拡張モードで使用される場合
に本来の基本モードにおけるサブセットに践する汎用レ
ジスタの内容を退避するtめの退避エリア6が用意され
る。
Furthermore, when each subcent is used in the extended mode, a tth save area 6 is prepared for saving the contents of the general-purpose registers used for the subset in the original basic mode.

各タスク(Th)に対応して設けられるタスク制御ブロ
ック’I”CBhij、現在の命令カウンタ等の従来の
タスクの状態情報に加えてこのタスクが、基本モード以
外のレジスタ即ちRI6〜FLsxk使用するか否か七
示すサブセット指定情報として、拡張モードビットE2
もつ。拡張モードビットEの値″″0”は、タスクが基
本モードのサブセットしか使用しないこと金示し、値″
1#は凡16以後金使うこと金示す。
In addition to conventional task status information such as the task control block 'I'CBhij provided corresponding to each task (Th) and the current instruction counter, whether this task uses registers other than the basic mode, that is, RI6 to FLsxk. Extended mode bit E2 is used as subset designation information indicating whether
Motsu. A value of ``0'' in the extended mode bit E indicates that the task uses only a subset of the basic mode;
1# indicates money to be spent after 16.

次に本実施例における動作を説明する。Next, the operation in this embodiment will be explained.

サブセット選択モードが標準モードのとき即ち、モード
設定機械語命令に工9モードフリッグ70ツブ3が値′
b する機械語命令で指定されたレジスタアドレスはそのま
ま汎用レジスタ1に印加される。従って、機械語命令で
指定され7tR◇、R1,・・・R31T’S、そのま
ま、プロセッサ上の汎用レジスタro、  rr+  
・・・rl1 VC対応づけされアクセスが行われる。
When the subset selection mode is the standard mode, that is, the mode setting machine language command is set to the value '
The register address specified by the machine language instruction b is applied to general-purpose register 1 as is. Therefore, 7tR◇, R1,...R31T'S specified by machine language instructions are directly transferred to general-purpose registers ro, rr+ on the processor.
... rl1 VC is associated and access is performed.

サブセット選択モードが裏モードのとさ、即ちモード設
定用の機械語命令に1pモード7リツグ7oツ7” 3
7bL値’″11にもつときにはレジスタを指定する機
械語命令で指定されたレジスタアドレスの最上位ビット
が反転して汎用レジスタ1にアドレスとして印加される
。即ち、RoからRISの指定に対してはプロセッサの
r16からrss tでのレジスタが、R16からR3
1の指定に対してはプロセッサの「0からr15までの
レジスタが割洛てられることVC7する。従って、各サ
ブセット選択モードで実行されるタスクが基本モードの
場合、即ち、プログラムでRoからRISまでしか使用
しない場合には、標準モードではプロセッサの汎用レジ
スタのrQからrtstでか使用され裏モードでt’X
r1@からrstまでのレジスタが使用されることにな
る。
When the subset selection mode is the hidden mode, that is, the machine language instruction for mode setting is 1p mode 7 rig 7 otsu 7" 3
When the 7bL value is '''11, the most significant bit of the register address specified by the machine language instruction specifying the register is inverted and applied to general register 1 as an address.In other words, for the specification of Ro to RIS, The registers from r16 to rss t of the processor are from R16 to R3.
For a specification of 1, registers from 0 to r15 of the processor are allocated VC7. Therefore, if the task executed in each subset selection mode is the basic mode, that is, the program selects registers from Ro to RIS. In the standard mode, the general-purpose registers rQ to rtst of the processor are used, and in the hidden mode, t'X
Registers from r1@ to rst will be used.

次に、本実施例におけるサブセットの切換え。Next, switching of subsets in this embodiment.

タスクの切換えを第2■により説明する。Task switching will be explained in Section 2.

なお、本実施例においては、通常のユーザのプログラム
は、標準モードで実行され、特別な入出力割込み処理だ
けが裏モードで実行されるものとする。標準モードにお
いて実行されるタスクは基本モードのサブセットしか使
用しないものも拡張モードも使用するものも存在する。
In this embodiment, it is assumed that a normal user's program is executed in the standard mode, and only special input/output interrupt processing is executed in the secret mode. Some tasks executed in standard mode use only a subset of basic mode, while others also use extended mode.

−万、裏モードで実行されるプログラムは、基本モード
のサブセットしか使用しないものとする◇ 標準モードにおいてプログラムの実行中に前記特別な入
出力割込みが発生したと@、めるいは前記特別な入出力
割込みに対する処理が完了したときに、サブセット選択
モード切換え機構が起動され、次の動作が行われる。
- It is assumed that a program executed in secret mode uses only a subset of the basic mode.◇ If the special input/output interrupt occurs while the program is running in standard mode, the special input/output interrupt When the processing for the output interrupt is completed, the subset selection mode switching mechanism is activated and the next operation is performed.

まず、タスク切換え機構を起動し、次のロールアウト動
作を行う。
First, the task switching mechanism is activated and the next rollout operation is performed.

すなわち、現在実行中のタスクが拡張モードのサブセラ
)k使用しているかどうかt現在実行中のサブセット選
択モードに対応するモード制御テーブル5のエントリの
PT几スフイールド指定されるタスク制御ブロックのE
ビyトvcLr)調べこれが″1“の場合即ち、使用し
て−る場合には、対応するレジスタの内容をタスク制御
ブロックのレジスタセーブエリアに格納する。Eビット
がOの場合VCニ、Cの処理に行わない。
That is, whether the currently executing task is using extended mode sub-selection mode or not.
Bit vcLr) is checked. If this is "1", that is, if it is being used, the contents of the corresponding register are stored in the register save area of the task control block. If the E bit is O, VC2 and C are not processed.

次に、プロセッサ上の10グラム状態語(この中には、
命令実行後のオーパフロウ、キャリイの発生等?示すフ
ラグ類1等が含まれている)お工びプログラムカウンタ
の内容を同じくタスク制御ブロックの対応するセーブエ
リアに格納する。
Next, the 10-gram state word on the processor (which includes:
Occurrence of overflow, carry, etc. after instruction execution? The contents of the modified program counter (including flags 1, etc. shown) are also stored in the corresponding save area of the task control block.

以上のロール7クト処理が終り7t6とで次の処理全行
う。
After the above roll 7 act processing is completed, the next processing is all performed at 7t6.

新7t+に切換わるべきモードに対応するモード制御テ
ーブル5のフラグフィールドF=2調べこれが11#の
とき、即ちサブセット選択モードにおける基本モードの
サブセットが他のモードのサブセットで使用されている
場合には、退避エリア6の対応するサブセットの内容t
−a出し、汎用レジスタIに格納し、このサブセット選
択モードにおける基本モードのサブセットの内容全復元
するとともに、フラグフィールドF’kOにリセットす
る。
Check the flag field F=2 of the mode control table 5 corresponding to the mode to be switched to the new 7t+. When this is 11#, that is, when the subset of the basic mode in the subset selection mode is used in the subset of another mode, , contents t of the corresponding subset of evacuation area 6
-a is output, stored in general-purpose register I, restores the entire contents of the basic mode subset in this subset selection mode, and resets the flag field F'kO.

FがOの場合には、基本モードのサブセットの内容は保
持されtままなので直ちに上の処理は行わない。
If F is O, the contents of the basic mode subset are retained and remain t, so the above process is not performed immediately.

次に、サブセット選択モードを他のモードに切換えるた
めの機械語命令を実行し几後、タスク切換え機構を起動
する。タスク切換え機構に、サブセット切換え機構から
の起動に際して次に示すタスクのロールイン処理を行う
。即ち、現在のサブ1′− セット選択モー各店するモード制御テーブル5のPTR
フィールドで示されるタスク制御ブロックの拡張モード
ピットEを調べこれが1の場合には、現在のサブセット
選択モードとに異なる前のサブセット選択モードに対応
するモード制御テーブル5の7ラグF’klべこれがO
ならば まだ前記の前のサブセット選択モードの基本モ
ードのサブセット(現在のサブセット選択モードの拡張
モードのサブセツ1m対応する)のセーブが行われてい
ないので、退避エリア60対応するサブセットに退避し
次うえで、タスク制御ブロック上に退避されている現在
のサブセット選択モードの拡張モードのサブセットに対
応するサブセットの内容t−汎用レジスタ1のサブセッ
トに復元するとともに前のサブセット選択モードの7ラ
グpic−i”七セットする。
Next, a machine language instruction for switching the subset selection mode to another mode is executed, and after that, the task switching mechanism is activated. The task switching mechanism performs the following task roll-in processing upon startup from the subset switching mechanism. That is, the current sub1'-PTR of the mode control table 5 for each set selection mode.
Check the extended mode pit E of the task control block indicated by field and if it is 1, set the 7 lag F'kl of mode control table 5 corresponding to the previous subset selection mode that is different from the current subset selection mode.
In that case, the basic mode subset of the previous subset selection mode (corresponding to the extended mode subset 1m of the current subset selection mode) has not been saved yet, so save it to the subset corresponding to save area 60 and save it. Then, the contents of the subset corresponding to the extended mode subset of the current subset selection mode saved on the task control block are restored to the subset t-general register 1, and the 7-lag pic-i of the previous subset selection mode is restored. Make seven sets.

フラグFが′1″の場合VCは、既に退避が行われてい
るので上の処理は不要である。
If the flag F is '1', the VC has already been saved, so the above process is not necessary.

拡張モードビットEが′0”の場合には拡張モードに対
応するサブセットの復元は不要である。
When the extended mode bit E is '0', there is no need to restore the subset corresponding to the extended mode.

同−のサブセット選択モード内でのタスクの切換えは次
のLうに行われる。
Task switching within the same subset selection mode is performed as follows.

即ち、まず次に実行すべきタスク全決定する。That is, first, all tasks to be executed next are determined.

これが現在実行中のタスクと異なる場合VCは、現在実
行中のタスクの状態を対応するタスク制御ブロックのセ
ーブエリアに退避する。この処理は、前述のサブセット
切換え時のロールアウト処理と、基本モードのサブセッ
トの汎用レジスタのセーブも行う点を除いて同様の処理
である。即ち、この場合には、プログラム状態語、プロ
グラムカウンタとともに、基本モードのサブセラ1ci
iiする汎用レジスタの内容もセーブする。更にこのと
き、タスク制御ブロックの拡張ビットEt−調べこれが
1#の場合には、拡張モードに対応するサブセットの内
容もタスク制御ブロックにセーブする。
If this is different from the currently executing task, the VC saves the state of the currently executing task to the save area of the corresponding task control block. This process is similar to the rollout process when switching the subset described above, except that general-purpose registers of the basic mode subset are also saved. That is, in this case, along with the program status word and program counter, the basic mode subcellar 1ci
The contents of the general-purpose registers specified in ii are also saved. Furthermore, at this time, the extension bit Et of the task control block is checked and if this is 1#, the contents of the subset corresponding to the extension mode are also saved in the task control block.

以上のロールアウト処理が終了し几後、現在のサブセッ
ト選択モードに対応するモード制御テーブル5のエント
リのPTRフィールドに新几に実行すべきタスクのタス
ク制御ブロックへのポインタ全セットし次うえで、次の
ロールイン処理上行う。
After the above rollout process is completed, all pointers to the task control blocks of the tasks to be executed in the new batch are set in the PTR field of the entry in the mode control table 5 corresponding to the current subset selection mode, and then, Perform on the next roll-in process.

即ち、まず、基本モードのサブセットに属する汎用レジ
スタの内容のりストアを行り九後、前述のサブセット切
換え時でのロールイン処理と全く同じ処理を行5゜これ
を第2図(b)に示す。
That is, first, the contents of the general-purpose registers belonging to the subset of the basic mode are stored, and then the same process as the roll-in process when switching the subset described above is performed in line 5. This is shown in FIG. 2(b). .

本実施例においてに、32本の汎用レジスタのセットt
−616本の2つのサブセットに分割しているが、本発
明はこれらの1セツト中のレジスタ数、?プセットの数
に限定されるものではない。
In this embodiment, a set of 32 general-purpose registers t
- 616 registers, but the present invention can reduce the number of registers in one set, ? It is not limited to the number of pushets.

ま几5本実施例においては、特定のスタックレジスタ等
の特定のレジスタが汎用レジスタ上に割当てられている
としているが必ずしもこのL5な1式でbる必要はない
。但し、その場合にはレジスタ選択モードの切換えの九
びにこれらの特定のレジスタの内容のセーブ/リストア
が必要となる。
Matrix 5 In this embodiment, it is assumed that a specific register such as a specific stack register is allocated to a general-purpose register, but it is not necessarily necessary to use this L5 equation. However, in that case, it is necessary to save/restore the contents of these specific registers every time the register selection mode is switched.

ま几、本実施例の説明において、説明の簡単の几めにタ
スク切換え機構、サブセット切換え機構の詳細の実施方
法、タスク制御ブロックの詳細の構造等の説明に省略し
てらるがこれらについては従来の1式と同様に実現でき
る。
In the explanation of this embodiment, for the sake of simplicity, the details of the task switching mechanism, the detailed implementation method of the subset switching mechanism, the detailed structure of the task control block, etc. are omitted. This can be realized in the same way as equation 1.

(発明の効果) 、本発明T/cにプロセッサにサブセットアドレス変換
機構を設けることVc工91個のプログラムから汎用レ
ジスタを全部使用することも出来、ま比況用レジスタの
一部のみ全使用して複数のタスクで汎用レジスタの内容
のセーブ/リストア上行なうことなく高速にタスク切換
全行なうことができ汎用レジスタの有効利用の向上、処
理速度の向上ができるという効果がろる。
(Effect of the invention) By providing a subset address translation mechanism in the processor of the T/C of the present invention, it is possible to use all the general-purpose registers from 91 Vc engineering programs, and it is possible to use only a part of the registers for comparison. It is possible to perform task switching at high speed without having to save/restore the contents of general-purpose registers among multiple tasks, thereby improving the effective use of general-purpose registers and increasing processing speed.

さらに汎用レジスタの基本モード#/cjJするサブセ
ットしか使用しないグログラムと基本モード以外のサブ
セットも使用するプログラムの混用を可能とし最少限の
レジスタの内容のセーブリストアでこれらのタスク間の
切換を行ない処理速度の向上ができるという効果がろる
Furthermore, it is possible to mix programs that use only the basic mode subset of general-purpose registers with programs that also use non-basic mode subsets, and to switch between these tasks by saving and restoring the contents of the registers to a minimum, increasing processing speed. The effect is that it can improve

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明片冒施例を示すブロック図、第2図(a
)、 (b)は第1aの動作上*すフローチャートでる
る。 1・・・汎用レジスタ、2・・・アドレスレジスタ、3
・・・モード7リツグフロツグ、4・・・排他的論理和
回路、5・・・モード制御テーブル、6・・・退避エリ
ヤ。 T CBi 、 T CBj・・・タスク制御ブロック
。 乃1凹
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG.
), (b) is a flowchart for the operation of 1a. 1...General-purpose register, 2...Address register, 3
. . . Mode 7 log frog, 4 . . . Exclusive OR circuit, 5 . . . Mode control table, 6 . . . Save area. TCBi, TCBj...Task control block. No1 dent

Claims (1)

【特許請求の範囲】 プロセッサに設けられた複数のサブセットからなる汎用
レジスタと、 機械語命令で指定された汎用レジスタのサブセット指定
を保持するサブセット指定保持手段と、サブセット選択
モードを指定するデータを書込み保持するモードデータ
書込み保持手段と、前記保持されているモードデータに
対応して前記保持されているサブセット指定を前記プロ
セッサに設けられた汎用レジスタのサブセットのアドレ
スデータに変換するサブセットアドレス変換手段と、 前記サブセットが基本モード以外で使用されたときに基
本モードにおける前記サブセットに属するレジスタの内
容を保存する基本モードデータ格納手段と、 実行中のタスクを識別するタスク識別子をサブセット選
択モード毎に保持するタスク識別子保持手段と、 前記サブセットが基本モード以外で使用されたか否かを
示す情報をサブセット選択モード毎に保持するサブセッ
ト使用状況情報保持手段と、前記タスク識別子保持手段
により指定され基本モード以外にも使用するサブセット
を指定するサブセット指定情報を保持するタスク制御ブ
ロックと、 サブセット選択モードの切換えに際して前記サブセット
使用状況情報保持手段に保持されている情報が新たに切
換えるべきサブセット選択モードの基本モードのサブセ
ットが他のサブセット選択モードで基本モード以外のモ
ードで使用されていることを示しているときには前記新
たに切換えるべきサブセット選択モードの基本モードの
サブセットに属するレジスタの内容を前記基本モードデ
ータ格納手段から読出し対応するレジスタに復元するサ
ブセット選択モード切換手段と、 同一のサブセット選択モード内におけるタスクの切換え
に際して新たに実行すべきタスクに対応する前記タスク
制御ブロックのサブセット指定情報が基本モード以外に
も使用するサブセットを指定してかつ前記サブセット使
用状況情報保持手段に保持されている情報が前記基本モ
ード以外にも使用するサブセットがまだ基本モード以外
で使用されていないことを示すときには前記基本モード
データ格納手段の対応するサブセットに前記基本モード
以外にも使用するサブセットに属するレジスタの内容を
保存し前記サブセット使用状況情報保持手段の情報を更
新してタスクの切換えを行なうタスク切換手段とを含む
ことを特徴とする情報処理装置。
[Scope of Claims] General-purpose registers provided in a processor and consisting of a plurality of subsets; subset designation holding means for holding subset designations of the general-purpose registers designated by machine language instructions; and writing data designating a subset selection mode. mode data writing and holding means for holding; and subset address conversion means for converting the held subset designation into address data of a subset of general-purpose registers provided in the processor in accordance with the held mode data; basic mode data storage means for storing the contents of registers belonging to the subset in basic mode when the subset is used in a mode other than basic mode; and a task for holding a task identifier for identifying the task being executed for each subset selection mode. an identifier holding means; a subset usage information holding means for holding information indicating whether or not the subset is used in a mode other than the basic mode for each subset selection mode; a task control block that holds subset specifying information that specifies a subset to be changed; and a task control block that holds subset specifying information that specifies a subset to be changed, and information held in the subset usage information holding means when switching the subset selection mode to another basic mode subset of the subset selection mode to be newly switched to. When the subset selection mode indicates that the mode is being used in a mode other than the basic mode, the content of the register belonging to the basic mode subset of the subset selection mode to be newly switched is read out from the basic mode data storage means and correspondingly executed. Subset selection mode switching means for restoring to the register, and subset specification information of the task control block corresponding to a newly executed task when switching tasks within the same subset selection mode specifying a subset to be used in addition to the basic mode. and when the information held in the subset usage information holding means indicates that the subset to be used in modes other than the basic mode has not yet been used in a mode other than the basic mode, the corresponding subset in the basic mode data storage means is and task switching means for storing the contents of registers belonging to subsets used in addition to the basic mode, updating information in the subset usage information holding means, and switching tasks. .
JP20093084A 1984-09-26 1984-09-26 Information processor Pending JPS6177936A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20093084A JPS6177936A (en) 1984-09-26 1984-09-26 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20093084A JPS6177936A (en) 1984-09-26 1984-09-26 Information processor

Publications (1)

Publication Number Publication Date
JPS6177936A true JPS6177936A (en) 1986-04-21

Family

ID=16432645

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20093084A Pending JPS6177936A (en) 1984-09-26 1984-09-26 Information processor

Country Status (1)

Country Link
JP (1) JPS6177936A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04211838A (en) * 1990-01-05 1992-08-03 Motorola Inc Method and apparatus for preventing returning risk

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04211838A (en) * 1990-01-05 1992-08-03 Motorola Inc Method and apparatus for preventing returning risk

Similar Documents

Publication Publication Date Title
US5210874A (en) Cross-domain call system in a capability based digital data processing system
US5812868A (en) Method and apparatus for selecting a register file in a data processing system
US5781758A (en) Software emulation system with reduced memory requirements
EP0208428B1 (en) Direct input/output in a virtual memory system
US4792895A (en) Instruction processing in higher level virtual machines by a real machine
US4459661A (en) Channel address control system for a virtual machine system
EP0595880B1 (en) Memory management method
US4812981A (en) Memory management system improving the efficiency of fork operations
EP0213843A2 (en) Digital processor control
JPS61206043A (en) Interruption control method in virtual computer system
JPS60176143A (en) Program calling apparatus
CA1172375A (en) Program call method
CN114691537A (en) Method for accessing memory and information processing equipment
JPH0195347A (en) System for converting address
JPS6177936A (en) Information processor
JPS6273347A (en) Address converter
GB1495729A (en) Apparatus and method for handling exceptions in a data processing system
JPS61160160A (en) Addressing control device of virtual computer
JP2798275B2 (en) Virtual memory address space access control method
US6321319B2 (en) Computer system for allowing a two word jump instruction to be executed in the same number of cycles as a single word jump instruction
US5117491A (en) Ring reduction logic using parallel determination of ring numbers in a plurality of functional units and forced ring numbers by instruction decoding
JPS6336012B2 (en)
WO1983003017A1 (en) Computer with automatic mapping of memory contents into machine registers
JPH0363822A (en) Computer control system
SU734686A1 (en) Command shaping device