Bug 12715 - Large immediate for neon vmov assembled incorrectly with as built with --enable-targets=x86_64-linux-gnu
Summary: Large immediate for neon vmov assembled incorrectly with as built with --enab...
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: ---
Assignee: Matthew Gretton-Dann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-29 06:50 UTC by Luke Kim
Modified: 2011-05-13 14:22 UTC (History)
1 user (show)

See Also:
Host: i486-linux-gnu
Target: arm-linux-gnueabi
Build: i486-linux-gnu
Last reconfirmed:


Attachments
assembly source code (56 bytes, application/octet-stream)
2011-04-29 07:02 UTC, Luke Kim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kim 2011-04-29 06:50:15 UTC
ujkim@DO-ujkim04:~/work/toolchain-bug/as-2.21/neon-immediate-moves$ cat neon-large-immediate-moves.s
.cpu cortex-a9
.fpu neon
.text

vmov.i64 d9,#0xffffffffffffffff

ujkim@DO-ujkim04:~/work/toolchain-bug/as-2.21/neon-immediate-moves$ arm-linux-gnueabi-as neon-large-immediate-moves.s

ujkim@DO-ujkim04:~/work/toolchain-bug/as-2.21/neon-immediate-moves$ arm-linux-gnueabi-objdump -d a.out

a.out: file format elf32-littlearm

Disassembly of section .text:

00000000 <.text>:
   0:	f2809e3f vmov.i64	d9, #0x00000000ffffffff

The immediate value should be 0xffffffffffffffff but the assembled result are ox00000000ffffffff

The toolchain is configured with following option.
../configure --host=i486-linux-gnu         --build=i486-linux-gnu --target=arm-linux-gnueabi --prefix=/tmp/cross/usr  --enable-shared --enable-plugins --enable-targets=x86_64-linux-gnu --disable-werror  --enable-ld=default --enable-gold

If I remove '--enable-targets=x86_64-linux-gnu' from the configure args, it seems no problem.
Comment 1 Luke Kim 2011-04-29 07:02:58 UTC
Created attachment 5697 [details]
assembly source code
Comment 2 Sourceware Commits 2011-05-12 12:41:48 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	mgretton@sourceware.org	2011-05-12 12:41:45

Modified files:
	gas            : ChangeLog 
	gas/config     : tc-arm.c 
	gas/testsuite  : ChangeLog 
	gas/testsuite/gas/arm: neon-const.d neon-const.s 

Log message:
	PR gas/12715
	* gas/config/tc-arm.c (parse_big_immediate):  Fix parsing of 64-bit
	immediates on 32-bit hosts.
	* gas/testsuite/gas/arm/neon-const.s: Add testcase for 64-bit Neon constants.
	* gas/testsuite/gas/arm/neon-const.d: Likewise.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/ChangeLog.diff?cvsroot=src&r1=1.4479&r2=1.4480
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?cvsroot=src&r1=1.483&r2=1.484
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/ChangeLog.diff?cvsroot=src&r1=1.1897&r2=1.1898
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/arm/neon-const.d.diff?cvsroot=src&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/arm/neon-const.s.diff?cvsroot=src&r1=1.2&r2=1.3
Comment 3 Sourceware Commits 2011-05-13 14:19:06 UTC
CVSROOT:	/cvs/src
Module name:	src
Branch: 	binutils-2_21-branch
Changes by:	mgretton@sourceware.org	2011-05-13 14:19:04

Modified files:
	gas            : ChangeLog 
	gas/config     : tc-arm.c 
	gas/testsuite  : ChangeLog 
	gas/testsuite/gas/arm: neon-const.d neon-const.s 

Log message:
	Apply from mainline.
	2011-05-12  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
	PR gas/12715
	* gas/config/tc-arm.c (parse_big_immediate):  Fix parsing of 64-bit
	immediates on 32-bit hosts.
	* gas/testsuite/gas/arm/neon-const.s: Add testcase for 64-bit Neon constants.
	* gas/testsuite/gas/arm/neon-const.d: Likewise.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/ChangeLog.diff?cvsroot=src&only_with_tag=binutils-2_21-branch&r1=1.4320.2.27&r2=1.4320.2.28
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?cvsroot=src&only_with_tag=binutils-2_21-branch&r1=1.471.2.2&r2=1.471.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/ChangeLog.diff?cvsroot=src&only_with_tag=binutils-2_21-branch&r1=1.1802.2.9&r2=1.1802.2.10
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/arm/neon-const.d.diff?cvsroot=src&only_with_tag=binutils-2_21-branch&r1=1.1&r2=1.1.16.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/arm/neon-const.s.diff?cvsroot=src&only_with_tag=binutils-2_21-branch&r1=1.2&r2=1.2.14.1
Comment 4 Matthew Gretton-Dann 2011-05-13 14:22:11 UTC
Fixes committed to both trunk and 2.21 branches.