utility.hh (7707:e5b6f1157be3) | utility.hh (7720:65d338a8dba4) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 25 unchanged lines hidden (view full) --- 34#ifndef __ARCH_MIPS_UTILITY_HH__ 35#define __ARCH_MIPS_UTILITY_HH__ 36#include "config/full_system.hh" 37#include "arch/mips/types.hh" 38#include "arch/mips/isa_traits.hh" 39#include "base/misc.hh" 40#include "base/types.hh" 41#include "config/full_system.hh" | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 25 unchanged lines hidden (view full) --- 34#ifndef __ARCH_MIPS_UTILITY_HH__ 35#define __ARCH_MIPS_UTILITY_HH__ 36#include "config/full_system.hh" 37#include "arch/mips/types.hh" 38#include "arch/mips/isa_traits.hh" 39#include "base/misc.hh" 40#include "base/types.hh" 41#include "config/full_system.hh" |
42#include "cpu/static_inst.hh" |
|
42#include "cpu/thread_context.hh" 43 44class ThreadContext; 45 46namespace MipsISA { 47 | 43#include "cpu/thread_context.hh" 44 45class ThreadContext; 46 47namespace MipsISA { 48 |
49inline PCState 50buildRetPC(const PCState &curPC, const PCState &callPC) 51{ 52 PCState ret = callPC; 53 ret.advance(); 54 ret.pc(curPC.npc()); 55 return ret; 56} 57 |
|
48uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp); 49 50//////////////////////////////////////////////////////////////////////// 51// 52// Floating Point Utility Functions 53// 54uint64_t fpConvert(ConvertType cvt_type, double fp_val); 55double roundFP(double val, int digits); --- 44 unchanged lines hidden (view full) --- 100// 101void startupCPU(ThreadContext *tc, int cpuId); 102 103void copyRegs(ThreadContext *src, ThreadContext *dest); 104void copyMiscRegs(ThreadContext *src, ThreadContext *dest); 105 106void skipFunction(ThreadContext *tc); 107 | 58uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp); 59 60//////////////////////////////////////////////////////////////////////// 61// 62// Floating Point Utility Functions 63// 64uint64_t fpConvert(ConvertType cvt_type, double fp_val); 65double roundFP(double val, int digits); --- 44 unchanged lines hidden (view full) --- 110// 111void startupCPU(ThreadContext *tc, int cpuId); 112 113void copyRegs(ThreadContext *src, ThreadContext *dest); 114void copyMiscRegs(ThreadContext *src, ThreadContext *dest); 115 116void skipFunction(ThreadContext *tc); 117 |
118inline void 119advancePC(PCState &pc, const StaticInstPtr inst) 120{ 121 pc.advance(); 122} 123 |
|
108}; 109 110 111#endif | 124}; 125 126 127#endif |