アドレス指定方式
アドレス指定方式とは、CPUの命令により、物理メモリ上の位置を指定する方式のことである。
CPU命令(機械語)は、命令部とアドレス部で構成される。この命令部とアドレス部、そしてCPU内部にある各種のレジスタおよび主記憶上のアドレスの関連で、種々のアドレス指定の方法がある。
アドレスを指定する命令には次のような6つの種類がある。(1)直接アドレス指定:命令語に含まれるアドレス値が直接的に有効アドレスとして利用される。(2)間接アドレス指定:命令語のアドレスで指定したアドレス上のメモリにあるデータが間接的に有効アドレスとして利用される。(3)指標レス指定:命令語に含まれるアドレス値にインデックスレジスタ上の値を加算したものが、有効アドレスとして利用される。(4)基底アドレス指定:基底レジスタの値と命令語のアドレス値を加算したものが有効アドレスとして利用される。(5)相対アドレス指定:命令語のアドレス値にプログラムカウンタの内容を加えたものが、有効アドレスになる。(6)即値アドレス指定:命令部のアドレスの値がアドレスとしてではなく、そのまま「演算デー タ」として利用される。
アドレス指定方式は、実際には利用するCPUの種類ごとにどの方式が利用可能かが異なる。なお、アセンブリ言語、および、機械語の機能は、CPUの機能に直接対応しており、アドレス指定についてもCPUが持つ方式をそのまま持っている。これに対して高級言語は、より抽象的なレベルでプログラムを記述するため、物理アドレス、および、物理的なアドレス指定方式は直接意識しない。
CPU: | A5X A6チップ アウト・オブ・オーダー実行 アドレス指定方式 インサーキットエミュレータ オーバークロック オーバーヘッド |
アドレッシングモード
(Addressing mode から転送)
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2020/07/04 05:50 UTC 版)
アドレッシングモード(Addressing Mode)は、CPUの命令セットアーキテクチャ(ISA)の一部を構成する。プロセッサの命令には操作対象をオペランドで指定するものがあり、その指定方法の詳細がアドレッシングモードと呼ばれるものである。したがって、広義のアドレッシングモードにはレジスタを指定する場合も、値が命令のオペランドとして直接与えられている場合も含まれるが、狭義のアドレッシングモードはオペランドとして使用すべきメモリ領域を指定するものとみなされる。
|
- ^ "How many addressing modes are enough?" by F. Chow, S. Correll, M. Himelstein, E. Killian, L. Weber, all from MIPS Computer Systems, Inc. 1987
"An Overview of the MIPS-X-MP Project" by John L. Hennessy and Mark A. Horowitz 1986: "MIPS-X uses a single addressing mode: base register plus offset. This simple addressing mode allows the computation of the effective address to begin very early" - ^ "Instruction Set Principles: Addressing Mode Usage (Summary)" Archived 2011年9月30日, at the Wayback Machine. by Dr. Sofiène Tahar "3 programs measured on machine with all address modes (VAX)": "displacement mode" and "immediate mode" are used 75% of the time.
"Fundamentals of Computer Design"[リンク切れ] p. 112-113 "Frequency of addressing modes for TI TMS320C54x DSP. The C54x has 17 data addressing modes, not counting register access, but the four found in MIPS account for 70% of the modes. Autoincrement and autodecrement, found in some RISC architectures, account for another 25% of the usage. This data was collected form a measurement of static instructions for the C-callable library of 54 DSP routines coded in assembly language."
"Efficient and Language-Independent Mobile Programs" by Ali-Reza Adl-Tabatabai, Geoff Langdale, Steven Lucco, and Robert Wahbe 1995: "79% of all instructions executed could be replaced by RISC instructions or synthesized into RISC instructions using only basic block instruction combination." - ^ Kong and Patterson. "Instruction set design". 1995. slide 27. [1]
- ^ "Architecture of the RTX 32P" by Philip Koopman 1989
- ^ a b Dave Brooks. "Some Old Computers".
- ^ Bill Purvis. "Some details of the Elliott 803B hardware"
- ^ "C Reference: function malloc()" メモリを確保するサイズをバイト数で指定
- Addressing modeのページへのリンク