File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22.text
33
44. global _start
5+ . global _main
56
7+ .balign 4
68_start:
79bl main
810mov x8 , # 93
911svc # 0
1012
13+ .balign 4
14+ _main:
1115main:
1216
1317sub sp , sp , 32
Original file line number Diff line number Diff line change 1+
2+ .text
3+
4+ . global _start
5+ . global _main
6+
7+ .balign 4
8+ _start:
9+ bl main
10+ mov x8 , # 93
11+ svc # 0
12+
13+ .balign 4
14+ _main:
15+ main:
16+
17+ sub sp , sp , 32
18+ mov x8 , 63
19+ mov x2 , 32
20+ add x1 , sp , 0
21+ mov x0 , 0
22+ svc 0
23+ mov x8 , 64
24+ mov x2 , 14
25+ add x1 , sp , 0
26+ mov x0 , 1
27+ svc 0
28+ mov x8 , 93
29+ svc 0
Original file line number Diff line number Diff line change @@ -68,6 +68,6 @@ mod tests {
6868 RiscVInstruction :: ECall ,
6969 ] ;
7070
71- translate_to_file ( riscv_asm, "test_binary_translate_echo.S " . to_string ( ) ) ;
71+ translate_to_file ( riscv_asm, "./tests/echo/echo.arm.s " . to_string ( ) ) ;
7272 }
7373}
Original file line number Diff line number Diff line change 1+
2+ .buf:
3+ .string "hello world\n"
4+
5+
6+ .text
7+
8+ . global _start
9+ . global _main
10+
11+ .balign 4
12+ _start:
13+ bl main
14+ mov x8 , # 93
15+ svc # 0
16+
17+ .balign 4
18+ _main:
19+ main:
20+
21+ mov x8 , 64
22+ mov x2 , 14
23+ adrp x0 , .buf
24+ add x1 , x0 , :lo12:.buf
25+ mov x0 , 1
26+ svc 0
27+ mov x8 , 93
28+ svc 0
Original file line number Diff line number Diff line change @@ -58,6 +58,6 @@ mod tests {
5858 RiscVInstruction :: ECall ,
5959 ] ;
6060
61- translate_to_file ( riscv_asm, "test_binary_translate_print.S " . to_string ( ) ) ;
61+ translate_to_file ( riscv_asm, "./tests/print/print.arm.s " . to_string ( ) ) ;
6262 }
6363}
Original file line number Diff line number Diff line change 1-
21#[ path = "add/test_add.rs" ]
32mod add;
3+
4+ #[ path = "echo/test_echo.rs" ]
5+ mod echo;
6+
7+ #[ path = "print/test_print.rs" ]
8+ mod print;
You can’t perform that action at this time.
0 commit comments