[PATCH][Newlib][AArch32] Add support for HLT to Mixed Mode models
Tamar Christina
Tamar.Christina@arm.com
Thu Feb 7 16:06:00 GMT 2019
Hi All,
The Semihosting v2 protocol requires us to output the Armv8-a HLT instruction
when in mixed mode (SEMIHOST_V2_MIXED_MODE), however it also requires this to
be done for Armv7-a and earlier architectures.
The HLT instruction is defined in the undefined encoding space for older
architectures but simulators such as QEMU already trap on it [1] for all
architectures and is a requirement for semihosting v2 [2]
Unfortunately the GAS restricts the use of HLT to Armv8-a which requires us to
use the instruction encodings we want directly in crt0.
This patch does this, I have not updated newlib/libc/* as that is quite out of
date already. A proper sync is needed in order to get things back in sync.
A different patch for this would be best.
[1] https://github.com/qemu/qemu/commit/19a6e31c9d2701ef648b70ddcfc3bf64cec8c37e
[2] https://developer.arm.com/docs/100863/latest/the-semihosting-interface
Regtested on arm-none-eabi and no issues.
Ok for trunk?
Thanks,
Tamar
libgloss/ChangeLog:
2019-02-07 Tamar Christina <tamar.christina@arm.com>
PR libgloss/24070
* arm/crt0.S: Convert macros to function Macros.
* arm/swi.h (AngelSWI_ARM, AngelSWI): Use raw insn encoding for
SEMIHOST_V2_MIXED_MODE case.
(AngelSWIAsm): Make function.
(AngelSWIInsn, AngelSWIAsm): Use .inst directive as instruction.
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb10668.patch
Type: text/x-diff
Size: 2188 bytes
Desc: rb10668.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20190207/544b22c1/attachment.bin>
More information about the Newlib
mailing list