bugmeout / pyemu

Automatically exported from code.google.com/p/pyemu
0 stars 0 forks source link

sar divison problem #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. just see the def sar(self, instruction) func in the pycpu.py 
2. search "result = result / 2"
3. just result = 0xFFFFFFF5 

What is the expected output? What do you see instead?
if i use c language 0xFFFFFFF5 >> 1 is FFFFFFFA
but use python2.5/2.7 the result is 7FFFFFFA

What version of the product are you using? On what operating system?
python2.5 win7

Please provide any additional information below.

i think the FFFFFFFA result is my want? why python got 7FFFFFFA?

Original issue reported on code.google.com by honey...@gmail.com on 23 Nov 2012 at 2:12