Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The architecture styles are: AccumulatorAll operations occur between a single register and a memory location. Memory-memoryAll instruction addresses reference only memory locations. StackAll operations occur

image text in transcribed

The architecture styles are: AccumulatorAll operations occur between a single register and a memory location. Memory-memoryAll instruction addresses reference only memory locations. StackAll operations occur on top of the stack. Push and pop are the only instructions that access memory; all others remove their operands from the stack and replace them with the result. The implementation uses a hardwired stack for only the top two stack entries, which keeps the processor circuit very small and low in cost. Additional stack positions are kept in memory locations, and accesses to these stack positions require memory references. Load-storeAll operations occur in registers, and register-to-register instructions have three register names per instruction.

Use the four different instruction set architecture styles from above, but assume that the memory operations supported include register indirect as well as direct addressing. Invent your own assembly language mnemonics (Figure A.2 provides a useful sample to generalize), and for each architecture, write the best equivalent assembly language code for this fragment of C code:

for (i = 0; i

Assume that A and B are arrays of 64-bit integers, and C, D, and i are 64-bit integers.

Stack Push A Push B Add Pop C Accumulator Load A Add B Store C Register (register-memory) Load R1, A Add R3, R1,B Store R3,C Register (load-store) Load R1,A Load R2.B Add R3, R1, R2 Store R3, FIGURE A.2 The code sequence for C = A + B for four classes of instruction sets. Stack Push A Push B Add Pop C Accumulator Load A Add B Store C Register (register-memory) Load R1, A Add R3, R1,B Store R3,C Register (load-store) Load R1,A Load R2.B Add R3, R1, R2 Store R3, FIGURE A.2 The code sequence for C = A + B for four classes of instruction sets

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+3 To introduce the concept of ecopreneurship

Answered: 1 week ago

Question

7. Explain how an employee could reduce stress at work.

Answered: 1 week ago