* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+
#define DATA_BITS (1 << (3 + SHIFT))
#define SHIFT_MASK (DATA_BITS - 1)
#define SIGN_MASK (((target_ulong)1) << (DATA_BITS - 1))
{
int cf, pf, af, zf, sf, of;
target_long src1, src2;
+
src1 = CC_SRC;
src2 = CC_DST - CC_SRC;
cf = (DATA_TYPE)CC_DST < (DATA_TYPE)src1;
{
int cf;
target_long src1;
+
src1 = CC_SRC;
cf = (DATA_TYPE)CC_DST < (DATA_TYPE)src1;
return cf;
{
int cf, pf, af, zf, sf, of;
target_long src1, src2;
+
src1 = CC_SRC;
src2 = CC_DST - CC_SRC - 1;
cf = (DATA_TYPE)CC_DST <= (DATA_TYPE)src1;
{
int cf;
target_long src1;
+
src1 = CC_SRC;
cf = (DATA_TYPE)CC_DST <= (DATA_TYPE)src1;
return cf;
{
int cf, pf, af, zf, sf, of;
target_long src1, src2;
+
src1 = CC_DST + CC_SRC;
src2 = CC_SRC;
cf = (DATA_TYPE)src1 < (DATA_TYPE)src2;
{
int cf;
target_long src1, src2;
+
src1 = CC_DST + CC_SRC;
src2 = CC_SRC;
cf = (DATA_TYPE)src1 < (DATA_TYPE)src2;
{
int cf, pf, af, zf, sf, of;
target_long src1, src2;
+
src1 = CC_DST + CC_SRC + 1;
src2 = CC_SRC;
cf = (DATA_TYPE)src1 <= (DATA_TYPE)src2;
{
int cf;
target_long src1, src2;
+
src1 = CC_DST + CC_SRC + 1;
src2 = CC_SRC;
cf = (DATA_TYPE)src1 <= (DATA_TYPE)src2;
static int glue(compute_all_logic, SUFFIX)(void)
{
int cf, pf, af, zf, sf, of;
+
cf = 0;
pf = parity_table[(uint8_t)CC_DST];
af = 0;
{
int cf, pf, af, zf, sf, of;
target_long src1, src2;
+
src1 = CC_DST - 1;
src2 = 1;
cf = CC_SRC;
{
int cf, pf, af, zf, sf, of;
target_long src1, src2;
+
src1 = CC_DST + 1;
src2 = 1;
cf = CC_SRC;
static int glue(compute_all_shl, SUFFIX)(void)
{
int cf, pf, af, zf, sf, of;
+
cf = (CC_SRC >> (DATA_BITS - 1)) & CC_C;
pf = parity_table[(uint8_t)CC_DST];
af = 0; /* undefined */
static int glue(compute_all_sar, SUFFIX)(void)
{
int cf, pf, af, zf, sf, of;
+
cf = CC_SRC & 1;
pf = parity_table[(uint8_t)CC_DST];
af = 0; /* undefined */
static int glue(compute_c_mul, SUFFIX)(void)
{
int cf;
+
cf = (CC_SRC != 0);
return cf;
}
static int glue(compute_all_mul, SUFFIX)(void)
{
int cf, pf, af, zf, sf, of;
+
cf = (CC_SRC != 0);
pf = parity_table[(uint8_t)CC_DST];
af = 0; /* undefined */
t0 &= DATA_MASK;
src = t0;
res = (t0 << count) | ((target_ulong)(eflags & CC_C) << (count - 1));
- if (count > 1)
+ if (count > 1) {
res |= t0 >> (DATA_BITS + 1 - count);
+ }
t0 = res;
env->cc_tmp = (eflags & ~(CC_C | CC_O)) |
(lshift(src ^ t0, 11 - (DATA_BITS - 1)) & CC_O) |
eflags = helper_cc_compute_all(CC_OP);
t0 &= DATA_MASK;
src = t0;
- res = (t0 >> count) | ((target_ulong)(eflags & CC_C) << (DATA_BITS - count));
- if (count > 1)
+ res = (t0 >> count) |
+ ((target_ulong)(eflags & CC_C) << (DATA_BITS - count));
+ if (count > 1) {
res |= t0 << (DATA_BITS + 1 - count);
+ }
t0 = res;
env->cc_tmp = (eflags & ~(CC_C | CC_O)) |
(lshift(src ^ t0, 11 - (DATA_BITS - 1)) & CC_O) |