required hack for Xeon 64
- From: "Anders Moe" <anders.moe@xxxxxxxxx>
- Date: Thu, 5 Oct 2006 16:38:33 +0200
Hi again.
I just wanted to share some modifications to the core-8.4-branch code I had
to make in order to avoid the following message :
---------------------------
Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss
of data. If this was intentional, you should mask the source of the cast
with the appropriate bitmask. For example:
char c = (i & 0xFF);
Changing the code in this way will not affect the quality of the resulting
optimized code.
----------------------------
This concerns MSVC 8.0 and Windows xp64 (MACHINE=0x64). The changes are, as
suggested above, to perform a 0xFF on various ints in tclCompile.h. :
#define TclStoreInt4AtPtr(i, p) \
*(p) = (unsigned char) (0xFF & ((unsigned int) (i) >> 24)); \
*(p+1) = (unsigned char) (0xFF & ((unsigned int) (i) >> 16)); \
*(p+2) = (unsigned char) (0xFF & ((unsigned int) (i) >> 8)); \
*(p+3) = (unsigned char) (0xFF & ((unsigned int) (i)))
the same goes for TclEmitInstInt4.
Perhaps this would be an issue for 8.5 as well.
Regards,
Anders.
I c
.
- Follow-Ups:
- Re: required hack for Xeon 64
- From: miguel sofer
- Re: required hack for Xeon 64
- Prev by Date: Re: tile combobox question
- Next by Date: Re: is tcl/tk dying out?!
- Previous by thread: Command line OLE (drag and drop) on Windows?
- Next by thread: Re: required hack for Xeon 64
- Index(es):
Relevant Pages
|