branch: externals/beardbolt commit 082cbc7b1cab76be13529143579de010ccf12b8a Author: Jay Kamat <jaygka...@gmail.com> Commit: Jay Kamat <jaygka...@gmail.com>
Add new tests --- .ert-runner | 1 + .gitlab-ci.yml | 9 + test/rmsbolt-c-post1.s | 47 +++ test/rmsbolt-c-post2.s | 916 +++++++++++++++++++++++++++++++++++++++++++++++++ test/rmsbolt-c-post3.s | 117 +++++++ test/rmsbolt-c-pre1.s | 916 +++++++++++++++++++++++++++++++++++++++++++++++++ test/rmsbolt-test.el | 45 +++ 7 files changed, 2051 insertions(+) diff --git a/.ert-runner b/.ert-runner new file mode 100644 index 0000000000..47007910fb --- /dev/null +++ b/.ert-runner @@ -0,0 +1 @@ +-l rmsbolt.el diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..daa4856f92 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,9 @@ +stages: + - build + +test: + image: jgkamat/emacs:25.2-cask + stage: build + script: + - cask + - cask exec ert-runner diff --git a/test/rmsbolt-c-post1.s b/test/rmsbolt-c-post1.s new file mode 100644 index 0000000000..2b100d724b --- /dev/null +++ b/test/rmsbolt-c-post1.s @@ -0,0 +1,47 @@ +isRMS: + push rbp + mov rbp, rsp + mov DWORD PTR -4[rbp], edi + mov eax, DWORD PTR -4[rbp] + cmp eax, 82 + je .L3 + cmp eax, 83 + je .L4 + cmp eax, 77 + je .L5 + jmp .L7 +.L3: + mov eax, 1 + jmp .L6 +.L5: + mov eax, 2 + jmp .L6 +.L4: + mov eax, 3 + jmp .L6 +.L7: + mov eax, 200 +.L6: + pop rbp + ret +.LC0: + .string "%c\n" +main: + push rbp + mov rbp, rsp + sub rsp, 16 + mov BYTE PTR -1[rbp], 2 + movsx eax, BYTE PTR -1[rbp] + mov edi, eax + call isRMS + test eax, eax + je .L9 + movsx eax, BYTE PTR -1[rbp] + mov esi, eax + lea rdi, .LC0[rip] + mov eax, 0 + call printf@PLT +.L9: + mov eax, 0 + leave + ret diff --git a/test/rmsbolt-c-post2.s b/test/rmsbolt-c-post2.s new file mode 100644 index 0000000000..c539d24771 --- /dev/null +++ b/test/rmsbolt-c-post2.s @@ -0,0 +1,916 @@ + .file "rmsbolt.c" + .intel_syntax noprefix + .text +.Ltext0: + .globl isRMS + .type isRMS, @function +isRMS: +.LFB0: + .file 1 "/tmp/rmsbolt-LsubiK/rmsbolt.c" + .loc 1 11 0 + .cfi_startproc + push rbp + .cfi_def_cfa_offset 16 + .cfi_offset 6, -16 + mov rbp, rsp + .cfi_def_cfa_register 6 + mov DWORD PTR -4[rbp], edi + .loc 1 12 0 + mov eax, DWORD PTR -4[rbp] + cmp eax, 82 + je .L3 + cmp eax, 83 + je .L4 + cmp eax, 77 + je .L5 + jmp .L7 +.L3: + .loc 1 14 0 + mov eax, 1 + jmp .L6 +.L5: + .loc 1 16 0 + mov eax, 2 + jmp .L6 +.L4: + .loc 1 18 0 + mov eax, 3 + jmp .L6 +.L7: + .loc 1 20 0 + mov eax, 200 +.L6: + .loc 1 22 0 + pop rbp + .cfi_def_cfa 7, 8 + ret + .cfi_endproc +.LFE0: + .size isRMS, .-isRMS + .section .rodata +.LC0: + .string "%c\n" + .text + .globl main + .type main, @function +main: +.LFB1: + .loc 1 24 0 + .cfi_startproc + push rbp + .cfi_def_cfa_offset 16 + .cfi_offset 6, -16 + mov rbp, rsp + .cfi_def_cfa_register 6 + sub rsp, 16 + .loc 1 25 0 + mov BYTE PTR -1[rbp], 2 + .loc 1 26 0 + movsx eax, BYTE PTR -1[rbp] + mov edi, eax + call isRMS + test eax, eax + je .L9 + .loc 1 27 0 + movsx eax, BYTE PTR -1[rbp] + mov esi, eax + lea rdi, .LC0[rip] + mov eax, 0 + call printf@PLT +.L9: + mov eax, 0 + .loc 1 28 0 + leave + .cfi_def_cfa 7, 8 + ret + .cfi_endproc +.LFE1: + .size main, .-main +.Letext0: + .file 2 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" + .file 3 "/usr/include/x86_64-linux-gnu/bits/types.h" + .file 4 "/usr/include/libio.h" + .file 5 "/usr/include/stdio.h" + .file 6 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x358 + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x8 + .uleb128 0x1 + .long .LASF56 + .byte 0xc + .long .LASF57 + .long .LASF58 + .quad .Ltext0 + .quad .Letext0-.Ltext0 + .long .Ldebug_line0 + .uleb128 0x2 + .long .LASF7 + .byte 0x2 + .byte 0xd8 + .long 0x38 + .uleb128 0x3 + .byte 0x8 + .byte 0x7 + .long .LASF0 + .uleb128 0x3 + .byte 0x1 + .byte 0x8 + .long .LASF1 + .uleb128 0x3 + .byte 0x2 + .byte 0x7 + .long .LASF2 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF3 + .uleb128 0x3 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x3 + .byte 0x2 + .byte 0x5 + .long .LASF5 + .uleb128 0x4 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x3 + .byte 0x8 + .byte 0x5 + .long .LASF6 + .uleb128 0x2 + .long .LASF8 + .byte 0x3 + .byte 0x83 + .long 0x69 + .uleb128 0x2 + .long .LASF9 + .byte 0x3 + .byte 0x84 + .long 0x69 + .uleb128 0x3 + .byte 0x8 + .byte 0x7 + .long .LASF10 + .uleb128 0x5 + .byte 0x8 + .uleb128 0x6 + .byte 0x8 + .long 0x95 + .uleb128 0x3 + .byte 0x1 + .byte 0x6 + .long .LASF11 + .uleb128 0x7 + .long 0x95 + .uleb128 0x8 + .long .LASF41 + .byte 0xd8 + .byte 0x4 + .byte 0xf1 + .long 0x21e + .uleb128 0x9 + .long .LASF12 + .byte 0x4 + .byte 0xf2 + .long 0x62 + .byte 0 + .uleb128 0x9 + .long .LASF13 + .byte 0x4 + .byte 0xf7 + .long 0x8f + .byte 0x8 + .uleb128 0x9 + .long .LASF14 + .byte 0x4 + .byte 0xf8 + .long 0x8f + .byte 0x10 + .uleb128 0x9 + .long .LASF15 + .byte 0x4 + .byte 0xf9 + .long 0x8f + .byte 0x18 + .uleb128 0x9 + .long .LASF16 + .byte 0x4 + .byte 0xfa + .long 0x8f + .byte 0x20 + .uleb128 0x9 + .long .LASF17 + .byte 0x4 + .byte 0xfb + .long 0x8f + .byte 0x28 + .uleb128 0x9 + .long .LASF18 + .byte 0x4 + .byte 0xfc + .long 0x8f + .byte 0x30 + .uleb128 0x9 + .long .LASF19 + .byte 0x4 + .byte 0xfd + .long 0x8f + .byte 0x38 + .uleb128 0x9 + .long .LASF20 + .byte 0x4 + .byte 0xfe + .long 0x8f + .byte 0x40 + .uleb128 0xa + .long .LASF21 + .byte 0x4 + .value 0x100 + .long 0x8f + .byte 0x48 + .uleb128 0xa + .long .LASF22 + .byte 0x4 + .value 0x101 + .long 0x8f + .byte 0x50 + .uleb128 0xa + .long .LASF23 + .byte 0x4 + .value 0x102 + .long 0x8f + .byte 0x58 + .uleb128 0xa + .long .LASF24 + .byte 0x4 + .value 0x104 + .long 0x256 + .byte 0x60 + .uleb128 0xa + .long .LASF25 + .byte 0x4 + .value 0x106 + .long 0x25c + .byte 0x68 + .uleb128 0xa + .long .LASF26 + .byte 0x4 + .value 0x108 + .long 0x62 + .byte 0x70 + .uleb128 0xa + .long .LASF27 + .byte 0x4 + .value 0x10c + .long 0x62 + .byte 0x74 + .uleb128 0xa + .long .LASF28 + .byte 0x4 + .value 0x10e + .long 0x70 + .byte 0x78 + .uleb128 0xa + .long .LASF29 + .byte 0x4 + .value 0x112 + .long 0x46 + .byte 0x80 + .uleb128 0xa + .long .LASF30 + .byte 0x4 + .value 0x113 + .long 0x54 + .byte 0x82 + .uleb128 0xa + .long .LASF31 + .byte 0x4 + .value 0x114 + .long 0x262 + .byte 0x83 + .uleb128 0xa + .long .LASF32 + .byte 0x4 + .value 0x118 + .long 0x272 + .byte 0x88 + .uleb128 0xa + .long .LASF33 + .byte 0x4 + .value 0x121 + .long 0x7b + .byte 0x90 + .uleb128 0xa + .long .LASF34 + .byte 0x4 + .value 0x129 + .long 0x8d + .byte 0x98 + .uleb128 0xa + .long .LASF35 + .byte 0x4 + .value 0x12a + .long 0x8d + .byte 0xa0 + .uleb128 0xa + .long .LASF36 + .byte 0x4 + .value 0x12b + .long 0x8d + .byte 0xa8 + .uleb128 0xa + .long .LASF37 + .byte 0x4 + .value 0x12c + .long 0x8d + .byte 0xb0 + .uleb128 0xa + .long .LASF38 + .byte 0x4 + .value 0x12e + .long 0x2d + .byte 0xb8 + .uleb128 0xa + .long .LASF39 + .byte 0x4 + .value 0x12f + .long 0x62 + .byte 0xc0 + .uleb128 0xa + .long .LASF40 + .byte 0x4 + .value 0x131 + .long 0x278 + .byte 0xc4 + .byte 0 + .uleb128 0xb + .long .LASF59 + .byte 0x4 + .byte 0x96 + .uleb128 0x8 + .long .LASF42 + .byte 0x18 + .byte 0x4 + .byte 0x9c + .long 0x256 + .uleb128 0x9 + .long .LASF43 + .byte 0x4 + .byte 0x9d + .long 0x256 + .byte 0 + .uleb128 0x9 + .long .LASF44 + .byte 0x4 + .byte 0x9e + .long 0x25c + .byte 0x8 + .uleb128 0x9 + .long .LASF45 + .byte 0x4 + .byte 0xa2 + .long 0x62 + .byte 0x10 + .byte 0 + .uleb128 0x6 + .byte 0x8 + .long 0x225 + .uleb128 0x6 + .byte 0x8 + .long 0xa1 + .uleb128 0xc + .long 0x95 + .long 0x272 + .uleb128 0xd + .long 0x86 + .byte 0 + .byte 0 + .uleb128 0x6 + .byte 0x8 + .long 0x21e + .uleb128 0xc + .long 0x95 + .long 0x288 + .uleb128 0xd + .long 0x86 + .byte 0x13 + .byte 0 + .uleb128 0xe + .long .LASF60 + .uleb128 0xf + .long .LASF46 + .byte 0x4 + .value 0x13b + .long 0x288 + .uleb128 0xf + .long .LASF47 + .byte 0x4 + .value 0x13c + .long 0x288 + .uleb128 0xf + .long .LASF48 + .byte 0x4 + .value 0x13d + .long 0x288 + .uleb128 0x6 + .byte 0x8 + .long 0x9c + .uleb128 0x7 + .long 0x2b1 + .uleb128 0x10 + .long .LASF49 + .byte 0x5 + .byte 0xaa + .long 0x25c + .uleb128 0x10 + .long .LASF50 + .byte 0x5 + .byte 0xab + .long 0x25c + .uleb128 0x10 + .long .LASF51 + .byte 0x5 + .byte 0xac + .long 0x25c + .uleb128 0x10 + .long .LASF52 + .byte 0x6 + .byte 0x1a + .long 0x62 + .uleb128 0xc + .long 0x2b7 + .long 0x2f3 + .uleb128 0x11 + .byte 0 + .uleb128 0x7 + .long 0x2e8 + .uleb128 0x10 + .long .LASF53 + .byte 0x6 + .byte 0x1b + .long 0x2f3 + .uleb128 0x12 + .long .LASF54 + .byte 0x1 + .byte 0x18 + .long 0x62 + .quad .LFB1 + .quad .LFE1-.LFB1 + .uleb128 0x1 + .byte 0x9c + .long 0x331 + .uleb128 0x13 + .string "a" + .byte 0x1 + .byte 0x19 + .long 0x95 + .uleb128 0x2 + .byte 0x91 + .sleb128 -17 + .byte 0 + .uleb128 0x14 + .long .LASF55 + .byte 0x1 + .byte 0xb + .long 0x62 + .quad .LFB0 + .quad .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .uleb128 0x15 + .string "a" + .byte 0x1 + .byte 0xb + .long 0x62 + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .byte 0 + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x7 + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0xf + .byte 0 + .uleb128 0xb + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0xf + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0x26 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x13 + .byte 0x1 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0xa + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0x5 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0xb + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0xc + .uleb128 0x1 + .byte 0x1 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xd + .uleb128 0x21 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2f + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0xe + .uleb128 0x13 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3c + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0xf + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0x5 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3c + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0x10 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3c + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0x11 + .uleb128 0x21 + .byte 0 + .byte 0 + .byte 0 + .uleb128 0x12 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x7 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x13 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x14 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x7 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0x15 + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x2c + .value 0x2 + .long .Ldebug_info0 + .byte 0x8 + .byte 0 + .value 0 + .value 0 + .quad .Ltext0 + .quad .Letext0-.Ltext0 + .quad 0 + .quad 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF20: + .string "_IO_buf_end" +.LASF28: + .string "_old_offset" +.LASF55: + .string "isRMS" +.LASF52: + .string "sys_nerr" +.LASF23: + .string "_IO_save_end" +.LASF5: + .string "short int" +.LASF7: + .string "size_t" +.LASF10: + .string "sizetype" +.LASF33: + .string "_offset" +.LASF17: + .string "_IO_write_ptr" +.LASF12: + .string "_flags" +.LASF19: + .string "_IO_buf_base" +.LASF24: + .string "_markers" +.LASF14: + .string "_IO_read_end" +.LASF57: + .string "/tmp/rmsbolt-LsubiK/rmsbolt.c" +.LASF51: + .string "stderr" +.LASF58: + .string "/tmp/rmsbolt-LsubiK" +.LASF32: + .string "_lock" +.LASF6: + .string "long int" +.LASF29: + .string "_cur_column" +.LASF48: + .string "_IO_2_1_stderr_" +.LASF60: + .string "_IO_FILE_plus" +.LASF45: + .string "_pos" +.LASF44: + .string "_sbuf" +.LASF41: + .string "_IO_FILE" +.LASF1: + .string "unsigned char" +.LASF4: + .string "signed char" +.LASF46: + .string "_IO_2_1_stdin_" +.LASF3: + .string "unsigned int" +.LASF42: + .string "_IO_marker" +.LASF31: + .string "_shortbuf" +.LASF16: + .string "_IO_write_base" +.LASF40: + .string "_unused2" +.LASF13: + .string "_IO_read_ptr" +.LASF2: + .string "short unsigned int" +.LASF11: + .string "char" +.LASF54: + .string "main" +.LASF43: + .string "_next" +.LASF34: + .string "__pad1" +.LASF35: + .string "__pad2" +.LASF36: + .string "__pad3" +.LASF37: + .string "__pad4" +.LASF38: + .string "__pad5" +.LASF0: + .string "long unsigned int" +.LASF18: + .string "_IO_write_end" +.LASF9: + .string "__off64_t" +.LASF8: + .string "__off_t" +.LASF25: + .string "_chain" +.LASF22: + .string "_IO_backup_base" +.LASF49: + .string "stdin" +.LASF27: + .string "_flags2" +.LASF39: + .string "_mode" +.LASF15: + .string "_IO_read_base" +.LASF30: + .string "_vtable_offset" +.LASF21: + .string "_IO_save_base" +.LASF53: + .string "sys_errlist" +.LASF26: + .string "_fileno" +.LASF56: + .string "GNU C11 6.3.0 20170516 -masm=intel -mtune=generic -march=x86-64 -g -O0" +.LASF50: + .string "stdout" +.LASF47: + .string "_IO_2_1_stdout_" +.LASF59: + .string "_IO_lock_t" + .ident "GCC: (Debian 6.3.0-18+deb9u1) 6.3.0 20170516" + .section .note.GNU-stack,"",@progbits diff --git a/test/rmsbolt-c-post3.s b/test/rmsbolt-c-post3.s new file mode 100644 index 0000000000..87d05796a2 --- /dev/null +++ b/test/rmsbolt-c-post3.s @@ -0,0 +1,117 @@ +.Ltext0: +isRMS: +.LFB0: + push rbp + mov rbp, rsp + mov DWORD PTR -4[rbp], edi + mov eax, DWORD PTR -4[rbp] + cmp eax, 82 + je .L3 + cmp eax, 83 + je .L4 + cmp eax, 77 + je .L5 + jmp .L7 +.L3: + mov eax, 1 + jmp .L6 +.L5: + mov eax, 2 + jmp .L6 +.L4: + mov eax, 3 + jmp .L6 +.L7: + mov eax, 200 +.L6: + pop rbp + ret +.LFE0: +.LC0: + .string "%c\n" +main: +.LFB1: + push rbp + mov rbp, rsp + sub rsp, 16 + mov BYTE PTR -1[rbp], 2 + movsx eax, BYTE PTR -1[rbp] + mov edi, eax + call isRMS + test eax, eax + je .L9 + movsx eax, BYTE PTR -1[rbp] + mov esi, eax + lea rdi, .LC0[rip] + mov eax, 0 + call printf@PLT +.L9: + mov eax, 0 + leave + ret +.LFE1: +.Letext0: +.Ldebug_info0: +.Ldebug_abbrev0: +.Ldebug_line0: +.LASF20: +.LASF28: +.LASF55: +.LASF52: +.LASF23: +.LASF5: +.LASF7: +.LASF10: +.LASF33: +.LASF17: +.LASF12: +.LASF19: +.LASF24: +.LASF14: +.LASF57: +.LASF51: +.LASF58: +.LASF32: +.LASF6: +.LASF29: +.LASF48: +.LASF60: +.LASF45: +.LASF44: +.LASF41: +.LASF1: +.LASF4: +.LASF46: +.LASF3: +.LASF42: +.LASF31: +.LASF16: +.LASF40: +.LASF13: +.LASF2: +.LASF11: +.LASF54: +.LASF43: +.LASF34: +.LASF35: +.LASF36: +.LASF37: +.LASF38: +.LASF0: +.LASF18: +.LASF9: +.LASF8: +.LASF25: +.LASF22: +.LASF49: +.LASF27: +.LASF39: +.LASF15: +.LASF30: +.LASF21: +.LASF53: +.LASF26: +.LASF56: +.LASF50: +.LASF47: +.LASF59: diff --git a/test/rmsbolt-c-pre1.s b/test/rmsbolt-c-pre1.s new file mode 100644 index 0000000000..c539d24771 --- /dev/null +++ b/test/rmsbolt-c-pre1.s @@ -0,0 +1,916 @@ + .file "rmsbolt.c" + .intel_syntax noprefix + .text +.Ltext0: + .globl isRMS + .type isRMS, @function +isRMS: +.LFB0: + .file 1 "/tmp/rmsbolt-LsubiK/rmsbolt.c" + .loc 1 11 0 + .cfi_startproc + push rbp + .cfi_def_cfa_offset 16 + .cfi_offset 6, -16 + mov rbp, rsp + .cfi_def_cfa_register 6 + mov DWORD PTR -4[rbp], edi + .loc 1 12 0 + mov eax, DWORD PTR -4[rbp] + cmp eax, 82 + je .L3 + cmp eax, 83 + je .L4 + cmp eax, 77 + je .L5 + jmp .L7 +.L3: + .loc 1 14 0 + mov eax, 1 + jmp .L6 +.L5: + .loc 1 16 0 + mov eax, 2 + jmp .L6 +.L4: + .loc 1 18 0 + mov eax, 3 + jmp .L6 +.L7: + .loc 1 20 0 + mov eax, 200 +.L6: + .loc 1 22 0 + pop rbp + .cfi_def_cfa 7, 8 + ret + .cfi_endproc +.LFE0: + .size isRMS, .-isRMS + .section .rodata +.LC0: + .string "%c\n" + .text + .globl main + .type main, @function +main: +.LFB1: + .loc 1 24 0 + .cfi_startproc + push rbp + .cfi_def_cfa_offset 16 + .cfi_offset 6, -16 + mov rbp, rsp + .cfi_def_cfa_register 6 + sub rsp, 16 + .loc 1 25 0 + mov BYTE PTR -1[rbp], 2 + .loc 1 26 0 + movsx eax, BYTE PTR -1[rbp] + mov edi, eax + call isRMS + test eax, eax + je .L9 + .loc 1 27 0 + movsx eax, BYTE PTR -1[rbp] + mov esi, eax + lea rdi, .LC0[rip] + mov eax, 0 + call printf@PLT +.L9: + mov eax, 0 + .loc 1 28 0 + leave + .cfi_def_cfa 7, 8 + ret + .cfi_endproc +.LFE1: + .size main, .-main +.Letext0: + .file 2 "/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h" + .file 3 "/usr/include/x86_64-linux-gnu/bits/types.h" + .file 4 "/usr/include/libio.h" + .file 5 "/usr/include/stdio.h" + .file 6 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x358 + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x8 + .uleb128 0x1 + .long .LASF56 + .byte 0xc + .long .LASF57 + .long .LASF58 + .quad .Ltext0 + .quad .Letext0-.Ltext0 + .long .Ldebug_line0 + .uleb128 0x2 + .long .LASF7 + .byte 0x2 + .byte 0xd8 + .long 0x38 + .uleb128 0x3 + .byte 0x8 + .byte 0x7 + .long .LASF0 + .uleb128 0x3 + .byte 0x1 + .byte 0x8 + .long .LASF1 + .uleb128 0x3 + .byte 0x2 + .byte 0x7 + .long .LASF2 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF3 + .uleb128 0x3 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x3 + .byte 0x2 + .byte 0x5 + .long .LASF5 + .uleb128 0x4 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x3 + .byte 0x8 + .byte 0x5 + .long .LASF6 + .uleb128 0x2 + .long .LASF8 + .byte 0x3 + .byte 0x83 + .long 0x69 + .uleb128 0x2 + .long .LASF9 + .byte 0x3 + .byte 0x84 + .long 0x69 + .uleb128 0x3 + .byte 0x8 + .byte 0x7 + .long .LASF10 + .uleb128 0x5 + .byte 0x8 + .uleb128 0x6 + .byte 0x8 + .long 0x95 + .uleb128 0x3 + .byte 0x1 + .byte 0x6 + .long .LASF11 + .uleb128 0x7 + .long 0x95 + .uleb128 0x8 + .long .LASF41 + .byte 0xd8 + .byte 0x4 + .byte 0xf1 + .long 0x21e + .uleb128 0x9 + .long .LASF12 + .byte 0x4 + .byte 0xf2 + .long 0x62 + .byte 0 + .uleb128 0x9 + .long .LASF13 + .byte 0x4 + .byte 0xf7 + .long 0x8f + .byte 0x8 + .uleb128 0x9 + .long .LASF14 + .byte 0x4 + .byte 0xf8 + .long 0x8f + .byte 0x10 + .uleb128 0x9 + .long .LASF15 + .byte 0x4 + .byte 0xf9 + .long 0x8f + .byte 0x18 + .uleb128 0x9 + .long .LASF16 + .byte 0x4 + .byte 0xfa + .long 0x8f + .byte 0x20 + .uleb128 0x9 + .long .LASF17 + .byte 0x4 + .byte 0xfb + .long 0x8f + .byte 0x28 + .uleb128 0x9 + .long .LASF18 + .byte 0x4 + .byte 0xfc + .long 0x8f + .byte 0x30 + .uleb128 0x9 + .long .LASF19 + .byte 0x4 + .byte 0xfd + .long 0x8f + .byte 0x38 + .uleb128 0x9 + .long .LASF20 + .byte 0x4 + .byte 0xfe + .long 0x8f + .byte 0x40 + .uleb128 0xa + .long .LASF21 + .byte 0x4 + .value 0x100 + .long 0x8f + .byte 0x48 + .uleb128 0xa + .long .LASF22 + .byte 0x4 + .value 0x101 + .long 0x8f + .byte 0x50 + .uleb128 0xa + .long .LASF23 + .byte 0x4 + .value 0x102 + .long 0x8f + .byte 0x58 + .uleb128 0xa + .long .LASF24 + .byte 0x4 + .value 0x104 + .long 0x256 + .byte 0x60 + .uleb128 0xa + .long .LASF25 + .byte 0x4 + .value 0x106 + .long 0x25c + .byte 0x68 + .uleb128 0xa + .long .LASF26 + .byte 0x4 + .value 0x108 + .long 0x62 + .byte 0x70 + .uleb128 0xa + .long .LASF27 + .byte 0x4 + .value 0x10c + .long 0x62 + .byte 0x74 + .uleb128 0xa + .long .LASF28 + .byte 0x4 + .value 0x10e + .long 0x70 + .byte 0x78 + .uleb128 0xa + .long .LASF29 + .byte 0x4 + .value 0x112 + .long 0x46 + .byte 0x80 + .uleb128 0xa + .long .LASF30 + .byte 0x4 + .value 0x113 + .long 0x54 + .byte 0x82 + .uleb128 0xa + .long .LASF31 + .byte 0x4 + .value 0x114 + .long 0x262 + .byte 0x83 + .uleb128 0xa + .long .LASF32 + .byte 0x4 + .value 0x118 + .long 0x272 + .byte 0x88 + .uleb128 0xa + .long .LASF33 + .byte 0x4 + .value 0x121 + .long 0x7b + .byte 0x90 + .uleb128 0xa + .long .LASF34 + .byte 0x4 + .value 0x129 + .long 0x8d + .byte 0x98 + .uleb128 0xa + .long .LASF35 + .byte 0x4 + .value 0x12a + .long 0x8d + .byte 0xa0 + .uleb128 0xa + .long .LASF36 + .byte 0x4 + .value 0x12b + .long 0x8d + .byte 0xa8 + .uleb128 0xa + .long .LASF37 + .byte 0x4 + .value 0x12c + .long 0x8d + .byte 0xb0 + .uleb128 0xa + .long .LASF38 + .byte 0x4 + .value 0x12e + .long 0x2d + .byte 0xb8 + .uleb128 0xa + .long .LASF39 + .byte 0x4 + .value 0x12f + .long 0x62 + .byte 0xc0 + .uleb128 0xa + .long .LASF40 + .byte 0x4 + .value 0x131 + .long 0x278 + .byte 0xc4 + .byte 0 + .uleb128 0xb + .long .LASF59 + .byte 0x4 + .byte 0x96 + .uleb128 0x8 + .long .LASF42 + .byte 0x18 + .byte 0x4 + .byte 0x9c + .long 0x256 + .uleb128 0x9 + .long .LASF43 + .byte 0x4 + .byte 0x9d + .long 0x256 + .byte 0 + .uleb128 0x9 + .long .LASF44 + .byte 0x4 + .byte 0x9e + .long 0x25c + .byte 0x8 + .uleb128 0x9 + .long .LASF45 + .byte 0x4 + .byte 0xa2 + .long 0x62 + .byte 0x10 + .byte 0 + .uleb128 0x6 + .byte 0x8 + .long 0x225 + .uleb128 0x6 + .byte 0x8 + .long 0xa1 + .uleb128 0xc + .long 0x95 + .long 0x272 + .uleb128 0xd + .long 0x86 + .byte 0 + .byte 0 + .uleb128 0x6 + .byte 0x8 + .long 0x21e + .uleb128 0xc + .long 0x95 + .long 0x288 + .uleb128 0xd + .long 0x86 + .byte 0x13 + .byte 0 + .uleb128 0xe + .long .LASF60 + .uleb128 0xf + .long .LASF46 + .byte 0x4 + .value 0x13b + .long 0x288 + .uleb128 0xf + .long .LASF47 + .byte 0x4 + .value 0x13c + .long 0x288 + .uleb128 0xf + .long .LASF48 + .byte 0x4 + .value 0x13d + .long 0x288 + .uleb128 0x6 + .byte 0x8 + .long 0x9c + .uleb128 0x7 + .long 0x2b1 + .uleb128 0x10 + .long .LASF49 + .byte 0x5 + .byte 0xaa + .long 0x25c + .uleb128 0x10 + .long .LASF50 + .byte 0x5 + .byte 0xab + .long 0x25c + .uleb128 0x10 + .long .LASF51 + .byte 0x5 + .byte 0xac + .long 0x25c + .uleb128 0x10 + .long .LASF52 + .byte 0x6 + .byte 0x1a + .long 0x62 + .uleb128 0xc + .long 0x2b7 + .long 0x2f3 + .uleb128 0x11 + .byte 0 + .uleb128 0x7 + .long 0x2e8 + .uleb128 0x10 + .long .LASF53 + .byte 0x6 + .byte 0x1b + .long 0x2f3 + .uleb128 0x12 + .long .LASF54 + .byte 0x1 + .byte 0x18 + .long 0x62 + .quad .LFB1 + .quad .LFE1-.LFB1 + .uleb128 0x1 + .byte 0x9c + .long 0x331 + .uleb128 0x13 + .string "a" + .byte 0x1 + .byte 0x19 + .long 0x95 + .uleb128 0x2 + .byte 0x91 + .sleb128 -17 + .byte 0 + .uleb128 0x14 + .long .LASF55 + .byte 0x1 + .byte 0xb + .long 0x62 + .quad .LFB0 + .quad .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .uleb128 0x15 + .string "a" + .byte 0x1 + .byte 0xb + .long 0x62 + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .byte 0 + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x7 + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0xf + .byte 0 + .uleb128 0xb + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0xf + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0x26 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x13 + .byte 0x1 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0xa + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0x5 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0xb + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0xc + .uleb128 0x1 + .byte 0x1 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xd + .uleb128 0x21 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2f + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0xe + .uleb128 0x13 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3c + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0xf + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0x5 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3c + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0x10 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3c + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0x11 + .uleb128 0x21 + .byte 0 + .byte 0 + .byte 0 + .uleb128 0x12 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x7 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x13 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x14 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x7 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0x15 + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x2c + .value 0x2 + .long .Ldebug_info0 + .byte 0x8 + .byte 0 + .value 0 + .value 0 + .quad .Ltext0 + .quad .Letext0-.Ltext0 + .quad 0 + .quad 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF20: + .string "_IO_buf_end" +.LASF28: + .string "_old_offset" +.LASF55: + .string "isRMS" +.LASF52: + .string "sys_nerr" +.LASF23: + .string "_IO_save_end" +.LASF5: + .string "short int" +.LASF7: + .string "size_t" +.LASF10: + .string "sizetype" +.LASF33: + .string "_offset" +.LASF17: + .string "_IO_write_ptr" +.LASF12: + .string "_flags" +.LASF19: + .string "_IO_buf_base" +.LASF24: + .string "_markers" +.LASF14: + .string "_IO_read_end" +.LASF57: + .string "/tmp/rmsbolt-LsubiK/rmsbolt.c" +.LASF51: + .string "stderr" +.LASF58: + .string "/tmp/rmsbolt-LsubiK" +.LASF32: + .string "_lock" +.LASF6: + .string "long int" +.LASF29: + .string "_cur_column" +.LASF48: + .string "_IO_2_1_stderr_" +.LASF60: + .string "_IO_FILE_plus" +.LASF45: + .string "_pos" +.LASF44: + .string "_sbuf" +.LASF41: + .string "_IO_FILE" +.LASF1: + .string "unsigned char" +.LASF4: + .string "signed char" +.LASF46: + .string "_IO_2_1_stdin_" +.LASF3: + .string "unsigned int" +.LASF42: + .string "_IO_marker" +.LASF31: + .string "_shortbuf" +.LASF16: + .string "_IO_write_base" +.LASF40: + .string "_unused2" +.LASF13: + .string "_IO_read_ptr" +.LASF2: + .string "short unsigned int" +.LASF11: + .string "char" +.LASF54: + .string "main" +.LASF43: + .string "_next" +.LASF34: + .string "__pad1" +.LASF35: + .string "__pad2" +.LASF36: + .string "__pad3" +.LASF37: + .string "__pad4" +.LASF38: + .string "__pad5" +.LASF0: + .string "long unsigned int" +.LASF18: + .string "_IO_write_end" +.LASF9: + .string "__off64_t" +.LASF8: + .string "__off_t" +.LASF25: + .string "_chain" +.LASF22: + .string "_IO_backup_base" +.LASF49: + .string "stdin" +.LASF27: + .string "_flags2" +.LASF39: + .string "_mode" +.LASF15: + .string "_IO_read_base" +.LASF30: + .string "_vtable_offset" +.LASF21: + .string "_IO_save_base" +.LASF53: + .string "sys_errlist" +.LASF26: + .string "_fileno" +.LASF56: + .string "GNU C11 6.3.0 20170516 -masm=intel -mtune=generic -march=x86-64 -g -O0" +.LASF50: + .string "stdout" +.LASF47: + .string "_IO_2_1_stdout_" +.LASF59: + .string "_IO_lock_t" + .ident "GCC: (Debian 6.3.0-18+deb9u1) 6.3.0 20170516" + .section .note.GNU-stack,"",@progbits diff --git a/test/rmsbolt-test.el b/test/rmsbolt-test.el index c3833cc8e3..409556ad07 100644 --- a/test/rmsbolt-test.el +++ b/test/rmsbolt-test.el @@ -5,8 +5,53 @@ ;;; Code: +(require 'el-mock) +(require 'rmsbolt) + (ert-deftest sanity-check-ert () "Check if ERT is working. :)" (should t)) +(defun test-asm-preprocessor (pre post) + "Tests the asm preprocessor on the current buffer." + (insert-file-contents pre) + (should + (string= + (string-trim + (mapconcat 'identity + (rmsbolt--process-asm-lines (current-buffer) + (split-string (buffer-string) "\n" t)) + "\n")) + (with-temp-buffer + (insert-file-contents post) + (string-trim + (buffer-string)))))) + +(ert-deftest filter-tests-all-c () + "Test if assembly filteration in c is working." + (with-temp-buffer + (setq-local rmsbolt-dissasemble nil) + (setq-local rmsbolt-filter-comment-only t) + (setq-local rmsbolt-filter-directives t) + (setq-local rmsbolt-filter-labels t) + (test-asm-preprocessor "test/rmsbolt-c-pre1.s" "test/rmsbolt-c-post1.s"))) +(ert-deftest filter-tests-none-c () + "Test if assembly filteration in c is working." + (with-temp-buffer + (setq-local rmsbolt-dissasemble nil) + (setq-local rmsbolt-filter-comment-only nil) + (setq-local rmsbolt-filter-directives nil) + (setq-local rmsbolt-filter-labels nil) + (test-asm-preprocessor "test/rmsbolt-c-pre1.s" "test/rmsbolt-c-post2.s"))) +(ert-deftest filter-tests-dir-c () + "Test if assembly filteration in c is working." + (with-temp-buffer + (setq-local rmsbolt-dissasemble nil) + (setq-local rmsbolt-filter-comment-only nil) + (setq-local rmsbolt-filter-directives t) + (setq-local rmsbolt-filter-labels nil) + (test-asm-preprocessor "test/rmsbolt-c-pre1.s" "test/rmsbolt-c-post3.s"))) + +;;;; Filtration tests + ;;; rmsbolt-test.el ends here