rename_map.hh (10537:47fe87b0cf97) rename_map.hh (10715:ced453290507)
1/*
1/*
2 * Copyright (c) 2015 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * Copyright (c) 2013 Advanced Micro Devices, 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
9 * notice, this list of conditions and the following disclaimer;

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

341 * register classes. The minimum is used so we guarantee that
342 * this number of entries is available regardless of which class
343 * of registers is requested.
344 */
345 unsigned numFreeEntries() const
346 {
347 return std::min(intMap.numFreeEntries(), floatMap.numFreeEntries());
348 }
14 * Copyright (c) 2004-2005 The Regents of The University of Michigan
15 * Copyright (c) 2013 Advanced Micro Devices, Inc.
16 * All rights reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions are
20 * met: redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer;

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

353 * register classes. The minimum is used so we guarantee that
354 * this number of entries is available regardless of which class
355 * of registers is requested.
356 */
357 unsigned numFreeEntries() const
358 {
359 return std::min(intMap.numFreeEntries(), floatMap.numFreeEntries());
360 }
361
362 /**
363 * Return whether there are enough registers to serve the request.
364 */
365 bool canRename(uint32_t intRegs, uint32_t floatRegs, uint32_t ccRegs) const
366 {
367 return intRegs <= intMap.numFreeEntries() &&
368 floatRegs <= floatMap.numFreeEntries() &&
369 ccRegs <= ccMap.numFreeEntries();
370 }
371
349};
350
351#endif //__CPU_O3_RENAME_MAP_HH__
372};
373
374#endif //__CPU_O3_RENAME_MAP_HH__