diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-08-18 04:17:29 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-08-18 04:17:29 -0700 |
commit | 186ae3cc353fa3115d4ee0c9fcb18d8b2370c68c (patch) | |
tree | 3ecbf5e1e1333195e6f30764f876618fc79e829b /pk/pk.h | |
parent | 2f7d5b9ee2ea937c6734650fecd9952e070a9795 (diff) | |
download | pk-186ae3cc353fa3115d4ee0c9fcb18d8b2370c68c.zip pk-186ae3cc353fa3115d4ee0c9fcb18d8b2370c68c.tar.gz pk-186ae3cc353fa3115d4ee0c9fcb18d8b2370c68c.tar.bz2 |
Renumber PCRs; refer to them with new ASM syntax
Diffstat (limited to 'pk/pk.h')
-rw-r--r-- | pk/pk.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -72,10 +72,9 @@ extern elf_info current; void load_elf(const char* fn, elf_info* info); -static inline void advance_pc(trapframe_t* tf) +static inline int insn_len(long insn) { - int rvc = (tf->insn & 0x3) < 0x3; - tf->epc += rvc ? 2 : 4; + return (insn & 0x3) < 0x3 ? 2 : 4; } #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0])) |