summaryrefslogtreecommitdiff
path: root/bits.h
blob: 8374527067e4c697786742199f186c2b6b33452b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * Copyright (C) 2010 Tobias Klauser <tklauser@distanz.ch>
 *
 * This file is part of nios2sim-ng.
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License. See the file "COPYING" in the main directory of this archive
 * for more details.
 */

#ifndef _BITS_H_
#define _BITS_H_

#define BIT_MASK(n)	(((n) == 64) ? ~0ULL : ((1ULL << (n))-1))

#endif /* _BITS_H_ */