Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
v8: Relax requirement from VFP3 to VFP2 where possible.
Browse files Browse the repository at this point in the history
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10818026

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@12194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
  • Loading branch information
hashseed authored and TooTallNate committed Sep 13, 2012
1 parent 451ff15 commit 25c2940
Show file tree
Hide file tree
Showing 14 changed files with 192 additions and 165 deletions.
12 changes: 9 additions & 3 deletions deps/v8/build/common.gypi
Expand Up @@ -48,7 +48,8 @@
# both for the snapshot and for the ARM target. Leaving the default value
# of 'false' will avoid VFP instructions in the snapshot and use CPU feature
# probing when running on the target.
'v8_can_use_vfp_instructions%': 'false',
'v8_can_use_vfp2_instructions%': 'false',
'v8_can_use_vfp3_instructions%': 'false',

# Similar to vfp but on MIPS.
'v8_can_use_fpu_instructions%': 'true',
Expand Down Expand Up @@ -125,9 +126,14 @@
'CAN_USE_UNALIGNED_ACCESSES=0',
],
}],
[ 'v8_can_use_vfp_instructions=="true"', {
[ 'v8_can_use_vfp2_instructions=="true"', {
'defines': [
'CAN_USE_VFP_INSTRUCTIONS',
'CAN_USE_VFP2_INSTRUCTIONS',
],
}],
[ 'v8_can_use_vfp3_instructions=="true"', {
'defines': [
'CAN_USE_VFP3_INSTRUCTIONS',
],
}],
[ 'v8_use_arm_eabi_hardfloat=="true"', {
Expand Down
108 changes: 59 additions & 49 deletions deps/v8/src/arm/assembler-arm.cc

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions deps/v8/src/arm/assembler-arm.h
Expand Up @@ -510,6 +510,7 @@ class CpuFeatures : public AllStatic {
static bool IsSupported(CpuFeature f) {
ASSERT(initialized_);
if (f == VFP3 && !FLAG_enable_vfp3) return false;
if (f == VFP2 && !FLAG_enable_vfp2) return false;
return (supported_ & (1u << f)) != 0;
}

Expand All @@ -535,6 +536,8 @@ class CpuFeatures : public AllStatic {
public:
explicit Scope(CpuFeature f) {
unsigned mask = 1u << f;
// VFP2 and ARMv7 are implied by VFP3.
if (f == VFP3) mask |= 1u << VFP2 | 1u << ARMv7;
ASSERT(CpuFeatures::IsSupported(f));
ASSERT(!Serializer::enabled() ||
(CpuFeatures::found_by_runtime_probing_ & mask) == 0);
Expand Down
5 changes: 1 addition & 4 deletions deps/v8/src/arm/builtins-arm.cc
Expand Up @@ -1246,10 +1246,7 @@ void Builtins::Generate_NotifyOSR(MacroAssembler* masm) {

void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
CpuFeatures::TryForceFeatureScope scope(VFP3);
if (!CpuFeatures::IsSupported(VFP3)) {
__ Abort("Unreachable code: Cannot optimize without VFP3 support.");
return;
}
ASSERT(CPU::SupportsCrankshaft());

// Lookup the function in the JavaScript frame and push it as an
// argument to the on-stack replacement function.
Expand Down

0 comments on commit 25c2940

Please sign in to comment.