I'm using a machine which I believe has a 64-bit-capable processor (Intel
e2140), but is running 32-bit Vista.
Are there any useful 64-bit operations which are easily available in 32-bit
mode, such as 64-bit arithmetic?
--
Bartc
|
|
0
|
|
|
|
Reply
|
Bartc
|
7/30/2008 9:43:13 PM |
|
On Wed, 30 Jul 2008 21:43:13 GMT
"Bartc" <spamtrap@crayne.org> wrote:
> Are there any useful 64-bit operations which are easily available in
> 32-bit mode, such as 64-bit arithmetic?
Unfortunately, no. The 64-bit operations are implemented by redefining
valid 32-bit operations, and, therefore, can only be executed when the
OS has put the CPU into 64-bit mode.
--
Chuck
http://www.pacificsites.com/~ccrayne/charles.html
|
|
0
|
|
|
|
Reply
|
Charles
|
7/31/2008 1:27:03 AM
|
|
On Jul 30, 5:43�pm, "Bartc" <spamt...@crayne.org> wrote:
> I'm using a machine which I believe has a 64-bit-capable processor (Intel
> e2140), but is running 32-bit Vista.
>
> Are there any useful 64-bit operations which are easily available in 32-bit
> mode, such as 64-bit arithmetic?
>
You can still use 64-bit code via emulation of an x86_64 CPU in your
32-bit environment:
http://bellard.org/qemu/status.html
Nathan.
|
|
0
|
|
|
|
Reply
|
NathanCBaker
|
7/31/2008 2:45:30 AM
|
|
Bartc wrote:
> I'm using a machine which I believe has a 64-bit-capable processor
> (Intel e2140), but is running 32-bit Vista.
>
> Are there any useful 64-bit operations which are easily available in
> 32-bit mode, such as 64-bit arithmetic?
>
Get a copy of VMWare and install a virtual 64-bit OS as a guest.
This actually works pretty nicely, even if the host OS is 32-bit!
I've used it many times to debug/verify 64-bit operation on code that
needed to be portable.
(Currently I'm running 32-bit XP and 64-bit Linux as guest with Vista-64
as the host OS.)
Terje
--
- <Terje.Mathisen@hda.hydro.com>
"almost all programming can be viewed as an exercise in caching"
|
|
0
|
|
|
|
Reply
|
Terje
|
7/31/2008 1:17:22 PM
|
|
Do you know if VMware emulates the 64-bit instructions (when running on a
32-bit host OS), or it actually puts the CPU into longmode?
"Terje Mathisen" <spamtrap@crayne.org> wrote in message
news:xZadna8Q18b_JgzVnZ2dnUVZ_qTinZ2d@giganews.com...
> Bartc wrote:
>> I'm using a machine which I believe has a 64-bit-capable processor (Intel
>> e2140), but is running 32-bit Vista.
>>
>> Are there any useful 64-bit operations which are easily available in
>> 32-bit mode, such as 64-bit arithmetic?
>>
> Get a copy of VMWare and install a virtual 64-bit OS as a guest.
>
> This actually works pretty nicely, even if the host OS is 32-bit!
>
> I've used it many times to debug/verify 64-bit operation on code that
> needed to be portable.
>
> (Currently I'm running 32-bit XP and 64-bit Linux as guest with Vista-64
> as the host OS.)
>
> Terje
>
> --
> - <Terje.Mathisen@hda.hydro.com>
> "almost all programming can be viewed as an exercise in caching"
>
|
|
0
|
|
|
|
Reply
|
comrade
|
8/4/2008 8:22:06 PM
|
|
On Aug 4, 3:22�pm, "comrade" <spamt...@crayne.org> wrote:
> Do you know if VMware emulates the 64-bit instructions (when running on a
> 32-bit host OS), or it actually puts the CPU into longmode?
It emulates.
|
|
0
|
|
|
|
Reply
|
robertwessel2
|
8/5/2008 12:13:49 AM
|
|
"robertwessel2@yahoo.com" <spamtrap@crayne.org> wrote:
>On Aug 4, 3:22�pm, "comrade" <spamt...@crayne.org> wrote:
>> Do you know if VMware emulates the 64-bit instructions (when running on a
>> 32-bit host OS), or it actually puts the CPU into longmode?
>
>It emulates.
Really? I'm dubious. I have a 64-bit Linux VM on my XP 32-bit machine,
and it runs at essentially native speed.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
|
|
0
|
|
|
|
Reply
|
Tim
|
8/5/2008 3:05:22 AM
|
|
robertwessel2@yahoo.com wrote:
> On Aug 4, 3:22 pm, "comrade" <spamt...@crayne.org> wrote:
>> Do you know if VMware emulates the 64-bit instructions (when running on a
>> 32-bit host OS), or it actually puts the CPU into longmode?
>
>
> It emulates.
>
Nope.
I depends on having a cpu with virtualization (VTX) support, and this
must be enabled in the BIOS.
Given this, VMware runs 64-bit operating systems natively on a 32-bit
host OS. The only thing that's really needed, and which Intel have been
working on since about 1992-93, is that a task switch must be able to
save all the (64-bit) state, not just the parts that a 32-bit OS knows
about.
This works because the task switch opcodes currently in use have a
fairly large save area, much larger than theoretically needed for a
32-bit cpu.
Intel wanted to have this area variable size, i.e. the OS would use
CPUID to read of the needed size of each task block, but Microsoft said
"No way, it has to be static size!", so the compromise was to make it a
bit larger than what Intel needed immediately.
OK?
Terje
--
- <Terje.Mathisen@hda.hydro.com>
"almost all programming can be viewed as an exercise in caching"
|
|
0
|
|
|
|
Reply
|
Terje
|
8/5/2008 7:17:10 AM
|
|
On Aug 5, 12:17 am, Terje Mathisen <spamt...@crayne.org> wrote:
> robertwess...@yahoo.com wrote:
> > On Aug 4, 3:22 pm, "comrade" <spamt...@crayne.org> wrote:
> >> Do you know if VMware emulates the 64-bit instructions (when running on a
> >> 32-bit host OS), or it actually puts the CPU into longmode?
>
> > It emulates.
>
> Nope.
>
> I depends on having a cpu with virtualization (VTX) support, and this
> must be enabled in the BIOS.
>
> Given this, VMware runs 64-bit operating systems natively on a 32-bit
> host OS. The only thing that's really needed, and which Intel have been
> working on since about 1992-93, is that a task switch must be able to
> save all the (64-bit) state, not just the parts that a 32-bit OS knows
> about.
>
> This works because the task switch opcodes currently in use have a
> fairly large save area, much larger than theoretically needed for a
> 32-bit cpu.
>
> Intel wanted to have this area variable size, i.e. the OS would use
> CPUID to read of the needed size of each task block, but Microsoft said
> "No way, it has to be static size!", so the compromise was to make it a
> bit larger than what Intel needed immediately.
>
> OK?
What does the task switching has to do with this (apart from the need
to be emulated by the host when the hardware virtualization is on)?
Alex
|
|
0
|
|
|
|
Reply
|
Alexei
|
8/5/2008 7:34:05 AM
|
|
Alexei A. Frounze wrote:
> On Aug 5, 12:17 am, Terje Mathisen <spamt...@crayne.org> wrote:
>> Intel wanted to have this area variable size, i.e. the OS would use
>> CPUID to read of the needed size of each task block, but Microsoft said
>> "No way, it has to be static size!", so the compromise was to make it a
>> bit larger than what Intel needed immediately.
>>
>> OK?
>
> What does the task switching has to do with this (apart from the need
> to be emulated by the host when the hardware virtualization is on)?
The job becomes much easier if the host OS can switch between a native
task and one or more independent 64-bit virtual tasks.
Otherwise the VMware device driver would need to hook into the host OS
task scheduler, to make certain all the 64-bit stuff got saved away each
time the host would switch away from a VMware task.
Terje
--
- <Terje.Mathisen@hda.hydro.com>
"almost all programming can be viewed as an exercise in caching"
|
|
0
|
|
|
|
Reply
|
Terje
|
8/5/2008 5:24:46 PM
|
|
On Aug 5, 10:24 am, Terje Mathisen <spamt...@crayne.org> wrote:
> Alexei A. Frounze wrote:
> > On Aug 5, 12:17 am, Terje Mathisen <spamt...@crayne.org> wrote:
> >> Intel wanted to have this area variable size, i.e. the OS would use
> >> CPUID to read of the needed size of each task block, but Microsoft said
> >> "No way, it has to be static size!", so the compromise was to make it a
> >> bit larger than what Intel needed immediately.
>
> >> OK?
>
> > What does the task switching has to do with this (apart from the need
> > to be emulated by the host when the hardware virtualization is on)?
>
> The job becomes much easier if the host OS can switch between a native
> task and one or more independent 64-bit virtual tasks.
>
> Otherwise the VMware device driver would need to hook into the host OS
> task scheduler, to make certain all the 64-bit stuff got saved away each
> time the host would switch away from a VMware task.
Well, if the long 64-bit mode is active, hardware TSS-based task
switching no longer works and therefore must be emulated (by VMWare,
Hyper-V, etc). If SVM/VMX is enabled for virtualization purposes, then
the context switching between the host and guest OSes is accomplished
by:
- executing the VMRUN/VMLAUNCH instruction (host->guest)
- executing an instruction that causes a return to the host operation
(many instructions and reasons; some conditions are programmable, some
not; the return appears to the host as if VMRUN/VMLAUNCH just
completed execution)
- external interrupt (also guest->host)
And the CPU state for the host OS and guest OS in this case is kept in
a large data structure called VMCB/VMCS. This is somewhat similar to
the TSS and apparently not very fast as well.
All of this info exists in the AMD and Intel CPU manuals.
The Hyper-V's hypervisor does the switching between the host and guest
OSes entirely (or almost entirely) transparently to the host OS. It
merely makes a bunch of virtual processors out of the physical ones
and runs the former on the latter (there's a scheduler distinct from
the Windows' own scheduler). The hypervisor probably also takes care
of the emulation of the TSS-based switching since the CPU no longer
does that and for performance reasons it would make sense to do so.
You can find this in the documents available at the Microsoft's web
site (presentations and Hypervisor TLFS). I don't know exactly how
VMWare works, though, as I never read technical docs on them.
So, if you're worrying about the separation of the host and guest CPU
and memory state in the case of a Hypervisor, you don't need to. It's
taken care of.
Alex
|
|
0
|
|
|
|
Reply
|
Alexei
|
8/6/2008 4:37:55 AM
|
|
Alexei A. Frounze wrote:
> So, if you're worrying about the separation of the host and guest CPU
> and memory state in the case of a Hypervisor, you don't need to. It's
> taken care of.
I wasn't worried, but thanks for the info!
:-)
Terje
--
- <Terje.Mathisen@hda.hydro.com>
"almost all programming can be viewed as an exercise in caching"
|
|
0
|
|
|
|
Reply
|
Terje
|
8/6/2008 3:28:27 PM
|
|
|
11 Replies
120 Views
(page loaded in 0.154 seconds)
Similiar Articles: Signed shift of 32-bit int using 16-bit instructions? - comp.lang ...Integers on 64-bit machines - comp.compilers Signed shift of 32-bit int using 16-bit instructions? - comp.lang ... Integers on 64-bit machines - comp.compilers Signed ... MEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ...Hi! I was wondering if anyone got MEX to work under 64 bit Windows 7, using Visual C++ Express Edition 9.0? I followed all instructions on http://w... 64 bit assembly m.s.bit and l.s.bit - comp.lang.asm.x86For the 64 bit instruction set, what is the most efficient way to get and clear the most significant bit and the least significant bit in an unsigned... x86 instruction size length - comp.lang.asm.x86far jump in 64-bit mode - comp.lang.asm.x86 x86 instruction size length - comp.lang.asm.x86 What I understood so far, in full 64-bit mode (not compatible long mode): the ... Matlab R2010b x64 ignores .mexw64 files ?! - comp.soft-sys.matlab ...... combination: Microsoft Visual C++ 2010 Express and Windows SDK 7.1 There was no option to check for installation of 64 bit compilers (I assume that this instruction ... Advantage of 64bit Java vs 32bit ? Performance? - comp.lang.java ...... with AMD64 and EM64T platforms running in 64-bit mode, the Java VM gets some additional registers which it can use to generate more efficient native instruction ... whats the use of "data16 nop" instruction generated by gas on x86 ...whats the use of "data16 nop" instruction generated by gas on x86 and x86_64 Follow ... basic problem is that there aren't different instruction encodings for 16-bit ... How to encode an unconditional jump in 64-bit mode? - comp.lang ...:-) Are you saying there is no 'push imm8' instruction in 64-bit mode? ;-) All values are pushed as 64-bits (or "virtual" 64-bits) since that's the stack size. 64 bit integer - comp.lang.c++.moderated64 bit assembly m.s.bit and l.s.bit - comp.lang.asm.x86 For the 64 bit instruction set, what is the most efficient way to get and clear the most significant bit and the ... How to cast using MSVC++ Intrinsics - comp.lang.asm.x86... from a few instructions to a few hundred instructions. Inline assembler has its issues too in that there are many constructs that you can't pass to inline. > In 64-bit ... assembly for 64 bit processors - comp.lang.asm.x86x86 instruction size length - comp.lang.asm.x86 assembly for 64 bit processors - comp.lang.asm.x86 Anyone interested in x86-64 assembly? - comp.lang.asm.x86 ... x86 ... Extended-Precision Division - comp.lang.asm.x86If so, the problem is trivial, since the x86 DIV opcode and register assignements are designed for exactly this sort of stuff: (I don't have the 64-bit instruction ... Cross-compiler mex files on Windows 7 64 bit - comp.soft-sys ...But cross-compiling with the deploytool seems to be working just fine after a bit of manual copying of files from the 32-bit install to the 64-bit install (Matlab won't ... Table for x86 arithmetic instructions - comp.lang.asm.x86 ...... possible addressing opportunities for 16/32/64 bit modes fit one single page. I made one myself for me, but you can also use Intel's: (IIRC I've seen it in the P4-manual ... sse2 and rolr - comp.lang.asm.x86In general I believe you'd need 2 64-bit shifts and an OR to merge them. ... sse2 and rolr - comp.lang.asm.x86 Signed shift of 32-bit int using 16-bit instructions ... x86-64 - Wikipedia, the free encyclopediaSSE2 is an alternative to the x87 instruction set's IEEE 80-bit precision with the choice of either IEEE 32-bit or 64-bit floating-point mathematics. 32 Bit Vs. 64 Bit | eHow.com32 bit and 64 bit are two popular computing architectures used today. Although 32-bit operating systems are still the norm, 64-bit operating systems are becoming ... 7/26/2012 9:29:46 PM
|