游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1294|回复: 0

VC++6.0使用?合?言(sp6)

[复制链接]

414

主题

611

帖子

621

积分

高级会员

Rank: 4

积分
621
发表于 2006-6-11 12:52:00 | 显示全部楼层 |阅读模式
我有三?????,?三?????如何解?Q呢?
我?些code是??quot;3D engine programming"的第4章,??险f要?sp4,VC++6.0才可以跑,可是我?了sp6?是有???

(1)?楹?NOSSE2是不合法的Label?
\chap_04\zfx3d\zfxcpu.cpp(75) : error C2705: '_NOSSE2' : illegal jump into __try scope
\chap_04\zfx3d\zfxcpu.cpp(79) : error C2705: '_NOSSE' : illegal jump into __try scope
\chap_04\zfx3d\zfxcpu.cpp(82) : error C2705: '_EXIT1' : illegal jump into __try scope

CPUINFO GetCPUInfo() {
   CPUINFO info;
   char *pStr = info.vendor;
   int n=1;
   int *pn = &n;

   // set all values to 0 (false)
   memset(&info, 0, sizeof(CPUINFO));

   // 1: See if we can get CPUID and vendor 's name then
   // check for SSE and MMX Support (vendor independant)
   __try {
     _asm {
     mov eax, 0 // eax=0 => CPUID returns vendor name
     CPUID // perform CPUID function

     mov esi, pStr
     mov [esi], ebx // first 4 chars
     mov [esi+4], edx // next for chars
     mov [esi+8], ecx // last 4 chars

     mov eax, 1 // EAX=1 => CPUID returns feature bits
     CPUID // perform CPUID (puts feature info to EDX)

     test edx, 04000000h // test bit 26 for SSE2
     jz _NOSSE2 // if test failed jump
     mov [info.bSSE2], 1 // set to true

_NOSSE2: test edx, 02000000h // test bit 25 for SSE
     jz _NOSSE // if test failed jump
     mov [info.bSSE], 1 // set to true

_NOSSE: test edx, 00800000h // test bit 23 for MMX
     jz _EXIT1 // if test failed jump
     mov [info.bMMX], 1 // set to true
_EXIT1: // nothing to do anymore
     }
     }

(2)
extern bool g_bSSE;
chap_04\zfx3d\zfxmatrix.cpp(16) : fatal error C1083: Cannot open compiler intermediate file: 'C:\DOCUME~1\user\LOCALS~1\Temp\a02444ex': Permission denied

(3)
     __asm {
     mov esi, this ; vector u
     movups xmm0, [esi] ; first vector in xmm0
chap_04\zfx3d\zfxvector.cpp(38) : fatal error C1601: unsupported inline assembly opcode

PS:我的CPU是Intel(R) Pentim(R) 4 CPU 2.40GHz
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-24 16:51

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表