This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

patch for fixing illegal instruction (wldrb, wldrh, wstrb, wstrh)


Current binutils (snapshot 20060920) has an error when assembling
wldrb/wldrh/wstrb/wstrh instructions with immediate number #0. Here is
the patch based on binutils snapshot 20060920, with testcase and
ChangeLog entries. Tested iwmmxt.s with arm-iwmmxt-linux-gnueabi. Is
this fine?

gas/
2006-09-21 Bridge Wu <mingqiao.wu@gmail.com>
	* config/tc-arm.c
	(md_apply_fix): not clear write_back bit

gas/testsuite/
2006-09-21 Bridge Wu <mingqiao.wu@gmail.com>
	* gas/arm/iwmmxt-wldstbh.s: New file.


diff -Nurp binutils-060920.old/gas/config/tc-arm.c binutils-060920/gas/config/tc-arm.c --- binutils-060920.old/gas/config/tc-arm.c 2006-09-17 00:24:28.000000000 +0800 +++ binutils-060920/gas/config/tc-arm.c 2006-09-21 12:38:15.000000000 +0800 @@ -18021,8 +18021,6 @@ md_apply_fix (fixS * fixP, newval = get_thumb32_insn (buf); newval &= 0xff7fff00; newval |= (value >> 2) | (sign ? INDEX_UP : 0); - if (value == 0) - newval &= ~WRITE_BACK; if (fixP->fx_r_type == BFD_RELOC_ARM_CP_OFF_IMM || fixP->fx_r_type == BFD_RELOC_ARM_CP_OFF_IMM_S2) md_number_to_chars (buf, newval, INSN_SIZE); diff -Nurp binutils-060920.old/gas/testsuite/gas/arm/iwmmxt-wldstbh.s binutils-060920/gas/testsuite/gas/arm/iwmmxt-wldstbh.s --- binutils-060920.old/gas/testsuite/gas/arm/iwmmxt-wldstbh.s 1970-01-01 08:00:00.000000000 +0800 +++ binutils-060920/gas/testsuite/gas/arm/iwmmxt-wldstbh.s 2006-09-21 12:42:35.000000000 +0800 @@ -0,0 +1,4 @@ + wldrb wr1, [r1], #0 + wldrh wr1, [r1], #0 + wstrb wr1, [r1], #0 + wstrh wr1, [r1], #0

--
best regards,
-Bridge


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]