ECEN 350 SPRING24- QUIZ 6 QUESTIONS
A ___________ is a sequence of instructions that starts with a branch target and ends
with a branch. - Answer -Basic Block
B-TypeConditional branches in ARMv8 are limited in the maximum distance the branch
destination can be from the current PC. If a (somewhat) larger range is needed the
_______ instruction can be used in combination with a conditional branch to get a
greater range. - Answer -
Given the following address and instruction stored at that address for a B instruction,
what is the jump target address (in hex)?
Address Value
0x10000000 0x1400AF15
Write your answer in hex with a leading 0x and all leading 0's removed. - Answer -
0x1002BC54
Given the following machine code instruction for a CBZ:
0xB4FFFF44
How much is added to the PC of the branch to form the branch target?
Give your answer in bytes as a hex value with a leading 0x, use a leading "-" if negative.
(ie. -0x2 for a negative 2). - Answer --0x18
In general, control flow instructions do no work, i.e. they manipulate no data. - Answer -
True - Control flow instructions choose which instruction will be exectued next but they
do not change the state of the processor otherwise.
The S appended to arithmetic operations is only needed to set the condition codes for
CBZ and CBNZ. - Answer -False - SUBS and etc. are used to set condition codes for
use in B.XX branches.
When constructing the destination of an unconditional branch from the machine code of
a B instruction, the top four bits of the destination address should be set to 0x0. -
Answer -False - The offset encoded in the instruction is left shifted by two and added to
the PC of the branch.
Another name for the "Heap" is the _________ data region of the memory map. -
Answer -dynamic
Assuming a simple subroutine that does not call any further subroutines itself, must use
four of the saved registers, how many bytes are pushed on the stack when the function
is entered? - Answer -32
A ___________ is a sequence of instructions that starts with a branch target and ends
with a branch. - Answer -Basic Block
B-TypeConditional branches in ARMv8 are limited in the maximum distance the branch
destination can be from the current PC. If a (somewhat) larger range is needed the
_______ instruction can be used in combination with a conditional branch to get a
greater range. - Answer -
Given the following address and instruction stored at that address for a B instruction,
what is the jump target address (in hex)?
Address Value
0x10000000 0x1400AF15
Write your answer in hex with a leading 0x and all leading 0's removed. - Answer -
0x1002BC54
Given the following machine code instruction for a CBZ:
0xB4FFFF44
How much is added to the PC of the branch to form the branch target?
Give your answer in bytes as a hex value with a leading 0x, use a leading "-" if negative.
(ie. -0x2 for a negative 2). - Answer --0x18
In general, control flow instructions do no work, i.e. they manipulate no data. - Answer -
True - Control flow instructions choose which instruction will be exectued next but they
do not change the state of the processor otherwise.
The S appended to arithmetic operations is only needed to set the condition codes for
CBZ and CBNZ. - Answer -False - SUBS and etc. are used to set condition codes for
use in B.XX branches.
When constructing the destination of an unconditional branch from the machine code of
a B instruction, the top four bits of the destination address should be set to 0x0. -
Answer -False - The offset encoded in the instruction is left shifted by two and added to
the PC of the branch.
Another name for the "Heap" is the _________ data region of the memory map. -
Answer -dynamic
Assuming a simple subroutine that does not call any further subroutines itself, must use
four of the saved registers, how many bytes are pushed on the stack when the function
is entered? - Answer -32