Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is question about x86-64 assembly language, please help me understand this, thanks! Consider the design of an instruction set for a machine with .
This is question about x86-64 assembly language, please help me understand this, thanks!
Consider the design of an instruction set for a machine with . a one-byte opcode; . a word-size of 32 bits . a byte-addressable memory of size 220 8; a register file of size 8 32. Note that the word-size does not equal the smallest addressable grain-size of memory: it is a multiple. That is typical for most machines. It is possible, therefore, that several instructions (up to 4) could occupy a single word of memory. An efficiently designed CPU would typically fetch that word only once and retain the result internally, rather than waste time on 4 separate fetches. This will be factored into our calculations by counting the number of bytes accessed on fetch, decode and execute, rather than the number of words. (d) 3 marks] Write a program that, for a trio of 32-bit values x, y, z, computes z-(x+y)* (x - y). You may also use sub and mul, which will have the same instruction format as add. Write two versions: one for the 3-operand machine and one for the 2-operand machine. Total the number of bytes of memory access that are done during each of fetch + decode, and execute, and conclude which system is better. Consider the design of an instruction set for a machine with . a one-byte opcode; . a word-size of 32 bits . a byte-addressable memory of size 220 8; a register file of size 8 32. Note that the word-size does not equal the smallest addressable grain-size of memory: it is a multiple. That is typical for most machines. It is possible, therefore, that several instructions (up to 4) could occupy a single word of memory. An efficiently designed CPU would typically fetch that word only once and retain the result internally, rather than waste time on 4 separate fetches. This will be factored into our calculations by counting the number of bytes accessed on fetch, decode and execute, rather than the number of words. (d) 3 marks] Write a program that, for a trio of 32-bit values x, y, z, computes z-(x+y)* (x - y). You may also use sub and mul, which will have the same instruction format as add. Write two versions: one for the 3-operand machine and one for the 2-operand machine. Total the number of bytes of memory access that are done during each of fetch + decode, and execute, and conclude which system is betterStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started