Skip to content

Commit 89f7276

Browse files
committed
meta: rename test/ -> tests/
1 parent 98fe35e commit 89f7276

13 files changed

Lines changed: 140 additions & 105 deletions

File tree

test/binaries/add.c

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/test_parse_asm.rs

Lines changed: 0 additions & 48 deletions
This file was deleted.

test/test_translation.rs

Lines changed: 0 additions & 50 deletions
This file was deleted.
File renamed without changes.

tests/binaries/add.c

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
int main(void) {
2+
int x = 3;
3+
int y = 4;
4+
5+
return x + y;
6+
}
7+
8+
//////////////// arm
9+
// main:
10+
// sub sp, sp, #16
11+
// mov w0, 3
12+
// str w0, [sp, 12]
13+
// mov w0, 4
14+
// str w0, [sp, 8]
15+
// ldr w1, [sp, 12]
16+
// ldr w0, [sp, 8]
17+
// add w0, w1, w0
18+
// add sp, sp, 16
19+
// ret
20+
21+
//////////// riscv
22+
// https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,selection:(endColumn:1,endLineNumber:8,positionColumn:1,positionLineNumber:8,selectionStartColumn:1,selectionStartLineNumber:8,startColumn:1,startLineNumber:8),source:'int+main(void)+%7B%0A%09int+x+%3D+3%3B%0A%09int+y+%3D+4%3B%0A%0A%09return+x+%2B+y%3B%0A%7D%0A%0A'),l:'5',n:'0',o:'C%2B%2B+source+%231',t:'0')),k:50,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:compiler,i:(compiler:rv64-gcc1420,filters:(b:'0',binary:'1',binaryObject:'1',commentOnly:'0',debugCalls:'1',demangle:'0',directives:'0',execute:'1',intel:'0',libraryCode:'0',trim:'1',verboseDemangling:'0'),flagsViewOpen:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,libs:!(),options:'',overrides:!(),selection:(endColumn:19,endLineNumber:19,positionColumn:19,positionLineNumber:19,selectionStartColumn:1,selectionStartLineNumber:1,startColumn:1,startLineNumber:1),source:1),l:'5',n:'0',o:'+RISC-V+(64-bits)+gcc+14.2.0+(Editor+%231)',t:'0')),k:50,l:'4',n:'0',o:'',s:0,t:'0')),l:'2',n:'0',o:'',t:'0')),version:4
23+
// main:
24+
// addi sp,sp,-32
25+
// sd ra,24(sp)
26+
// sd s0,16(sp)
27+
// addi s0,sp,32
28+
// li a5,3
29+
// sw a5,-20(s0)
30+
// li a5,4
31+
// sw a5,-24(s0)
32+
// lw a5,-20(s0)
33+
// mv a4,a5
34+
// lw a5,-24(s0)
35+
// addw a5,a4,a5
36+
// sext.w a5,a5
37+
// mv a0,a5
38+
// ld ra,24(sp)
39+
// ld ß s0,16(sp)
40+
// addi sp,sp,32
41+
// jr ra

0 commit comments

Comments
 (0)