Index: src/arm/simulator-arm.cc |
=================================================================== |
--- src/arm/simulator-arm.cc (revision 4358) |
+++ src/arm/simulator-arm.cc (working copy) |
@@ -1465,6 +1465,50 @@ |
} |
return; |
} |
+ } else if ((type == 0) && instr->IsMiscType0()) { |
+ if (instr->Bits(22, 21) == 1) { |
+ int rm = instr->RmField(); |
+ switch (instr->Bits(7, 4)) { |
+ case BX: |
+ set_pc(get_register(rm)); |
+ break; |
+ case BLX: { |
+ uint32_t old_pc = get_pc(); |
+ set_pc(get_register(rm)); |
+ set_register(lr, old_pc + Instr::kInstrSize); |
+ break; |
+ } |
+ case BKPT: |
+ v8::internal::OS::DebugBreak(); |
+ break; |
+ default: |
+ UNIMPLEMENTED(); |
+ } |
+ } else if (instr->Bits(22, 21) == 3) { |
+ int rm = instr->RmField(); |
+ int rd = instr->RdField(); |
+ switch (instr->Bits(7, 4)) { |
+ case CLZ: { |
+ uint32_t bits = get_register(rm); |
+ int leading_zeros = 0; |
+ if (bits == 0) { |
+ leading_zeros = 32; |
+ } else { |
+ while ((bits & 0x80000000u) == 0) { |
+ bits <<= 1; |
+ leading_zeros++; |
+ } |
+ } |
+ set_register(rd, leading_zeros); |
+ break; |
+ } |
+ default: |
+ UNIMPLEMENTED(); |
+ } |
+ } else { |
+ PrintF("%08x\n", instr->InstructionBits()); |
+ UNIMPLEMENTED(); |
+ } |
} else { |
int rd = instr->RdField(); |
int rn = instr->RnField(); |
@@ -1582,21 +1626,7 @@ |
SetNZFlags(alu_out); |
SetCFlag(shifter_carry_out); |
} else { |
- ASSERT(type == 0); |
- int rm = instr->RmField(); |
- switch (instr->Bits(7, 4)) { |
- case BX: |
- set_pc(get_register(rm)); |
- break; |
- case BLX: { |
- uint32_t old_pc = get_pc(); |
- set_pc(get_register(rm)); |
- set_register(lr, old_pc + Instr::kInstrSize); |
- break; |
- } |
- default: |
- UNIMPLEMENTED(); |
- } |
+ UNIMPLEMENTED(); |
Erik Corry
2010/04/08 12:56:30
UNREACHABLE
Søren Thygesen Gjesse
2010/04/08 13:29:06
Done.
|
} |
break; |
} |
@@ -1624,27 +1654,7 @@ |
SetCFlag(!CarryFrom(rn_val, shifter_operand)); |
SetVFlag(OverflowFrom(alu_out, rn_val, shifter_operand, true)); |
} else { |
- ASSERT(type == 0); |
- int rm = instr->RmField(); |
- int rd = instr->RdField(); |
- switch (instr->Bits(7, 4)) { |
- case CLZ: { |
- uint32_t bits = get_register(rm); |
- int leading_zeros = 0; |
- if (bits == 0) { |
- leading_zeros = 32; |
- } else { |
- while ((bits & 0x80000000u) == 0) { |
- bits <<= 1; |
- leading_zeros++; |
- } |
- } |
- set_register(rd, leading_zeros); |
- break; |
- } |
- default: |
- UNIMPLEMENTED(); |
- } |
+ UNIMPLEMENTED(); |
Erik Corry
2010/04/08 12:56:30
&here
Søren Thygesen Gjesse
2010/04/08 13:29:06
Done.
|
} |
break; |
} |