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

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

Issue 23654005: ARM Bug fix: ConstantPoolSizeAt() (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updated Created 7 years, 3 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 | « no previous file | 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 // 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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 1651
1652 bool Decoder::IsConstantPoolAt(byte* instr_ptr) { 1652 bool Decoder::IsConstantPoolAt(byte* instr_ptr) {
1653 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr)); 1653 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr));
1654 return (instruction_bits & kConstantPoolMarkerMask) == kConstantPoolMarker; 1654 return (instruction_bits & kConstantPoolMarkerMask) == kConstantPoolMarker;
1655 } 1655 }
1656 1656
1657 1657
1658 int Decoder::ConstantPoolSizeAt(byte* instr_ptr) { 1658 int Decoder::ConstantPoolSizeAt(byte* instr_ptr) {
1659 if (IsConstantPoolAt(instr_ptr)) { 1659 if (IsConstantPoolAt(instr_ptr)) {
1660 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr)); 1660 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr));
1661 return DecodeConstantPoolLength(instruction_bits); 1661 return DecodeConstantPoolLength(instruction_bits) / Assembler::kInstrSize;
1662 } else { 1662 } else {
1663 return -1; 1663 return -1;
1664 } 1664 }
1665 } 1665 }
1666 1666
1667 1667
1668 // Disassemble the instruction at *instr_ptr into the output buffer. 1668 // Disassemble the instruction at *instr_ptr into the output buffer.
1669 int Decoder::InstructionDecode(byte* instr_ptr) { 1669 int Decoder::InstructionDecode(byte* instr_ptr) {
1670 Instruction* instr = Instruction::At(instr_ptr); 1670 Instruction* instr = Instruction::At(instr_ptr);
1671 // Print raw instruction bytes. 1671 // Print raw instruction bytes.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 v8::internal::PrintF( 1798 v8::internal::PrintF(
1799 f, "%p %08x %s\n", 1799 f, "%p %08x %s\n",
1800 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); 1800 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start());
1801 } 1801 }
1802 } 1802 }
1803 1803
1804 1804
1805 } // namespace disasm 1805 } // namespace disasm
1806 1806
1807 #endif // V8_TARGET_ARCH_ARM 1807 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698