Guide to RISC processors for programmers and engineers

387 318 1
Guide to RISC processors for programmers and engineers

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Guide to RISC processors for programmers and engineers

[...]... addr into the accumulator store addr Stores the value in the accumulator at the memory address addr add addr Adds the contents of the accumulator and value at address addr and stores the result in the accumulator sub addr Subtracts the value at memory address addr from the contents of the accumulator and stores the result in the accumulator mult addr Multiplies the contents of the accumulator and value... (src1 − src2) and stores the result in dest mult dest,src1,src2 Multiplies the two values at src1 and src2 and stores the result in dest accumulator machines and the zero-address machines are called stack machines We discuss the pros and cons of these schemes later RISC processors tend to use a special architecture known as the load/store architecture In this architecture, special load and store instructions... two addresses to specify the two input operands and one to specify where the result should go Typical operations require two operands, therefore we need three addresses: two addresses to specify the two input operands and the third one to indicate where the result should be stored Most processors specify three addresses We can reduce the number of addresses to two by using one address to specify a source... execution because of their load/store architecture 22 Guide to RISC Processors Processor Registers Processors have a number of registers to hold data, instructions, and state information We can divide the registers into general-purpose or special-purpose registers Special-purpose registers can be further divided into those that are accessible to the user programs and those reserved for system use The available... * D - E + F + A is converted to the following code load mult add sub add add store C D B E F A A ; ; ; ; ; ; ; load C into the accumulator accumulator = C*D accumulator = C*D+B accumulator = C*D+B-E accumulator = C*D+B-E+F accumulator = C*D+B-E+F+A store the accumulator contents in A Zero-Address Machines In zero-address machines, locations of both operands are assumed to be at a default location These... 3-address format 18 bits 2-address format 8 bits 13 bits 5 bits Opcode Rdest/Rsrc2 1-address format 8 bits 8 bits Opcode 0-address format Figure 2.1 Instruction sizes for the four formats: this format assumes that the operands are located in registers The count for the accumulator machine is better as the accumulator is a register and reading or writing to it, therefore, does not generate a memory access... Places the value at address addr on top of the stack pop addr Stores the top value on the stack at memory address addr add Adds the top two values on the stack and pushes the result onto the stack sub Subtracts the second top value from the top value of the stack and pushes the result onto the stack mult Multiplies the top two values on the stack and pushes the result onto the stack In these machines,... of the RISC category Before we dig into the details of these two designs, let us talk about the current trend In the 1970s and early 1980s, processors predominantly followed the CISC designs The current trend is to use the RISC philosophy To understand this shift from CISC to RISC, we need to look at the motivation for going the CISC way initially But first we have to explain what these two types of design... IA-32 processors use the two-address format It is also possible to have instructions that use only one or even zero address The one-address machines are called 13 14 Guide to RISC Processors Table 2.1 Sample three-address machine instructions Instruction Semantics add dest,src1,src2 Adds the two values at src1 and src2 and stores the result in dest sub dest,src1,src2 Subtracts the second source operand... the early designers did not think about the RISC way of designing processors? Several factors contributed to the popularity of CISC in the 1970s In those days, memory was very expensive and small in capacity For example, even in the mid-1970s, 6 Guide to RISC Processors ISA level ISA level Microprogram control Hardware Hardware (a) CISC implementation (b) RISC implementation Figure 1.2 The ISA-level . y0 w0 h1" alt="" Guide to RISC Processors Sivarama P. Dandamudi Guide to RISC Processors for Programmers and Engineers Sivarama P. Dandamudi School of Computer Science Carleton University Ottawa,. moved from CISC to RISC design for their 64-bit processor. The main objective of this book is to provide a guide to the archi- tecture and assembly language of the popular RISC processors. In. indirectly, to the writing of this book. First and foremost, I would like to thank Sobha and Veda for their understanding and patience! I want to thank Ann Kostant, Executive Editor and Wayne Wheeler,

Ngày đăng: 11/05/2014, 15:05

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan