aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2024-07-23 16:00:45 -0700
committerGitHub <noreply@github.com>2024-07-23 16:00:45 -0700
commit3544bba038bcea040b6afd73787dfd7d939beb1e (patch)
tree07aa507354255cb50298febe749047802269e73b /src
parent6024788dc24a3414af3363489f4302e9df29d61b (diff)
downloadriscv-isa-manual-3544bba038bcea040b6afd73787dfd7d939beb1e.zip
riscv-isa-manual-3544bba038bcea040b6afd73787dfd7d939beb1e.tar.gz
riscv-isa-manual-3544bba038bcea040b6afd73787dfd7d939beb1e.tar.bz2
Add notes about semihosting NOPs; clarify there is only one semihosting exit NOP (#1539)riscv-isa-release-3544bba-2024-07-23
* There is only one semihosting call, not several The comment suggested otherwise. * Add NOTE to HINT section about semihosting NOPs
Diffstat (limited to 'src')
-rw-r--r--src/rv32.adoc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rv32.adoc b/src/rv32.adoc
index fac9909..1deda32 100644
--- a/src/rv32.adoc
+++ b/src/rv32.adoc
@@ -865,6 +865,7 @@ ignore the _predecessor_ and _successor_ fields and always execute a
conservative fence on all operations.
====
+[[ecall-ebreak]]
=== Environment Call and Breakpoints
`SYSTEM` instructions are used to access system functionality that might
require privileged access and are encoded using the I-type instruction
@@ -924,7 +925,7 @@ to distinguish a semihosting EBREAK from a debugger inserted EBREAK.
....
slli x0, x0, 0x1f # Entry NOP
ebreak # Break to debugger
- srai x0, x0, 7 # NOP encoding the semihosting call number 7
+ srai x0, x0, 7 # Exit NOP
....
Note that these three instructions must be 32-bit-wide instructions,
@@ -1063,3 +1064,5 @@ hints, security tags, and instrumentation flags for simulation/emulation.
|SLTU |_rd_=`x0` |latexmath:[$2^{10}$]
|===
+TIP: When allocating `slli x0, x0, 0x1f` or `srai x0, x0, 7` as custom HINTs,
+take note of their use in semihosting calls, as described in <<ecall-ebreak>>.