Re: mmx instruction support on bohcs
"Thore Sittly" <[email protected]> Thu, 25 Apr 2013 21:55:11 +0200 (CEST)
| Newsgroups | gmane.comp.emulators.bochs.devel |
|---|---|
| Message-ID | <trinity-00df6498-cf80-4e67-b609-a6b4a32dbe57-1366919710834@3capp-gmx-bs05> |
Maybe this should work: ;now enable SSE and the like mov eax, cr0 and ax, 0xFFFB ;clear coprocessor emulation CR0.EM or ax, 0x2 ;set coprocessor monitoring CR0.MP mov cr0, eax mov eax, cr4 or ax, 3 << 9 ;set CR4.OSFXSR and CR4.OSXMMEXCPT at the same time mov cr4, eax ret More information on http://wiki.osdev.org/SSE Gesendet: Donnerstag, 25. April 2013 um 19:30 Uhr Von: Stanislav <[email protected]> An: "'Hatte John'" <[email protected]> Cc: [email protected] Betreff: Re: [Bochs-developers] mmx instruction support on bohcs By programming correct guest software ? I'd suggest you to read exceptions information for PXOR instruction in Intel Software Developers manual. Stanislav From: Hatte John [mailto:[email protected]] Sent: Thursday, April 25, 2013 1:09 PM To: Stanislav Shwartsman Cc: [email protected] Subject: Re: [Bochs-developers] mmx instruction support on bohcs >But if your program doesn't set CR0.EM, CR4.OSFXSR and CR0.TS properly - it will raise exception. >This is how the arch works. I use the bochs from web source ,so how to set CR0.EM, CR4.OSFXSR ? tks! 2013/4/25 Stanislav Shwartsman < [email protected] > Yes, everything is right. PXOR xmm, xmm is SSE2 instruction (and not MMX) but you have SSE2 enabled. But if your program doesn't set CR0.EM, CR4.OSFXSR and CR0.TS properly - it will raise exception. This is how the arch works. I'd suggest you to read exceptions information for PXOR instruction in Intel Software Developers manual. Stanislav On Thu, Apr 25, 2013 at 12:43 PM, Hatte John < [email protected] > wrote: And I have find some useful clue for that.But I am not quite sure. at cpu/fetchdecode.cc : if (! BX_CPU_THIS_PTR sse_ok) { if (op_flags & BX_PREPARE_SSE) { if (i->execute != &BX_CPU_C::BxError) i->execute = &BX_CPU_C::BxNoSSE; return(1); } sse_ok affect bochs's execution for pxor instr . And sse_ok is assigned according to some bits of cr0 and cr4. hope for guide . 2013/4/25 Hatte John < [email protected] > here is the output at the start of log file : 00000000000i[ ] System configuration 00000000000i[ ] processors: 1 (cores=1, HT threads=1) 00000000000i[ ] A20 line support: yes 00000000000i[ ] IPS is set to 4000000 00000000000i[ ] CPU configuration 00000000000i[ ] level: 6 00000000000i[ ] SMP support: no 00000000000i[ ] APIC support: xapic 00000000000i[ ] FPU support: yes 00000000000i[ ] MMX support: yes 00000000000i[ ] 3dnow! support: no 00000000000i[ ] SEP support: yes 00000000000i[ ] SSE support: sse2 00000000000i[ ] XSAVE support: no 00000000000i[ ] AES support: no 00000000000i[ ] MOVBE support: no 00000000000i[ ] ADX support: no 00000000000i[ ] x86-64 support: no 00000000000i[ ] MWAIT support: yes My bochs halt at this : 0x40092587: pxor %xmm0,%xmm0 . Thanks! 2013/4/25 Stanislav < [email protected] > Not, enough. How about complete config? What Bochs writes you in the log file when it starts ? >BTW,do you know some irc channel dedicated to bochs ? Probably there is old IRC channel but nobody is there …. Stanislav From: Hatte John [mailto: [email protected] ] Sent: Thursday, April 25, 2013 5:40 AM To: Stanislav Cc: [email protected] Subject: Re: [Bochs-developers] mmx instruction support on bohcs thanks at first . here is my cpuid config set :cpuid: mmx =1, sep=1 ,and my coulevel is 6 BTW,do you know some irc channel dedicated to bochs ? 2013/4/25 Stanislav < [email protected] > You didn’t post your .bochsrc and configure options so nobody can guess what are doing wrong … From: Hatte John [mailto: [email protected] ] Sent: Wednesday, April 24, 2013 6:52 PM To: [email protected] Subject: [Bochs-developers] mmx instruction support on bohcs My custom bochs can not recognize this inst: pxor %xmm0,%xmm0 I think that is needed one config option set for cpuid in bochsrc file . how can I write the config option? I have write mmx=1 , but it can not exec that instrc . So I am confused . I am using 2.6 version . Thanks in advance ! ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr _______________________________________________ bochs-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bochs-developers