[prev in list] [next in list] [prev in thread] [next in thread]
List: netbsd-tech-toolchain
Subject: Re: PCC LP64 compiler_rt ((mode (TI))) woe
From: Anders Magnusson <ragge () ludd ! ltu ! se>
Date: 2016-04-02 9:10:01
Message-ID: 56FF8C69.3040002 () ludd ! ltu ! se
[Download RAW message or body]
Den 2016-04-02 kl. 03:26, skrev Toru Nishimura:
> Hi, list,
>
> I found PCC can not compile a piece of code. In specific,
> it's GCC attribute ((mode (TI))) large size integer designation.
>
> The offending file is
> src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_types.h
>
> #if __LP64__
> #define CRT_HAS_128BIT
> #endif
>
> #ifdef CRT_HAS_128BIT
> typedef int ti_int __attribute__ ((mode (TI)));
> typedef unsigned tu_int __attribute__ ((mode (TI)));
>
> PCC has mode (TI) logic which is braced out with #ifdef and
> that part is not enabled probably due to the lack of code
> generator support.
>
I took a quick look at the TImode for pcc some time ago, and the
#ifdef TARGET_TIMODE is the result of that. This is a trivial
implementation and therefore very inefficient (and not well tested).
Currently it just allocates space on stack for variables (handling as a
struct)
and calls the TI functions for evaluating expressions. Only tested on x86.
Doing a "correct" implementation would require much more work and since
it is a special non-standard case that is almost never used I have not spent
any time on it.
I just tested and at least it generated some code. It might be a reason to
turn it on just to be able to compile compiler_rt, but it probably would
be good
if someone checked the correctness of the generated code first.
-- Ragge
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic