pangyuteng / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

replace x86/gcc-specific code in symbolize_unittest with gcc-specific code #130

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
the current symbolize_unittest.cc code does:
 #ifdef TEST_X86_32_AND_64
   __asm__ __volatile__("call 1f; 1: pop %0" : "=r"(pc));
 #endif

you could write this instead as:
  void *pc;
  pc = &&curr_pc;
  curr_pc:
  return pc;

gcc has supported this since 3.0.x, so you shouldn't need to check versions here

Original issue reported on code.google.com by vapier@gmail.com on 10 Sep 2012 at 9:53