From: Danny S. <dan...@cl...> - 2004-10-28 07:38:46
|
This is in reference to a bug reported to gcc lists: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16381 Could someone with a newish MS compiler test the MS version of the following test case and report results: #include <stdio.h> typedef int __m128 __attribute__ ((__mode__(__V4SF__))); struct Quad { Quad() { } float x __attribute__((aligned(16))); float y; float z; float w; }; struct Base1 { Quad q; int i; }; struct Derived1 : public Base1 { int i2; }; struct Base2 { __m128 m; int i; }; struct Derived2 : public Base2 { int i2; }; #define offset(C,M) (int((&((C*)(16))->M))-16) int main() { printf("__m128 size %i, align %i\n", sizeof(__m128), __alignof__(__m128)); printf("Quad size %i, align %i\n", sizeof(Quad), __alignof__(Quad)); printf("Base1 %i Derived1 %i Offset %i\n", sizeof(Base1), sizeof(Derived1), offset(Derived1, i2) ); printf("Base2 %i Derived2 %i Offset %i\n", sizeof(Base2), sizeof(Derived2), offset(Derived2, i2) ); return 0; } |
From: Aaron W. L. <aar...@aa...> - 2004-10-28 18:59:01
|
Danny Smith wrote: > This is in reference to a bug reported to gcc lists: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16381 > > Could someone with a newish MS compiler test the > MS version of the following test case and report results: > > > #include <stdio.h> > > typedef int __m128 __attribute__ ((__mode__(__V4SF__))); I attempted to try with MSVC 7.1, but it doesn't have __attribute__. I don't know how you declare vector types in MSVC. Aaron W. LaFramboise |
From: Danny S. <dan...@cl...> - 2004-10-28 20:53:49
|
Aaron W. LaFramboise wrote: > Danny Smith wrote: > >> This is in reference to a bug reported to gcc lists: >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16381 >> >> Could someone with a newish MS compiler test the >> MS version of the following test case and report results: >> >> >> #include <stdio.h> >> >> typedef int __m128 __attribute__ ((__mode__(__V4SF__))); > > I attempted to try with MSVC 7.1, but it doesn't have __attribute__. > > I don't know how you declare vector types in MSVC. > I tried using the info at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccelng /htm/msmod_18.asp ie typedef struct __declspec(align(16)) { float f[4]; } __m128; buut the MS compiler to which I have access doesn't support __declspec(align()) Does VC7 not have __m128 intrinsic type? Danny > Aaron W. LaFramboise > > > > ------------------------------------------------------- > This Newsletter Sponsored by: Macrovision > For reliable Linux application installations, use the industry's > leading setup authoring tool, InstallShield X. Learn more and evaluate > today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/ > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users |
From: Aaron W. L. <aar...@aa...> - 2004-10-28 23:01:42
|
Danny Smith wrote: > I tried using the info at > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccelng > /htm/msmod_18.asp > > ie typedef struct __declspec(align(16)) > { > float f[4]; > } __m128; > > buut the MS compiler to which I have access doesn't support > __declspec(align()) > > Does VC7 not have __m128 intrinsic type? I think its in <xmmintrin.h>. I can't look into this any more at the moment, but I'd just like to fire this off before you go to bed. Aaron W. LaFramboise |
From: Danny S. <dan...@cl...> - 2004-10-29 00:18:49
|
Aaron W. LaFramboise wrote: > Danny Smith wrote: > >> Does VC7 not have __m128 intrinsic type? > > I think its in <xmmintrin.h>. I can't look into this any more at the > moment, but I'd just like to fire this off before you go to bed. > He, he - I wish. It's 1 pm on a Friday afternoon here. Miles to go before I sleep. Am I making my usual noddy-time typos again? Anywhay, I've found a MSVC 6 with enough service packs to give me the answer. The define BIGGEST_FIELD_ALIGNMENT 64 in cygming.h is definitely wrong. We can get struct layout compat with MSVC in C, but GNUC handles non-POD classes in C++ differently than MSVC C++ Danny > Aaron W. LaFramboise > > > > ------------------------------------------------------- > This Newsletter Sponsored by: Macrovision > For reliable Linux application installations, use the industry's > leading setup authoring tool, InstallShield X. Learn more and evaluate > today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/ > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users |