Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Winston Edmond
Sat, 08 Aug 1992 06:30
Bug in GAS v1.37 found
Author: Winston Edmond
Date: Sat, 08 Aug 1992 06:30
Date: Sat, 08 Aug 1992 06:30
44 lines
1952 bytes
1952 bytes
To all 68020 developers using the GNU assembler (GAS): ** There is a bug in GAS version 1.37 that causes it to incorrectly ** assemble the MOVEM instruction in some cases. The bug occurs when: (1) the instruction is being assembled in the TEXT segment; (2) the transfer is memory --> register(s) (memory is the data source); (3) the Effective Address (EA) is known (not an external reference); (4) the EA is in the TEXT segment; and (5) the EA is absolute (no indirection or indexing). Why it breaks: GAS has a special test for absolute address references to text segment locations, and it converts them into PC-relative addresses. Although the GAS code in m68k.c and m68k-opcodes.h looks like it ought to work, it clearly doesn't. What you get: GAS produces <instruction> <offset> <reglist> instead of <instruction> <reglist> <offset> as it ought to. Work-around: Use data segment memory. It's a bit odd to be using text segment locations to save register values anyway. Comparison of v1.37 and v1.38 GAS source code files indicates that v1.38 has the bug, too. -WBE Other notes for bug-gnu: * running on SunOS 4.1, cross assembling for Sun3 * assemble the following with "gas -mc68020 -o bug bug.s" --------------------------------------------------------------------------- .text foo: .skip 0x50 moveml foo,d0-d7/a0-a7 --------------------------------------------------------------------------- * assembles: 0x50/ 4cfa ffae ffff, but should have ffff as second word, not third. -WBE
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads