liberty/support/specpriv-profile/api.cpp
// Load 'size_bytes' bytes from pointer 'ptr' and return
// a zero-extended representation of the result.
Load 'size_bytes' bytes from pointer 'ptr' and return
a zero-extended representation of the result.
Load ' size_bytes ' bytes from pointer ' ptr ' and return a zero - extended representation of the result .
uint64_t __prof_unsafe_load(void *ptr, unsigned size_bytes)
{
  switch( size_bytes )
  {
    case 1:
      return (uint64_t) * (uint8_t*) ptr;
    case 2:
      return (uint64_t) * (uint16_t*) ptr;
    case 4:
      return (uint64_t) * (uint32_t*) ptr;
    case 8:
      return (uint64_t) * (uint64_t*) ptr;
  }
  fprintf(stderr, "Bad size %d\n", size_bytes);
  _exit(1);
}
uint64_t __prof_unsafe_load ( void * ptr , unsigned size_bytes ) { switch ( size_bytes ) { case 1 : return ( uint64_t ) * ( uint8_t * ) ptr ; case 2 : return ( uint64_t ) * ( uint16_t * ) ptr ; case 4 : return ( uint64_t ) * ( uint32_t * ) ptr ; case 8 : return ( uint64_t ) * ( uint64_t * ) ptr ; } fprintf ( stderr , " \n " , size_bytes ) ; _exit ( 1 ) ; }
Load 'size_bytes' bytes from pointer 'ptr' and return
a zero-extended representation of the result.
Load ' size_bytes ' bytes from pointer ' ptr ' and return a zero - extended representation of the result .