+2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ PR 24559
+ * config/tc-arm.c (move_or_literal_pool): Set size_req to 0 for MOVW
+ replacement.
+ * testsuite/gas/arm/load-pseudo.s: New test input.
+ * testsuite/gas/arm/m0-load-pseudo.d: New test.
+ * testsuite/gas/arm/m23-load-pseudo.d: New test.
+ * testsuite/gas/arm/m33-load-pseudo.d: New test.
+
2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
* testsuite/gas/arm/armv8_1-m-bf.d: Allow different branch target naming
inst.instruction |= (imm & 0x0800) << 15;
inst.instruction |= (imm & 0x0700) << 4;
inst.instruction |= (imm & 0x00ff);
+ /* In case this replacement is being done on Armv8-M
+ Baseline we need to make sure to disable the
+ instruction size check, as otherwise GAS will reject
+ the use of this T32 instruction. */
+ inst.size_req = 0;
return TRUE;
}
}
--- /dev/null
+.syntax unified
+ldr r0, =(0x30)
+ldr r0, =(0x70000000)
--- /dev/null
+# name: Load pseudo-operation for Cortex-M0
+# as: -mcpu=cortex-m0
+# objdump: -dr --prefix-addresses --show-raw-insn -M force-thumb
+# source: load-pseudo.s
+
+.*: +file format .*arm.*
+
+
+Disassembly of section .text:
+[^>]*> 4800 ldr r0, \[pc, #0\] ; \(00000004 [^>]*>\)
+[^>]*> 4801 ldr r0, \[pc, #4\] ; \(00000008 [^>]*>\)
+#...
--- /dev/null
+# name: Load pseudo-operation for Cortex-M23
+# as: -mcpu=cortex-m23
+# objdump: -dr --prefix-addresses --show-raw-insn -M force-thumb
+# source: load-pseudo.s
+
+.*: +file format .*arm.*
+
+
+Disassembly of section .text:
+[^>]*> f240 0030 movw r0, #48 ; 0x30
+[^>]*> 4800 ldr r0, \[pc, #0\] ; \(00000008 [^>]*>\)
+#...
--- /dev/null
+# name: Load pseudo-operation for Cortex-M33
+# as: -mcpu=cortex-m33
+# objdump: -dr --prefix-addresses --show-raw-insn -M force-thumb
+# source: load-pseudo.s
+
+.*: +file format .*arm.*
+
+
+Disassembly of section .text:
+[^>]*> f04f 0030 mov.w r0, #48 ; 0x30
+[^>]*> f04f 40e0 mov.w r0, #1879048192 ; 0x70000000