linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* warning: objtool: fn1 uses BP as a scratch register
@ 2019-07-19 18:09 Arnd Bergmann
  2019-07-19 18:23 ` Nick Desaulniers
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2019-07-19 18:09 UTC (permalink / raw)
  To: clang-built-linux, Linux Kernel Mailing List, Josh Poimboeuf,
	Peter Zijlstra

A lot of objtool fixes showed up in linux-next, so I looked at some
remaining ones.
This one comes a lot up in some configurations

https://godbolt.org/z/ZZLVD-

struct ov7670_win_size {
  int width;
  int height;
};
struct ov7670_devtype {
  struct ov7670_win_size *win_sizes;
  unsigned n_win_sizes;
};
struct ov7670_info {
  int min_width;
  int min_height;
  struct ov7670_devtype devtype;
} a;
int b;
int fn1() {
  struct ov7670_info c = a;
  int i = 0;
  for (; i < c.devtype.n_win_sizes; i++) {
    struct ov7670_win_size d = c.devtype.win_sizes[i];
    if (c.min_width && d.width < d.height < c.min_height)
      if (b)
        return 0;
  }
  return 2;
}

$ clang-8 -O2 -fno-omit-frame-pointer -fno-strict-overflow -c ov7670.i
$ objtool check  --no-unreachable --uaccess ov7670.o
ov7670.o: warning: objtool: fn1 uses BP as a scratch register

     Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-22 19:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 18:09 warning: objtool: fn1 uses BP as a scratch register Arnd Bergmann
2019-07-19 18:23 ` Nick Desaulniers
2019-07-19 18:31   ` Josh Poimboeuf
2019-07-19 18:44     ` Arnd Bergmann
2019-07-19 18:48       ` Nick Desaulniers
2019-07-19 18:50       ` Nick Desaulniers
2019-07-19 19:43         ` Arnd Bergmann
2019-07-22 19:46           ` Topper, Craig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).