JPS592148A - Loop processing system - Google Patents

Loop processing system

Info

Publication number
JPS592148A
JPS592148A JP11126382A JP11126382A JPS592148A JP S592148 A JPS592148 A JP S592148A JP 11126382 A JP11126382 A JP 11126382A JP 11126382 A JP11126382 A JP 11126382A JP S592148 A JPS592148 A JP S592148A
Authority
JP
Japan
Prior art keywords
instruction
word
loop
boundary position
entry
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
JP11126382A
Other languages
Japanese (ja)
Inventor
Toshiaki Hirota
広田 俊明
Hisao Nakagawa
中川 寿生
Koichi Murata
光一 村田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP11126382A priority Critical patent/JPS592148A/en
Publication of JPS592148A publication Critical patent/JPS592148A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/322Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
    • G06F9/325Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address for loops, e.g. loop detection or loop counter

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To make it unnecessary to execute a line form-processing at every loop processing, by positioning an entry instruction of a loop at a word boundary position, and interposing a no-operation instruction instead, in case when the entry instruction concerned does not exist in the word boundary position. CONSTITUTION:In case when a 1-word length instruction is stored as 4-byte from a word boundary position (code 4), the whole of a desired 1-word length instruction can be inputted by fetching of once. In case when the 1-word length instruction is stored as 4-byte from a position which is not the word boundary position (code 5), usually the first half of the instruction concerned 5 is inputted by fetching of the first 1-word portion, the latter half of the instruction concerned 5 is inputted by fetching of the following 1-word portion, and it becomes necessary to form a line by a line form-processing function 3, but first of all, the instruction is positioned in the word boundary position (code 6), instead of which a no- operation instruction of a non-1-word length instruction is interposed (code 7). In this way, it is unnecessary to execute a line form-processing at every loop processing, and the efficiency can be improved as a whole.

Description

【発明の詳細な説明】 (4)発明の技術分野 本発明は、ループ処理方式、特にプログラム中のループ
を構成する命令列の入口命令を主記憶装置上の語境界位
置に格納せしめると共に、当該格納を行うべくノー・オ
ペレーション命令を実行するようにしたループ処理方式
に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (4) Technical Field of the Invention The present invention relates to a loop processing method, in particular, to storing an entry instruction of a sequence of instructions constituting a loop in a program at a word boundary position in a main memory, and The present invention relates to a loop processing method in which a no-operation instruction is executed to perform storage.

(B)  技術の背景と問題点 従来から、主記憶装置上には1語長命令の他に半語長命
令などが混在しているが、主記憶装置から命令をフェッ
チするに当っては、いわゆる語境界位置を先頭上する1
語単位で7エツチが行われる。このために上記半語長命
令などが混在していることに伴って、例えば1語長命令
の格納アドレスが上記語境界位置に位置していないこと
も生じ、このような場合には、例えば当該1語長命令を
含む2語分をフエ、ツチして(2回に分けてフェッチし
て)、整列処理を行って所望の1語長命令を抽出するよ
りにしている。
(B) Technical Background and Problems Traditionally, main memory has had a mix of one-word long instructions and half-word long instructions, but when fetching instructions from main memory, Move the so-called word boundary position upward 1
Seven etches are performed for each word. For this reason, as the above-mentioned half-word length instructions are mixed, for example, the storage address of the one-word length instruction may not be located at the above-mentioned word boundary position. Two words including a one-word length instruction are fetched and fetched (fetched in two steps), and a desired one-word length instruction is extracted by performing alignment processing.

このような整列処理を伴なうフェッチは例えば2τ程厩
の余分な時間を必要とするに止まるものであるが、例え
ばFORTRANの如き科学技術計算向きの官給で記述
されたプログラムでは、一箇所ないしは数箇所程度のル
ープの処理に実行時間の大半を費やされることが多く、
これらループの処理を効率よく行わせることが重要にな
ってくる。
Fetching that involves such sorting processing only requires an extra time of, for example, 2τ, but in a government-funded program for scientific and technical calculations such as FORTRAN, it is necessary to Most of the execution time is often spent processing loops in a few places,
It is important to efficiently process these loops.

