https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65804

            Bug ID: 65804
           Summary: blackfin: Not support global frame pointer with
                    -fno-omit-frame-pointer
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gang.chen.5i5j at gmail dot com

The code:

  [root@localhost gcc]# cat stacktrace.i
  register unsigned long current_frame_pointer asm("FP");

  void save_stack_trace(void)
  {
   unsigned long fp;
   fp = current_frame_pointer;
  }


For gcc5 from upstream (cause issue):

  [root@localhost gcc]# /upstream/release-blackfin/bin/bfin-gchen-elf-gcc
-mcpu=bf533-0.3 -fno-omit-frame-pointer -pg -c stacktrace.i
  stacktrace.i: In function 'save_stack_trace':
  stacktrace.i:3:6: error: frame pointer required, but reserved
   void save_stack_trace(void)
        ^
  stacktrace.i:1:24: note: for 'current_frame_pointer'
   register unsigned long current_frame_pointer asm("FP");
                          ^

  [root@localhost linux-next]#
/upstream/release-blackfin/bin/bfin-gchen-elf-gcc -v
  Using built-in specs.
  COLLECT_GCC=/upstream/release-blackfin/bin/bfin-gchen-elf-gcc
 
COLLECT_LTO_WRAPPER=/upstream/release-blackfin/libexec/gcc/bfin-gchen-elf/5.0.0/lto-wrapper
  Target: bfin-gchen-elf
  Configured with: ../gcc-blackfin/configure --target=bfin-gchen-elf
--disable-nls --disable-threads --disable-shared --disable-libquadmath
--disable-libgomp --disable-libatomic --prefix=/upstream/release-blackfin
--without-headers target_alias=bfin-gchen-elf --enable-languages=c
  Thread model: single
  gcc version 5.0.0 20150401 (experimental) (GCC)


For blackfin gcc4.5.4 from soureforge (no issue):

  root@gchen:/upstream/linux-next# /3p/release-blackfin/bin/bfin-gchen-elf-gcc
-mcpu=bf533-0.3 -fno-omit-frame-pointer -pg -c stacktrace.i

  root@gchen:/upstream/linux-next# /3p/release-blackfin/bin/bfin-gchen-elf-gcc
-v
  Using built-in specs.
  COLLECT_GCC=/3p/release-blackfin/bin/bfin-gchen-elf-gcc
 
COLLECT_LTO_WRAPPER=/3p/release-blackfin/libexec/gcc/bfin-gchen-elf/4.5.4/lto-wrapper
  Target: bfin-gchen-elf
  Configured with: ../gcc/configure --target=bfin-gchen-elf --disable-nls
--disable-threads --disable-shared --disable-libssp --disable-libquadmath
--disable-libgomp --disable-libatomic --prefix=/upstream/release-blackfin
--without-headers --enable-languages=c : (reconfigured) ../gcc/configure
--target=bfin-gchen-elf --disable-nls --disable-threads --disable-shared
--disable-libssp --disable-libquadmath --disable-libgomp --disable-libatomic
--prefix=/3p/release-blackfin --without-headers --enable-languages=c
  Thread model: single
  gcc version 4.5.4 (GCC)

Reply via email to