Int64值存储在哪里? [英] Where are Int64 values stored in ?

查看:119
本文介绍了Int64值存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基于x68架构的计算机的寄存器为EAX,EBX,ECX,EDX,ESP,EBP,ESI,EDI和EIP.
它们每个都由32位组成,这意味着4个字节,这意味着它们可以保存高达FFFFFFFF = 4.294.967.295的值! 但是int64值需要8位.因此,具有32位寄存器的计算机如何声明和操纵64位值?

the registers of a x68 architexture based computer are EAX,EBX,ECX,EDX,ESP,EBP,ESI,EDI and EIP .
each of them consists of 32 bits that means 4 bytes that means they can hold values up to FFFFFFFF =4.294.967.295 !
but int64 values require 8 bits . so how can computers with 32-bit registers declare and manipulate 64-bit values ???

推荐答案

它们被存储为双字. 本文 [此处 [
They are stored as double words. This article[^] discusses this from a basic perspective.
For more detailed analysis, you probably need to read a few processor programming articles / whitepapers.

Here[^] is more information on the word.


某些指令将在一对寄存器上起作用,而其他指令将在一对寄存器上起作用可能以软件实现.因此,如果您的应用程序执行大量的64位算术运算,则在作为64位应用程序运行时可能会更快.

顺便说一句,通过查看反汇编代码将非常容易知道.只需使用64位数字的某种算术来编译32位和64位未管理的应用程序,您就会对编译器的工作有所了解.

您可以为此使用Visual C ++ Express 2010.
Some instructions will works on a pair of registers while other might be implemented in software. Thus if your application does a lot of 64 bits arithmetic, it might be faster when running as a 64 bit application.

By the way, it would be very easy to know by looking at the disassembly code. Simply compile an unmanged application both in 32 bit and 64 bit with some arithmetic on 64 bits numbers and you will have a good idea of what the compiler does.

You can uses Visual C++ Express 2010 for that.


请参见下文

http://en.wikipedia.org/wiki/Integer_%28computer_science%29
see below

http://en.wikipedia.org/wiki/Integer_%28computer_science%29


这篇关于Int64值存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