clang/Darwin/x86-64 status on the LLVM test & gcc "compat" test suites

Hi all,

Continuing with the current compiler test results, here is the status
of clang/Darwin/x86-64 on the LLVM test suite:

22 failures on top of the x86-32 failures I already reported on.

Presumed miscompilations (a number of these are likely attributable to
the same root cause):

I think I know one additional error.
The CFString struct is not the same on 64 bits runtime, and so, the Constant CFString generation does not works properly on darwin x64.
It would also affect constant NSString generation if 64bits objc codegen was working.

Fariborz, are you aware of this issue?

-Chris

They are the same, except for the 64bit-ness of types. Here it is:

struct __builtin_CFString {
        const int *isa; (will point at __CFConstantStringClassReference)
        int flags;
        const char *str;
        long length;
      };

- Fariborz

11 feb 2009 kl. 09.02 skrev Fariborz Jahanian:

They are the same, except for the 64bit-ness of types. Here it is:

struct __builtin_CFString {
       const int *isa; (will point at
__CFConstantStringClassReference)
       int flags;
       const char *str;
       long length;
     };

- Fariborz

I did some testing of constant CFString/NSString layout in 64-bit and could not find any issues.

Anders

OK, Look like auto padding from the compiler give the good struct, but the CF declaration is not the same for 32 and 64 bits:

typedef struct __CFRuntimeBase {
uintptr_t _cfisa;
uint8_t _cfinfo[4];
#if LP64
uint32_t _rc;
#endif
} CFRuntimeBase;

11 feb 2009 kl. 09.02 skrev Fariborz Jahanian:

They are the same, except for the 64bit-ness of types. Here it is:

struct __builtin_CFString {

const int *isa; (will point at

__CFConstantStringClassReference)

int flags;

const char *str;

long length;

};

  • Fariborz

I did some testing of constant CFString/NSString layout in 64-bit and
could not find any issues.

Anders

OK, Look like auto padding from the compiler give the good struct, but the CF declaration is not the same for 32 and 64 bits:

typedef struct __CFRuntimeBase {
uintptr_t _cfisa;
uint8_t _cfinfo[4];
#if LP64
uint32_t _rc;
#endif
} CFRuntimeBase;

Where do you get this declaration? I don;t see it in clang, /usr/include, (or gcc) source tree?

  • fariborz

CF sources in the Darwin sources.

http://www.opensource.apple.com/darwinsource/10.5.6/CF-476.17/CFRuntime.h

But maybe the public sources (and declarations) does not match the real shipped CoreFoundation implementation, as CFLite is a slightly different version (stripped down version) of the official CoreFoundation.

CF sources in the Darwin sources.

http://www.opensource.apple.com/darwinsource/10.5.6/CF-476.17/CFRuntime.h

But maybe the public sources (and declarations) does not match the real shipped CoreFoundation implementation, as CFLite is a slightly different

I checked the CoreFoundation version. They are identical to the open source version.

  • fariborz