qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Question] Qemu Register Mapping Directly in AARCH64
@ 2014-06-09  5:59 Chaos Shu
  2014-06-09  7:51 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Chaos Shu @ 2014-06-09  5:59 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

Hi all

 

I've noticed that Qemu maintained the target arch register in memory for
capacity, but the load/store really cost a bit much, is there any way map
the register directly.

 

For example, in x86 to aarch64, x86 uses 8 registers mostly such eax ebx ecx
and so on, and aarch64 arch got 31 general registers, is there any method
try to map eax ebx directly to aarch64 hardware registers? As far as I know,
may we need reserve those hardware registers in aarch64's compilers and in
Qemu we use hardware registers to instead of memory value. 

 

Anybody got any infos about those? Thanks.

 

Thanks

Chaos


[-- Attachment #2: Type: text/html, Size: 2679 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [Question] Qemu Register Mapping Directly in AARCH64
  2014-06-09  5:59 [Qemu-devel] [Question] Qemu Register Mapping Directly in AARCH64 Chaos Shu
@ 2014-06-09  7:51 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2014-06-09  7:51 UTC (permalink / raw)
  To: Chaos Shu; +Cc: QEMU Developers

On 9 June 2014 06:59, Chaos Shu <chaos.shun@live.com> wrote:
> I’ve noticed that Qemu maintained the target arch register in memory for
> capacity, but the load/store really cost a bit much, is there any way map
> the register directly.

Our JIT's register allocator will avoid storing the guest register value
back to RAM unless it has to (eg if we might be about to fault,
call a helper which would trash the host register, etc).
Using a target-agnostic JIT like this is a pretty fundamental design
decision that isn't easy to change. In any case the regs[] array
in the CPU state struct will always be in L1 cache so access will
be fast.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-09  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-09  5:59 [Qemu-devel] [Question] Qemu Register Mapping Directly in AARCH64 Chaos Shu
2014-06-09  7:51 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).