condcodes.hh (4715:2c37daa0ff2e) condcodes.hh (5092:e418877ee8cb)
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;

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

49
50/**
51 * Calculate the overflow flag from an addition.
52 */
53inline
54bool
55findOverflow(int width, uint64_t dest, uint64_t src1, uint64_t src2) {
56 int shift = width - 1;
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;

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

49
50/**
51 * Calculate the overflow flag from an addition.
52 */
53inline
54bool
55findOverflow(int width, uint64_t dest, uint64_t src1, uint64_t src2) {
56 int shift = width - 1;
57 return ((src1 ^ ~src2) & (src1 ^ dest)) & (1 << shift);
57 return ((src1 ^ ~src2) & (src1 ^ dest)) & (1ULL << shift);
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) {

--- 29 unchanged lines hidden ---
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) {

--- 29 unchanged lines hidden ---