src/emu/cpu/rsp/rspdrc.c
| r9895 | r9896 | |
| 3272 | 3272 | int sel = EL & 7; |
| 3273 | 3273 | INT32 shifter = 0; |
| 3274 | 3274 | |
| 3275 | | INT32 rec = (INT16)(VREG_S(VS2REG, sel)); |
| 3276 | | INT32 datainput = (rec < 0) ? (-rec) : rec; |
| 3275 | INT32 rec = ((UINT16)(VREG_S(VS2REG, sel)) | ((UINT32)(rsp->reciprocal_high) & 0xffff0000)); |
| 3276 | |
| 3277 | INT32 datainput = rec; |
| 3278 | |
| 3279 | if (rec < 0) |
| 3280 | { |
| 3281 | if (rsp->dp_allowed) |
| 3282 | { |
| 3283 | if (rec < -32768)//VDIV.C,208 |
| 3284 | { |
| 3285 | datainput = ~datainput; |
| 3286 | } |
| 3287 | else |
| 3288 | { |
| 3289 | datainput = -datainput; |
| 3290 | } |
| 3291 | } |
| 3292 | else |
| 3293 | { |
| 3294 | datainput = -datainput; |
| 3295 | } |
| 3296 | } |
| 3297 | |
| 3277 | 3298 | if (datainput) |
| 3278 | 3299 | { |
| 3279 | 3300 | for (i = 0; i < 32; i++) |
| 3280 | 3301 | { |
| 3281 | | if (datainput & (1 << ((~i) & 0x1f)))//ò.æ.÷òî 31 - i |
| 3302 | if (datainput & (1 << ((~i) & 0x1f))) |
| 3282 | 3303 | { |
| 3283 | 3304 | shifter = i; |
| 3284 | 3305 | break; |
| r9895 | r9896 | |
| 3287 | 3308 | } |
| 3288 | 3309 | else |
| 3289 | 3310 | { |
| 3290 | | shifter = 0x10; |
| 3311 | if (rsp->dp_allowed) |
| 3312 | { |
| 3313 | shifter = 0; |
| 3314 | } |
| 3315 | else |
| 3316 | { |
| 3317 | shifter = 0x10; |
| 3318 | } |
| 3291 | 3319 | } |
| 3292 | 3320 | |
| 3293 | 3321 | INT32 address = ((datainput << shifter) & 0x7fc00000) >> 22; |