+2010-09-27 Tejas Belagod <tejas.belagod@arm.com>
+
+ * config/tc-arm.c (do_neon_ldr_str): Deprecate ARM-mode PC-relative
+ VSTR, issue an error in THUMB mode.
+
2010-09-23 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* config/tc-arm.c (arm_ext_virt): New variable.
{
int is_ldr = (inst.instruction & (1 << 20)) != 0;
+ /* Use of PC in vstr in ARM mode is deprecated in ARMv7.
+ And is UNPREDICTABLE in thumb mode. */
+ if (!is_ldr
+ && inst.operands[1].reg == REG_PC
+ && ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v7))
+ {
+ if (!thumb_mode && warn_on_deprecated)
+ as_warn (_("Use of PC here is deprecated"));
+ else
+ inst.error = _("Use of PC here is UNPREDICTABLE");
+ }
+
if (inst.operands[0].issingle)
{
if (is_ldr)
+2010-09-27 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gas/arm/vldr.s: New test for pc-relative VLDR disassembly comment.
+ * gas/arm/vldr.d: Likewise.
+ * gas/arm/vstr-bad.s: New test for PC-relative VSTR.
+ * gas/arm/vstr-thumb-bad.l: Likewise.
+ * gas/arm/vstr-thumb-bad.d: Likewise.
+ * gas/arm/vstr-arm-bad.l: Likewise.
+ * gas/arm/vstr-arm-bad.d: Likewise.
+
2010-09-23 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* gas/arm/armv7-a+virt.d: New test.
--- /dev/null
+# name: VFP VLDR
+# as: -mfpu=vfp3 -mcpu=cortex-a8 -mthumb
+# source: vldr.s
+# objdump: -dr --prefix-addresses --show-raw-insn
+
+.*: +file format .*arm.*
+
+Disassembly of section .text:
+0[0-9a-f]+ <[^>]+> bf00 nop
+0[0-9a-f]+ <[^>]+> ed9f 0b03 vldr d0, \[pc, #12\] ; 00000010 <float>
+0[0-9a-f]+ <[^>]+> ed9f 0b02 vldr d0, \[pc, #8\] ; 00000010 <float>
+0[0-9a-f]+ <[^>]+> bf00 nop
+0[0-9a-f]+ <[^>]+> bf00 nop
+0[0-9a-f]+ <[^>]+> bf00 nop
+ ...
--- /dev/null
+.syntax unified
+.text
+ nop
+ vldr d0, float
+ vldr d0, float
+ nop
+ nop
+
+.align
+float: .double 0.0
--- /dev/null
+# name: VFP PC-relative VSTR arm mode
+# as: -mfpu=vfp3 -mcpu=cortex-a8
+# source: vstr-bad.s
+# error-output: vstr-arm-bad.l
--- /dev/null
+[^:]*: Assembler messages:
+[^:]*:6: Warning: Use of PC here is deprecated
+[^:]*:7: Warning: Use of PC here is deprecated
--- /dev/null
+
+.syntax unified
+.text
+
+ nop
+ vstr d0, float
+ vstr d0, [pc, #4]
+ nop
+ nop
+
+.align
+float: .double 0.0
--- /dev/null
+# name: VFP PC-relative VSTR thumb mode
+# as: -mfpu=vfp3 -mthumb -mcpu=cortex-a8
+# source: vstr-bad.s
+# error-output: vstr-thumb-bad.l
--- /dev/null
+[^:]*: Assembler messages:
+[^:]*:6: Error: Use of PC here is UNPREDICTABLE -- `vstr d0,float'
+[^:]*:7: Error: Use of PC here is UNPREDICTABLE -- `vstr d0,\[pc,#4\]'
+2010-09-27 Tejas Belagod <tejas.belagod@arm.com>
+
+ * arm_dis.c (print_insn_coprocessor): Apply off-by-alignment
+ correction to unaligned PCs while printing comment.
+
2010-09-23 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* arm-dis.c (arm_opcodes): Add Virtualiztion Extensions support.
if (rn == 15 && (PRE_BIT_SET || WRITEBACK_BIT_SET))
{
func (stream, "\t; ");
- info->print_address_func (offset + pc
- + info->bytes_per_chunk * 2, info);
+ /* For unaligned PCs, apply off-by-alignment
+ correction. */
+ info->print_address_func (offset + pc
+ + info->bytes_per_chunk * 2
+ - (pc & 3),
+ info);
}
}
break;