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

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

Issue 157503002: A64: Synchronize with r18444. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/code-stubs-arm.cc ('k') | src/arm/cpu-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 19 matching lines...) Expand all
30 #if V8_TARGET_ARCH_ARM 30 #if V8_TARGET_ARCH_ARM
31 31
32 #include "codegen.h" 32 #include "codegen.h"
33 #include "macro-assembler.h" 33 #include "macro-assembler.h"
34 #include "simulator-arm.h" 34 #include "simulator-arm.h"
35 35
36 namespace v8 { 36 namespace v8 {
37 namespace internal { 37 namespace internal {
38 38
39 39
40 UnaryMathFunction CreateTranscendentalFunction(TranscendentalCache::Type type) {
41 switch (type) {
42 case TranscendentalCache::LOG: return &log;
43 default: UNIMPLEMENTED();
44 }
45 return NULL;
46 }
47
48
49 #define __ masm. 40 #define __ masm.
50 41
51 42
52 #if defined(USE_SIMULATOR) 43 #if defined(USE_SIMULATOR)
53 byte* fast_exp_arm_machine_code = NULL; 44 byte* fast_exp_arm_machine_code = NULL;
54 double fast_exp_simulator(double x) { 45 double fast_exp_simulator(double x) {
55 return Simulator::current(Isolate::Current())->CallFPReturnsDouble( 46 return Simulator::current(Isolate::Current())->CallFPReturnsDouble(
56 fast_exp_arm_machine_code, x, 0); 47 fast_exp_arm_machine_code, x, 0);
57 } 48 }
58 #endif 49 #endif
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 __ b(&done); 817 __ b(&done);
827 818
828 __ bind(&infinity); 819 __ bind(&infinity);
829 __ vldr(result, ExpConstant(2, temp3)); 820 __ vldr(result, ExpConstant(2, temp3));
830 821
831 __ bind(&done); 822 __ bind(&done);
832 } 823 }
833 824
834 #undef __ 825 #undef __
835 826
827 #ifdef DEBUG
836 // add(r0, pc, Operand(-8)) 828 // add(r0, pc, Operand(-8))
837 static const uint32_t kCodeAgePatchFirstInstruction = 0xe24f0008; 829 static const uint32_t kCodeAgePatchFirstInstruction = 0xe24f0008;
830 #endif
838 831
839 static byte* GetNoCodeAgeSequence(uint32_t* length) { 832 static byte* GetNoCodeAgeSequence(uint32_t* length) {
840 // The sequence of instructions that is patched out for aging code is the 833 // The sequence of instructions that is patched out for aging code is the
841 // following boilerplate stack-building prologue that is found in FUNCTIONS 834 // following boilerplate stack-building prologue that is found in FUNCTIONS
842 static bool initialized = false; 835 static bool initialized = false;
843 static uint32_t sequence[kNoCodeAgeSequenceLength]; 836 static uint32_t sequence[kNoCodeAgeSequenceLength];
844 byte* byte_sequence = reinterpret_cast<byte*>(sequence); 837 byte* byte_sequence = reinterpret_cast<byte*>(sequence);
845 *length = kNoCodeAgeSequenceLength * Assembler::kInstrSize; 838 *length = kNoCodeAgeSequenceLength * Assembler::kInstrSize;
846 if (!initialized) { 839 if (!initialized) {
847 CodePatcher patcher(byte_sequence, kNoCodeAgeSequenceLength); 840 CodePatcher patcher(byte_sequence, kNoCodeAgeSequenceLength);
848 PredictableCodeSizeScope scope(patcher.masm(), *length); 841 PredictableCodeSizeScope scope(patcher.masm(), *length);
849 patcher.masm()->stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); 842 patcher.masm()->PushFixedFrame(r1);
850 patcher.masm()->nop(ip.code()); 843 patcher.masm()->nop(ip.code());
851 patcher.masm()->add(fp, sp, 844 patcher.masm()->add(fp, sp,
852 Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); 845 Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
853 initialized = true; 846 initialized = true;
854 } 847 }
855 return byte_sequence; 848 return byte_sequence;
856 } 849 }
857 850
858 851
859 bool Code::IsYoungSequence(byte* sequence) { 852 bool Code::IsYoungSequence(byte* sequence) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 patcher.masm()->add(r0, pc, Operand(-8)); 888 patcher.masm()->add(r0, pc, Operand(-8));
896 patcher.masm()->ldr(pc, MemOperand(pc, -4)); 889 patcher.masm()->ldr(pc, MemOperand(pc, -4));
897 patcher.masm()->emit_code_stub_address(stub); 890 patcher.masm()->emit_code_stub_address(stub);
898 } 891 }
899 } 892 }
900 893
901 894
902 } } // namespace v8::internal 895 } } // namespace v8::internal
903 896
904 #endif // V8_TARGET_ARCH_ARM 897 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/cpu-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698