[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/23335] New: MSP430 gas mishandle symbols starting with a regist
From: |
suckfish at ihug dot co.nz |
Subject: |
[Bug gas/23335] New: MSP430 gas mishandle symbols starting with a register name. |
Date: |
Sat, 23 Jun 2018 21:26:43 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=23335
Bug ID: 23335
Summary: MSP430 gas mishandle symbols starting with a register
name.
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: suckfish at ihug dot co.nz
Target Milestone: ---
Target: msp430
Created attachment 11097
--> https://sourceware.org/bugzilla/attachment.cgi?id=11097&action=edit
Source assembly.
See attached code. gas treats the symbols 'r5XXXX', 'srXXXX' etc. as registers
(r5, sr etc.)
This happens for PC-relative address mode but not absolute.
Noticed on Fedora28 msp430-elf-binutils-5.1.0.0-1.x86_64, also on latest git.
Compiling the attached code with msp430-elf-as regs.s -o regs.o, the
disassembly is (the first half is bogus, the second half is correct):
<pre>
regs.o: file format elf32-msp430
Disassembly of section .text:
00000000 <.text>:
0: 05 40 mov r0, r5 ;
2: 04 45 mov r5, r4 ;
4: 01 40 mov r0, r1 ;
6: 04 41 mov r1, r4 ;
8: 02 40 mov r0, r2 ;
a: 04 42 mov r2, r4 ;
c: 00 40 br r0 ;
e: 04 40 mov r0, r4 ;
10: 80 40 00 00 mov r0, 0x0000 ; PC rel. 0x0012
14: 14 40 00 00 mov 0x0000, r4 ;PC rel. 0x0016
18: 82 40 00 00 mov r0, &0x0000 ;
1c: 14 42 00 00 mov &0x0000,r4 ;0x0000
20: 82 40 00 00 mov r0, &0x0000 ;
24: 14 42 00 00 mov &0x0000,r4 ;0x0000
28: 82 40 00 00 mov r0, &0x0000 ;
2c: 14 42 00 00 mov &0x0000,r4 ;0x0000
30: 82 40 00 00 mov r0, &0x0000 ;
34: 14 42 00 00 mov &0x0000,r4 ;0x0000
</pre>
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/23335] New: MSP430 gas mishandle symbols starting with a register name.,
suckfish at ihug dot co.nz <=