Fix warnings about tautological compares by recent Clang versions.

This fixes the following Clang warnings:

../../v8/src/ia32/assembler-ia32.cc:1504:24: warning: comparison of constant 16 with expression of type 'v8::internal::Condition' is always true [-Wtautological-constant-out-of-range-compare]
  ASSERT(0 <= cc && cc < 16);
  ~~~~~~~~~~~~~~~~~~~~~^~~~~

../../v8/src/ia32/assembler-ia32.cc:1536:27: warning: comparison of constant 16 with expression of type 'v8::internal::Condition' is always true [-Wtautological-constant-out-of-range-compare]
  ASSERT((0 <= cc) && (cc < 16));
  ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~

BUG=crbug.com/151927

Review URL: https://chromiumcodereview.appspot.com/11225030
Patch from Hans Wennborg <hans@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12792 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ulan@chromium.org 2012-10-22 15:59:58 +00:00
parent d247c5e6c7
commit 3c864d3e79

View File

@ -1501,7 +1501,7 @@ void Assembler::jmp(Handle<Code> code, RelocInfo::Mode rmode) {
void Assembler::j(Condition cc, Label* L, Label::Distance distance) {
EnsureSpace ensure_space(this);
ASSERT(0 <= cc && cc < 16);
ASSERT(0 <= cc && static_cast<int>(cc) < 16);
if (L->is_bound()) {
const int short_size = 2;
const int long_size = 6;
@ -1533,7 +1533,7 @@ void Assembler::j(Condition cc, Label* L, Label::Distance distance) {
void Assembler::j(Condition cc, byte* entry, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this);
ASSERT((0 <= cc) && (cc < 16));
ASSERT((0 <= cc) && (static_cast<int>(cc) < 16));
// 0000 1111 1000 tttn #32-bit disp.
EMIT(0x0F);
EMIT(0x80 | cc);