diff -Nru libv8-3.8.9.20/debian/changelog libv8-3.8.9.20/debian/changelog --- libv8-3.8.9.20/debian/changelog 2012-04-27 22:56:19.000000000 +0100 +++ libv8-3.8.9.20/debian/changelog 2012-06-30 21:10:49.000000000 +0100 @@ -1,3 +1,11 @@ +libv8 (3.8.9.20-1+rpi1) wheezy; urgency=low + + * Non-maintainer upload. + * Modified to produce code compatible with armv6 on Raspberry Pi. + * Changes modeled on: https://codereview.qt-project.org/#change,27256 + + -- Mike Thompson Sat, 30 Jun 2012 13:09:38 -0700 + libv8 (3.8.9.20-1) unstable; urgency=low [ Jérémy Lal ] diff -Nru libv8-3.8.9.20/debian/patches/armv6_for_rpi.diff libv8-3.8.9.20/debian/patches/armv6_for_rpi.diff --- libv8-3.8.9.20/debian/patches/armv6_for_rpi.diff 1970-01-01 01:00:00.000000000 +0100 +++ libv8-3.8.9.20/debian/patches/armv6_for_rpi.diff 2012-06-30 21:08:37.000000000 +0100 @@ -0,0 +1,164 @@ +--- a/src/arm/assembler-arm.cc ++++ b/src/arm/assembler-arm.cc +@@ -61,7 +61,8 @@ + answer |= 1u << ARMv7; + #endif // def CAN_USE_ARMV7_INSTRUCTIONS + #ifdef CAN_USE_VFP_INSTRUCTIONS +- answer |= 1u << VFP3 | 1u << ARMv7; ++ // RPI answer |= 1u << VFP3 | 1u << ARMv7; ++ answer |= 1u << VFP2; + #endif // def CAN_USE_VFP_INSTRUCTIONS + + #ifdef __arm__ +@@ -69,7 +70,8 @@ + // generation even when generating snapshots. This won't work for cross + // compilation. VFPv3 implies ARMv7, see ARM DDI 0406B, page A1-6. + #if defined(__VFP_FP__) && !defined(__SOFTFP__) +- answer |= 1u << VFP3 | 1u << ARMv7; ++ // RPI answer |= 1u << VFP3 | 1u << ARMv7; ++ answer |= 1u << VFP2; + #endif // defined(__VFP_FP__) && !defined(__SOFTFP__) + #endif // def __arm__ + +@@ -99,25 +101,28 @@ + // For the simulator=arm build, use VFP when FLAG_enable_vfp3 is + // enabled. VFPv3 implies ARMv7, see ARM DDI 0406B, page A1-6. + if (FLAG_enable_vfp3) { +- supported_ |= 1u << VFP3 | 1u << ARMv7; ++ // RPI supported_ |= 1u << VFP3 | 1u << ARMv7; ++ supported_ |= 1u << VFP2; + } + // For the simulator=arm build, use ARMv7 when FLAG_enable_armv7 is enabled + if (FLAG_enable_armv7) { +- supported_ |= 1u << ARMv7; ++ // RPI supported_ |= 1u << ARMv7; + } + #else // def __arm__ + // Probe for additional features not already known to be available. +- if (!IsSupported(VFP3) && OS::ArmCpuHasFeature(VFP3)) { ++ if (!IsSupported(VFP2) && OS::ArmCpuHasFeature(VFP2)) { + // This implementation also sets the VFP flags if runtime + // detection of VFP returns true. VFPv3 implies ARMv7, see ARM DDI + // 0406B, page A1-6. +- supported_ |= 1u << VFP3 | 1u << ARMv7; +- found_by_runtime_probing_ |= 1u << VFP3 | 1u << ARMv7; ++ // RPI supported_ |= 1u << VFP3 | 1u << ARMv7; ++ // RPI found_by_runtime_probing_ |= 1u << VFP3 | 1u << ARMv7; ++ supported_ |= 1u << VFP2; ++ found_by_runtime_probing_ |= 1u << VFP2; + } + + if (!IsSupported(ARMv7) && OS::ArmCpuHasFeature(ARMv7)) { +- supported_ |= 1u << ARMv7; +- found_by_runtime_probing_ |= 1u << ARMv7; ++ // RPI supported_ |= 1u << ARMv7; ++ // found_by_runtime_probing_ |= 1u << ARMv7; + } + #endif + } +@@ -1739,7 +1744,8 @@ + // Instruction details available in ARM DDI 0406A, A8-786. + // cond(31-28) | 1101(27-24)| U000(23-20) | | Rbase(19-16) | + // Vsrc(15-12) | 1011(11-8) | (offset/4) +- ASSERT(CpuFeatures::IsEnabled(VFP3)); ++ // RPI ASSERT(CpuFeatures::IsEnabled(VFP3)); ++ ASSERT(CpuFeatures::IsEnabled(VFP3) || CpuFeatures::IsEnabled(VFP2)); + int u = 1; + if (offset < 0) { + offset = -offset; +@@ -2025,7 +2031,8 @@ + // Instruction details available in ARM DDI 0406A, A8-646. + // cond(31-28) | 1100(27-24)| 010(23-21) | op=0(20) | Rt2(19-16) | + // Rt(15-12) | 1011(11-8) | 00(7-6) | M(5) | 1(4) | Vm +- ASSERT(CpuFeatures::IsEnabled(VFP3)); ++ // RPI ASSERT(CpuFeatures::IsEnabled(VFP3)); ++ ASSERT(CpuFeatures::IsEnabled(VFP3) || CpuFeatures::IsEnabled(VFP2)); + ASSERT(!src1.is(pc) && !src2.is(pc)); + emit(cond | 0xC*B24 | B22 | src2.code()*B16 | + src1.code()*B12 | 0xB*B8 | B4 | dst.code()); +--- a/src/arm/code-stubs-arm.cc ++++ b/src/arm/code-stubs-arm.cc +@@ -992,7 +992,7 @@ + __ push(lr); + __ PrepareCallCFunction(0, 2, scratch); + if (masm->use_eabi_hardfloat()) { +- CpuFeatures::Scope scope(VFP3); ++ CpuFeatures::Scope scope(VFP2); + __ vmov(d0, r0, r1); + __ vmov(d1, r2, r3); + } +@@ -1004,7 +1004,7 @@ + // Store answer in the overwritable heap number. Double returned in + // registers r0 and r1 or in d0. + if (masm->use_eabi_hardfloat()) { +- CpuFeatures::Scope scope(VFP3); ++ CpuFeatures::Scope scope(VFP2); + __ vstr(d0, + FieldMemOperand(heap_number_result, HeapNumber::kValueOffset)); + } else { +@@ -1376,7 +1376,7 @@ + __ push(lr); + __ PrepareCallCFunction(0, 2, r5); + if (masm->use_eabi_hardfloat()) { +- CpuFeatures::Scope scope(VFP3); ++ CpuFeatures::Scope scope(VFP2); + __ vmov(d0, r0, r1); + __ vmov(d1, r2, r3); + } +@@ -3404,7 +3404,7 @@ + + __ push(lr); + __ PrepareCallCFunction(0, 1, scratch); +- if (masm->use_eabi_hardfloat()) { ++ if (masm->use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) { + __ vmov(d0, d2); + } else { + __ vmov(r0, r1, d2); +--- a/src/arm/macro-assembler-arm.cc ++++ b/src/arm/macro-assembler-arm.cc +@@ -930,7 +930,7 @@ + } + + void MacroAssembler::GetCFunctionDoubleResult(const DoubleRegister dst) { +- if (use_eabi_hardfloat()) { ++ if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) { + Move(dst, d0); + } else { + vmov(dst, r0, r1); +@@ -3281,7 +3281,7 @@ + + + void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg) { +- if (use_eabi_hardfloat()) { ++ if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) { + Move(d0, dreg); + } else { + vmov(r0, r1, dreg); +@@ -3291,7 +3291,7 @@ + + void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg1, + DoubleRegister dreg2) { +- if (use_eabi_hardfloat()) { ++ if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) { + if (dreg2.is(d0)) { + ASSERT(!dreg1.is(d1)); + Move(d1, dreg2); +@@ -3309,7 +3309,7 @@ + + void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg, + Register reg) { +- if (use_eabi_hardfloat()) { ++ if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) { + Move(d0, dreg); + Move(r0, reg); + } else { +--- a/src/v8globals.h ++++ b/src/v8globals.h +@@ -437,6 +437,7 @@ + RDTSC = 4, // x86 + CPUID = 10, // x86 + VFP3 = 1, // ARM ++ VFP2 = 4, // ARM + ARMv7 = 2, // ARM + SAHF = 0, // x86 + FPU = 1}; // MIPS diff -Nru libv8-3.8.9.20/debian/patches/series libv8-3.8.9.20/debian/patches/series --- libv8-3.8.9.20/debian/patches/series 2012-04-27 22:47:50.000000000 +0100 +++ libv8-3.8.9.20/debian/patches/series 2012-06-30 20:39:51.000000000 +0100 @@ -2,3 +2,4 @@ 0011_use_system_gyp.patch 0014_disable_cross_build.patch issue9316131_5001.diff +armv6_for_rpi.diff