Skip to content

Commit 8b43a18

Browse files
committed
Tidy ups to the HyperRAM-related assembler
Tidy and explain `get_hyperram_fn_ptr.` Remove misleading and incorrect comment; this is no return value.
1 parent 5da67be commit 8b43a18

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
# Copyright lowRISC contributors.
22
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
# SPDX-License-Identifier: Apache-2.0
4-
.include "assembly-helpers.s"
4+
.include "assembly-helpers.s"
55

66
.section .text, "ax", @progbits
77

88
.globl get_hyperram_fn_ptr
99
.p2align 2
10-
.type get_hyperram_fn_ptr,@function
10+
.type get_hyperram_fn_ptr,@function
11+
12+
// Return an executable capability for the given address; this relies upon pcc containing the
13+
// supplied address already.
14+
//
15+
// entry a0 = address of function
16+
// return ca0 -> function
1117
get_hyperram_fn_ptr:
12-
auipcc ct0, 0
13-
csetaddr ca0, ct0, a0
14-
cret
18+
auipcc ct0, 0
19+
csetaddr ca0, ct0, a0
20+
cret
21+

sw/cheri/common/hyperram_perf_test.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
// ca0 -> destination (word-aligned)
3232
// ca1 -> source (word-aligned)
3333
// a2 = number of bytes to copy
34-
// return -> beyond destination data.
3534
hyperram_copy_block:
3635
srl a3, a2, 5
3736
andi a2, a2, 31 // 0-31 bytes remaining after 32-byte loop.

0 commit comments

Comments
 (0)