Ticket #373 (closed defect: fixed)

Opened 2 months ago

Last modified 1 month ago

x86 ports: invalid numerical comparisons

Reported by: emarsden Assigned to: gb
Priority: normal Milestone:
Component: Compiler Version: trunk
Keywords: Cc:

Description

Incorrect code seems to be generated for comparisons with a bignum.

Welcome to Clozure Common Lisp Version 1.3-dev-r11281M  (LinuxX8632)!
? (defun tax (income)
    (declare (type (integer 0 1000000) income))
    (if (> income 1000000000) 1 0))
TAX
? (tax 10)
1

Change History

11/01/08 20:32:54 changed by rme

  • summary changed from IA32 port: invalid numerical comparisons to x86 ports: invalid numerical comparisons.
  • milestone deleted.

The x86-64 lisp also exhibits the error in similar circumstances:

Welcome to Clozure Common Lisp Version 1.3-dev-r11173M-trunk  (DarwinX8664)!
? (defun tax (income)
    (declare (type (integer 0 1000000) income))
    (if (> income (1+ most-positive-fixnum)) 1 0))
TAX
? (tax 10)
1

11/01/08 21:47:05 changed by gb

  • status changed from new to assigned.

In the x8632-case, aside form getting the sense of the comparison wrong it marks a register as immediate and only unmarks it on one arm of the conditional.

11/28/08 20:42:30 changed by rme

  • status changed from assigned to closed.
  • resolution set to fixed.