Bug 598486 - nanojit: clarify semantics of comparisons. r=edwsmith.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 26 Sep 2010 22:36:16 -0700
changeset 54743 2073b3512f5fa1dce8b17fc7c743794a908055a3
parent 54742 53354d177d97ce322d1b3bcc53adea6bb421c85c
child 54744 54700fad8cf920142b50cd1a320d819dc01f9cd9
push id16011
push userrsayre@mozilla.com
push dateWed, 29 Sep 2010 06:01:57 +0000
treeherdermozilla-central@d7e659b4f80c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwsmith
bugs598486
milestone2.0b7pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 598486 - nanojit: clarify semantics of comparisons. r=edwsmith.
js/src/nanojit/LIRopcode.tbl
--- a/js/src/nanojit/LIRopcode.tbl
+++ b/js/src/nanojit/LIRopcode.tbl
@@ -204,17 +204,19 @@ OP_64(immq,     50, QorD, Q,    1)  // q
 OP___(immd,     51, QorD, D,    1)  // double immediate
 
 OP_UN(52)
 
 //---------------------------------------------------------------------------
 // Comparisons
 //---------------------------------------------------------------------------
 
-// Within each size group, order must be preserved so that, except for eq*, (op
+// All comparisons return an int:  0 on failure and 1 on success.
+//
+// Within each type group, order must be preserved so that, except for eq*, (op
 // ^ 1) gives the opposite one (eg. lt ^ 1 == gt).  eq* must have odd numbers
 // for this to work.  They must also remain contiguous so that opcode range
 // checking works correctly.  Static assertions in LIR.h check these
 // requirements.
 OP___(eqi,      53, Op2,  I,    1)  //          int equality
 OP___(lti,      54, Op2,  I,    1)  //   signed int less-than
 OP___(gti,      55, Op2,  I,    1)  //   signed int greater-than
 OP___(lei,      56, Op2,  I,    1)  //   signed int less-than-or-equal