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

Side by Side Diff: src/platform-linux.cc

Issue 148913008: A64: Fix some compile errors when building for Android. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Address comments 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/platform-freebsd.cc ('k') | src/sampler.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include <sys/stat.h> // open 51 #include <sys/stat.h> // open
52 #include <fcntl.h> // open 52 #include <fcntl.h> // open
53 #include <unistd.h> // sysconf 53 #include <unistd.h> // sysconf
54 #include <strings.h> // index 54 #include <strings.h> // index
55 #include <errno.h> 55 #include <errno.h>
56 #include <stdarg.h> 56 #include <stdarg.h>
57 57
58 // GLibc on ARM defines mcontext_t has a typedef for 'struct sigcontext'. 58 // GLibc on ARM defines mcontext_t has a typedef for 'struct sigcontext'.
59 // Old versions of the C library <signal.h> didn't define the type. 59 // Old versions of the C library <signal.h> didn't define the type.
60 #if defined(__ANDROID__) && !defined(__BIONIC_HAVE_UCONTEXT_T) && \ 60 #if defined(__ANDROID__) && !defined(__BIONIC_HAVE_UCONTEXT_T) && \
61 defined(__arm__) && !defined(__BIONIC_HAVE_STRUCT_SIGCONTEXT) 61 (defined(__arm__) || defined(__aarch64__)) && \
62 !defined(__BIONIC_HAVE_STRUCT_SIGCONTEXT)
62 #include <asm/sigcontext.h> 63 #include <asm/sigcontext.h>
63 #endif 64 #endif
64 65
65 #undef MAP_TYPE 66 #undef MAP_TYPE
66 67
67 #include "v8.h" 68 #include "v8.h"
68 69
69 #include "platform-posix.h" 70 #include "platform-posix.h"
70 #include "platform.h" 71 #include "platform.h"
71 #include "v8threads.h" 72 #include "v8threads.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 if (FLAG_break_on_abort) { 432 if (FLAG_break_on_abort) {
432 DebugBreak(); 433 DebugBreak();
433 } 434 }
434 abort(); 435 abort();
435 } 436 }
436 437
437 438
438 void OS::DebugBreak() { 439 void OS::DebugBreak() {
439 // TODO(lrn): Introduce processor define for runtime system (!= V8_ARCH_x, 440 // TODO(lrn): Introduce processor define for runtime system (!= V8_ARCH_x,
440 // which is the architecture of generated code). 441 // which is the architecture of generated code).
441 #if defined(__aarch64__) 442 #if defined(__arm__) || defined(__thumb__)
442 asm("hlt 0");
443 #elif defined(__arm__) || defined(__thumb__)
444 asm("bkpt 0"); 443 asm("bkpt 0");
444 #elif defined(__aarch64__)
445 asm("brk 0");
445 #elif defined(__mips__) 446 #elif defined(__mips__)
446 asm("break"); 447 asm("break");
447 #elif defined(__native_client__) 448 #elif defined(__native_client__)
448 asm("hlt"); 449 asm("hlt");
449 #else 450 #else
450 asm("int $3"); 451 asm("int $3");
451 #endif 452 #endif
452 } 453 }
453 454
454 455
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 limit_mutex = CreateMutex(); 939 limit_mutex = CreateMutex();
939 } 940 }
940 941
941 942
942 void OS::TearDown() { 943 void OS::TearDown() {
943 delete limit_mutex; 944 delete limit_mutex;
944 } 945 }
945 946
946 947
947 } } // namespace v8::internal 948 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/sampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698