]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Arm: Backport hlt to all architectures.
authorTamar Christina <tamar.christina@arm.com>
Thu, 7 Feb 2019 17:12:23 +0000 (17:12 +0000)
committerTamar Christina <tamar.christina@arm.com>
Thu, 7 Feb 2019 17:43:23 +0000 (17:43 +0000)
commitd0a5d5c64231eff423a33e924132f2eedd6c1c29
tree2d738cbe30dd41c455f805d1849a3ea3afa7687e
parentafbdeb58468604ede2d51fb00c4ea9850fcf2617
Arm: Backport hlt to all architectures.

The software trap instruction HLT that was introduced in Armv8-a is used
as the semihosting trap instruction in AArch64.  In order to allow systems
configured to run AArch64 code to also run AArch32 with semihosting it was
decided that AArch32 should also use HLT in the case of the "mixed mode"
environment.  This requires that HLT also be backported to all earlier
architectures.  The instruction is in the undefined encoding space earlier
architectures but must trigger a semihosting trap [3].

The Arm Architectural Reference Manual [1] doesn't explicitly mention this
however this is an explicit requirement in the Semihosting-v2 protocol [2].

[1] https://developer.arm.com/docs/ddi0487/latest/arm-architecture-reference-manual-armv8-for-armv8-a-architecture-profile
[2] https://developer.arm.com/docs/100863/latest/the-semihosting-interface
[3] https://github.com/qemu/qemu/commit/19a6e31c9d2701ef648b70ddcfc3bf64cec8c37e

gas/ChangeLog:

* config/tc-arm.c (insns): Redefine THUMB_VARIANT and ARM_VARIANT for
hlt to armv1.
* testsuite/gas/arm/armv8a-automatic-hlt.d: Update TAGs
* testsuite/gas/arm/hlt.d: New test.
* testsuite/gas/arm/hlt.s: New test.

opcodes/ChangeLog:

* arm-dis.c (arm_opcodes): Redefine hlt to armv1.

(cherry picked from commit f7dd2fb2e2b750f0fb9dedaf885c17bc6beef1f7)
gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/gas/arm/armv8a-automatic-hlt.d
gas/testsuite/gas/arm/hlt.d [new file with mode: 0644]
gas/testsuite/gas/arm/hlt.s [new file with mode: 0644]
opcodes/ChangeLog
opcodes/arm-dis.c