diff options
author | Richard Henderson <rth@twiddle.net> | 2013-07-16 06:45:57 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2013-07-18 06:44:55 -0700 |
commit | 19e0cbb82ffab7220cdbcc78ab2c1dac823ce4e3 (patch) | |
tree | b3c8ca6e9341d07c740a962ab17e92914301a448 /target-alpha/translate.c | |
parent | 6453a3a69488196f26d12654c6b148446abdf3d6 (diff) |
target-alpha: Move alarm to vm_clock
Basing the alarm off the rtc_clock was silly. It leads to horrible
spinning in the guest after being suspended and resumed, as it tries
to catch up with lost ticks.
This requires adding an accessor for reading the vm_clock too.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-alpha/translate.c')
-rw-r--r-- | target-alpha/translate.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/target-alpha/translate.c b/target-alpha/translate.c index dd7f0fbf94..5558b728dd 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -1634,15 +1634,19 @@ static ExitStatus gen_mfpr(int ra, int regno) return NO_EXIT; } - if (regno == 250) { - /* WALL_TIME */ + /* Special help for VMTIME and WALLTIME. */ + if (regno == 250 || regno == 249) { + void (*helper)(TCGv) = gen_helper_get_walltime; + if (regno == 249) { + helper = gen_helper_get_vmtime; + } if (use_icount) { gen_io_start(); - gen_helper_get_time(cpu_ir[ra]); + helper(cpu_ir[ra]); gen_io_end(); return EXIT_PC_STALE; } else { - gen_helper_get_time(cpu_ir[ra]); + helper(cpu_ir[ra]); return NO_EXIT; } } |