This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Fix PR/ 708 ARC backend.
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at codito dot com>
- To: binutils at sources dot redhat dot com
- Cc: Nick Clifton <nickc at redhat dot com>
- Date: Tue, 01 Mar 2005 20:10:52 +0530
- Subject: [PATCH] Fix PR/ 708 ARC backend.
Hi,
This trivial patch fixes PR gas/708. The suffix variable was not
getting initialized right and hence was creating the segfault.
Also adding a testcase for the bug report.
Built and tested with a cross arc-elf32 on i686-linux.
Ok to commit ?
cheers
Ramana
--
Ramana Radhakrishnan
GNU Tools
codito ergo sum (www.codito.com)
Index: gas/config/tc-arc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arc.c,v
retrieving revision 1.31
diff -c -3 -p -r1.31 tc-arc.c
*** gas/config/tc-arc.c 23 Feb 2005 12:28:03 -0000 1.31
--- gas/config/tc-arc.c 1 Mar 2005 14:33:42 -0000
*************** md_assemble (str)
*** 568,574 ****
NULL);
else
insn |= suf->value << operand->shift;
!
str = t;
found = 1;
}
--- 568,574 ----
NULL);
else
insn |= suf->value << operand->shift;
! suffix=suf;
str = t;
found = 1;
}
*** /dev/null 2004-06-30 21:59:41.000000000 +0530
--- gas/testsuite/gas/arc/extensions.s 2005-03-01 19:53:47.000000000 +0530
***************
*** 0 ****
--- 1,4 ----
+ .extCondCode isbusy, 0x12
+ .section .text
+ condcodeTest:
+ add.isbusy r0,r0,r1
*** /dev/null 2004-06-30 21:59:41.000000000 +0530
--- gas/testsuite/gas/arc/extensions.d 2005-03-01 20:02:07.000000000 +0530
***************
*** 0 ****
--- 1,9 ----
+ #as: -EL -marc8
+ #objdump: -dr -EL
+
+ .*: +file format elf32-.*arc
+
+ Disassembly of section .text:
+
+ 00000000 <condcodeTest>:
+ 0: 12 02 00 40 40000212 add.isbusy r0,r0,r1
2005-03-01 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
PR gas/708
* config/tc-arc.c(md_assemble):Initialize suffix for extension
suffixes also.
* testsuite/gas/arc/extensions.s:New file
* testsuite/gas/arc/extensions.d:New file