Saturday, July 31, 2010

Data Alignment Question Interview - PowerPC

What happens when you try to read an integer value from memory address 0x000003?
 assume: ANSI C standards
Things to look for:
Does the candidate know
  1.  what is the size of integer in PowerPC EABI  ANSI C
         4 bytes
  2.  what happens when a read from a non aligned address and how to handle it
         causes an exception / using exception handler / software intervention to add multiple cycles
If the candidate has answered these questions then I will be impressed.

I may further ask why and how can we cover rule alignment options in the compiler?
use pack option --specific to compiler --/to save memory

ref: http://www.google.co.in/url?sa=t&source=web&cd=1&ved=0CBUQFjAA&url=http%3A%2F%2Fwww.ibm.com%2Fchips%2Ftechlib%2Ftechlib.nsf%2Ftechdocs%2F852569B20050FF77852569970071B0D6%2F%24file%2Feabi_app.pdf&ei=f5dUTI41grusB7XChfMD&usg=AFQjCNEfjWbv3uP5lPSRnMmlgzskYfybVw&sig2=k4jTL8K_Ko_iezyRkMVCyA

No comments: