Andrew Dennison wrote:
> On 5/3/07, Rob Wehrli <[EMAIL PROTECTED]> wrote:
>> On Mon, 30 Apr 2007 03:23:23 -0400, <[EMAIL PROTECTED]> wrote:
>>
>>
>>> /*
>>> * Linear memory description for lgdt and lidt instructions.
>>> - * The compiler tries to put l_addr on a long boundary, so you
>>> - * must use &l.limit as the argument to lgdt() and friends.
>>> */
>>> struct desc_p {
>>> - u_short pad;
>>> u_short limit;
>>> u_long base;
>>> } __attribute__ ((packed));
>>>
>> I'm just wondering if this creates a dependency on GCC within Prex?
>> Compilers who do not understand the directive may make compilation under
>> different compilers/toolchains more difficult.
>
> __attribute__(()) wasn't added by the patch ;)
The patch removes a pad data which is required for non-gcc compiler. So,
this change may increase gcc dependency.
> There would be a bit more work required to use an alternate compiler,
> but this only makes sense to me if you are using a processor not
> supported by gcc.
There is strong requirement to support non-gcc compiler in embedded
development. It seems many developers prefer native compiler provided by
processor vendors even if gcc supports that processor architecture.
BTW, when I was using Microsoft C compiler to compile Prex before, the
generated code was much faster than gcc version although the code size
was 80%(!). I guess this is the reason why Linux kernel must have many
ugly hand-optimization to generate better code with gcc.
Prex supports only gcc for now. However, I want to reduce the gcc
dependency in future, especially in code for architecture independent
layer. This is post-1.0 work item.
- Kohsuke
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Prex-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/prex-devel