[cfe-commits] r166633 - /cfe/trunk/test/CodeGen/ms-inline-asm.c

Eric Christopher echristo at gmail.com
Wed Oct 24 15:29:17 PDT 2012


You should be able to test these on the backend side as well yes?

-eric

2012/10/24 Chad Rosier <mcrosier at apple.com>:
> 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
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list