Launchpad has imported 5 comments from the remote bug at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46788.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2010-12-03T15:38:21+00:00 Tinokrauss wrote:

Created attachment 22618
a module

When compiling the attached file the compiler does not warn, but the assambler 
gives the following error:
C:\DOKUME~1\tkr\LOKALE~1\Temp\ccqr1SmQ.s: Assembler messages:
C:\DOKUME~1\tkr\LOKALE~1\Temp\ccqr1SmQ.s:522: Error: immediate value out of 
range -- `movt r3,-32768'
The line "dwCalcVal.u_16_values.u_16_value_1=0x8000u;" causes the error.
It looks to me like a singned-unsigned fault and in fact it is so. reducing the 
constant to a value 0x0000 till 0x7FFF will compile without error.
The problem appears also only when:
- the value is at the stack (local)
- the second value in struct is used (u_16_value_0 works fine).
GCC v 4.3.3 also works fine on the same code.

Configuarion:
-------------
PC Windows XP with Codesourcery, Target STM32F103 ARM-Controller
>arm-none-eabi-gcc.exe -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc.exe
COLLECT_LTO_WRAPPER=c:/temp/codesourcery/bin/../libexec/gcc/arm-none-eabi/4.5.1/lto-wrapper.exe
Target: arm-none-eabi
Configured with: 
/scratch/julian/2010q3-release-eabi-lite/src/gcc-4.5-2010.09/configure 
--build=i686-pc-linux-gnu --host=i686-mingw32 --target=arm-none-eabi 
--enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch 
--enable-extra-sgxxlite-multilibs --with-gnu-as --with-gnu-ld 
--with-specs='%{save-temps: -fverbose-asm} -D__CS_SOURCERYGXX_MAJ__=2010 
-D__CS_SOURCERYGXX_MIN__=9 -D__CS_SOURCERYGXX_REV__=51 
%{O2:%{!fno-remove-local-statics: -fremove-local-statics}} 
%{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' 
--enable-languages=c,c++ --disable-s
hared --enable-lto --with-newlib --with-pkgversion='Sourcery G++ Lite 
2010.09-51' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ 
--disable-nls --prefix=/opt/codesourcery --with-headers=yes 
--with-sysroot=/opt/codesourcery/arm-none-eabi 
--with-build-sysroot=/scratch/julian/2010q3-release-eabi-lite/install/host-i686-mingw32/arm-none-eabi
 
--with-libiconv-prefix=/scratch/julian/2010q3-release-eabi-lite/obj/host-libs-2010.09-51-arm-none-eabi-i686-mingw32/usr
 
--with-gmp=/scratch/julian/2010q3-release-eabi-lite/obj/host-libs-2010.09-51-arm-none-eabi-i686-mingw32/usr
 
--with-mpfr=/scratch/julian/2010q3-release-eabi-lite/obj/host-libs-2010.09-51-arm-none-eabi-i686-mingw32/usr
 
--with-mpc=/scratch/julian/2010q3-release-eabi-lite/obj/host-libs-2010.09-51-arm-none-eabi-i686-mingw32/usr
 
--with-ppl=/scratch/julian/2010q3-release-eabi-lite/obj/host-libs-2010.09-51-arm-none-eabi-i686-mingw32/usr
 --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lst dc++,-Bdynamic -lm' 
--with-cloog=/scratch/julian/2010q3-release-eabi-lite/obj/host-libs-2010.09-51-arm-none-eabi-i686-mingw32/usr
 
--with-libelf=/scratch/julian/2010q3-release-eabi-lite/obj/host-libs-2010.09-51-arm-none-eabi-i686-mingw32/usr
 --disable-libgomp --enable-poison-system-directories 
--with-build-time-tools=/scratch/julian/2010q3-release-eabi-lite/obj/tools-i686-pc-linux-gnu-2010.09-51-arm-none-eabi-i686-mingw32/arm-none-eabi/bin
 
--with-build-time-tools=/scratch/julian/2010q3-release-eabi-lite/obj/tools-i686-pc-linux-gnu-2010.09-51-arm-none-eabi-i686-mingw32/arm-none-eabi/bin
Thread model: single
gcc version 4.5.1 (Sourcery G++ Lite 2010.09-51)


Call-Parameters:
----------------
COLLECT_GCC_OPTIONS='-c' '-mcpu=cortex-m3' '-mthumb' '-mtune=cortex-m3' 
'-mfix-cortex-m3-ldrd' '-mlong-calls' '-pedantic' '-mfpu=vfp' 
'-mfloat-abi=soft' '-nostdinc' '-Os' '-DLITTLE_ENDIAN' '-v' '-gdwarf-2' 
'-fmessage-length=0' '-mlittle-endian' '-fshort-enums' '-mno-thumb-interwork' 
'-mstructure-size-boundary=8' '-fno-builtin' '-funsigned-bitfields' 
'-Wcast-align' '-Wreturn-type' '-Wimplicit' '-Wunused' '-Wswitch' 
'-Wuninitialized' '-o' 'E:\workspace_tkr\FSD-ELMA\trunk\out/SA1/ALGAac1.o' 
'-D__CS_SOURCERYGXX_MAJ__=2010' '-D__CS_SOURCERYGXX_MIN__=9' 
'-D__CS_SOURCERYGXX_REV__=51' 
e:/toolhome/arm/codesourcery/v_4_5_1/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/bin/as.exe
 -v -EL -mcpu=cortex-m3 -mfloat-abi=soft -mfpu=vfp -meabi=5 -alhcdn -o 
E:\workspace_tkr\FSD-ELMA\trunk\out/SA1/ALGAac1.o 
C:\DOKUME~1\tkr\LOKALE~1\Temp\ccqr1SmQ.s
GNU assembler version 2.20.51 (arm-none-eabi) using BFD version (Sourcery G++ 
Lite 2010.09-51) 2.20.51.20100809

Reply at: https://bugs.launchpad.net/gcc/+bug/730440/comments/0

------------------------------------------------------------------------
On 2010-12-03T16:25:40+00:00 Rguenth wrote:

Please report to CodeSourcery or use a FSF version.

Reply at: https://bugs.launchpad.net/gcc/+bug/730440/comments/1

------------------------------------------------------------------------
On 2010-12-04T17:31:11+00:00 Mikpe wrote:

I can reproduce this with FSF gcc-4.5/4.6 and binutils-2.20.1 on
armv5tel-linux-gnueabi:

> gcc/xgcc -Bgcc -mcpu=cortex-m3 -mthumb -O2 -c MyFile.c
/tmp/ccCisNkW.s: Assembler messages:
/tmp/ccCisNkW.s:27: Error: immediate value out of range -- `movt r3,-32768'

With gcc-4.4 the error does not occur.

Reply at: https://bugs.launchpad.net/gcc/+bug/730440/comments/2

------------------------------------------------------------------------
On 2011-02-04T10:35:43+00:00 Mikpe wrote:

It's caused by 150953:

Author: ramana
Date: Thu Aug 20 08:09:29 2009
New Revision: 150953

URL: http://gcc.gnu.org/viewcvs?root=3Dgcc&view=3Drev&rev=3D150953
Log:
Fix twolf ICE for ARM

2009-08-19  Ramana Radhakrishnan  <ramana.radhakrish...@arm.com>
            Richard Earnshaw  <richard.earns...@arm.com>

        * config/arm/arm.c (arm_emit_movpair): Handle CONST_INT.
        * config/arm/arm.md (*arm_movtas_ze): New pattern for
        movt.

You're missing an "#:upper16:" annotation in the *arm_movtas_ze pattern,
c.f. the *arm_movt pattern.

(Not posting a patch since my renewed attempt to get a copyright
assignment seems to have ended up in /dev/null over at the FSF.)

Reply at: https://bugs.launchpad.net/gcc/+bug/730440/comments/3

------------------------------------------------------------------------
On 2011-03-10T11:59:32+00:00 Ramana-gcc wrote:

Confirmed

Reply at: https://bugs.launchpad.net/gcc/+bug/730440/comments/11


** Changed in: gcc
       Status: Unknown => In Progress

** Changed in: gcc
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/730440

Title:
  armel: incorrect immediate for movt

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to