Skip to content

Commit 46952b0

Browse files
committed
[lldb] Adapted TestGdbRemoteSingleStep.py test for RISC-V
1 parent 3edb159 commit 46952b0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lldb/test/API/tools/lldb-server/main.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ static void swap_chars() {
128128
:
129129
: "r"('0'), "r"('1'), "r"(&g_c1), "r"(&g_c2)
130130
: "memory");
131+
#elif defined(__riscv)
132+
asm volatile("sb %1, (%2)\n\t"
133+
"sb %0, (%3)\n\t"
134+
"sb %0, (%2)\n\t"
135+
"sb %1, (%3)\n\t"
136+
:
137+
: "r"('0'), "r"('1'), "r"(&g_c1), "r"(&g_c2)
138+
: "memory");
139+
131140
#else
132141
#warning This may generate unpredictible assembly and cause the single-stepping test to fail.
133142
#warning Please add appropriate assembly for your target.

0 commit comments

Comments
 (0)