FIX: Optimization Removes SS Override from Inline AssemblyLast reviewed: September 18, 1997Article ID: Q115536 |
1.00
WINDOWS
kbtool kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSIf optimizations are used, the version 8.0 C/C++ compiler may remove the use of the stack segment register (SS) override in a pointer reference in an inline assembly block.
RESOLUTIONTo get around this problem, do one of the following:
STATUSMicrosoft has confirmed this to be a problem with the C/C++ compiler version 8.0. The problem was corrected in C/C++, version 8.0c, included with Visual C++ for Windows, version 1.5.
MORE INFORMATIONThe sample code below can be used to reproduce the problem. Use the /Fc compiler option to generate a source/assembly listing of the code.
Sample Code
/* Compile options needed: /c /Ox (or any optimization) */ unsigned char tbl[256]; static void Bug(unsigned char _far *Font, unsigned char c) { unsigned char _far *font_data = Font + c*33; __asm { push ds mov al, byte ptr ss:[bx] mov bl, es:[di] } } main() { Bug((unsigned char _far *)0, 0); } |
Additional reference words: 8.00 1.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |