[llvm-commits] PATCH: llvm-gcc in SPARC

Venkatraman Govindaraju venkatra at cs.wisc.edu
Wed Aug 26 11:19:38 PDT 2009

On Wed, Aug 26, 2009 at 12:28 PM, Anton
Korobeynikov<anton at korobeynikov.info> wrote:
> Hello
>> Please review the patches and let me know if I missed something.
> sparc-codegen-fixes.patch is ok, please apply
>> +/* LLVM LOCAL begin set long double size to 64 -- otherwise llvm-gcc
>> won't compile */
>> +#if defined(ENABLE_LLVM) || defined( __llvm__ )
>> +#define LONG_DOUBLE_TYPE_SIZE 64
>> +#else
>>  #define LONG_DOUBLE_TYPE_SIZE 128
>> +#endif
>> +/* LLVM LOCAL end */
> This is not correct. Sparc's long double is 128-bit.

Although sparc's long double is 128 bit, neither llvm-gcc (see
llvm-types.cpp) nor sparc back-end support 128 bit floating point unit
yet. This is a interim fix that let us compile the gcc in sparc. I am
intended to fix this in a later patch.

>> +# LLVM LOCAL begin check HOST_BITS_PER_INT also
>> +print "#if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) &&
>> defined(HOST_BITS_PER_INT)"
>> +# LLVM LOCAL end
> Could you please clarify, why do you need this?

This script generates the options.h which is included in
gcc/config/sparc/gmon-sol2.h through tm.h. However when gmon-sol2.h
compiles as part of gcc, HOST_BITS_PER_INT is not defined. However
HOST_BITS_PER_INT is used in options.h to explicitly pad a struct.
If there is a better way to fix this, let me know.


> --
> With best regards, Anton Korobeynikov.
> Faculty of Mathematics & Mechanics, Saint Petersburg State University.

More information about the llvm-commits mailing list