JP2005149297A - プロセッサおよびそのアセンブラ - Google Patents
プロセッサおよびそのアセンブラ Download PDFInfo
- Publication number
- JP2005149297A JP2005149297A JP2003388130A JP2003388130A JP2005149297A JP 2005149297 A JP2005149297 A JP 2005149297A JP 2003388130 A JP2003388130 A JP 2003388130A JP 2003388130 A JP2003388130 A JP 2003388130A JP 2005149297 A JP2005149297 A JP 2005149297A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- nop
- branch
- flag
- unit
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/443—Optimisation
- G06F8/4434—Reducing the memory space required by the program code
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
【解決手段】 命令解析部23は、プログラム入力部12に入力されたプログラムの命令を順次解析する。NOP命令解析部24は、連続するNOP命令を1つの連続NOP命令にエンコードする。そして、命令コード出力部14は、命令解析部23によってエンコードされた命令をオブジェクトコードとして出力する。したがって、オブジェクトコードのサイズを削減することが可能となる。
【選択図】 図4
Description
まず、一般的なアセンブラの動作について説明する。図1は、一般的なアセンブラの機能的構成を示すブロック図である。このアセンブラ11は、ニーモニックで記述されたプログラム(以下、単にプログラムと呼ぶ。)10が入力されるプログラム入力部12と、プログラム入力部12に入力されたプログラムの命令コードを1つずつ解析し、エンコードされた命令を出力する命令解析部13と、命令解析部13から出力されたエンコードされた命令をオブジェクトコード15として出力する命令コード出力部14とを含む。
本発明の第2の実施の形態におけるアセンブラ装置の構成例は、図3に示す本発明の第1の実施の形態におけるアセンブラ装置の構成例と同様である。また、本発明の第2の実施の形態におけるアセンブラの機能的構成は、図4に示す本発明の第1の実施の形態におけるアセンブラの機能的構成と同様である。したがって、重複する構成および機能の詳細な説明は繰返さない。
図11は、本発明の第3の実施の形態におけるプロセッサの概略構成を示すブロック図である。このプロセッサは、フェッチする命令のアドレスを生成するプログラムアドレス生成部30と、プログラムアドレス生成部30によって生成されたアドレスに応じて命令をフェッチする命令フェッチ部31と、命令フェッチ部31によってフェッチされた命令をデコードする命令デコード部32と、命令デコード部32によるデコード結果に応じてメモリやレジスタからデータを読出すデータ読出し部33と、データ読出し部33によって読出されたデータをソースとして整数演算や浮動小数点演算などを行なう演算処理部34と、演算処理部34による演算結果をメモリやレジスタに書込むデータ書込み部35とを含む。
本発明の第3の実施の形態においては、図13(b)に示すように、分岐命令がフェッチされてから実際に分岐先アドレスに分岐するまでの間において、分岐命令のフェッチステージとデコードステージとの差のサイクル数の命令が処理されてしまう。一般には、これらの命令は、NOP命令に置換されることが多い。したがって、分岐命令の後に必ずNOP命令を挿入しなければならず、オブジェクトコードのサイズが増大することになる。本実施の形態においては、必要なNOP実行回数だけNOP命令を含んだNOP付分岐命令を実行するプロセッサに関する。
本発明の第5の実施の形態におけるプロセッサは、図11に示す第3の実施の形態におけるプロセッサの概略構成と比較して、命令フェッチ部の構成が異なる点のみが異なる。また、本発明の第5の実施の形態における命令デコード部の構成は、図17に示す第4の実施の形態における命令デコード部の構成と同様である。したがって、重複する構成および機能の詳細な説明は繰返さない。
本発明の第6の実施の形態におけるプロセッサの概略構成は、図11に示す第3の実施の形態におけるプロセッサの概略構成と比較して、命令デコード部の構成が異なる点のみが異なる。したがって、重複する構成および機能の詳細な説明は繰返さない。なお、本実施の形態における命令デコード部の参照符号を53として説明する。
Claims (5)
- 入力されたプログラムの命令を順次解析し、連続する複数個のノーオペレーション命令を、該複数個のノーオペレーション命令の個数を指定するオペランドをもつ連続ノーオペレーション命令にエンコードする命令解析手段と、
前記命令解析手段によってエンコードされた命令をオブジェクトコードとして出力する出力手段とを含むアセンブラ。 - 前記命令解析手段は、命令がラベルが付されたノーオペレーション命令の場合には、当該命令を前記連続ノーオペレーション命令に含めずにエンコードする、請求項1記載のアセンブラ。
- 前記命令解析手段は、命令が引数に相当する個数のノーオペレーションを行なう引数付ノーオペレーション命令の場合には、当該命令を前記連続ノーオペレーション命令に含めずにエンコードする、請求項1または2記載のアセンブラ。
- フェッチすべき命令のアドレスを生成するアドレス生成手段と、
前記アドレス生成手段によって生成されたアドレスに応じて命令をフェッチする命令フェッチ手段と、
前記命令フェッチ手段によってフェッチされた命令をデコードする命令デコード手段と、
前記命令デコード手段によるデコード結果に応じて、当該命令を実行する命令実行手段とを含み、
前記命令デコード手段は、デコードする命令が、オペランド指定フィールドを有する連続ノーオペレーション命令である場合、そのオペランド指定フィールドで指定された個数分だけ連続したノーオペレーション命令として処理することができ、
その連続ノーオペレーション命令の直前にフェッチされた命令が分岐命令であり、かつこの分岐命令による分岐が生じるときには、前記オペランド指定フィールドには依存しない個数のノーオペレーション命令として処理する、プロセッサ。 - フェッチすべき命令のアドレスを生成するアドレス生成手段と、
前記アドレス生成手段によって生成されたアドレスに応じて命令をフェッチする命令フェッチ手段と、
前記命令フェッチ手段によってフェッチされた命令をデコードする命令デコード手段と、
前記命令デコード手段によるデコード結果に応じて、当該命令を実行する命令実行手段とを含み、
前記命令デコード手段は、デコードした命令がノーオペレーション付分岐命令であり、かつ分岐条件が成立する場合にはノーオペレーション命令を該ノーオペレーション付分岐命令の後に挿入し、デコードした命令がノーオペレーション付分岐命令であり、かつ分岐条件が不成立の場合にはノーオペレーション命令を挿入しない、プロセッサ。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003388130A JP2005149297A (ja) | 2003-11-18 | 2003-11-18 | プロセッサおよびそのアセンブラ |
US10/841,467 US20050108698A1 (en) | 2003-11-18 | 2004-05-10 | Assembler capable of reducing size of object code, and processor for executing the object code |
DE102004036293A DE102004036293A1 (de) | 2003-11-18 | 2004-07-27 | Assembler, der zur Verringerung der Größe des Zielcodes fähig ist, und Prozessor zum Ausführen des Zielcodes |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003388130A JP2005149297A (ja) | 2003-11-18 | 2003-11-18 | プロセッサおよびそのアセンブラ |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005149297A true JP2005149297A (ja) | 2005-06-09 |
JP2005149297A5 JP2005149297A5 (ja) | 2006-12-21 |
Family
ID=34567466
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003388130A Pending JP2005149297A (ja) | 2003-11-18 | 2003-11-18 | プロセッサおよびそのアセンブラ |
Country Status (3)
Country | Link |
---|---|
US (1) | US20050108698A1 (ja) |
JP (1) | JP2005149297A (ja) |
DE (1) | DE102004036293A1 (ja) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008027341A (ja) * | 2006-07-25 | 2008-02-07 | Matsushita Electric Ind Co Ltd | 命令セットおよび情報処理装置 |
US20090113403A1 (en) * | 2007-09-27 | 2009-04-30 | Microsoft Corporation | Replacing no operations with auxiliary code |
KR20180031266A (ko) * | 2016-09-19 | 2018-03-28 | 삼성전자주식회사 | 전자 장치, vliw 프로세서 및 그 제어 방법들 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04275603A (ja) * | 1991-03-01 | 1992-10-01 | Fuji Electric Co Ltd | プログラマブル・コントローラ |
JPH11306016A (ja) * | 1998-04-16 | 1999-11-05 | Japan Radio Co Ltd | レジスタ間接分岐命令及び条件付き分岐命令実行方法 |
JP2001216154A (ja) * | 1999-12-30 | 2001-08-10 | Texas Instr Inc <Ti> | むき出しのパイプラインを具備するコードのサイズを、nop演算を命令オペランドとしてコード化することで削減するための方法並びに装置 |
JP2002099348A (ja) * | 2000-09-21 | 2002-04-05 | Matsushita Electric Ind Co Ltd | クロック制御方法およびクロック制御装置 |
Family Cites Families (28)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS61269734A (ja) * | 1985-05-23 | 1986-11-29 | Hitachi Ltd | マイクロプログラム制御方式 |
DE3856175T2 (de) * | 1987-06-05 | 1998-12-17 | Mitsubishi Electric Corp | Digitales Signalverarbeitungssystem in dem ein Prozessor unter Kontrolle eines Hosts auf zwei Befehlsspeicher zugreift |
US6253307B1 (en) * | 1989-05-04 | 2001-06-26 | Texas Instruments Incorporated | Data processing device with mask and status bits for selecting a set of status conditions |
JP2761688B2 (ja) * | 1992-02-07 | 1998-06-04 | 三菱電機株式会社 | データ処理装置 |
JP3499252B2 (ja) * | 1993-03-19 | 2004-02-23 | 株式会社ルネサステクノロジ | コンパイル装置及びデータ処理装置 |
US5727194A (en) * | 1995-06-07 | 1998-03-10 | Hitachi America, Ltd. | Repeat-bit based, compact system and method for implementing zero-overhead loops |
US5958044A (en) * | 1997-01-24 | 1999-09-28 | Texas Instruments Incorporated | Multicycle NOP |
US6182211B1 (en) * | 1997-07-02 | 2001-01-30 | Matsushita Electric Industrial Co., Ltd. | Conditional branch control method |
US5970241A (en) * | 1997-11-19 | 1999-10-19 | Texas Instruments Incorporated | Maintaining synchronism between a processor pipeline and subsystem pipelines during debugging of a data processing system |
US6370638B1 (en) * | 1997-11-21 | 2002-04-09 | Matsushita Electric Industrial Co., Ltd. | Apparatus and method of computer program control in computer systems using pipeline processing |
JP3881763B2 (ja) * | 1998-02-09 | 2007-02-14 | 株式会社ルネサステクノロジ | データ処理装置 |
US6553488B2 (en) * | 1998-09-08 | 2003-04-22 | Intel Corporation | Method and apparatus for branch prediction using first and second level branch prediction tables |
US6564316B1 (en) * | 1998-09-10 | 2003-05-13 | Parthusceva Ltd. | Method and apparatus for reducing code size by executing no operation instructions that are not explicitly included in code using programmable delay slots |
US20060168431A1 (en) * | 1998-10-14 | 2006-07-27 | Peter Warnes | Method and apparatus for jump delay slot control in a pipelined processor |
JP3842474B2 (ja) * | 1999-02-02 | 2006-11-08 | 株式会社ルネサステクノロジ | データ処理装置 |
US6367071B1 (en) * | 1999-03-02 | 2002-04-02 | Lucent Technologies Inc. | Compiler optimization techniques for exploiting a zero overhead loop mechanism |
US6275929B1 (en) * | 1999-05-26 | 2001-08-14 | Infineon Technologies Ag L. Gr. | Delay-slot control mechanism for microprocessors |
US6691240B1 (en) * | 1999-12-30 | 2004-02-10 | Texas Instruments Incorporated | System and method of implementing variabe length delay instructions, which prevents overlapping lifetime information or values in efficient way |
US6799266B1 (en) * | 1999-12-30 | 2004-09-28 | Texas Instruments Incorporated | Methods and apparatus for reducing the size of code with an exposed pipeline by encoding NOP operations as instruction operands |
US6889320B1 (en) * | 1999-12-30 | 2005-05-03 | Texas Instruments Incorporated | Microprocessor with an instruction immediately next to a branch instruction for adding a constant to a program counter |
US6834338B1 (en) * | 2000-02-18 | 2004-12-21 | Texas Instruments Incorporated | Microprocessor with branch-decrement instruction that provides a target and conditionally modifies a test register if the register meets a condition |
US6738893B1 (en) * | 2000-04-25 | 2004-05-18 | Transmeta Corporation | Method and apparatus for scheduling to reduce space and increase speed of microprocessor operations |
US7178013B1 (en) * | 2000-06-30 | 2007-02-13 | Cisco Technology, Inc. | Repeat function for processing of repetitive instruction streams |
JP2002342075A (ja) * | 2001-05-11 | 2002-11-29 | Mitsubishi Electric Corp | マイクロプロセッサ |
US20040034759A1 (en) * | 2002-08-16 | 2004-02-19 | Lexra, Inc. | Multi-threaded pipeline with context issue rules |
US7185177B2 (en) * | 2002-08-26 | 2007-02-27 | Gerald George Pechanek | Methods and apparatus for meta-architecture defined programmable instruction fetch functions supporting assembled variable length instruction processors |
US7143269B2 (en) * | 2003-01-14 | 2006-11-28 | Ip-First, Llc | Apparatus and method for killing an instruction after loading the instruction into an instruction queue in a pipelined microprocessor |
JP3974063B2 (ja) * | 2003-03-24 | 2007-09-12 | 松下電器産業株式会社 | プロセッサおよびコンパイラ |
-
2003
- 2003-11-18 JP JP2003388130A patent/JP2005149297A/ja active Pending
-
2004
- 2004-05-10 US US10/841,467 patent/US20050108698A1/en not_active Abandoned
- 2004-07-27 DE DE102004036293A patent/DE102004036293A1/de not_active Withdrawn
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04275603A (ja) * | 1991-03-01 | 1992-10-01 | Fuji Electric Co Ltd | プログラマブル・コントローラ |
JPH11306016A (ja) * | 1998-04-16 | 1999-11-05 | Japan Radio Co Ltd | レジスタ間接分岐命令及び条件付き分岐命令実行方法 |
JP2001216154A (ja) * | 1999-12-30 | 2001-08-10 | Texas Instr Inc <Ti> | むき出しのパイプラインを具備するコードのサイズを、nop演算を命令オペランドとしてコード化することで削減するための方法並びに装置 |
JP2002099348A (ja) * | 2000-09-21 | 2002-04-05 | Matsushita Electric Ind Co Ltd | クロック制御方法およびクロック制御装置 |
Also Published As
Publication number | Publication date |
---|---|
DE102004036293A1 (de) | 2005-06-23 |
US20050108698A1 (en) | 2005-05-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH0628185A (ja) | 2つのコンピュータ命令を並列に実行できるコンピュータ装置 | |
US20160259643A1 (en) | Confidence-driven selective predication of processor instructions | |
JP2006313422A (ja) | 演算処理装置及びデータ転送処理の実行方法 | |
KR20080014062A (ko) | 마이크로프로세서에서의 효율적인 서브프로그램 복귀 | |
EP2461246B1 (en) | Early conditional selection of an operand | |
JP2009059246A (ja) | マイクロプロセッサ | |
US6871343B1 (en) | Central processing apparatus and a compile method | |
JP4134179B2 (ja) | ソフトウエアによる動的予測方法および装置 | |
US20150227371A1 (en) | Processors with Support for Compact Branch Instructions & Methods | |
US6799266B1 (en) | Methods and apparatus for reducing the size of code with an exposed pipeline by encoding NOP operations as instruction operands | |
JP2006517322A (ja) | パイプライン化ディジタルプロセッサにおけるハザード検出および管理のための方法および装置 | |
JP4607958B2 (ja) | プロセッサおよびプログラム変換装置 | |
US6209080B1 (en) | Constant reconstruction processor that supports reductions in code size and processing time | |
Kiat et al. | A comprehensive analysis on data hazard for RISC32 5-stage pipeline processor | |
US7543135B2 (en) | Processor and method for selectively processing instruction to be read using instruction code already in pipeline or already stored in prefetch buffer | |
JP2005149297A (ja) | プロセッサおよびそのアセンブラ | |
JP2006053830A (ja) | 分岐予測装置および分岐予測方法 | |
JP5068529B2 (ja) | 時間−静止型プロセッサにおけるゼロ−オーバヘッドのブランチング及びルーピング | |
JP2002024008A (ja) | データ処理装置およびプログラム変換装置 | |
JP3915019B2 (ja) | Vliwプロセッサ、プログラム生成装置、および記録媒体 | |
US9135006B1 (en) | Early execution of conditional branch instruction with pc operand at which point target is fetched | |
JP4006887B2 (ja) | コンパイラ、プロセッサおよび記録媒体 | |
JP2004355477A (ja) | マイクロプロセッサ | |
JPH1196001A (ja) | プログラム実行装置及びプログラム変換方法 | |
Hussain et al. | Design and FPGA Implementation of Five Stage Pipelined RISC-V Processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20061108 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061108 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090105 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091201 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100406 |