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

Side by Side Diff: src/vm/tick_sampler_posix.cc

Issue 2006403003: [mips] Initial framework support for MIPS32 (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Code changes per review. Created 4 years, 7 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/vm/interpreter_mips.cc ('k') | src/vm/vm.gyp » ('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 (c) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #if defined(DARTINO_TARGET_OS_POSIX) 5 #if defined(DARTINO_TARGET_OS_POSIX)
6 6
7 #include "src/vm/tick_sampler.h" 7 #include "src/vm/tick_sampler.h"
8 8
9 #include <errno.h> 9 #include <errno.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #elif defined(DARTINO_TARGET_X64) 49 #elif defined(DARTINO_TARGET_X64)
50 sample->pc = bit_cast<word>(mcontext.gregs[REG_RIP]); 50 sample->pc = bit_cast<word>(mcontext.gregs[REG_RIP]);
51 sample->sp = bit_cast<word>(mcontext.gregs[REG_RSP]); 51 sample->sp = bit_cast<word>(mcontext.gregs[REG_RSP]);
52 sample->fp = bit_cast<word>(mcontext.gregs[REG_RBP]); 52 sample->fp = bit_cast<word>(mcontext.gregs[REG_RBP]);
53 ip = bit_cast<word>(mcontext.gregs[REG_RSI]); 53 ip = bit_cast<word>(mcontext.gregs[REG_RSI]);
54 #elif defined(DARTINO_TARGET_ARM) 54 #elif defined(DARTINO_TARGET_ARM)
55 sample->pc = bit_cast<word>(mcontext.arm_pc); 55 sample->pc = bit_cast<word>(mcontext.arm_pc);
56 sample->sp = bit_cast<word>(mcontext.arm_sp); 56 sample->sp = bit_cast<word>(mcontext.arm_sp);
57 sample->fp = bit_cast<word>(mcontext.arm_fp); 57 sample->fp = bit_cast<word>(mcontext.arm_fp);
58 ip = bit_cast<word>(mcontext.arm_r5); 58 ip = bit_cast<word>(mcontext.arm_r5);
59 #elif defined(DARTINO_TARGET_MIPS)
60 sample->pc = (word)mcontext.pc;
61 sample->sp = (word)mcontext.gregs[29];
62 sample->fp = (word)mcontext.gregs[30];
63 ip = (word)mcontext.gregs[17];
59 #else 64 #else
60 FATAL("HandleSignal not support on this platform"); 65 FATAL("HandleSignal not support on this platform");
61 #endif 66 #endif
62 #endif 67 #endif
63 #if defined(DARTINO_TARGET_OS_MACOS) 68 #if defined(DARTINO_TARGET_OS_MACOS)
64 #if defined(DARTINO_TARGET_IA32) 69 #if defined(DARTINO_TARGET_IA32)
65 sample->pc = bit_cast<word>(mcontext->__ss.__eip); 70 sample->pc = bit_cast<word>(mcontext->__ss.__eip);
66 sample->sp = bit_cast<word>(mcontext->__ss.__esp); 71 sample->sp = bit_cast<word>(mcontext->__ss.__esp);
67 sample->fp = bit_cast<word>(mcontext->__ss.__ebp); 72 sample->fp = bit_cast<word>(mcontext->__ss.__ebp);
68 ip = bit_cast<word>(mcontext->__ss.__esi); 73 ip = bit_cast<word>(mcontext->__ss.__esi);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 231 }
227 232
228 processor->Join(); 233 processor->Join();
229 delete queue; 234 delete queue;
230 delete processor; 235 delete processor;
231 } 236 }
232 237
233 } // namespace dartino 238 } // namespace dartino
234 239
235 #endif // DARTINO_TARGET_OS_POSIX 240 #endif // DARTINO_TARGET_OS_POSIX
OLDNEW
« no previous file with comments | « src/vm/interpreter_mips.cc ('k') | src/vm/vm.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698