[Bug binutils/12844] New: TARGET is undefined in bucomm.c

2011-06-05 Thread hazelnusse at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12844

   Summary: TARGET is undefined in bucomm.c
   Product: binutils
   Version: 2.21
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassig...@sources.redhat.com
ReportedBy: hazelnu...@gmail.com


I'm running Kubuntu 11.04 on x86_64 and have downloaded binutils-2.21 and after
untaring I run:
mkdir build
cd build
../configure
make

and I get this error:

gcc -DHAVE_CONFIG_H -I. -I../../binutils  -I. -I../../binutils -I../bfd
-I../../binutils/../bfd -I../../binutils/../include
-DLOCALEDIR="\"/usr/local/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation  -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bucomm.o -MD -MP -MF
.deps/bucomm.Tpo -c -o bucomm.o ../../binutils/bucomm.c
../../binutils/bucomm.c: In function ‘set_default_bfd_target’:
../../binutils/bucomm.c:160:24: error: ‘TARGET’ undeclared (first use in this
function)
../../binutils/bucomm.c:160:24: note: each undeclared identifier is reported
only once for each function it appears in
make[4]: *** [bucomm.o] Error 1

The same thing happens in the daily snapshot of binutils.  I have not found
this error anywhere via Google, and the source simply says:

/* The macro TARGET is defined by Makefile.  */
  const char *target = TARGET;

Obviously, TARGET is not getting defined, but I don't know why.  I have tried
setting the --target configure option (--target=arm-eabi, in my particular
case), but this does not fix it.

It would be great to know what I'm doing wrong or if this is a bug.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/13215] New: ARM Cortex M3 strexh strexb instructions with same registers generates error

2011-09-22 Thread hazelnusse at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13215

 Bug #: 13215
   Summary: ARM Cortex M3 strexh strexb instructions with same
registers generates error
   Product: binutils
   Version: 2.21
Status: NEW
  Severity: critical
  Priority: P2
 Component: gas
AssignedTo: unassig...@sources.redhat.com
ReportedBy: hazelnu...@gmail.com
Classification: Unclassified


Created attachment 5939
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5939
example of ARM provided code that makes use of strexh strexb with same
registers

In gas version 2.21.53, when compiling for the Cortex-M3 with -mcpu=cortex-m3
-march=armv7-m, the following instructions generate assembler errors:

strexh r0, r0, [r1]
strexb r0, r0, [r1]

The error messages are:
Error: registers may not be the same -- `strexh r0,r0,[r1]'
Error: registers may not be the same -- `strexb r0,r0,[r1]'

However, according to the ARM documentation of STREX for the Cortex M3 [0],
only the word sized (32-bit) version of the instruction strex has the
restriction that the three registers be unique:

for STREX, Rd must be different from both Rt and Rn

This problem shows up, for example, when trying to compile vendor provided
peripheral libraries that make use of CMSIS.  In particular, the core_cm3.[ch]
of CMSIS v1.3, and core_cmInstr.h of CMSIS v2.0 have all of these instructions.
 Curiously, even strex r0, r0, [r1] shows up in CMSIS, even though this is
explicitly restricted in [0].  So perhaps even some of the CMSIS code is
breaking the specification of the ARM documentation, not sure.

[0] --
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABFFBJB.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/13215] ARM Cortex M3 strexh strexb instructions with same registers generates error

2011-09-22 Thread hazelnusse at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13215

Luke Peterson  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #1 from Luke Peterson  2011-09-22 
16:22:03 UTC ---
A closer read of the ARMv7m reference manual confirms that for any of the strex
instructions (word, half word, byte), if the register are the same, the result
is undefined.  So James Greenhalgh's patch is correct, and this bug is invalid.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils