Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions executor/programs/asm/data_page_touch.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.data
.align 3
counter:
.dword 0x123456789ABCDEF0

.text
.attribute 5, "rv64i2p1"
.globl main
main:
# Touch an ELF .data page: load, mutate, store back a static global so the
# page is genuinely ELF-backed (init_values non-empty), not stack/zero-init.
la t0, counter # 1: t0 = &counter
ld t1, 0(t0) # 2: t1 = counter (0x123456789ABCDEF0)
addi t1, t1, 1 # 3: t1 += 1
sd t1, 0(t0) # 4: counter = t1

li a0, 0
li a7, 93
ecall # 5: Halt
Loading
Loading