Revision d5575a38 target-mips/op_helper.c

b/target-mips/op_helper.c
113 113
    env->active_tc.HI[0] = (int32_t)(HILO >> 32);
114 114
}
115 115

  
116
#if TARGET_LONG_BITS > HOST_LONG_BITS
117
void helper_madd (target_ulong t0, target_ulong t1)
118
{
119
    int64_t tmp;
120

  
121
    tmp = ((int64_t)(int32_t)t0 * (int64_t)(int32_t)t1);
122
    set_HILO((int64_t)get_HILO() + tmp);
123
}
124

  
125
void helper_maddu (target_ulong t0, target_ulong t1)
126
{
127
    uint64_t tmp;
128

  
129
    tmp = ((uint64_t)(uint32_t)t0 * (uint64_t)(uint32_t)t1);
130
    set_HILO(get_HILO() + tmp);
131
}
132

  
133
void helper_msub (target_ulong t0, target_ulong t1)
134
{
135
    int64_t tmp;
136

  
137
    tmp = ((int64_t)(int32_t)t0 * (int64_t)(int32_t)t1);
138
    set_HILO((int64_t)get_HILO() - tmp);
139
}
140

  
141
void helper_msubu (target_ulong t0, target_ulong t1)
142
{
143
    uint64_t tmp;
144

  
145
    tmp = ((uint64_t)(uint32_t)t0 * (uint64_t)(uint32_t)t1);
146
    set_HILO(get_HILO() - tmp);
147
}
148
#endif /* TARGET_LONG_BITS > HOST_LONG_BITS */
149

  
150 116
/* Multiplication variants of the vr54xx. */
151 117
target_ulong helper_muls (target_ulong t0, target_ulong t1)
152 118
{

Also available in: Unified diff