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

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

Issue 207523005: ARM: Fix Q register encoding (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/arm/disasm-arm.cc ('k') | test/cctest/test-assembler-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3452 matching lines...) Expand 10 before | Expand all | Expand 10 after
3463 } 3463 }
3464 } 3464 }
3465 3465
3466 3466
3467 void Simulator::DecodeSpecialCondition(Instruction* instr) { 3467 void Simulator::DecodeSpecialCondition(Instruction* instr) {
3468 switch (instr->SpecialValue()) { 3468 switch (instr->SpecialValue()) {
3469 case 5: 3469 case 5:
3470 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) && 3470 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) &&
3471 (instr->Bit(4) == 1)) { 3471 (instr->Bit(4) == 1)) {
3472 // vmovl signed 3472 // vmovl signed
3473 int Vd = (instr->Bit(22) << 4) | instr->VdValue(); 3473 if ((instr->VdValue() & 1) != 0) UNIMPLEMENTED();
3474 int Vd = (instr->Bit(22) << 3) | (instr->VdValue() >> 1);
3474 int Vm = (instr->Bit(5) << 4) | instr->VmValue(); 3475 int Vm = (instr->Bit(5) << 4) | instr->VmValue();
3475 int imm3 = instr->Bits(21, 19); 3476 int imm3 = instr->Bits(21, 19);
3476 if ((imm3 != 1) && (imm3 != 2) && (imm3 != 4)) UNIMPLEMENTED(); 3477 if ((imm3 != 1) && (imm3 != 2) && (imm3 != 4)) UNIMPLEMENTED();
3477 int esize = 8 * imm3; 3478 int esize = 8 * imm3;
3478 int elements = 64 / esize; 3479 int elements = 64 / esize;
3479 int8_t from[8]; 3480 int8_t from[8];
3480 get_d_register(Vm, reinterpret_cast<uint64_t*>(from)); 3481 get_d_register(Vm, reinterpret_cast<uint64_t*>(from));
3481 int16_t to[8]; 3482 int16_t to[8];
3482 int e = 0; 3483 int e = 0;
3483 while (e < elements) { 3484 while (e < elements) {
3484 to[e] = from[e]; 3485 to[e] = from[e];
3485 e++; 3486 e++;
3486 } 3487 }
3487 set_q_register(Vd, reinterpret_cast<uint64_t*>(to)); 3488 set_q_register(Vd, reinterpret_cast<uint64_t*>(to));
3488 } else { 3489 } else {
3489 UNIMPLEMENTED(); 3490 UNIMPLEMENTED();
3490 } 3491 }
3491 break; 3492 break;
3492 case 7: 3493 case 7:
3493 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) && 3494 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) &&
3494 (instr->Bit(4) == 1)) { 3495 (instr->Bit(4) == 1)) {
3495 // vmovl unsigned 3496 // vmovl unsigned
3496 int Vd = (instr->Bit(22) << 4) | instr->VdValue(); 3497 if ((instr->VdValue() & 1) != 0) UNIMPLEMENTED();
3498 int Vd = (instr->Bit(22) << 3) | (instr->VdValue() >> 1);
3497 int Vm = (instr->Bit(5) << 4) | instr->VmValue(); 3499 int Vm = (instr->Bit(5) << 4) | instr->VmValue();
3498 int imm3 = instr->Bits(21, 19); 3500 int imm3 = instr->Bits(21, 19);
3499 if ((imm3 != 1) && (imm3 != 2) && (imm3 != 4)) UNIMPLEMENTED(); 3501 if ((imm3 != 1) && (imm3 != 2) && (imm3 != 4)) UNIMPLEMENTED();
3500 int esize = 8 * imm3; 3502 int esize = 8 * imm3;
3501 int elements = 64 / esize; 3503 int elements = 64 / esize;
3502 uint8_t from[8]; 3504 uint8_t from[8];
3503 get_d_register(Vm, reinterpret_cast<uint64_t*>(from)); 3505 get_d_register(Vm, reinterpret_cast<uint64_t*>(from));
3504 uint16_t to[8]; 3506 uint16_t to[8];
3505 int e = 0; 3507 int e = 0;
3506 while (e < elements) { 3508 while (e < elements) {
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
3850 uintptr_t address = *stack_slot; 3852 uintptr_t address = *stack_slot;
3851 set_register(sp, current_sp + sizeof(uintptr_t)); 3853 set_register(sp, current_sp + sizeof(uintptr_t));
3852 return address; 3854 return address;
3853 } 3855 }
3854 3856
3855 } } // namespace v8::internal 3857 } } // namespace v8::internal
3856 3858
3857 #endif // USE_SIMULATOR 3859 #endif // USE_SIMULATOR
3858 3860
3859 #endif // V8_TARGET_ARCH_ARM 3861 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/disasm-arm.cc ('k') | test/cctest/test-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698