From 31ab052d856ee3902cea924983c72112960308e2 Mon Sep 17 00:00:00 2001 From: Matt Godbolt Date: Thu, 13 Oct 2016 07:30:55 -0500 Subject: [PATCH] Allow configuration of the 'Intel Syntax' per-compiler. Configure same for clang and iccpython --- lib/asm-cl.js | 0 test/cases/cl64-sum.asm.dlcb.json | 380 ++++++++++++++++++++++++++++++ 2 files changed, 380 insertions(+) create mode 100644 lib/asm-cl.js create mode 100644 test/cases/cl64-sum.asm.dlcb.json diff --git a/lib/asm-cl.js b/lib/asm-cl.js new file mode 100644 index 000000000..e69de29bb diff --git a/test/cases/cl64-sum.asm.dlcb.json b/test/cases/cl64-sum.asm.dlcb.json new file mode 100644 index 000000000..10852964d --- /dev/null +++ b/test/cases/cl64-sum.asm.dlcb.json @@ -0,0 +1,380 @@ +[ + { + "text": "input$ = 8", + "source": null + }, + { + "text": "length$ = 16", + "source": null + }, + { + "text": "testFunction, COMDAT PROC", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " mov QWORD PTR [rsp+8], rbx", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " xor r8d, r8d", + "source": null + }, + { + "text": " movsxd rbx, edx", + "source": null + }, + { + "text": " mov r9, rcx", + "source": null + }, + { + "text": " mov r11d, r8d", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " mov r10d, r8d", + "source": null + }, + { + "text": " test edx, edx", + "source": null + }, + { + "text": " jle SHORT $LN9@testFuncti", + "source": null + }, + { + "text": " cmp ebx, 8", + "source": null + }, + { + "text": " jb SHORT $LN9@testFuncti", + "source": null + }, + { + "text": " mov eax, ebx", + "source": null + }, + { + "text": " and eax, -2147483641 ; ffffffff80000007H", + "source": null + }, + { + "text": " jge SHORT $LN19@testFuncti", + "source": null + }, + { + "text": " eax", + "source": null, + "opcodes": [], + "address": 3564 + }, + { + "text": " or eax, -8", + "source": null + }, + { + "text": " inc eax", + "source": null + }, + { + "text": "$LN19@testFuncti:", + "source": null + }, + { + "text": " mov edx, ebx", + "source": null + }, + { + "text": " xorps xmm2, xmm2", + "source": null + }, + { + "text": " sub edx, eax", + "source": null + }, + { + "text": " movdqa xmm1, xmm2", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " npad 8", + "source": null + }, + { + "text": "$LL4@testFuncti:", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " movsxd rax, r10d", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " movdqu xmm0, XMMWORD PTR [r9+rax*4]", + "source": null + }, + { + "text": " lea eax, DWORD PTR [r10+4]", + "source": null + }, + { + "text": " r10d, 8", + "source": null, + "opcodes": [], + "address": 2781 + }, + { + "text": " movsxd rcx, eax", + "source": null + }, + { + "text": " paddd xmm0, xmm2", + "source": null + }, + { + "text": " movdqa xmm2, xmm0", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " movdqu xmm0, XMMWORD PTR [r9+rcx*4]", + "source": null + }, + { + "text": " paddd xmm0, xmm1", + "source": null + }, + { + "text": " movdqa xmm1, xmm0", + "source": null + }, + { + "text": " cmp r10d, edx", + "source": null + }, + { + "text": " jl SHORT $LL4@testFuncti", + "source": null + }, + { + "text": " paddd xmm1, xmm2", + "source": null + }, + { + "text": " movdqa xmm0, xmm1", + "source": null + }, + { + "text": " psrldq xmm0, 8", + "source": null + }, + { + "text": " paddd xmm1, xmm0", + "source": null + }, + { + "text": " movdqa xmm0, xmm1", + "source": null + }, + { + "text": " psrldq xmm0, 4", + "source": null + }, + { + "text": " paddd xmm1, xmm0", + "source": null + }, + { + "text": " movd r11d, xmm1", + "source": null + }, + { + "text": "$LN9@testFuncti:", + "source": null + }, + { + "text": " movsxd rcx, r10d", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " mov edx, r8d", + "source": null + }, + { + "text": " cmp rcx, rbx", + "source": null + }, + { + "text": " jge SHORT $LN20@testFuncti", + "source": null + }, + { + "text": " mov rax, rbx", + "source": null + }, + { + "text": " sub rax, rcx", + "source": null + }, + { + "text": " cmp rax, 2", + "source": null + }, + { + "text": " jl SHORT $LC14@testFuncti", + "source": null + }, + { + "text": " lea rax, QWORD PTR [rbx-1]", + "source": null + }, + { + "text": " npad 3", + "source": null + }, + { + "text": "$LL16@testFuncti:", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " r8d, DWORD PTR [r9+rcx*4]", + "source": null, + "opcodes": [], + "address": 2781 + }, + { + "text": " edx, DWORD PTR [r9+rcx*4+4]", + "source": null, + "opcodes": [], + "address": 2781 + }, + { + "text": " rcx, 2", + "source": null, + "opcodes": [], + "address": 2781 + }, + { + "text": " cmp rcx, rax", + "source": null + }, + { + "text": " jl SHORT $LL16@testFuncti", + "source": null + }, + { + "text": "$LC14@testFuncti:", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " cmp rcx, rbx", + "source": null + }, + { + "text": " jge SHORT $LN15@testFuncti", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " r11d, DWORD PTR [r9+rcx*4]", + "source": null, + "opcodes": [], + "address": 2781 + }, + { + "text": "$LN15@testFuncti:", + "source": null + }, + { + "text": "", + "source": null + }, + { + "text": " lea eax, DWORD PTR [rdx+r8]", + "source": null + }, + { + "text": " eax, r11d", + "source": null, + "opcodes": [], + "address": 2781 + }, + { + "text": "", + "source": null + }, + { + "text": " mov rbx, QWORD PTR [rsp+8]", + "source": null + }, + { + "text": " ret 0", + "source": null + }, + { + "text": "$LN20@testFuncti:", + "source": null + }, + { + "text": " mov rbx, QWORD PTR [rsp+8]", + "source": null + }, + { + "text": " mov eax, r11d", + "source": null + }, + { + "text": " ret 0", + "source": null + }, + { + "text": "testFunction ENDP", + "source": null + }, + { + "text": "", + "source": null + } +] \ No newline at end of file