How about r166638? Chad
On Oct 24, 2012, at 3:45 PM, Eric Christopher <[email protected]> wrote: > You should be able to run llvm-mc on a .s file with the appropriate > code and check the encoding. Alternately .s to object file and use > llvm-objdump to disassemble? > > -eric > > 2012/10/24 Chad Rosier <[email protected]>: >> >> On Oct 24, 2012, at 3:29 PM, Eric Christopher <[email protected]> wrote: >> >>> You should be able to test these on the backend side as well yes? >> >> I don't know exactly how to go about doing that, but yes we should be >> testing this. I'll talk to Jim, unless you know how to go about doing this. >> Keep in mind emitting a .s file isn't sufficient. I need to actually emit >> an object file and then disassemble it to make sure everything is being >> encoded correctly. >> >> Chad >> >> >>> -eric >>> >>> 2012/10/24 Chad Rosier <[email protected]>: >>>> Author: mcrosier >>>> Date: Wed Oct 24 17:22:12 2012 >>>> New Revision: 166633 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=166633&view=rev >>>> Log: >>>> [ms-inline asm] Test case for r166632. >>>> >>>> Modified: >>>> cfe/trunk/test/CodeGen/ms-inline-asm.c >>>> >>>> Modified: cfe/trunk/test/CodeGen/ms-inline-asm.c >>>> URL: >>>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.c?rev=166633&r1=166632&r2=166633&view=diff >>>> ============================================================================== >>>> --- cfe/trunk/test/CodeGen/ms-inline-asm.c (original) >>>> +++ cfe/trunk/test/CodeGen/ms-inline-asm.c Wed Oct 24 17:22:12 2012 >>>> @@ -163,3 +163,19 @@ >>>> // CHECK: call void asm sideeffect inteldialect ".byte 0x43", >>>> "~{dirflag},~{fpsr},~{flags}"() nounwind >>>> // CHECK: call void asm sideeffect inteldialect ".byte 0x4B", >>>> "~{dirflag},~{fpsr},~{flags}"() nounwind >>>> } >>>> + >>>> +struct t18_type { int a, b; }; >>>> + >>>> +int t18() { >>>> + struct t18_type foo; >>>> + foo.a = 1; >>>> + foo.b = 2; >>>> + __asm { >>>> + lea ebx, foo >>>> + mov eax, [ebx].0 >>>> + mov [ebx].4, ecx >>>> + } >>>> + return foo.b; >>>> +// CHECK: t18 >>>> +// CHECK: call void asm sideeffect inteldialect "lea ebx, foo\0A\09mov >>>> eax, [ebx].0\0A\09mov [ebx].4, ecx", >>>> "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind >>>> +} >>>> >>>> >>>> _______________________________________________ >>>> cfe-commits mailing list >>>> [email protected] >>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >> _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
