[PATCH] clang/MIPS additional command-line options

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] clang/MIPS additional command-line options

Oleksandr Tymoshenko
I was trying to test clang on FReeBSD/mips and came to conclusion that some additional
keys required to set proper target for compilation. This patch adds several knobs to clang/MIPS:
    - floating point ABI (-msoft-float/-mhard-float)
    - target CPU (-march=)
    - target ABI (-mabi=)

Also byte order is set explicitly for toolchain assembler in based on target architecture
(mips/mipsel) so we don't rely on assembler default.



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] clang/MIPS additional command-line options

Oleksandr Tymoshenko

On 2010-02-16, at 7:34 PM, Oleksandr Tymoshenko wrote:

> I was trying to test clang on FReeBSD/mips and came to conclusion that some additional
> keys required to set proper target for compilation. This patch adds several knobs to clang/MIPS:
>    - floating point ABI (-msoft-float/-mhard-float)
>    - target CPU (-march=)
>    - target ABI (-mabi=)
>
> Also byte order is set explicitly for toolchain assembler in based on target architecture
> (mips/mipsel) so we don't rely on assembler default.


Shame on me. Forgot to attach the patch

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

clang-mips.diff (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] clang/MIPS additional command-line options

Eric Christopher-2

On Feb 16, 2010, at 7:44 PM, Oleksandr Tymoshenko wrote:

>
> On 2010-02-16, at 7:34 PM, Oleksandr Tymoshenko wrote:
>
>> I was trying to test clang on FReeBSD/mips and came to conclusion that some additional
>> keys required to set proper target for compilation. This patch adds several knobs to clang/MIPS:
>>   - floating point ABI (-msoft-float/-mhard-float)
>>   - target CPU (-march=)
>>   - target ABI (-mabi=)
>>
>> Also byte order is set explicitly for toolchain assembler in based on target architecture
>> (mips/mipsel) so we don't rely on assembler default.
>
>
> Shame on me. Forgot to attach the patch
> <clang-mips.diff>_________________

The semantics mostly look ok to me. I'm curious about choosing soft-float as a default?

-eric
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] clang/MIPS additional command-line options

Holger Schurig
> The semantics mostly look ok to me. I'm curious about choosing
> soft-float as a default?

I'm not familiar with MIPS, but if their processors are similar
to ARM cores ones, then most don't have a floating point unit.
And therefore they use soft-floating point.

(For ARM, there's a another option with the Linux-kernel FPU
emulator, but soft-float is faster compared to generating FPU
opcodes, trapping them and handling them in the kernel).

--
http://www.holgerschurig.de
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] clang/MIPS additional command-line options

Oleksandr Tymoshenko
In reply to this post by Eric Christopher-2

On 2010-02-16, at 8:09 PM, Eric Christopher wrote:

>
> On Feb 16, 2010, at 7:44 PM, Oleksandr Tymoshenko wrote:
>
>>
>> On 2010-02-16, at 7:34 PM, Oleksandr Tymoshenko wrote:
>>
>>> I was trying to test clang on FReeBSD/mips and came to conclusion that some additional
>>> keys required to set proper target for compilation. This patch adds several knobs to clang/MIPS:
>>>  - floating point ABI (-msoft-float/-mhard-float)
>>>  - target CPU (-march=)
>>>  - target ABI (-mabi=)
>>>
>>> Also byte order is set explicitly for toolchain assembler in based on target architecture
>>> (mips/mipsel) so we don't rely on assembler default.
>>
>>
>> Shame on me. Forgot to attach the patch
>> <clang-mips.diff>_________________
>
> The semantics mostly look ok to me. I'm curious about choosing soft-float as a default?

    Most MIPS32 target I've been working with were FPU-less. My exposure to this type of
hardware is not that wide, after all, so default value for floating point ABI is open for discussion.

--
gonzo




_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] clang/MIPS additional command-line options

Eric Christopher-2

On Feb 17, 2010, at 12:25 AM, Oleksandr Tymoshenko wrote:

>
> On 2010-02-16, at 8:09 PM, Eric Christopher wrote:
>
>>
>> On Feb 16, 2010, at 7:44 PM, Oleksandr Tymoshenko wrote:
>>
>>>
>>> On 2010-02-16, at 7:34 PM, Oleksandr Tymoshenko wrote:
>>>
>>>> I was trying to test clang on FReeBSD/mips and came to conclusion that some additional
>>>> keys required to set proper target for compilation. This patch adds several knobs to clang/MIPS:
>>>> - floating point ABI (-msoft-float/-mhard-float)
>>>> - target CPU (-march=)
>>>> - target ABI (-mabi=)
>>>>
>>>> Also byte order is set explicitly for toolchain assembler in based on target architecture
>>>> (mips/mipsel) so we don't rely on assembler default.
>>>
>>>
>>> Shame on me. Forgot to attach the patch
>>> <clang-mips.diff>_________________
>>
>> The semantics mostly look ok to me. I'm curious about choosing soft-float as a default?
>
>    Most MIPS32 target I've been working with were FPU-less. My exposure to this type of
> hardware is not that wide, after all, so default value for floating point ABI is open for discussion.

Hunh. Whereas almost all of the ones I've dealt with have FPUs.  I don't care enough to hold it up on that basis though :)

I'll test the patch and commit if everything looks good.

Thanks!

-eric
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] clang/MIPS additional command-line options

Eric Christopher-2
In reply to this post by Oleksandr Tymoshenko

On Feb 16, 2010, at 7:44 PM, Oleksandr Tymoshenko wrote:

>
> On 2010-02-16, at 7:34 PM, Oleksandr Tymoshenko wrote:
>
>> I was trying to test clang on FReeBSD/mips and came to conclusion that some additional
>> keys required to set proper target for compilation. This patch adds several knobs to clang/MIPS:
>>   - floating point ABI (-msoft-float/-mhard-float)
>>   - target CPU (-march=)
>>   - target ABI (-mabi=)
>>
>> Also byte order is set explicitly for toolchain assembler in based on target architecture
>> (mips/mipsel) so we don't rely on assembler default.
>
>
> Shame on me. Forgot to attach the patch
> <clang-mips.diff>

This has been committed as:

[yendi:llvm/tools/clang] echristo% svn ci
Sending        lib/Basic/Targets.cpp
Sending        lib/Driver/Tools.cpp
Sending        lib/Driver/Tools.h
Transmitting file data ...
Committed revision 97544.


Thanks for the patch!

-eric
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev