Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: src/x64/disasm-x64.cc

Issue 1875323002: Fix testing of the VEX.L (128/256-bit) flag in the x64 disassembler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add me (addaleax@gmail.com) to the AUTHORS file Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/disasm-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <assert.h> 5 #include <assert.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #if V8_TARGET_ARCH_X64 9 #if V8_TARGET_ARCH_X64
10 10
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 bool rex_w() { return (rex_ & 0x08) != 0; } 352 bool rex_w() { return (rex_ & 0x08) != 0; }
353 353
354 bool vex_w() { 354 bool vex_w() {
355 DCHECK(vex_byte0_ == VEX3_PREFIX || vex_byte0_ == VEX2_PREFIX); 355 DCHECK(vex_byte0_ == VEX3_PREFIX || vex_byte0_ == VEX2_PREFIX);
356 return vex_byte0_ == VEX3_PREFIX ? (vex_byte2_ & 0x80) != 0 : false; 356 return vex_byte0_ == VEX3_PREFIX ? (vex_byte2_ & 0x80) != 0 : false;
357 } 357 }
358 358
359 bool vex_128() { 359 bool vex_128() {
360 DCHECK(vex_byte0_ == VEX3_PREFIX || vex_byte0_ == VEX2_PREFIX); 360 DCHECK(vex_byte0_ == VEX3_PREFIX || vex_byte0_ == VEX2_PREFIX);
361 byte checked = vex_byte0_ == VEX3_PREFIX ? vex_byte2_ : vex_byte1_; 361 byte checked = vex_byte0_ == VEX3_PREFIX ? vex_byte2_ : vex_byte1_;
362 return (checked & 4) != 1; 362 return (checked & 4) == 0;
363 } 363 }
364 364
365 bool vex_none() { 365 bool vex_none() {
366 DCHECK(vex_byte0_ == VEX3_PREFIX || vex_byte0_ == VEX2_PREFIX); 366 DCHECK(vex_byte0_ == VEX3_PREFIX || vex_byte0_ == VEX2_PREFIX);
367 byte checked = vex_byte0_ == VEX3_PREFIX ? vex_byte2_ : vex_byte1_; 367 byte checked = vex_byte0_ == VEX3_PREFIX ? vex_byte2_ : vex_byte1_;
368 return (checked & 3) == 0; 368 return (checked & 3) == 0;
369 } 369 }
370 370
371 bool vex_66() { 371 bool vex_66() {
372 DCHECK(vex_byte0_ == VEX3_PREFIX || vex_byte0_ == VEX2_PREFIX); 372 DCHECK(vex_byte0_ == VEX3_PREFIX || vex_byte0_ == VEX2_PREFIX);
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2502 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { 2502 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) {
2503 fprintf(f, " "); 2503 fprintf(f, " ");
2504 } 2504 }
2505 fprintf(f, " %s\n", buffer.start()); 2505 fprintf(f, " %s\n", buffer.start());
2506 } 2506 }
2507 } 2507 }
2508 2508
2509 } // namespace disasm 2509 } // namespace disasm
2510 2510
2511 #endif // V8_TARGET_ARCH_X64 2511 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/disasm-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698