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

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

Issue 2804005: [Isolates] Removal of miscellaneous statics from the backend. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/disassembler.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 void InstructionTable::AddJumpConditionalShort() { 235 void InstructionTable::AddJumpConditionalShort() {
236 for (byte b = 0x70; b <= 0x7F; b++) { 236 for (byte b = 0x70; b <= 0x7F; b++) {
237 InstructionDesc* id = &instructions_[b]; 237 InstructionDesc* id = &instructions_[b];
238 ASSERT_EQ(NO_INSTR, id->type); // Information not already entered. 238 ASSERT_EQ(NO_INSTR, id->type); // Information not already entered.
239 id->mnem = jump_conditional_mnem[b & 0x0F]; 239 id->mnem = jump_conditional_mnem[b & 0x0F];
240 id->type = JUMP_CONDITIONAL_SHORT_INSTR; 240 id->type = JUMP_CONDITIONAL_SHORT_INSTR;
241 } 241 }
242 } 242 }
243 243
244 244
245 // TODO(isolates): This appears to act morally as a constant. Is it safe?
245 static InstructionTable instruction_table; 246 static InstructionTable instruction_table;
246 247
247 248
248 // The IA32 disassembler implementation. 249 // The IA32 disassembler implementation.
249 class DisassemblerIA32 { 250 class DisassemblerIA32 {
250 public: 251 public:
251 DisassemblerIA32(const NameConverter& converter, 252 DisassemblerIA32(const NameConverter& converter,
252 bool abort_on_unimplemented = true) 253 bool abort_on_unimplemented = true)
253 : converter_(converter), 254 : converter_(converter),
254 tmp_buffer_pos_(0), 255 tmp_buffer_pos_(0),
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" 1382 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh"
1382 }; 1383 };
1383 1384
1384 1385
1385 static const char* xmm_regs[8] = { 1386 static const char* xmm_regs[8] = {
1386 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7" 1387 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
1387 }; 1388 };
1388 1389
1389 1390
1390 const char* NameConverter::NameOfAddress(byte* addr) const { 1391 const char* NameConverter::NameOfAddress(byte* addr) const {
1391 static v8::internal::EmbeddedVector<char, 32> tmp_buffer; 1392 v8::internal::OS::SNPrintF(tmp_buffer_, "%p", addr);
1392 v8::internal::OS::SNPrintF(tmp_buffer, "%p", addr); 1393 return tmp_buffer_.start();
1393 return tmp_buffer.start();
1394 } 1394 }
1395 1395
1396 1396
1397 const char* NameConverter::NameOfConstant(byte* addr) const { 1397 const char* NameConverter::NameOfConstant(byte* addr) const {
1398 return NameOfAddress(addr); 1398 return NameOfAddress(addr);
1399 } 1399 }
1400 1400
1401 1401
1402 const char* NameConverter::NameOfCPURegister(int reg) const { 1402 const char* NameConverter::NameOfCPURegister(int reg) const {
1403 if (0 <= reg && reg < 8) return cpu_regs[reg]; 1403 if (0 <= reg && reg < 8) return cpu_regs[reg];
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 fprintf(f, " "); 1462 fprintf(f, " ");
1463 } 1463 }
1464 fprintf(f, " %s\n", buffer.start()); 1464 fprintf(f, " %s\n", buffer.start());
1465 } 1465 }
1466 } 1466 }
1467 1467
1468 1468
1469 } // namespace disasm 1469 } // namespace disasm
1470 1470
1471 #endif // V8_TARGET_ARCH_IA32 1471 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/disassembler.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698