Displaying 20 results from an estimated 25 matches for "akhmechet".
2005 Mar 08
2
[LLVMdev] GCC assembler rejects native code generated by LLVM
Ok, I just tried the patch with some modifications (added msvc target
and used WIN32 instead of __MINGW32__ for preprocessor) and everything
worked beautifully. Thanks for the help!
On Mon, 7 Mar 2005 20:45:40 -0500, Vyacheslav Akhmechet
<coffeemug at gmail.com> wrote:
> Reid,
>
> This patch won't work for me. I compile llvm toolset with MSVC Express
> (hence __MINGW32__ won't be defined for me at compile time). I only
> try to feed the generated assembly into gcc (pretty much gnu
> assembler, I sup...
2005 Mar 08
3
[LLVMdev] GCC assembler rejects native code generated by LLVM
...smPrinter.cpp in llvm/lib/Target/X86. The patch just includes MINGW
targets in the same set of choices that it makes for Cygwin. Could you
please try the patch and let me know if it solves your problem? If it
does, I'll commit the patch.
Thanks,
Reid.
On Mon, 2005-03-07 at 16:39, Vyacheslav Akhmechet wrote:
> Ok, I got home so I have more details. Here's the sample C program:
> ----------------- C program ---------------
> #include <stdio.h>
> int main() {
> printf("hello world\n");
> return 0;
> }
> ------------- end C program ----...
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
...st includes MINGW
> targets in the same set of choices that it makes for Cygwin. Could you
> please try the patch and let me know if it solves your problem? If it
> does, I'll commit the patch.
>
> Thanks,
>
> Reid.
>
>
> On Mon, 2005-03-07 at 16:39, Vyacheslav Akhmechet wrote:
> > Ok, I got home so I have more details. Here's the sample C program:
> > ----------------- C program ---------------
> > #include <stdio.h>
> > int main() {
> > printf("hello world\n");
> > return 0;
> > }
&g...
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
On Mon, 7 Mar 2005, Vyacheslav Akhmechet wrote:
> Ok, I just tried the patch with some modifications (added msvc target
> and used WIN32 instead of __MINGW32__ for preprocessor) and everything
> worked beautifully. Thanks for the help!
Did you actually try the previous patch? If you compiled llvm-gcc with
mingw, it should work...
2005 Mar 07
7
[LLVMdev] GCC assembler rejects native code generated by LLVM
I successfully compiled CVS HEAD yesterday on my win32 machine using
Visual C++ Express (2005). I also have Mingw tools installed. I wrote
a simple hello world application and generated native assembly code
using llvm. When I tried to feed the code into GCC, it rejected it
with "junk at the end of line" error messages. Shouldn't GCC be able
to assemble this code? I realize win32 port
2005 Mar 07
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
On Mon, 7 Mar 2005, Vyacheslav Akhmechet wrote:
> I successfully compiled CVS HEAD yesterday on my win32 machine using
> Visual C++ Express (2005). I also have Mingw tools installed. I wrote
> a simple hello world application and generated native assembly code
> using llvm. When I tried to feed the code into GCC, it rejected i...
2005 Apr 21
0
[LLVMdev] Using LLVM for a dynamically typed language
On Thu, 2005-21-04 at 11:34 -0400, Vyacheslav Akhmechet wrote:
> I disagree. If I could push a bunch of arguments on a stack (or
> specify a list of arguments, etc.) and just use a "call" instruction
> with a pointer to a memory address I wouldn't run into this problem.
> This is a specific challenge with LLVM because it is str...
2005 Apr 21
5
[LLVMdev] Using LLVM for a dynamically typed language
...you consider my code example, I don't know the type
of 'i' until runtime (in fact, I can't even know a possible range of
types 'i' may assume).
Thanks,
- Slava.
On 4/21/05, Evan Jones <ejones at uwaterloo.ca> wrote:
> On Thu, 2005-21-04 at 09:31 -0400, Vyacheslav Akhmechet wrote:
> > At this point I cannot know the type of 'i' at compile time. At
> > runtime 'i' is a structure that contains a type and a function
> > pointer. What I can't figure out is how to cast my llvm function
> > pointer to an appropriate function type....
2005 Apr 21
2
[LLVMdev] Using LLVM for a dynamically typed language
> a) Make all functions the same type. For example, make them all return
> void, take a vector of parameters as the first argument, and a vector
> for return values as the second argument.
This is something I was considering. I guess I'll end up going with this option.
> I don't see how this is a specific challenge with LLVM. It seems to me
> that this is a challenge that
2005 Apr 21
0
[LLVMdev] Using LLVM for a dynamically typed language
On Thu, 2005-21-04 at 09:31 -0400, Vyacheslav Akhmechet wrote:
> At this point I cannot know the type of 'i' at compile time. At
> runtime 'i' is a structure that contains a type and a function
> pointer. What I can't figure out is how to cast my llvm function
> pointer to an appropriate function type. I cannot know unti...
2005 Apr 21
2
[LLVMdev] Using LLVM for a dynamically typed language
I recently ran into the following problem.
I'm prototyping a compiler for a dynamically typed language in which
functions are first class objects. Assuming I have something like
this:
if(rand() > 5)
i = define(x, y, z) { return x + y + z; }
else
i = define(x, y) { return x + y; }
At this point I cannot know the type of 'i' at compile time. At
runtime 'i' is a
2005 Mar 08
3
[LLVMdev] GCC assembler rejects native code generated by LLVM
...same problem that I had with Cygwin .. nearly identical.
The issue was documented in PR492 if you want some background. I'm
currently trying to dig up what I did to fix this in December for Cygwin
and see if I can apply the same change for mingw.
Reid.
On Mon, 2005-03-07 at 16:39, Vyacheslav Akhmechet wrote:
> Ok, I got home so I have more details. Here's the sample C program:
> ----------------- C program ---------------
> #include <stdio.h>
> int main() {
> printf("hello world\n");
> return 0;
> }
> ------------- end C program ----...
2005 Mar 08
1
[LLVMdev] GCC assembler rejects native code generated by LLVM
Yes, but it won't work in the future because the VC++ build will use
Intel syntax, not AT&T.
If you have mingw installed, why not use it to build LLVM? It's a lot
more functional. Mixing and matching Microsoft and GNU tool chains is
not good for your sanity.
Vyacheslav Akhmechet wrote:
>Reid,
>
>This patch won't work for me. I compile llvm toolset with MSVC Express
>(hence __MINGW32__ won't be defined for me at compile time). I only
>try to feed the generated assembly into gcc (pretty much gnu
>assembler, I suppose). I don't use mingw tools a...
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
Ok, I got home so I have more details. Here's the sample C program:
----------------- C program ---------------
#include <stdio.h>
int main() {
printf("hello world\n");
return 0;
}
------------- end C program -------------
This is compiled using llvm online demo into the following llvm code
(target removed):
----------------- LLVM code --------------
deplibs
2005 Mar 07
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
...to build LLVM. Anyway,
assembly code generation is not yet supported using the Microsoft tool
chain (as documented in the Getting Started with VS page), and when it
is it will be with NASMW and not GCC. Not that any of this explains the
"junk at the end of line" you got.
Vyacheslav Akhmechet wrote:
>I successfully compiled CVS HEAD yesterday on my win32 machine using
>Visual C++ Express (2005). I also have Mingw tools installed. I wrote
>a simple hello world application and generated native assembly code
>using llvm. When I tried to feed the code into GCC, it rejected it
&...
2005 Mar 08
1
[LLVMdev] GCC assembler rejects native code generated by LLVM
> Did you actually try the previous patch? If you compiled llvm-gcc with
> mingw, it should work, regardless of the compiler you use to compile
> the LLVM X86 backend with.
I didn't build llvm-gcc. I just used the front end provided by the
online demo on LLVM's webpage.
2005 Mar 10
0
[LLVMdev] VC++ 2003
Vyacheslav Akhmechet wrote:
>Then add llvm/win32\tools folder to a list of executable
>search paths in VC options->directories.
>
Actually, this is not required and the projects are set up to work
without that directory being in the search path. That list of
directories is global to the whole machine,...
2005 Apr 21
0
[LLVMdev] Using LLVM for a dynamically typed language
On Thursday 21 April 2005 18:28, Vyacheslav Akhmechet wrote:
> Evan,
>
> The problem is that I do not know the type of a target function at
> compile time. If you consider my code example, I don't know the type
> of 'i' until runtime (in fact, I can't even know a possible range of
> types 'i' may assume).
But...
2005 Mar 07
1
[LLVMdev] GCC assembler rejects native code generated by LLVM
> I'm confused. My understanding is that Visual C++ Express does not
> include Visual Studio, which is required to build LLVM.
Well, Visual C++ Express is a cut down version of Visual Studio. I'm
not sure about exact differences between editions but Visual C++
Express does read the .sln files and comes with an excellent C++
compiler. I didn't encounter any problems building llvm
2005 Apr 14
1
[LLVMdev] Variables and/or identifiers?
I am having trouble understanding the relationship between LLVM
identifiers, stack (alloca) and variables. In particular, when I need
to create a variable, what should I use? For instance, consider the
following C-like language snippet:
int f()
{
int i = rand();
if(i > 5)
i = 1;
return i;
}
Ignoring optimizations, what should I use to represent 'i'? Online
demo gives the following