(C1発明の目的と構成 本発明は上記の点を解決する1つの方策を提供すること
を目的としておシ1本発明のループ処理方式は、1語長
命令に混在して1語長以外の長さをもつ非1語長命令が
格納されている主記憶装置と該主記憶装置から上記命令
をフェッチして処理を進めるプロセッサとを有し、上記
主記憶装置が語境界位置を先頭とする1語分を転送する
よう構成されてなるデータ処理システムにおいて、ルー
プを構成する命令列のループ入口に位置する入口命令が
上記語境界位置に合わせられた格納アドレスに格納され
てなシ、かつ上記入口命令以前の命令と当該入口命令と
の間に当該入口命令の格納アドレスを上記語境界位置に
位置合わせするためのノー・オペレーション命令が挿入
され、上記ループを構成する命令列の上記入口命令が上
記語境界位置からフェッチされることを特徴としている
(C1 Purpose and Structure of the Invention The present invention aims to provide a method for solving the above-mentioned problems.) The loop processing method of the present invention is such that a one-word length instruction is mixed with a one-word length instruction. a main memory in which a non-one-word length instruction is stored; and a processor that fetches the instruction from the main memory and proceeds with processing, and the main memory starts at a word boundary position. In a data processing system configured to transfer one word, an entry instruction located at the loop entrance of a sequence of instructions constituting a loop is not stored at a storage address aligned with the word boundary position, and the above A no-operation instruction for aligning the storage address of the entry instruction with the word boundary position is inserted between the instruction before the entry instruction and the entry instruction, and the entry instruction of the instruction sequence forming the loop is inserted. It is characterized in that it is fetched from the word boundary position.

以下図面を参照しつつ説明する。This will be explained below with reference to the drawings.

(DJ  発明の実施例 第1図は本発明にいう語境界の意味する所を説明する説
明図、第2図は本発明の一実施例の要部を説明する説明
図を示している。
(DJ Embodiment of the Invention FIG. 1 is an explanatory diagram for explaining the meaning of word boundaries in the present invention, and FIG. 2 is an explanatory diagram for explaining the main part of one embodiment of the present invention.

第1図において、1は主記憶装置、2はプロセッサ、3
は整列処理機能部を表わしている。図示の場合、1語4
バイトとして示されておシ、主記憶装置1のアドレスの
下位2ビツトが「00」を示す位置が本発明にいう語境
界位置に対応している。そして、主記憶装置1から命令
がフェッチされる場合には、上記語境界位置を先頭とす
る4バイト分(即ち1語分)が1度にプロモツプ2側へ
転送される。
In FIG. 1, 1 is a main storage device, 2 is a processor, and 3 is a main storage device.
represents the sorting processing function section. In the case shown, 1 word 4
The location where the lower two bits of the address in the main memory 1 indicate "00", which is shown as a byte, corresponds to the word boundary location according to the present invention. When an instruction is fetched from the main memory 1, four bytes (ie, one word) starting from the word boundary position are transferred to the promoter 2 at one time.

このために、図示符号4に示す1語長命令の如く5語境
界位置からの4バイトとして格納されていれば、1回の
フェッチによって所望とするIM長命令全体f取込むこ
とができる。しかし、図示符号5に示す1語長命令の如
く1語境界位置でない位置からの4バイトとして格納さ
れているような場合には、最初の1 [i!分の7エツ
チによって当該命令5の前半を取込み、次の1胎分の7
エツチによって当該命令5の後半を取込むようになり、
整列処理機能部3によって整列を行うことが必要となる
For this reason, if the instruction is stored as 4 bytes from the 5-word boundary position, such as the 1-word length instruction shown by reference numeral 4, the entire desired IM-length instruction f can be fetched in one fetch. However, when the 1-word length instruction shown in the figure 5 is stored as 4 bytes starting from a position that is not a 1-word boundary position, the first 1 [i! The first half of the instruction 5 is taken in by the 7/7 etch, and the next 7/7
Due to ecchi, the second half of the instruction 5 is now included,
It is necessary to perform the alignment using the alignment processing function section 3.

上記「技術の背景と問題点」の欄に述べた如く、上記整
列処理を行う必要がある形で、ループの入口命令が位置
していると、ループが繰返される都度、上記整列処理が
必要となり、全体の処理に大きく影響することが生じる
As mentioned in the "Technical Background and Problems" section above, if the loop entry instruction is located in a way that requires the above sorting process, the above sorting process will be necessary every time the loop is repeated. , which can greatly affect the overall processing.

このために1本発明の場合には、図示符号5の如き形で
ループの入口命令が位置する場合には、当該入口命令を
図示符号6として示す如く語境界位置に位置せしめ、こ
の償いのために図示符号7とし°C示す如き非1語長命
令のノー・オペレーション命令を介在せしめるようにし
ている。勿論、当該ノー・オペレーション命令は、ルー
プの入口命令の直前に鰺〈必要はない。
For this purpose, in the case of the present invention, when the entry instruction of a loop is located as shown by the symbol 5, the entry instruction is located at a word boundary position as shown by the symbol 6, and for this compensation, A no-operation instruction, which is a non-one-word-length instruction, is interposed as indicated by the reference numeral 7 in the figure. Of course, the no-operation instruction does not need to be placed immediately before the loop entry instruction.

このようにすることによって、ノー会オペレーション命
令の実行に伴う時間的ロスは存在するが、ループ処理の
都度上述の整列が行われることがなくなシ、全体として
効率が良くなる。第2図はこの点を説明している。
By doing so, although there is a time loss associated with the execution of the no-meeting operation command, the above-mentioned sorting is not performed every time the loop processing is performed, and the overall efficiency is improved. Figure 2 illustrates this point.

即ち、今第2図囚図示は、 A (I)なA (I) 十B (I)なる演算を工が
値「1」から値rNJとなるまで繰返し実行するという
DOループの場合を示している。第2図(Blはループ
の入口命令(I、E ) Kついて語境界に対する配慮
を行っていない場合を示しておシ、第2図(C1は本発
明による実施例態様を示している。そして両者は夫々第
2図(4)のDOループを実行せしめるプログラムであ
る。
That is, the illustration in Figure 2 shows the case of a DO loop in which the operation A (I) A (I) 10 B (I) is repeatedly executed until the value ``1'' becomes the value rNJ. There is. FIG. 2 (Bl shows a case in which word boundaries are not considered for the loop entry instructions (I, E) K, and FIG. 2 (C1 shows an embodiment according to the present invention). Both are programs that execute the DO loop shown in FIG. 2 (4).

第2図(B) (C1において、rバイト」とある欄は
夫々の命令のバイト長をちなみに示したものであり、「
位置」とある欄は主記憶装#1上のバイト位置r oo
 J 、 r oIJ 、 r to J 、 r 1
1 Jをちなみに示したものであシ、「アドレス」とあ
る欄は主記憶装#1士のアドレスを示している。
Figure 2 (B) (In C1, the column labeled "r bytes" indicates the byte length of each instruction;
The column labeled “Position” indicates the byte position r oo on main memory #1.
J, roIJ, r to J, r 1
1J is shown by the way, and the column labeled "Address" indicates the address of main memory #1.

第2図(Bl (C1図示の場合、図示命令(Llが第
1図図示符号5の1語長命令の如く格納される形となっ
ている。ぞして、第2図(B1図示の場合、命令(L)
はバイト位ti&rlOJからの4バイト分に格納され
ている。このために上述の整列が必要となる。これに苅
して第2図(C)図示の場合、半語長のノー・オペレー
ション命令r BCRO,OJが間挿せしめられており
、入口命令である命令(L)は語境界位置からの4バイ
ト分に格納される形となる。
In FIG. 2 (Bl (C1), the instruction (Ll) is stored as a 1-word length instruction indicated by reference numeral 5 in FIG. 1. , command (L)
is stored in 4 bytes starting from byte position ti&rlOJ. This requires the alignment described above. In addition to this, in the case shown in FIG. 2(C), a half-word no-operation instruction r BCRO, OJ is inserted, and the entry instruction (L) is a 4-bit instruction from the word boundary position. It is stored in bytes.

なお、上記ノー・オペレーション命令の挿入は、コンパ
イラにおいて目的プログラムの最適化を図る隙llCs
人口命令のアドレスを詞べて、必要に応じて行わせるよ
うにすれば足シる。
Note that the insertion of the above-mentioned no-operation instruction creates an opportunity for the compiler to optimize the target program.
It will save you a lot of money if you tell them the address of the population command and have them do it as needed.

(H)  発明の詳細 な説明した如く1本発明によれば、ループの発生幅広整
列処理を行うという如き不都合がなくなり、全体として
の処理時間に犬きく功献する。
(H) As described in detail, according to the present invention, inconveniences such as occurrence of loops and wide alignment processing are eliminated, and the overall processing time is significantly reduced.

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

第1図は本発明にいう語境界の意味する所を説明する説
明図、第2図は本発明の一実施例の要部を説明する説明
図を示している。 図中、1は主記憶装置、2はプロセッサ、3は整列処理
機能部を表わす。 特許出願人  富士通株式会社
FIG. 1 is an explanatory diagram illustrating the meaning of a word boundary in the present invention, and FIG. 2 is an explanatory diagram illustrating a main part of an embodiment of the present invention. In the figure, 1 represents a main memory, 2 a processor, and 3 an alignment processing function section. Patent applicant Fujitsu Limited

Claims (1)

【特許請求の範囲】[Claims] 1語長命令に・混在して1語長以外の長さをもつ非1語
長命令が格納されている主記憶装置と核上・  記憶装
置から上記命令をフェッチして処理を進めるプロセッサ
とを有し、上記主記憶装置が語境界位置を先頭とする1
語分を転送するよう構成されてなるデータ処理システム
において、ループを構成する命令列のループ入口に位置
する入口命令が上記語境界位置に合わせられた格納アド
レスに格納されてなシ、かつ上記入口命令以前の命令と
当該入口命令との間に当該入口命令の格納アドレスを上
記語境界位置に位置合わせするためのノー・オペレーシ
ョン命令が挿入され、上記ループを構成する命令列の上
記入口命令が上記語境界位置からフェッチされることを
特徴とするループ処理方式。
A main memory in which non-one word length instructions having a length other than one word mixed with one word length instructions are stored, and a processor which fetches the above instructions from the core memory and proceeds with processing. 1 with the main memory starting at the word boundary position.
In a data processing system configured to transfer word segments, an entry instruction located at a loop entry of a sequence of instructions constituting a loop is not stored at a storage address aligned with the word boundary position, and A no-operation instruction for aligning the storage address of the entry instruction to the word boundary position is inserted between the instruction before the instruction and the entry instruction, and the entry instruction of the instruction sequence forming the loop is A loop processing method characterized by fetching from word boundary positions.
JP11126382A 1982-06-28 1982-06-28 Loop processing system Pending JPS592148A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11126382A JPS592148A (en) 1982-06-28 1982-06-28 Loop processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11126382A JPS592148A (en) 1982-06-28 1982-06-28 Loop processing system

Publications (1)

Publication Number Publication Date
JPS592148A true JPS592148A (en) 1984-01-07

Family

ID=14556761

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11126382A Pending JPS592148A (en) 1982-06-28 1982-06-28 Loop processing system

Country Status (1)

Country Link
JP (1) JPS592148A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5034727A (en) * 1988-11-25 1991-07-23 Fuji Jukogyo Kabushiki Kaisha Monitor system for a connection of a connector in an electric system of a motor vehicle
JPH0784781A (en) * 1993-09-13 1995-03-31 Nec Corp Information processor
WO2006006613A1 (en) * 2004-07-08 2006-01-19 Sony Computer Entertainment Inc. Methods and apparatus for updating of a branch history table

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58172756A (en) * 1982-04-02 1983-10-11 Hitachi Ltd Matching system for double-word-length boundary of branch destinated instruction address

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58172756A (en) * 1982-04-02 1983-10-11 Hitachi Ltd Matching system for double-word-length boundary of branch destinated instruction address

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5034727A (en) * 1988-11-25 1991-07-23 Fuji Jukogyo Kabushiki Kaisha Monitor system for a connection of a connector in an electric system of a motor vehicle
JPH0784781A (en) * 1993-09-13 1995-03-31 Nec Corp Information processor
WO2006006613A1 (en) * 2004-07-08 2006-01-19 Sony Computer Entertainment Inc. Methods and apparatus for updating of a branch history table
US7500088B2 (en) 2004-07-08 2009-03-03 Sony Computer Entertainment Inc. Methods and apparatus for updating of a branch history table

Similar Documents

Publication Publication Date Title
US6889318B1 (en) Instruction fusion for digital signal processor
US4858104A (en) Preceding instruction address based branch prediction in a pipelined processor
EP0438961A2 (en) Hardware data string operation controller
JPH06236268A (en) Apparatus and method for judgment of length of instruction
EP1241567B1 (en) Method and apparatus for executing coprocessor instructions
JPH1091435A (en) Processor executing two types of instruction length codes and instruction code input device therefor
US5313644A (en) System having status update controller for determining which one of parallel operation results of execution units is allowed to set conditions of shared processor status word
JP2806359B2 (en) Instruction processing method and instruction processing device
JPH063584B2 (en) Information processing equipment
US4541047A (en) Pipelined data processing system
JPH07120278B2 (en) Data processing device
US5088030A (en) Branch address calculating system for branch instructions
JPS592148A (en) Loop processing system
US7047396B1 (en) Fixed length memory to memory arithmetic and architecture for a communications embedded processor system
JP2006518060A (en) Method and computer program for single command multiple data management
EP0150506B1 (en) Instruction processor
EP0397414A2 (en) Control device having a function of modifying a microinstruction
US4977497A (en) Data processor
JPH07101385B2 (en) Information processing equipment
JPS6116335A (en) Information processor
US5819081A (en) Method of executing a branch instruction of jumping to a subroutine in a pipeline control system
JPS5890247A (en) Pipeline controlling system of information processor
US6530013B1 (en) Instruction control apparatus for loading plurality of instructions into execution stage
JP2772100B2 (en) Parallel instruction fetch mechanism
JP2843844B2 (en) Parallel processing unit