[pypy-issue] [issue1058] trackgcroot.py should handle the cqto instruction

Marien Zwart tracker at bugs.pypy.org
Thu Feb 16 13:44:46 CET 2012


New submission from Marien Zwart <marien.zwart at gmail.com>:

When building pypy-1.8 (also observed with a more recent hg checkout) with
CFLAGS="-march=amdfam10" set the build fails because gcc (4.5.3) generates a
"cqto" instruction trackgcroot.py does not understand:

python /tmp/pypy-pypy-2346207d9946/pypy/translator/c/gcc/trackgcroot.py -t
module__collections_interp_deque.s > module__collections_interp_deque.gctmp
Traceback (most recent call last):
  File "/tmp/pypy-pypy-2346207d9946/pypy/translator/c/gcc/trackgcroot.py", line
2008, in <module>
    tracker.process(f, g, filename=fn)
  File "/tmp/pypy-pypy-2346207d9946/pypy/translator/c/gcc/trackgcroot.py", line
1901, in process
    tracker = parser.process_function(lines, filename)
  File "/tmp/pypy-pypy-2346207d9946/pypy/translator/c/gcc/trackgcroot.py", line
1418, in process_function
    table = tracker.computegcmaptable(self.verbose)
  File "/tmp/pypy-pypy-2346207d9946/pypy/translator/c/gcc/trackgcroot.py", line
52, in computegcmaptable
    self.parse_instructions()
  File "/tmp/pypy-pypy-2346207d9946/pypy/translator/c/gcc/trackgcroot.py", line
204, in parse_instructions
    self.find_missing_visit_method(opname)
  File "/tmp/pypy-pypy-2346207d9946/pypy/translator/c/gcc/trackgcroot.py", line
234, in find_missing_visit_method
    raise UnrecognizedOperation(opname)
__main__.UnrecognizedOperation: cqto
make: *** [module__collections_interp_deque.gcmap] Error 1

No particularly hairy code is needed to get this instruction generated: dividing
two long integers seems to suffice. The instruction does "convert quad to
octword", according to google, which does not sound like an operation applicable
to pointers. So just adding 'cqto' to IGNORE_OPS_WITH_PREFIXES seems reasonable,
and a pypy-1.8 built with that change successfully translated a more recent
checkout of pypy.

----------
messages: 3957
nosy: marienz, pypy-issue
priority: bug
status: unread
title: trackgcroot.py should handle the cqto instruction

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1058>
________________________________________


More information about the pypy-issue mailing list