I'm planning on upstreaming some test cases for the inline assembly
usage in the Mozilla code base. A lot of these test cases test the
recent fixes to this code.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I'm in favor of more tests like this. Please commit with some minor touch ups.
Going forward, I wonder if we can test this on the LLVM side by adding some kind of utility that parses a .test file with some "inline assembly" in a dirt simple language that mostly consists of canned lookup results. Then we could actually test the Intel inline assembly parser changes in LLVM instead of in Clang. Right now it's completely untestable.
test/CodeGen/mozilla-ms-inline-asm.c | ||
---|---|---|
10 ↗ | (On Diff #11416) | Most of these LLVM IR value names are elided in a no-asserts (NDEBUG) build. You can approximate this effect without doing a complete release build and test cycle by piping the IR through 'opt -strip -S' before FileCheck. |
18 ↗ | (On Diff #11416) | I would wildcard most of the string literal contents. The only thing worth testing is the instructions that got rewritten and the constraints. Maybe some CHECK lines like: // CHECK: call void asm sideeffect inteldialect // CHECK: mov edx,dword ptr $1 // CHECK: mov ecx,dword ptr $2 // CHECK: mov eax,dword ptr $3 // CHECK: call dword ptr[edx+eax*$$4] // CHECK: "=*m,*m,*m,*m,~{eax},~{ebp},~{ecx},~{edx},~{flags},~{esp},~{dirflag},~{fpsr},~{flags}" // CHECK: (i8** %params.addr, i32* %paramCount.addr, i8** %that.addr, i32* %methodIndex.addr) |