You are designing a new processor that is similar to members of the ARM family, but are not happy with the ARM processor’s approach to literal constants. Recall that the instruction has a 12?bit field that specifies a 4?bit scale factor and an 8?bit literal. You have a new idea, the clut or constant lookup table. Your knowledge of computer architecture tells you that the range of literals used by most programs is very small, but you also know that large constants and pointers are needed. The clut is a table with 212 entries that is set to 0 to 4,095 sequentially at startup so that you can specify a literal in the range 0 to 4,095. However, by means of a special clut set instruction cluts the programmer can reload the table with any 32?bit values they wish, up to 4,096 in total.

If you are using less than 4096 literals you can access them with a 12?bit literal field in the instruction which becomes a pointer into the clut table. Is the clut instruction a great idea or is it a bit clumsy?

What will be an ideal response?

This is possibly not a good idea, partially because it is relatively obvious but has not been implemented. First, is
the storage of a table of 4,096 32?bit constants a good use of resources? Second, how much time would be lost
in preloading the table with constants? You would have to save a lot of time avoiding loading literals from
memory to make this a good idea. Third, if you have a multitasking system and switch tasks, the constant look
up table would need flushing, as a new task might need a different set of constants. This would be a real killer
and make the idea unworkable. You could only fully answer this question by running a lot of code with a profiler
and investigating the constant/literal usage by real programs.

Computer Science & Information Technology

You might also like to view...

In Excel, optional arguments in functions are surrounded by ________

A) { } B) | | C) ( ) D) [ ]

Computer Science & Information Technology

Data for a mail merge in Word can come either from a(n) ________ table or query

Fill in the blank(s) with correct word

Computer Science & Information Technology