Skip to content

Commit c0de856

Browse files
committed
gdb test: set float
1 parent 9f03546 commit c0de856

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

baremetal/arch/aarch64/regs.S

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ main:
1313
mov x30, #2
1414
/* test-gdb-x30 */
1515

16+
fmov d0, #1.5
17+
/* test-gdb-d0 */
18+
fmov d1, #2.5
19+
/* test-gdb-d1 */
20+
21+
fmov d30, #1.5
22+
/* test-gdb-d30 */
23+
fmov d31, #2.5
24+
/* test-gdb-d31 */
25+
1626
/* Exit required since we meesed up with x30 which is the lr. */
1727
mov x0, #0
1828
bl exit

baremetal/arch/aarch64/regs.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
def test(self):
22
self.sendline('tbreak main')
33
self.sendline('continue')
4+
45
self.continue_to('x0')
56
self.sendline('set $x0 = 3')
67
self.continue_to('x1')
@@ -12,3 +13,15 @@ def test(self):
1213
assert self.get_int('$x30') == 3
1314
self.continue_to('x30')
1415
assert self.get_int('$x30') == 2
16+
17+
self.continue_to('d0')
18+
self.sendline('set $d0 = 3.5')
19+
self.continue_to('d1')
20+
assert self.get_float('$d0') == 3.5
21+
assert self.get_float('$d1') == 2.5
22+
self.sendline('set $d31 = 3.5')
23+
self.continue_to('d30')
24+
assert self.get_float('$d30') == 1.5
25+
assert self.get_float('$d31') == 3.5
26+
self.continue_to('d31')
27+
assert self.get_float('$d31') == 2.5

0 commit comments

Comments
 (0)