/* Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and return the immediate data encoded in the instruction. */
UINT16 ThumbMovtImmediateAddress(IN UINT16 *Instruction)
/* Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and return the immediate data encoded in the instruction. */
UINT16 ThumbMovtImmediateAddress(IN UINT16 *Instruction)
{
  UINT32  Movt;
  UINT16  Address;
  Movt = (*Instruction << 16) | (*(Instruction + 1));
  Address  = (UINT16)(Movt & 0x000000ff);
  Address |= (UINT16)((Movt >> 4) &  0x0000f700);
  Address |= (((Movt & BIT26) != 0) ? BIT11 : 0);
  return Address;
}