summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>2013-01-14 17:23:32 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-24 11:13:54 +0100
commit49fd16b31c8137ea50f06c0cf61f843f1d6f6116 (patch)
treec66c94b78792ecd162c3dccbadbee3c8ed306907
parent9ccf743c4ee38f228abeebb5a7cd5f8618f9a602 (diff)
downloadqtjsbackend-49fd16b31c8137ea50f06c0cf61f843f1d6f6116.tar.gz
[v8]: Implement missing bits of the QNX platform
The recent update of v8 added some functions that needed to be implemented, as otherwise v8 wouldn't compile anymore. Change-Id: Ic3d19f051059cb559b5cbab6d6c078df7627ea97 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
-rw-r--r--src/3rdparty/v8/src/platform-qnx.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/3rdparty/v8/src/platform-qnx.cc b/src/3rdparty/v8/src/platform-qnx.cc
index 4c36344..f0093c6 100644
--- a/src/3rdparty/v8/src/platform-qnx.cc
+++ b/src/3rdparty/v8/src/platform-qnx.cc
@@ -125,12 +125,15 @@ static bool CPUInfoContainsString(const char * search_string) {
bool OS::ArmCpuHasFeature(CpuFeature feature) {
switch (feature) {
+ case VFP2:
case VFP3:
// All shipping devices currently support this and QNX has no easy way to
// determine this at runtime.
return true;
case ARMv7:
return (SYSPAGE_ENTRY(cpuinfo)->flags & ARM_CPU_FLAG_V7) != 0;
+ case SUDIV:
+ return CPUInfoContainsString("idiva");
default:
UNREACHABLE();
}
@@ -138,6 +141,12 @@ bool OS::ArmCpuHasFeature(CpuFeature feature) {
return false;
}
+CpuImplementer OS::GetCpuImplementer() {
+ // We do NOT return QUALCOMM_IMPLEMENTER, even though /proc/cpuinfo
+ // has "CPU implementer : 0x51" in it, as that leads to a runtime
+ // error on the first JS function call.
+ return UNKNOWN_IMPLEMENTER;
+}
// Simple helper function to detect whether the C code is compiled with
// option -mfloat-abi=hard. The register d0 is loaded with 1.0 and the register
@@ -600,6 +609,10 @@ bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
return munmap(base, size) == 0;
}
+bool VirtualMemory::HasLazyCommits() {
+ return false;
+}
+
class Thread::PlatformData : public Malloced {
public: