[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/22773] New: [ARM] Invalid immediate constants produce incorrect
From: |
koops.j at gmail dot com |
Subject: |
[Bug gas/22773] New: [ARM] Invalid immediate constants produce incorrect instructions |
Date: |
Fri, 02 Feb 2018 09:01:29 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22773
Bug ID: 22773
Summary: [ARM] Invalid immediate constants produce incorrect
instructions
Product: binutils
Version: 2.29
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: koops.j at gmail dot com
Target Milestone: ---
I have the following bit of assembly:
.syntax unified
.cpu cortex-m4
.thumb
.section .text
orr r1, #12800
orr r1, #12801
I invoke the GNU assembler as follows:
arm-none-eabi-gcc -g -Wall -c bla.s
The assembler issues no warnings, but the output, when inspected with objdump,
looks as follows:
bla.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <.text>:
0: f441 5148 orr.w r1, r1, #12800 ; 0x3200
4: f243 2101 movw r1, #12801 ; 0x3201
The second orr instruction, which should've produced an error since the
constant #12801 cannot be encoded as an immediate, was silently changed into a
mov instruction instead.
The exact version of the assembler is:
GNU assembler version 2.29.51 (arm-none-eabi) using BFD version (GNU Tools for
Arm Embedded Processors 7-2017-q4-major) 2.29.51.20171128
I'm running OSX:
Darwin trumposaurus.local 15.6.0 Darwin Kernel Version 15.6.0: Sun Jun 4
21:43:07 PDT 2017; root:xnu-3248.70.3~1/RELEASE_X86_64 x86_64
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/22773] New: [ARM] Invalid immediate constants produce incorrect instructions,
koops.j at gmail dot com <=
- [Bug gas/22773] [ARM] Invalid immediate constants produce incorrect instructions, koops.j at gmail dot com, 2018/02/02
- [Bug gas/22773] [ARM] Invalid immediate constants produce incorrect instructions, koops.j at gmail dot com, 2018/02/02
- [Bug gas/22773] [ARM] Invalid immediate constants produce incorrect instructions, cvs-commit at gcc dot gnu.org, 2018/02/13
- [Bug gas/22773] [ARM] Invalid immediate constants produce incorrect instructions, nickc at redhat dot com, 2018/02/13
- [Bug gas/22773] [ARM] Invalid immediate constants produce incorrect instructions, koops.j at gmail dot com, 2018/02/14