base_dyn_inst.hh (3093:b09c33e66bce) base_dyn_inst.hh (3125:febd811bccc6)
1/*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 183 unchanged lines hidden (view full) ---

192 /** Effective physical address for a copy source. */
193 Addr copySrcPhysEffAddr;
194
195 /** The memory request flags (from translation). */
196 unsigned memReqFlags;
197
198 union Result {
199 uint64_t integer;
1/*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 183 unchanged lines hidden (view full) ---

192 /** Effective physical address for a copy source. */
193 Addr copySrcPhysEffAddr;
194
195 /** The memory request flags (from translation). */
196 unsigned memReqFlags;
197
198 union Result {
199 uint64_t integer;
200 float fp;
200// float fp;
201 double dbl;
202 };
203
204 /** The result of the instruction; assumes for now that there's only one
205 * destination register.
206 */
207 Result instResult;
208

--- 180 unchanged lines hidden (view full) ---

389
390 /** Returns the logical register index of the i'th source register. */
391 RegIndex srcRegIdx(int i) const { return staticInst->srcRegIdx(i); }
392
393 /** Returns the result of an integer instruction. */
394 uint64_t readIntResult() { return instResult.integer; }
395
396 /** Returns the result of a floating point instruction. */
201 double dbl;
202 };
203
204 /** The result of the instruction; assumes for now that there's only one
205 * destination register.
206 */
207 Result instResult;
208

--- 180 unchanged lines hidden (view full) ---

389
390 /** Returns the logical register index of the i'th source register. */
391 RegIndex srcRegIdx(int i) const { return staticInst->srcRegIdx(i); }
392
393 /** Returns the result of an integer instruction. */
394 uint64_t readIntResult() { return instResult.integer; }
395
396 /** Returns the result of a floating point instruction. */
397 float readFloatResult() { return instResult.fp; }
397 float readFloatResult() { return (float)instResult.dbl; }
398
399 /** Returns the result of a floating point (double) instruction. */
400 double readDoubleResult() { return instResult.dbl; }
401
402 /** Records an integer register being set to a value. */
403 void setIntReg(const StaticInst *si, int idx, uint64_t val)
404 {
405 instResult.integer = val;

--- 8 unchanged lines hidden (view full) ---

414 instResult.dbl = val;
415 else
416 panic("Unsupported width!");
417 }
418
419 /** Records an fp register being set to a value. */
420 void setFloatReg(const StaticInst *si, int idx, FloatReg val)
421 {
398
399 /** Returns the result of a floating point (double) instruction. */
400 double readDoubleResult() { return instResult.dbl; }
401
402 /** Records an integer register being set to a value. */
403 void setIntReg(const StaticInst *si, int idx, uint64_t val)
404 {
405 instResult.integer = val;

--- 8 unchanged lines hidden (view full) ---

414 instResult.dbl = val;
415 else
416 panic("Unsupported width!");
417 }
418
419 /** Records an fp register being set to a value. */
420 void setFloatReg(const StaticInst *si, int idx, FloatReg val)
421 {
422 instResult.fp = val;
422// instResult.fp = val;
423 instResult.dbl = (double)val;
423 }
424
425 /** Records an fp register being set to an integer value. */
426 void setFloatRegBits(const StaticInst *si, int idx, uint64_t val, int width)
427 {
428 instResult.integer = val;
429 }
430

--- 301 unchanged lines hidden ---
424 }
425
426 /** Records an fp register being set to an integer value. */
427 void setFloatRegBits(const StaticInst *si, int idx, uint64_t val, int width)
428 {
429 instResult.integer = val;
430 }
431

--- 301 unchanged lines hidden ---