condcodes.hh (5092:e418877ee8cb) condcodes.hh (5098:65373916c468)
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;

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

58}
59
60/**
61 * Calculate the parity of a value. 1 is for odd parity and 0 is for even.
62 */
63inline
64bool
65findParity(int width, uint64_t dest) {
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;

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

58}
59
60/**
61 * Calculate the parity of a value. 1 is for odd parity and 0 is for even.
62 */
63inline
64bool
65findParity(int width, uint64_t dest) {
66 dest &= width;
66 dest &= mask(width);
67 dest ^= (dest >> 32);
68 dest ^= (dest >> 16);
69 dest ^= (dest >> 8);
70 dest ^= (dest >> 4);
71 dest ^= (dest >> 2);
72 dest ^= (dest >> 1);
73 return dest & 1;
74}

--- 20 unchanged lines hidden ---
67 dest ^= (dest >> 32);
68 dest ^= (dest >> 16);
69 dest ^= (dest >> 8);
70 dest ^= (dest >> 4);
71 dest ^= (dest >> 2);
72 dest ^= (dest >> 1);
73 return dest & 1;
74}

--- 20 unchanged lines hidden ---