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

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

Issue 223623003: Fix fixed-point vcvt_f64_s32 immediate value encoding (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Reorder bits for clarity Created 6 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/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 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after
2929 double dd_value = -dm_value; 2929 double dd_value = -dm_value;
2930 dd_value = canonicalizeNaN(dd_value); 2930 dd_value = canonicalizeNaN(dd_value);
2931 set_d_register_from_double(vd, dd_value); 2931 set_d_register_from_double(vd, dd_value);
2932 } else if ((instr->Opc2Value() == 0x7) && (instr->Opc3Value() == 0x3)) { 2932 } else if ((instr->Opc2Value() == 0x7) && (instr->Opc3Value() == 0x3)) {
2933 DecodeVCVTBetweenDoubleAndSingle(instr); 2933 DecodeVCVTBetweenDoubleAndSingle(instr);
2934 } else if ((instr->Opc2Value() == 0x8) && (instr->Opc3Value() & 0x1)) { 2934 } else if ((instr->Opc2Value() == 0x8) && (instr->Opc3Value() & 0x1)) {
2935 DecodeVCVTBetweenFloatingPointAndInteger(instr); 2935 DecodeVCVTBetweenFloatingPointAndInteger(instr);
2936 } else if ((instr->Opc2Value() == 0xA) && (instr->Opc3Value() == 0x3) && 2936 } else if ((instr->Opc2Value() == 0xA) && (instr->Opc3Value() == 0x3) &&
2937 (instr->Bit(8) == 1)) { 2937 (instr->Bit(8) == 1)) {
2938 // vcvt.f64.s32 Dd, Dd, #<fbits> 2938 // vcvt.f64.s32 Dd, Dd, #<fbits>
2939 int fraction_bits = 32 - ((instr->Bit(5) << 4) | instr->Bits(3, 0)); 2939 int fraction_bits = 32 - ((instr->Bits(3, 0) << 1) | instr->Bit(5));
2940 int fixed_value = get_sinteger_from_s_register(vd * 2); 2940 int fixed_value = get_sinteger_from_s_register(vd * 2);
2941 double divide = 1 << fraction_bits; 2941 double divide = 1 << fraction_bits;
2942 set_d_register_from_double(vd, fixed_value / divide); 2942 set_d_register_from_double(vd, fixed_value / divide);
2943 } else if (((instr->Opc2Value() >> 1) == 0x6) && 2943 } else if (((instr->Opc2Value() >> 1) == 0x6) &&
2944 (instr->Opc3Value() & 0x1)) { 2944 (instr->Opc3Value() & 0x1)) {
2945 DecodeVCVTBetweenFloatingPointAndInteger(instr); 2945 DecodeVCVTBetweenFloatingPointAndInteger(instr);
2946 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) && 2946 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) &&
2947 (instr->Opc3Value() & 0x1)) { 2947 (instr->Opc3Value() & 0x1)) {
2948 DecodeVCMP(instr); 2948 DecodeVCMP(instr);
2949 } else if (((instr->Opc2Value() == 0x1)) && (instr->Opc3Value() == 0x3)) { 2949 } else if (((instr->Opc2Value() == 0x1)) && (instr->Opc3Value() == 0x3)) {
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
3852 uintptr_t address = *stack_slot; 3852 uintptr_t address = *stack_slot;
3853 set_register(sp, current_sp + sizeof(uintptr_t)); 3853 set_register(sp, current_sp + sizeof(uintptr_t));
3854 return address; 3854 return address;
3855 } 3855 }
3856 3856
3857 } } // namespace v8::internal 3857 } } // namespace v8::internal
3858 3858
3859 #endif // USE_SIMULATOR 3859 #endif // USE_SIMULATOR
3860 3860
3861 #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