VS2005 patch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

VS2005 patch

Morten Ofstad
OK, fixed the problem with the intrin.h header that doesn't exist in previous versions of VS...

Index: lib/Target/X86/X86JITInfo.cpp
===================================================================
RCS file: /var/cvs/llvm/llvm/lib/Target/X86/X86JITInfo.cpp,v
retrieving revision 1.14
diff -u -r1.14 X86JITInfo.cpp
--- lib/Target/X86/X86JITInfo.cpp 22 Jul 2005 20:49:37 -0000 1.14
+++ lib/Target/X86/X86JITInfo.cpp 26 Jan 2006 15:28:54 -0000
@@ -20,6 +20,11 @@
 #include <iostream>
 using namespace llvm;
 
+#ifdef _MSC_VER
+  extern "C" void *_AddressOfReturnAddress(void);
+  #pragma intrinsic(_AddressOfReturnAddress)
+#endif
+
 void X86JITInfo::replaceMachineCodeForFunction(void *Old, void *New) {
   unsigned char *OldByte = (unsigned char *)Old;
   *OldByte++ = 0xE9;                // Emit JMP opcode.
@@ -64,9 +69,6 @@
     "popl    %ebp\n"
     "ret\n");
 #else
-  extern "C" void *_AddressOfReturnAddress(void);
-  #pragma intrinsic(_AddressOfReturnAddress)
-
   void X86CompilationCallback2(void);
 
   _declspec(naked) void X86CompilationCallback(void) {

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

AaronNGray
Hi Morten,

If you can make the VS2005 project files availiable on the net then I can
test them as I have VS2005 now, so then with Chris'es okay then they could
be distributed with LLVM.

Thanks,

Aaron

----- Original Message -----
From: "Morten Ofstad" <[hidden email]>
To: "LLVM Developers Mailing List" <[hidden email]>
Sent: Thursday, January 26, 2006 3:31 PM
Subject: [LLVMdev] VS2005 patch


> OK, fixed the problem with the intrin.h header that doesn't exist in
> previous versions of VS...
>


--------------------------------------------------------------------------------


> Index: lib/Target/X86/X86JITInfo.cpp
> ===================================================================
> RCS file: /var/cvs/llvm/llvm/lib/Target/X86/X86JITInfo.cpp,v
> retrieving revision 1.14
> diff -u -r1.14 X86JITInfo.cpp
> --- lib/Target/X86/X86JITInfo.cpp 22 Jul 2005 20:49:37 -0000 1.14
> +++ lib/Target/X86/X86JITInfo.cpp 26 Jan 2006 15:28:54 -0000
> @@ -20,6 +20,11 @@
> #include <iostream>
> using namespace llvm;
>
> +#ifdef _MSC_VER
> +  extern "C" void *_AddressOfReturnAddress(void);
> +  #pragma intrinsic(_AddressOfReturnAddress)
> +#endif
> +
> void X86JITInfo::replaceMachineCodeForFunction(void *Old, void *New) {
>   unsigned char *OldByte = (unsigned char *)Old;
>   *OldByte++ = 0xE9;                // Emit JMP opcode.
> @@ -64,9 +69,6 @@
>     "popl    %ebp\n"
>     "ret\n");
> #else
> -  extern "C" void *_AddressOfReturnAddress(void);
> -  #pragma intrinsic(_AddressOfReturnAddress)
> -
>   void X86CompilationCallback2(void);
>
>   _declspec(naked) void X86CompilationCallback(void) {
>


--------------------------------------------------------------------------------


> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>


--------------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.22/239 - Release Date: 24/01/2006

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

Jeff Cohen
The project files need frequent updating.  I cannot maintain VS2005
project files, so while they could be distributed with LLVM, they will
become broken fast.  Also, VS2003 and VS2005 project and solution files
cannot coexist in the same directories, further complicating matters.

Aaron Gray wrote:

> Hi Morten,
>
> If you can make the VS2005 project files availiable on the net then I
> can test them as I have VS2005 now, so then with Chris'es okay then
> they could be distributed with LLVM.
>
> Thanks,
>
> Aaron
>
> ----- Original Message ----- From: "Morten Ofstad" <[hidden email]>
> To: "LLVM Developers Mailing List" <[hidden email]>
> Sent: Thursday, January 26, 2006 3:31 PM
> Subject: [LLVMdev] VS2005 patch
>
>
>> OK, fixed the problem with the intrin.h header that doesn't exist in
>> previous versions of VS...
>>
>
>
> --------------------------------------------------------------------------------
>
>
>
>> Index: lib/Target/X86/X86JITInfo.cpp
>> ===================================================================
>> RCS file: /var/cvs/llvm/llvm/lib/Target/X86/X86JITInfo.cpp,v
>> retrieving revision 1.14
>> diff -u -r1.14 X86JITInfo.cpp
>> --- lib/Target/X86/X86JITInfo.cpp 22 Jul 2005 20:49:37 -0000 1.14
>> +++ lib/Target/X86/X86JITInfo.cpp 26 Jan 2006 15:28:54 -0000
>> @@ -20,6 +20,11 @@
>> #include <iostream>
>> using namespace llvm;
>>
>> +#ifdef _MSC_VER
>> +  extern "C" void *_AddressOfReturnAddress(void);
>> +  #pragma intrinsic(_AddressOfReturnAddress)
>> +#endif
>> +
>> void X86JITInfo::replaceMachineCodeForFunction(void *Old, void *New) {
>>   unsigned char *OldByte = (unsigned char *)Old;
>>   *OldByte++ = 0xE9;                // Emit JMP opcode.
>> @@ -64,9 +69,6 @@
>>     "popl    %ebp\n"
>>     "ret\n");
>> #else
>> -  extern "C" void *_AddressOfReturnAddress(void);
>> -  #pragma intrinsic(_AddressOfReturnAddress)
>> -
>>   void X86CompilationCallback2(void);
>>
>>   _declspec(naked) void X86CompilationCallback(void) {
>>
>
>
> --------------------------------------------------------------------------------
>
>
>
>> _______________________________________________
>> LLVM Developers mailing list
>> [hidden email]         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>
>
> --------------------------------------------------------------------------------
>
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 267.14.22/239 - Release Date:
> 24/01/2006
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

Chris Lattner
In reply to this post by Morten Ofstad
On Thu, 26 Jan 2006, Morten Ofstad wrote:

> OK, fixed the problem with the intrin.h header that doesn't exist in previous
> versions of VS...

applied, thanks!
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060123/031225.html

-Chris

--
http://nondot.org/sabre/
http://llvm.org/

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

Jeff Cohen
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

Morten Ofstad
In reply to this post by Jeff Cohen
Jeff Cohen wrote:
> The project files need frequent updating.  I cannot maintain VS2005
> project files, so while they could be distributed with LLVM, they will
> become broken fast.  Also, VS2003 and VS2005 project and solution files
> cannot coexist in the same directories, further complicating matters.

The VS2003 project files convert without problems -- you might want to add in a property sheet (using the new property
manager) that defines _CRT_SECURE_NO_DEPRECATE, though. Actually the VS2005 project files are XML and not that different
from the VS2003 files, so just using CVS you will pick up any changes to the VS2003 files. In conclusion there is no
need for separate VS2005 project files.

m.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

Jeff Cohen
_CRT_SECURE_NO_DEPRECATE is new for VS2005.  Nothing I can do with it in
VS2003.

Morten Ofstad wrote:

> Jeff Cohen wrote:
>
>> The project files need frequent updating.  I cannot maintain VS2005
>> project files, so while they could be distributed with LLVM, they
>> will become broken fast.  Also, VS2003 and VS2005 project and
>> solution files cannot coexist in the same directories, further
>> complicating matters.
>
>
> The VS2003 project files convert without problems -- you might want to
> add in a property sheet (using the new property manager) that defines
> _CRT_SECURE_NO_DEPRECATE, though. Actually the VS2005 project files
> are XML and not that different from the VS2003 files, so just using
> CVS you will pick up any changes to the VS2003 files. In conclusion
> there is no need for separate VS2005 project files.
>
> m.
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

Chris Lattner
On Fri, 27 Jan 2006, Jeff Cohen wrote:
> _CRT_SECURE_NO_DEPRECATE is new for VS2005.  Nothing I can do with it in
> VS2003.

It shouldn't hurt to define it though, even if VC2003  where it does
nothing.  Right?

-Chris

> Morten Ofstad wrote:
>
>> Jeff Cohen wrote:
>>
>>> The project files need frequent updating.  I cannot maintain VS2005
>>> project files, so while they could be distributed with LLVM, they will
>>> become broken fast.  Also, VS2003 and VS2005 project and solution files
>>> cannot coexist in the same directories, further complicating matters.
>>
>>
>> The VS2003 project files convert without problems -- you might want to add
>> in a property sheet (using the new property manager) that defines
>> _CRT_SECURE_NO_DEPRECATE, though. Actually the VS2005 project files are XML
>> and not that different from the VS2003 files, so just using CVS you will
>> pick up any changes to the VS2003 files. In conclusion there is no need for
>> separate VS2005 project files.
>>
>> m.
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> [hidden email]         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>>
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-Chris

--
http://nondot.org/sabre/
http://llvm.org/

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

Jeff Cohen
The new property manager doesn't exist in VS2003 either.  Don't know
where to add it.

Chris Lattner wrote:

> On Fri, 27 Jan 2006, Jeff Cohen wrote:
>
>> _CRT_SECURE_NO_DEPRECATE is new for VS2005.  Nothing I can do with it
>> in VS2003.
>
>
> It shouldn't hurt to define it though, even if VC2003  where it does
> nothing.  Right?
>
> -Chris
>
>> Morten Ofstad wrote:
>>
>>> Jeff Cohen wrote:
>>>
>>>> The project files need frequent updating.  I cannot maintain VS2005
>>>> project files, so while they could be distributed with LLVM, they
>>>> will become broken fast.  Also, VS2003 and VS2005 project and
>>>> solution files cannot coexist in the same directories, further
>>>> complicating matters.
>>>
>>>
>>>
>>> The VS2003 project files convert without problems -- you might want
>>> to add in a property sheet (using the new property manager) that
>>> defines _CRT_SECURE_NO_DEPRECATE, though. Actually the VS2005
>>> project files are XML and not that different from the VS2003 files,
>>> so just using CVS you will pick up any changes to the VS2003 files.
>>> In conclusion there is no need for separate VS2005 project files.
>>>
>>> m.
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> [hidden email]         http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>
>>>
>>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> [hidden email]         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>
> -Chris
>

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

Chris Lattner
On Fri, 27 Jan 2006, Jeff Cohen wrote:
> The new property manager doesn't exist in VS2003 either.  Don't know where to
> add it.

Isn't there a place to add -D_CRT_SECURE_NO_DEPRECATE for the
preprocessor?  Isn't this all we are talking about, or am I missing
something?

-Chris

>> On Fri, 27 Jan 2006, Jeff Cohen wrote:
>>
>>> _CRT_SECURE_NO_DEPRECATE is new for VS2005.  Nothing I can do with it in
>>> VS2003.
>>
>>
>> It shouldn't hurt to define it though, even if VC2003  where it does
>> nothing.  Right?
>>
>> -Chris
>>
>>> Morten Ofstad wrote:
>>>
>>>> Jeff Cohen wrote:
>>>>
>>>>> The project files need frequent updating.  I cannot maintain VS2005
>>>>> project files, so while they could be distributed with LLVM, they will
>>>>> become broken fast.  Also, VS2003 and VS2005 project and solution files
>>>>> cannot coexist in the same directories, further complicating matters.
>>>>
>>>>
>>>>
>>>> The VS2003 project files convert without problems -- you might want to
>>>> add in a property sheet (using the new property manager) that defines
>>>> _CRT_SECURE_NO_DEPRECATE, though. Actually the VS2005 project files are
>>>> XML and not that different from the VS2003 files, so just using CVS you
>>>> will pick up any changes to the VS2003 files. In conclusion there is no
>>>> need for separate VS2005 project files.
>>>>
>>>> m.
>>>>
>>>> _______________________________________________
>>>> LLVM Developers mailing list
>>>> [hidden email]         http://llvm.cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>>
>>>>
>>>>
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> [hidden email]         http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>
>>
>> -Chris
>>
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-Chris

--
http://nondot.org/sabre/
http://llvm.org/

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

Jeff Cohen
I don't know.  If that's all it was, why is there a special new property
manager to set it?  Morten will need to explain what to do in VS2003 to
make VS2005 happy.

Chris Lattner wrote:

> On Fri, 27 Jan 2006, Jeff Cohen wrote:
>
>> The new property manager doesn't exist in VS2003 either.  Don't know
>> where to add it.
>
>
> Isn't there a place to add -D_CRT_SECURE_NO_DEPRECATE for the
> preprocessor?  Isn't this all we are talking about, or am I missing
> something?
>
> -Chris
>
>>> On Fri, 27 Jan 2006, Jeff Cohen wrote:
>>>
>>>> _CRT_SECURE_NO_DEPRECATE is new for VS2005.  Nothing I can do with
>>>> it in VS2003.
>>>
>>>
>>>
>>> It shouldn't hurt to define it though, even if VC2003  where it does
>>> nothing.  Right?
>>>
>>> -Chris
>>>
>>>> Morten Ofstad wrote:
>>>>
>>>>> Jeff Cohen wrote:
>>>>>
>>>>>> The project files need frequent updating.  I cannot maintain
>>>>>> VS2005 project files, so while they could be distributed with
>>>>>> LLVM, they will become broken fast.  Also, VS2003 and VS2005
>>>>>> project and solution files cannot coexist in the same
>>>>>> directories, further complicating matters.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> The VS2003 project files convert without problems -- you might
>>>>> want to add in a property sheet (using the new property manager)
>>>>> that defines _CRT_SECURE_NO_DEPRECATE, though. Actually the VS2005
>>>>> project files are XML and not that different from the VS2003
>>>>> files, so just using CVS you will pick up any changes to the
>>>>> VS2003 files. In conclusion there is no need for separate VS2005
>>>>> project files.
>>>>>
>>>>> m.
>>>>>
>>>>> _______________________________________________
>>>>> LLVM Developers mailing list
>>>>> [hidden email]         http://llvm.cs.uiuc.edu
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>>>
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> LLVM Developers mailing list
>>>> [hidden email]         http://llvm.cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>>
>>>
>>> -Chris
>>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> [hidden email]         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>
> -Chris
>

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re[2]: VS2005 patch

Oleg Smolsky
Hello Jeff,

Jeff Cohen wrote on 28/01/2006 at 11:43 a.m.:
> I don't know.  If that's all it was, why is there a special new property
> manager to set it?  Morten will need to explain what to do in VS2003 to
> make VS2005 happy.
IMHO all you need to do is go to
        Project properties -> C/C++ -> Preprocessor definitions

and add _CRT_SECURE_NO_DEPRECATE

Best regards,
Oleg.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

Jeff Cohen
Done.  I have no way to verify that it has the desired effect in VS2005,
but it has no effect as far as I can tell in VS2003 (as to be expected).

Oleg Smolsky wrote:

>Hello Jeff,
>
>Jeff Cohen wrote on 28/01/2006 at 11:43 a.m.:
>  
>
>>I don't know.  If that's all it was, why is there a special new property
>>manager to set it?  Morten will need to explain what to do in VS2003 to
>>make VS2005 happy.
>>    
>>
>IMHO all you need to do is go to
>        Project properties -> C/C++ -> Preprocessor definitions
>
>and add _CRT_SECURE_NO_DEPRECATE
>
>Best regards,
>Oleg.
>
>_______________________________________________
>LLVM Developers mailing list
>[hidden email]         http://llvm.cs.uiuc.edu
>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
>  
>

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: VS2005 patch

Morten Ofstad
In reply to this post by Jeff Cohen
Jeff Cohen wrote:
> I don't know.  If that's all it was, why is there a special new property
> manager to set it?  Morten will need to explain what to do in VS2003 to
> make VS2005 happy.

Sorry I made this confusing... I was just talking about what someone who has their own project files for VS2005 would
do, the property manager is a new feature that allows you to make 'property sheets' (basically a set of compiler
options) that you can add in as defaults for the projects in your solution. That way you can keep any 'extra' settings
in one place so you're less likely to get a conflict when you update from CVS.

When that is said, it wouldn't hurt to just define _CRT_SECURE_NO_DEPRECATE in the VS2003 project files. It would make
life even easier for someone using VS2005...

m.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev