Modify the LLVM front-end to support EFI C and Add LLVM to EFI Byte Code(EBC) target

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

Modify the LLVM front-end to support EFI C and Add LLVM to EFI Byte Code(EBC) target

Lu Mitnick
Hello all,

I want to the do followings:

(1) Modify the LLVM front-end(clang) to support EFI C

(2) Add EFI Byte Code target to LLVM

I am wondering to know which task should I do first, modify front end or porting LLVM?

thanks

yi-hong

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

Re: Modify the LLVM front-end to support EFI C and Add LLVM to EFI Byte Code(EBC) target

Michael Spencer-2
On Thu, Dec 16, 2010 at 5:42 PM, Lu Mitnick <[hidden email]> wrote:

> Hello all,
>
> I want to the do followings:
>
> (1) Modify the LLVM front-end(clang) to support EFI C
>
> (2) Add EFI Byte Code target to LLVM
>
> I am wondering to know which task should I do first, modify front end or
> porting LLVM?
>
> thanks
>
> yi-hong

As long as EFI C isn't radically different from normal C, I would
suggest adding a EBC target to LLVM first. Otherwise you have no way
to test the clang modifications.

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

Re: Modify the LLVM front-end to support EFI C and Add LLVM to EFI Byte Code(EBC) target

David Chisnall
On 17 Dec 2010, at 03:15, Michael Spencer wrote:

> As long as EFI C isn't radically different from normal C, I would
> suggest adding a EBC target to LLVM first. Otherwise you have no way
> to test the clang modifications.


As was stated in the last post on this subject, EFI C has integer types that have a size determined at run time.  I can't see how this would be integrated into the existing IRGen infrastructure in clang without some serious modification, nor how you would represent these in LLVM IR.  Mapping from a language that has variable-sized ints, to a target that has variable-sized ints, via an intermediate representation that does not have variable-sized ints would be tricky, I suspect.

David

-- Sent from my PDP-11


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

Re: Modify the LLVM front-end to support EFI C and Add LLVM to EFI Byte Code(EBC) target

Lu Mitnick
Hello Michael  and all,

So the issue related can be reduced into the two problem:

1. There is no good representation of EBC int in LLVM IR.

2. clang IRGen may have some serious modification.

I know LLVM IR is extensible. Is it possible to add a new type in(natural int) to represent EFI int and

integrated into clang IRGen??

thanks

yi-hong

2010/12/17 David Chisnall <[hidden email]>
On 17 Dec 2010, at 03:15, Michael Spencer wrote:

> As long as EFI C isn't radically different from normal C, I would
> suggest adding a EBC target to LLVM first. Otherwise you have no way
> to test the clang modifications.


As was stated in the last post on this subject, EFI C has integer types that have a size determined at run time.  I can't see how this would be integrated into the existing IRGen infrastructure in clang without some serious modification, nor how you would represent these in LLVM IR.  Mapping from a language that has variable-sized ints, to a target that has variable-sized ints, via an intermediate representation that does not have variable-sized ints would be tricky, I suspect.

David

-- Sent from my PDP-11



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