diff options
author | Zong Li <zongbox@gmail.com> | 2018-04-27 17:57:39 +0800 |
---|---|---|
committer | Andrew Waterman <aswaterman@gmail.com> | 2018-04-27 02:57:39 -0700 |
commit | 9d0911092df8e9bd483edf495a9a780e5f0e660f (patch) | |
tree | e98e7321ca81944856d7111467dcae85964644ad /machine/emulation.c | |
parent | f2aaee46b9c4ff7573bab35351cbaab6178b6395 (diff) | |
download | pk-9d0911092df8e9bd483edf495a9a780e5f0e660f.zip pk-9d0911092df8e9bd483edf495a9a780e5f0e660f.tar.gz pk-9d0911092df8e9bd483edf495a9a780e5f0e660f.tar.bz2 |
Fix typo of perf counter (#100)
Diffstat (limited to 'machine/emulation.c')
-rw-r--r-- | machine/emulation.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/machine/emulation.c b/machine/emulation.c index 6a2b31a..db0f3a7 100644 --- a/machine/emulation.c +++ b/machine/emulation.c @@ -202,12 +202,12 @@ static inline int emulate_read_csr(int num, uintptr_t mstatus, uintptr_t* result *result = read_csr(minstreth); return 0; case CSR_MHPMCOUNTER3H: - if (!((counteren >> (3 + CSR_HPMCOUNTER3 - CSR_MHPMCOUNTER3)) & 1)) + if (!((counteren >> (3 + CSR_MHPMCOUNTER3 - CSR_MHPMCOUNTER3)) & 1)) return -1; *result = read_csr(mhpmcounter3h); return 0; case CSR_MHPMCOUNTER4H: - if (!((counteren >> (3 + CSR_HPMCOUNTER4 - CSR_MHPMCOUNTER3)) & 1)) + if (!((counteren >> (3 + CSR_MHPMCOUNTER4 - CSR_MHPMCOUNTER3)) & 1)) return -1; *result = read_csr(mhpmcounter4h); return 0; |