types.hh (9498:66eb324d4de1) types.hh (9500:9c3e3d1c7a87)
1/*
2 * Copyright (c) 2003-2005 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;

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

35 */
36
37#ifndef __BASE_TYPES_HH__
38#define __BASE_TYPES_HH__
39
40#include <inttypes.h>
41
42#include <cassert>
1/*
2 * Copyright (c) 2003-2005 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;

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

35 */
36
37#ifndef __BASE_TYPES_HH__
38#define __BASE_TYPES_HH__
39
40#include <inttypes.h>
41
42#include <cassert>
43#include <ostream>
43
44/** uint64_t constant */
45#define ULL(N) ((uint64_t)N##ULL)
46/** int64_t constant */
47#define LL(N) ((int64_t)N##LL)
48
49/** Statistics counter type. Not much excuse for not using a 64-bit
50 * integer here, but if you're desperate and only run short

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

120 { assert(c >= b.c); return Cycles(c - b.c); }
121
122 const Cycles operator <<(const int32_t shift)
123 { return Cycles(c << shift); }
124
125 const Cycles operator >>(const int32_t shift)
126 { return Cycles(c >> shift); }
127
44
45/** uint64_t constant */
46#define ULL(N) ((uint64_t)N##ULL)
47/** int64_t constant */
48#define LL(N) ((int64_t)N##LL)
49
50/** Statistics counter type. Not much excuse for not using a 64-bit
51 * integer here, but if you're desperate and only run short

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

121 { assert(c >= b.c); return Cycles(c - b.c); }
122
123 const Cycles operator <<(const int32_t shift)
124 { return Cycles(c << shift); }
125
126 const Cycles operator >>(const int32_t shift)
127 { return Cycles(c >> shift); }
128
129 friend std::ostream& operator<<(std::ostream &out, const Cycles & cycles);
130
128#endif // SWIG not touching operators
129
130};
131
132/**
133 * Address type
134 * This will probably be moved somewhere else in the near future.
135 * This should be at least as big as the biggest address width in use

--- 45 unchanged lines hidden ---
131#endif // SWIG not touching operators
132
133};
134
135/**
136 * Address type
137 * This will probably be moved somewhere else in the near future.
138 * This should be at least as big as the biggest address width in use

--- 45 unchanged lines hidden ---