From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joern Rennecke To: aoliva@redhat.com (Alexandre Oliva) Cc: wilson@cygnus.com (Jim Wilson), gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org, gdb@sources.redhat.com Subject: Re: C++ ptrmemfun break if FUNCTION_BOUNDARY < 2 * BITS_PER_UNIT Date: Mon, 09 Apr 2001 12:29:00 -0000 Message-id: <200104091927.f39JRtw00873@phal.cambridge.redhat.com> References: X-SW-Source: 2001-04/msg00074.html Is it safe to use arithmetic SHIFTs instead of letting the compiler > choose them instead of DIVs and MULTs? For some reason, on > mn10300-elf, the div makes it to the generated code, which we > certainly don't want. A signed division is not a portable way to extract a bit. And for negative values, it just doesn't work. Why don't you use an unsigned division or a logical shift?